diff --git a/BUILD.gn b/BUILD.gn index 8045dc8..cefda89 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -566,7 +566,9 @@ deps += [ "//extensions/shell:app_shell" ] } - if (enable_nacl) { + # TODO(https://crbug.com/1299021): Implement building these NaCl targets + # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (enable_nacl && target_cpu != "arm64") { deps += [ "//components/nacl/loader:nacl_loader_unittests" ] if (is_linux || is_chromeos) { @@ -787,7 +789,8 @@ } } - if (enable_nacl) { + # TODO(https://crbug.com/1299021): Remove the special case for arm64. + if (enable_nacl && target_cpu != "arm64") { deps += [ "//native_client_sdk/src:nacl_core_sdk" ] } @@ -1189,7 +1192,10 @@ } if (is_mac) { - data += [ "//third_party/apache-mac/" ] + data += [ + "//third_party/apache-mac/", + "//third_party/apache-mac-arm64/", + ] } if (is_android) {
diff --git a/DEPS b/DEPS index 08f1947..9fc2888 100644 --- a/DEPS +++ b/DEPS
@@ -253,7 +253,7 @@ # 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': '567e97899ec479f4870139c2c7400e2bbe14f6d4', + 'skia_revision': '357881bc95a9bea30591a380df18ac8235c432fe', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. @@ -261,11 +261,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '09f55382dac4e57d820746bcc742202ef73f05ae', + 'angle_revision': '73ec28af7ab9cef5624474ea975daa2c2c10cb5c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. - 'swiftshader_revision': 'dc3b5e209ef1fbeb2ca604ff4ec38eb86b5f8640', + 'swiftshader_revision': '33b068cc682bfb0034d9f552e7a6858acd21199a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -328,7 +328,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': '4a780350796eb1fcef2efa7de54ce3220c5914f1', + 'devtools_frontend_revision': 'd4240f8bc96a3ebd2dc2a5b316fd41c24e20fb3c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -523,10 +523,23 @@ 'condition': '(host_os == "linux")', }, + # We don't know target_cpu at deps time. At least until there's a universal + # binary of httpd-php, pull both intel and arm versions in DEPS and then pick + # the right one at runtime. 'src/third_party/apache-mac': { 'packages': [ { - 'package': 'infra/3pp/tools/httpd-php/${{platform}}', + 'package': 'infra/3pp/tools/httpd-php/mac-amd64', + 'version': 'version:2@httpd2.4.38.php7.3.31.chromium.2', + }, + ], + 'dep_type': 'cipd', + 'condition': '(host_os == "mac")', + }, + 'src/third_party/apache-mac-arm64': { + 'packages': [ + { + 'package': 'infra/3pp/tools/httpd-php/mac-arm64', 'version': 'version:2@httpd2.4.38.php7.3.31.chromium.2', }, ], @@ -715,7 +728,7 @@ }, 'src/ios/third_party/earl_grey2/src': { - 'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + '16b7d15f81c0a724b2b2054451cbeae93fbccedb', + 'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + '6d04bede62d40373947a87e6b7dac3033199da83', 'condition': 'checkout_ios', }, @@ -1127,7 +1140,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'e7eb3eb81ab7a84f7d9fc422200b9ba09d95699f', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '4de5deacd4a7cb46637a3d446b9c0dc258be1159', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1510,7 +1523,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'ab32c07962cf0a145b7906a97d0dabed35189286', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'ae44ad76bdf06db6f4e11186dd30cfdbc7d852b0', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1731,7 +1744,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '981b513154230fb38aaa1d999d4c30bd7a3c3966', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'e7985a491d249ade8deadd701c3bc2e1c0abcd09', + Var('webrtc_git') + '/src.git' + '@' + 'b9c636506bbee5ca6b7494888dc1fe6cb92009ce', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1801,7 +1814,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@ca3fe50b28b2f0a1f0c82f803c65225eceebcf5b', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@bdd9ffebf5fdfb6a17c7047a6cf0401cc1e10667', 'condition': 'checkout_src_internal', },
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 3a5df0d..fe11ca7e 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn
@@ -844,7 +844,6 @@ "//components/feature_engagement/public:public_java", "//components/metrics:metrics_java", "//components/network_session_configurator/android:network_session_configurator_java", - "//components/power_scheduler:power_scheduler_java", "//components/viz:viz_java", "//components/webrtc:components_webrtc_java", "//content/public/android:content_java",
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index bac94fc..365ddb3 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -11,7 +11,6 @@ import org.chromium.components.feature_engagement.FeatureConstants; import org.chromium.components.metrics.MetricsSwitches; import org.chromium.components.network_session_configurator.NetworkSessionSwitches; -import org.chromium.components.power_scheduler.PowerSchedulerFeatures; import org.chromium.components.viz.common.VizFeatures; import org.chromium.components.webrtc.ComponentsWebRtcFeatures; import org.chromium.content_public.common.ContentFeatures; @@ -127,20 +126,6 @@ + "feature flag until the true runtime cost can be measured."), Flag.baseFeature(AwFeatures.WEBVIEW_DISPLAY_CUTOUT, "Enables display cutout (notch) support in WebView for Android P and above."), - Flag.baseFeature(PowerSchedulerFeatures.WEBVIEW_CPU_AFFINITY_RESTRICT_TO_LITTLE_CORES, - "Forces WebView to do rendering work on LITTLE CPU cores on big.LITTLE " - + "architectures"), - Flag.baseFeature(PowerSchedulerFeatures.WEBVIEW_POWER_SCHEDULER_THROTTLE_IDLE, - "Restricts all of WebView's out-of-process renderer threads to use only LITTLE " - + "CPU cores on big.LITTLE architectures when the power mode is idle. " - + "WebViewCpuAffinityRestrictToLittleCores, if set, takes precedence " - + "over this flag."), - Flag.baseFeature(PowerSchedulerFeatures.POWER_SCHEDULER, - "Enables the Power Scheduler. Defaults to throttling when idle or in no-op " - + "animations, if at least 250ms of CPU time were spent " - + "in the first 500ms after entering idle/no-op animation mode. " - + "Can be further configured via field trial parameters, " - + "see power_scheduler.h/cc for details."), Flag.baseFeature(BlinkFeatures.WEBVIEW_ACCELERATE_SMALL_CANVASES, "Accelerate all canvases in webview."), Flag.baseFeature(AwFeatures.WEBVIEW_MIXED_CONTENT_AUTOUPGRADES,
diff --git a/android_webview/lib/aw_main_delegate.cc b/android_webview/lib/aw_main_delegate.cc index efdbabf..d22cfea3 100644 --- a/android_webview/lib/aw_main_delegate.cc +++ b/android_webview/lib/aw_main_delegate.cc
@@ -41,12 +41,11 @@ #include "components/crash/core/common/crash_key.h" #include "components/gwp_asan/buildflags/buildflags.h" #include "components/metrics/unsent_log_store_metrics.h" -#include "components/power_scheduler/power_scheduler.h" #include "components/safe_browsing/android/safe_browsing_api_handler_bridge.h" #include "components/services/heap_profiling/public/cpp/profiling_client.h" #include "components/spellcheck/spellcheck_buildflags.h" -#include "components/variations/variations_ids_provider.h" #include "components/translate/core/common/translate_util.h" +#include "components/variations/variations_ids_provider.h" #include "components/version_info/android/channel_getter.h" #include "components/viz/common/features.h" #include "content/public/browser/android/media_url_interceptor_register.h" @@ -397,15 +396,7 @@ *base::CommandLine::ForCurrentProcess(); std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); - bool is_browser_process = process_type.empty(); - - // Enable LITTLE-cores only mode/idle power mode throttling if the features - // are enabled, but only for child processes, as the browser process is shared - // with the hosting app. - if (!is_browser_process) { - power_scheduler::PowerScheduler::GetInstance() - ->InitializePolicyFromFeatureList(); - } + [[maybe_unused]] bool is_browser_process = process_type.empty(); #if BUILDFLAG(ENABLE_GWP_ASAN_MALLOC) gwp_asan::EnableForMalloc(is_canary_dev || is_browser_process,
diff --git a/android_webview/renderer/aw_render_thread_observer.cc b/android_webview/renderer/aw_render_thread_observer.cc index c41dc93..7135a4f 100644 --- a/android_webview/renderer/aw_render_thread_observer.cc +++ b/android_webview/renderer/aw_render_thread_observer.cc
@@ -4,7 +4,6 @@ #include "android_webview/renderer/aw_render_thread_observer.h" -#include "components/power_scheduler/power_scheduler.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/platform/web_cache.h" #include "third_party/blink/public/platform/web_network_state_notifier.h"
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc index a3eb71c..7672d39 100644 --- a/ash/accelerators/accelerator_controller_impl.cc +++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -296,7 +296,7 @@ window_to_move = window_util::GetActiveWindow(); } - if (!window_to_move) + if (!window_to_move || !desks_util::BelongsToActiveDesk(window_to_move)) return; Desk* target_desk = nullptr;
diff --git a/ash/clipboard/clipboard_history_controller_impl.cc b/ash/clipboard/clipboard_history_controller_impl.cc index ff4d120..a6c2d6ab 100644 --- a/ash/clipboard/clipboard_history_controller_impl.cc +++ b/ash/clipboard/clipboard_history_controller_impl.cc
@@ -31,6 +31,7 @@ #include "base/location.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" +#include "base/one_shot_event.h" #include "base/ranges/algorithm.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/lock.h" @@ -324,6 +325,16 @@ std::move(callback)); } +void ClipboardHistoryControllerImpl::BlockGetHistoryValuesForTest() { + get_history_values_blocker_for_test_.reset(); + get_history_values_blocker_for_test_ = std::make_unique<base::OneShotEvent>(); +} + +void ClipboardHistoryControllerImpl::ResumeGetHistoryValuesForTest() { + DCHECK(get_history_values_blocker_for_test_); + get_history_values_blocker_for_test_->Signal(); +} + bool ClipboardHistoryControllerImpl::ShouldShowNewFeatureBadge() const { return chromeos::features::IsClipboardHistoryContextMenuNudgeEnabled() && nudge_controller_->ShouldShowNewFeatureBadge(); @@ -416,9 +427,29 @@ GetHistoryValuesCallback callback, std::unique_ptr<std::map<base::UnguessableToken, std::vector<uint8_t>>> encoded_pngs) { + // If a test is performing some work that must be done before history values + // are returned, wait to run this function until that work is finished. + if (get_history_values_blocker_for_test_ && + !get_history_values_blocker_for_test_->is_signaled()) { + get_history_values_blocker_for_test_->Post( + FROM_HERE, + base::BindOnce( + &ClipboardHistoryControllerImpl::GetHistoryValuesWithEncodedPNGs, + weak_ptr_factory_.GetWeakPtr(), item_id_filter, std::move(callback), + std::move(encoded_pngs))); + return; + } + base::Value item_results(base::Value::Type::LIST); DCHECK(encoded_pngs); + // Check after asynchronous PNG encoding finishes to make sure we have not + // entered a state where clipboard history is disabled, e.g., a locked screen. + if (!ClipboardHistoryUtil::IsEnabledInCurrentMode()) { + std::move(callback).Run(std::move(item_results)); + return; + } + bool all_images_encoded = true; // Get the clipboard data for each clipboard history item. for (auto& item : clipboard_history_->GetItems()) { @@ -596,7 +627,7 @@ } if (confirmed_operation_callback_for_test_) - confirmed_operation_callback_for_test_.Run(); + confirmed_operation_callback_for_test_.Run(/*success=*/true); } void ClipboardHistoryControllerImpl::OnCachedImageModelUpdated( @@ -676,10 +707,14 @@ aura::Window* intended_window, ClipboardHistoryItem item, bool paste_plain_text) { - // It's possible that the window could change after posting the - // PasteClipboardHistoryItem task is scheduled. - if (!intended_window || intended_window != window_util::GetActiveWindow()) + // It's possible that the window could change or we could enter a disabled + // mode after posting the `PasteClipboardHistoryItem()` task. + if (!intended_window || intended_window != window_util::GetActiveWindow() || + !ClipboardHistoryUtil::IsEnabledInCurrentMode()) { + if (confirmed_operation_callback_for_test_) + confirmed_operation_callback_for_test_.Run(/*success=*/false); return; + } auto* clipboard = GetClipboard(); std::unique_ptr<ui::ClipboardData> original_data;
diff --git a/ash/clipboard/clipboard_history_controller_impl.h b/ash/clipboard/clipboard_history_controller_impl.h index 7dbbb5ed..21b91b34 100644 --- a/ash/clipboard/clipboard_history_controller_impl.h +++ b/ash/clipboard/clipboard_history_controller_impl.h
@@ -19,6 +19,7 @@ #include "base/callback_forward.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" +#include "base/one_shot_event.h" #include "base/timer/timer.h" #include "base/unguessable_token.h" #include "base/values.h" @@ -78,6 +79,12 @@ void GetHistoryValuesForTest(GetHistoryValuesCallback callback) const; + // Used to delay the post-encoding step of `GetHistoryValues()` until the + // completion of some work that needs to happen after history values have been + // requested and before the values are returned. + void BlockGetHistoryValuesForTest(); + void ResumeGetHistoryValuesForTest(); + // Whether the ClipboardHistory has items. bool IsEmpty() const; @@ -109,7 +116,7 @@ } void set_confirmed_operation_callback_for_test( - base::RepeatingClosure new_callback) { + base::RepeatingCallback<void(bool)> new_callback) { confirmed_operation_callback_for_test_ = new_callback; } @@ -144,11 +151,12 @@ void OnCachedImageModelUpdated( const std::vector<base::UnguessableToken>& menu_item_ids) override; - // Invoked by GetHistoryValues once all clipboard instances with images have - // been encoded into PNGs. Returns the history which tracks what is being - // copied to the clipboard. Only the items listed in `item_id_filter` are - // returned. If `item_id_filter` is empty, then all items in the history are - // returned. + // Invoked by `GetHistoryValues()` once all clipboard instances with images + // have been encoded into PNGs. Calls `callback` with the clipboard history + // list, which tracks what has been copied to the clipboard. Only the items + // listed in `item_id_filter` are returned. If `item_id_filter` is empty, then + // all items in the history are returned. If clipboard history is disabled in + // the current mode, `callback` will be called with an empty history list. void GetHistoryValuesWithEncodedPNGs( const std::set<std::string>& item_id_filter, GetHistoryValuesCallback callback, @@ -219,6 +227,11 @@ // history menu and are waiting for the confirmations from `ClipboardHistory`. int pastes_to_be_confirmed_ = 0; + // Created when a test requests that `GetHistoryValues()` wait for some work + // to be done before encoding finishes. Reset and recreated if the same test + // makes the request to pause `GetHistoryValues()` again. + std::unique_ptr<base::OneShotEvent> get_history_values_blocker_for_test_; + // The delay interval for restoring the clipboard buffer to its original // state following a paste event. absl::optional<base::TimeDelta> buffer_restoration_delay_for_test_; @@ -227,9 +240,9 @@ // menu opens. base::RepeatingClosure initial_item_selected_callback_for_test_; - // Called when the controller is notified of the confirmed clipboard data - // operation. - base::RepeatingClosure confirmed_operation_callback_for_test_; + // Called when a copy or paste finishes. Accepts the operation's success as an + // argument. + base::RepeatingCallback<void(bool)> confirmed_operation_callback_for_test_; // A new bitmap to be written to the clipboard while existing images are being // encoded during `GetHistoryValues()`, which will force `GetHistoryValues()`
diff --git a/ash/clipboard/clipboard_history_controller_unittest.cc b/ash/clipboard/clipboard_history_controller_unittest.cc index a7686ff..ae064766 100644 --- a/ash/clipboard/clipboard_history_controller_unittest.cc +++ b/ash/clipboard/clipboard_history_controller_unittest.cc
@@ -82,17 +82,18 @@ void OnShutdown() override {} }; -void ExpectHistoryValueMatchesBitmap(const base::Value& value, +void ExpectHistoryValueMatchesBitmap(const base::Value::Dict* value, const SkBitmap& expected_bitmap) { - auto* format = value.FindKey("displayFormat"); - EXPECT_TRUE(format); - EXPECT_EQ(format->GetString(), "png"); + ASSERT_TRUE(value); + auto* format = value->FindString("displayFormat"); + ASSERT_TRUE(format); + EXPECT_EQ("png", *format); - auto* image_data = value.FindKey("imageData"); - EXPECT_TRUE(image_data); + auto* image_data = value->FindString("imageData"); + ASSERT_TRUE(image_data); auto png = ui::ClipboardData::EncodeBitmapData(expected_bitmap); std::string png_data_url = webui::GetPngDataUrl(png.data(), png.size()); - EXPECT_EQ(png_data_url, image_data->GetString()); + EXPECT_EQ(png_data_url, *image_data); } } // namespace @@ -120,6 +121,40 @@ void ShowMenu() { PressAndReleaseKey(ui::VKEY_V, ui::EF_COMMAND_DOWN); } + base::Value::List GetHistoryValues() { + base::test::TestFuture<base::Value> future; + GetClipboardHistoryController()->GetHistoryValuesForTest( + future.GetCallback()); + auto result = future.Take(); + EXPECT_TRUE(result.is_list()); + return std::move(result.GetList()); + } + + void TestEnteringLockScreen() { + // Querying clipboard history should return nothing if the screen is locked + // while the request is in progress. + GetClipboardHistoryController()->BlockGetHistoryValuesForTest(); + base::test::TestFuture<base::Value> future; + GetClipboardHistoryController()->GetHistoryValuesForTest( + future.GetCallback()); + EXPECT_FALSE(future.IsReady()); + + auto* session_controller = Shell::Get()->session_controller(); + session_controller->LockScreen(); + GetSessionControllerClient()->FlushForTest(); // `LockScreen()` is async. + EXPECT_TRUE(session_controller->IsScreenLocked()); + + GetClipboardHistoryController()->ResumeGetHistoryValuesForTest(); + auto* locked_during_query_result = future.Get().GetIfList(); + ASSERT_TRUE(locked_during_query_result); + EXPECT_EQ(0u, locked_during_query_result->size()); + + // Querying clipboard history should return nothing if the screen is locked + // before the request is made. + auto locked_before_query_result = GetHistoryValues(); + EXPECT_EQ(0u, locked_before_query_result.size()); + } + private: base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr<MockClipboardImageModelFactory> mock_image_factory_; @@ -341,19 +376,13 @@ } FlushMessageLoop(); - // The bitmap should be encoded to a PNG once this task completes. - base::test::TestFuture<base::Value> future; - GetClipboardHistoryController()->GetHistoryValuesForTest( - future.GetCallback()); - EXPECT_TRUE(future.Wait()); + // The bitmap should be encoded to a PNG once this task completes. Manually + // pry into the contents of the result to confirm that the newly-encoded PNG + // is included. + auto result = GetHistoryValues(); + EXPECT_EQ(1u, result.size()); - // Manually pry into the contents of the result to confirm that the - // newly-encoded PNG is included. - base::Value result = future.Take(); - EXPECT_TRUE(result.is_list()); - EXPECT_EQ(1u, result.GetListDeprecated().size()); - - ExpectHistoryValueMatchesBitmap(result.GetListDeprecated()[0], test_bitmap); + ExpectHistoryValueMatchesBitmap(result[0].GetIfDict(), test_bitmap); } TEST_F(ClipboardHistoryControllerTest, EncodeMultipleImages) { @@ -368,22 +397,16 @@ FlushMessageLoop(); } - // The bitmaps should be encoded to PNGs once this task completes. - base::test::TestFuture<base::Value> future; - GetClipboardHistoryController()->GetHistoryValuesForTest( - future.GetCallback()); - EXPECT_TRUE(future.Wait()); - - // Manually pry into the contents of the result to confirm that the - // newly-encoded PNGs are included. - base::Value result = future.Take(); - EXPECT_TRUE(result.is_list()); - auto num_results = result.GetListDeprecated().size(); + // The bitmaps should be encoded to PNGs once this task completes. Manually + // pry into the contents of the result to confirm that the newly-encoded PNGs + // are included. + auto result = GetHistoryValues(); + auto num_results = result.size(); EXPECT_EQ(num_results, test_bitmaps.size()); // History values should be sorted by recency. for (uint i = 0; i < num_results; ++i) { - ExpectHistoryValueMatchesBitmap(result.GetListDeprecated()[i], + ExpectHistoryValueMatchesBitmap(result[i].GetIfDict(), test_bitmaps[num_results - 1 - i]); } } @@ -409,25 +432,47 @@ GetClipboardHistoryController() ->set_new_bitmap_to_write_while_encoding_for_test(test_bitmaps[1]); - base::test::TestFuture<base::Value> future; - GetClipboardHistoryController()->GetHistoryValuesForTest( - future.GetCallback()); - - // Both bitmaps should be encoded to a PNG once this task completes. - EXPECT_TRUE(future.Wait()); - - // Manually pry into the contents of the result to confirm that the - // newly-encoded PNGs are included. - base::Value result = future.Take(); - EXPECT_TRUE(result.is_list()); - auto num_results = result.GetListDeprecated().size(); + // Both bitmaps should be encoded to a PNG once this task completes. Manually + // pry into the contents of the result to confirm that the newly-encoded PNGs + // are included. + auto result = GetHistoryValues(); + auto num_results = result.size(); EXPECT_EQ(num_results, test_bitmaps.size()); // History values should be sorted by recency. for (uint i = 0; i < num_results; ++i) { - ExpectHistoryValueMatchesBitmap(result.GetListDeprecated()[i], + ExpectHistoryValueMatchesBitmap(result[i].GetIfDict(), test_bitmaps[num_results - 1 - i]); } } +TEST_F(ClipboardHistoryControllerTest, LockedScreenText) { + // Write text to ClipboardHistory and verify that it can be retrieved. + WriteToClipboard("test"); + auto history_list_value = GetHistoryValues(); + EXPECT_EQ(1u, history_list_value.size()); + auto* history_list_item = history_list_value[0].GetIfDict(); + EXPECT_TRUE(history_list_item); + auto* history_list_item_text = history_list_item->FindString("textData"); + EXPECT_TRUE(history_list_item_text); + EXPECT_EQ("test", *history_list_item_text); + + TestEnteringLockScreen(); +} + +TEST_F(ClipboardHistoryControllerTest, LockedScreenImage) { + // Write a bitmap to ClipboardHistory and verify that it can be returned. + SkBitmap test_bitmap = gfx::test::CreateBitmap(3, 2); + { + ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste); + scw.WriteImage(test_bitmap); + } + FlushMessageLoop(); + auto result = GetHistoryValues(); + EXPECT_EQ(1u, result.size()); + ExpectHistoryValueMatchesBitmap(result[0].GetIfDict(), test_bitmap); + + TestEnteringLockScreen(); +} + } // namespace ash
diff --git a/ash/components/phonehub/camera_roll_item_unittest.cc b/ash/components/phonehub/camera_roll_item_unittest.cc index adf394c..c7145f7 100644 --- a/ash/components/phonehub/camera_roll_item_unittest.cc +++ b/ash/components/phonehub/camera_roll_item_unittest.cc
@@ -6,6 +6,7 @@ #include "ash/components/phonehub/proto/phonehub_api.pb.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h"
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index c33a878..0e945d3 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -232,7 +232,6 @@ extern const base::Feature kEnableOobePolymer3; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kEnableOobeNetworkScreenSkip; -COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kEnablePciguardUi; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kEnableSamlNotificationOnPasswordChangeSuccess; COMPONENT_EXPORT(ASH_CONSTANTS)
diff --git a/ash/constants/ash_pref_names.cc b/ash/constants/ash_pref_names.cc index 894ec51..5e246f9 100644 --- a/ash/constants/ash_pref_names.cc +++ b/ash/constants/ash_pref_names.cc
@@ -36,6 +36,12 @@ // by serializing a CellularESimProfile. const char kESimProfiles[] = "cros_esim.esim_profiles"; +// Pref which stores a dictionary of Integrated Circuit Card IDentifier (ICCID) +// and Subscription Management - Data Preparation (SMDP+) address pair for each +// managed cellular network. +const char kManagedCellularIccidSmdpPair[] = + "cros_esim.managed_iccid_smdp_pair"; + // A dictionary pref to hold the mute setting for all the currently known // audio devices. const char kAudioDevicesMute[] = "settings.audio.devices.mute";
diff --git a/ash/constants/ash_pref_names.h b/ash/constants/ash_pref_names.h index 5ca08eda..939d08c 100644 --- a/ash/constants/ash_pref_names.h +++ b/ash/constants/ash_pref_names.h
@@ -21,6 +21,8 @@ COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kESimProfiles[]; COMPONENT_EXPORT(ASH_CONSTANTS) +extern const char kManagedCellularIccidSmdpPair[]; +COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kEmojiSuggestionEnabled[]; COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kEmojiSuggestionEnterpriseAllowed[];
diff --git a/ash/public/cpp/clipboard_history_controller.h b/ash/public/cpp/clipboard_history_controller.h index 3c1e337..17ba5373 100644 --- a/ash/public/cpp/clipboard_history_controller.h +++ b/ash/public/cpp/clipboard_history_controller.h
@@ -76,9 +76,12 @@ // its lifetime. virtual std::unique_ptr<ScopedClipboardHistoryPause> CreateScopedPause() = 0; - // Returns the history which tracks what is being copied to the clipboard. - // Only the items listed in |item_id_filter| are returned. If |item_id_filter| - // is empty, then all items in the history are returned. + // Calls `callback` with the clipboard history list, which tracks what has + // been copied to the clipboard. Only the items listed in |item_id_filter| are + // returned. If |item_id_filter| is empty, then all items in the history are + // returned. If clipboard history is disabled in the current mode, `callback` + // will be called with an empty history list. + // TODO(crbug.com/1309666): Remove const ref from |item_id_filter| param type. virtual void GetHistoryValues(const std::set<std::string>& item_id_filter, GetHistoryValuesCallback callback) const = 0;
diff --git a/ash/public/cpp/shelf_item.h b/ash/public/cpp/shelf_item.h index e22674e..9585bae7 100644 --- a/ash/public/cpp/shelf_item.h +++ b/ash/public/cpp/shelf_item.h
@@ -10,6 +10,7 @@ #include "ash/public/cpp/ash_public_export.h" #include "ash/public/cpp/shelf_types.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image_skia.h" namespace ash {
diff --git a/ash/public/cpp/shell_window_ids.h b/ash/public/cpp/shell_window_ids.h index a5c387b..dc2f5a2 100644 --- a/ash/public/cpp/shell_window_ids.h +++ b/ash/public/cpp/shell_window_ids.h
@@ -216,6 +216,9 @@ // The window that shows the Desks Templates grid in overview. kShellWindowId_DesksTemplatesGridWindow, + + // The window that shows the "No recent items" label in overview. + kShellWindowId_OverviewNoWindowsLabelWindow, }; // A list of system modal container IDs. The order of the list is important that
diff --git a/ash/services/cellular_setup/esim_test_base.cc b/ash/services/cellular_setup/esim_test_base.cc index 203f58c..9cc87a2 100644 --- a/ash/services/cellular_setup/esim_test_base.cc +++ b/ash/services/cellular_setup/esim_test_base.cc
@@ -74,6 +74,7 @@ std::make_unique<CellularESimUninstallHandler>(); cellular_esim_uninstall_handler_->Init( cellular_inhibitor_.get(), cellular_esim_profile_handler_.get(), + /*managed_cellular_pref_handler=*/nullptr, network_configuration_handler_.get(), network_connection_handler_.get(), network_state_handler_.get());
diff --git a/ash/system/eche/eche_icon_loading_indicator_view.cc b/ash/system/eche/eche_icon_loading_indicator_view.cc index 570480dd8..7aec4ff9 100644 --- a/ash/system/eche/eche_icon_loading_indicator_view.cc +++ b/ash/system/eche/eche_icon_loading_indicator_view.cc
@@ -14,6 +14,7 @@ #include "ui/gfx/animation/throb_animation.h" #include "ui/gfx/canvas.h" #include "ui/gfx/color_palette.h" +#include "ui/gfx/geometry/rect.h" #include "ui/gfx/paint_throbber.h" #include "ui/views/controls/image_view.h" #include "ui/views/view.h" @@ -27,8 +28,7 @@ } // namespace -EcheIconLoadingIndicatorView::EcheIconLoadingIndicatorView( - views::ImageView* parent) +EcheIconLoadingIndicatorView::EcheIconLoadingIndicatorView(views::View* parent) : parent_(parent) { observed_session_.Observe(parent_); @@ -59,12 +59,14 @@ if (!throbber_start_time_) return; - const SkColor color = - TrayIconColor(Shell::Get()->session_controller()->GetSessionState()); - - gfx::PaintThrobberSpinning(canvas, GetLocalBounds(), color, - base::TimeTicks::Now() - *throbber_start_time_, - kThrobberStrokeWidth); + // The image covers the container horizontally and is centered vertically. + gfx::Rect bounds = GetLocalBounds(); + bounds.ClampToCenteredSize( + gfx::Size(GetLocalBounds().width(), GetLocalBounds().width())); + gfx::PaintThrobberSpinning( + canvas, bounds, + TrayIconColor(Shell::Get()->session_controller()->GetSessionState()), + base::TimeTicks::Now() - *throbber_start_time_, kThrobberStrokeWidth); } void EcheIconLoadingIndicatorView::OnViewBoundsChanged( @@ -79,4 +81,4 @@ SchedulePaint(); } -} // namespace ash \ No newline at end of file +} // namespace ash
diff --git a/ash/system/eche/eche_icon_loading_indicator_view.h b/ash/system/eche/eche_icon_loading_indicator_view.h index a5547a6..a56f135 100644 --- a/ash/system/eche/eche_icon_loading_indicator_view.h +++ b/ash/system/eche/eche_icon_loading_indicator_view.h
@@ -13,10 +13,6 @@ #include "ui/views/view.h" #include "ui/views/view_observer.h" -namespace views { -class ImageView; -} // namespace views - namespace gfx { class Canvas; class Animation; @@ -29,7 +25,7 @@ public views::ViewObserver, public gfx::AnimationDelegate { public: - explicit EcheIconLoadingIndicatorView(views::ImageView* parent); + explicit EcheIconLoadingIndicatorView(views::View* parent); EcheIconLoadingIndicatorView(const EcheIconLoadingIndicatorView&) = delete; EcheIconLoadingIndicatorView& operator=(const EcheIconLoadingIndicatorView&) = delete; @@ -50,7 +46,7 @@ private: absl::optional<base::TimeTicks> throbber_start_time_; - views::ImageView* parent_ = nullptr; + views::View* parent_ = nullptr; // Unowned. base::ScopedObservation<views::View, views::ViewObserver> observed_session_{ this};
diff --git a/ash/system/eche/eche_tray.cc b/ash/system/eche/eche_tray.cc index 41f8933..7451be5 100644 --- a/ash/system/eche/eche_tray.cc +++ b/ash/system/eche/eche_tray.cc
@@ -12,6 +12,7 @@ #include "ash/public/cpp/ash_web_view_factory.h" #include "ash/public/cpp/shell_window_ids.h" #include "ash/resources/vector_icons/vector_icons.h" +#include "ash/root_window_controller.h" #include "ash/session/session_controller_impl.h" #include "ash/shelf/shelf.h" #include "ash/shell.h" @@ -19,12 +20,15 @@ #include "ash/style/ash_color_provider.h" #include "ash/style/icon_button.h" #include "ash/system/eche/eche_icon_loading_indicator_view.h" +#include "ash/system/phonehub/phone_hub_tray.h" #include "ash/system/phonehub/ui_constants.h" +#include "ash/system/status_area_widget.h" #include "ash/system/tray/tray_bubble_wrapper.h" #include "ash/system/tray/tray_container.h" #include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_utils.h" #include "base/bind.h" +#include "base/callback_forward.h" #include "components/account_id/account_id.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" @@ -41,6 +45,7 @@ #include "ui/gfx/vector_icon_types.h" #include "ui/strings/grit/ui_strings.h" #include "ui/views/border.h" +#include "ui/views/controls/button/image_button.h" #include "ui/views/controls/button/image_button_factory.h" #include "ui/views/controls/highlight_path_generator.h" #include "ui/views/controls/image_view.h" @@ -101,12 +106,6 @@ views::CreateEmptyBorder(gfx::Insets(icon_padding, icon_padding))); icon_->SetTooltipText(GetAccessibleNameForTray()); - - if (features::IsEcheSWAInBackgroundEnabled()) { - loading_indicator_ = icon_->AddChildView( - std::make_unique<EcheIconLoadingIndicatorView>(icon_)); - loading_indicator_->SetVisible(false); - } } EcheTray::~EcheTray() { @@ -155,24 +154,15 @@ } void EcheTray::ShowBubble() { - if (bubble_) { - bubble_->GetBubbleWidget()->Show(); - bubble_->GetBubbleWidget()->Activate(); - bubble_->bubble_view()->SetVisible(true); - SetIsActive(true); - - // TODO(b/223297066): Observe the connection status and add/remove the - // loading indicator based on the connection status. - if (features::IsEcheSWAInBackgroundEnabled() && - loading_indicator_->GetAnimating()) { - loading_indicator_->SetAnimating(false); - } + if (!bubble_) return; - } + SetIconVisibility(true); + StopLoadingAnimation(); - InitBubble(); - - // TODO(nayebi): Add metric updates. + bubble_->GetBubbleWidget()->Show(); + bubble_->GetBubbleWidget()->Activate(); + bubble_->bubble_view()->SetVisible(true); + SetIsActive(true); } bool EcheTray::PerformAction(const ui::Event& event) { @@ -217,16 +207,40 @@ } void EcheTray::SetIcon(const gfx::Image& icon) { - icon_->SetImage(gfx::ImageSkiaOperations::CreateResizedImage( - icon.AsImageSkia(), skia::ImageOperations::RESIZE_BEST, - gfx::Size(kIconSize, kIconSize))); + views::ImageButton* icon_view = GetIcon(); + if (icon_view) { + icon_view->SetImage( + views::ImageButton::STATE_NORMAL, + gfx::ImageSkiaOperations::CreateResizedImage( + icon.AsImageSkia(), skia::ImageOperations::RESIZE_BEST, + gfx::Size(kIconSize, kIconSize))); + SetIconVisibility(true); + } +} + +void EcheTray::LoadBubble(const GURL& url, const gfx::Image& icon) { + SetUrl(url); + SetIcon(icon); + // If the bubble is already initialized, setting the icon and url was enough + // to navigate the bubble to the new address. + if (IsInitialized()) { + ShowBubble(); + return; + } + InitBubble(); + StartLoadingAnimation(); + auto* phone_hub_tray = GetPhoneHubTray(); + if (phone_hub_tray) { + phone_hub_tray->SetEcheIconActivationCallback( + base::BindRepeating(&EcheTray::PerformAction, base::Unretained(this))); + } + // Hide bubble first until the streaming is ready. + HideBubble(); } void EcheTray::PurgeAndClose() { - if (features::IsEcheSWAInBackgroundEnabled() && - loading_indicator_->GetAnimating()) { - loading_indicator_->SetAnimating(false); - } + StopLoadingAnimation(); + SetIconVisibility(false); if (!bubble_) return; @@ -238,6 +252,7 @@ bubble_.reset(); SetIsActive(false); SetVisiblePreferred(false); + web_view_ = nullptr; } void EcheTray::HideBubble() { @@ -289,9 +304,6 @@ SetIsActive(true); bubble_->GetBubbleView()->UpdateBubble(); - - if (features::IsEcheSWAInBackgroundEnabled()) - loading_indicator_->SetAnimating(true); } gfx::Size EcheTray::GetSizeForEche() const { @@ -356,6 +368,46 @@ return header; } +views::ImageButton* EcheTray::GetIcon() { + PhoneHubTray* phone_hub_tray = GetPhoneHubTray(); + if (!phone_hub_tray) + return nullptr; + return phone_hub_tray->eche_icon_view(); +} + +void EcheTray::StopLoadingAnimation() { + auto* loading_indicator = GetLoadingIndicator(); + if (loading_indicator && loading_indicator->GetAnimating()) { + loading_indicator->SetAnimating(false); + } +} + +void EcheTray::StartLoadingAnimation() { + auto* loading_indicator = GetLoadingIndicator(); + if (loading_indicator) { + loading_indicator->SetAnimating(true); + } +} + +void EcheTray::SetIconVisibility(bool visibility) { + auto* icon = GetIcon(); + if (!icon) + return; + icon->SetVisible(visibility); + GetPhoneHubTray()->tray_container()->UpdateLayout(); +} + +PhoneHubTray* EcheTray::GetPhoneHubTray() { + return shelf()->GetStatusAreaWidget()->phone_hub_tray(); +} + +EcheIconLoadingIndicatorView* EcheTray::GetLoadingIndicator() { + PhoneHubTray* phone_hub_tray = GetPhoneHubTray(); + if (!phone_hub_tray) + return nullptr; + return phone_hub_tray->eche_loading_indicator(); +} + BEGIN_METADATA(EcheTray, TrayBackgroundView) END_METADATA
diff --git a/ash/system/eche/eche_tray.h b/ash/system/eche/eche_tray.h index 5062aec..9941cfa 100644 --- a/ash/system/eche/eche_tray.h +++ b/ash/system/eche/eche_tray.h
@@ -20,6 +20,7 @@ namespace views { class ImageView; +class ImageButton; class View; class Widget; @@ -40,6 +41,7 @@ class TrayBubbleView; class TrayBubbleWrapper; class AshWebView; +class PhoneHubTray; // This class represents the Eche tray button in the status area and // controls the bubble that is shown when the tray button is clicked. @@ -82,6 +84,13 @@ // Sets the icon that will be used on the tray. void SetIcon(const gfx::Image& icon); + // Initializes the bubble with given parameters. If there is any previous + // bubble already shown with a different URL it is going to be closed. The + // bubble is not shown initially until `ShowBubble` is called. The `url` + // parameter is used to load the `WebView` inside the bubble. The `icon` is + // used to update the tray icon for `EcheTray`. + void LoadBubble(const GURL& url, const gfx::Image& icon); + // Destroys the view inclusing the web view. // Note: `CloseBubble` only hides the view. void PurgeAndClose(); @@ -110,6 +119,14 @@ // close, and minimize buttons. std::unique_ptr<views::View> CreateBubbleHeaderView(); + views::ImageButton* GetIcon(); + void StopLoadingAnimation(); + void StartLoadingAnimation(); + void SetIconVisibility(bool visibility); + + PhoneHubTray* GetPhoneHubTray(); + EcheIconLoadingIndicatorView* GetLoadingIndicator(); + // The url that is transferred to the web view. // In the current implementation, this is supposed to be // Eche window URL. However, the bubble does not interpret, @@ -128,8 +145,6 @@ base::ScopedObservation<SessionControllerImpl, SessionObserver> observed_session_{this}; - // The loading indicator, showing a throbber animation on top of the icon. - EcheIconLoadingIndicatorView* loading_indicator_ = nullptr; base::WeakPtrFactory<EcheTray> weak_factory_{this}; };
diff --git a/ash/system/eche/eche_tray_unittest.cc b/ash/system/eche/eche_tray_unittest.cc index 102ede9..688ca8b 100644 --- a/ash/system/eche/eche_tray_unittest.cc +++ b/ash/system/eche/eche_tray_unittest.cc
@@ -8,12 +8,14 @@ #include <string> #include "ash/shell.h" +#include "ash/system/phonehub/phone_hub_tray.h" #include "ash/system/status_area_widget_test_helper.h" #include "ash/system/tray/tray_bubble_wrapper.h" #include "ash/test/ash_test_base.h" #include "ash/test/test_ash_web_view_factory.h" #include "base/test/scoped_feature_list.h" #include "ui/display/test/display_manager_test_api.h" +#include "ui/gfx/image/image.h" namespace ash { @@ -39,6 +41,8 @@ AshTestBase::SetUp(); eche_tray_ = StatusAreaWidgetTestHelper::GetStatusAreaWidget()->eche_tray(); + phone_hub_tray_ = + StatusAreaWidgetTestHelper::GetStatusAreaWidget()->phone_hub_tray(); display::test::DisplayManagerTestApi(display_manager()) .SetFirstDisplayAsInternalDisplay(); @@ -51,9 +55,11 @@ } EcheTray* eche_tray() { return eche_tray_; } + PhoneHubTray* phone_hub_tray() { return phone_hub_tray_; } private: EcheTray* eche_tray_ = nullptr; // Not owned + PhoneHubTray* phone_hub_tray_ = nullptr; // Not owned base::test::ScopedFeatureList feature_list_; // Calling the factory constructor is enough to set it up. @@ -68,7 +74,7 @@ } // Verify taps on the eche tray button results in expected behaviour. -// It also sets the url and calls `ShowBubble`. +// It also sets the url and calls `LoadBubble`. TEST_F(EcheTrayTest, EcheTrayShowBubbleAndTapTwice) { // Verify the eche tray button is not active, and the eche tray bubble // is not shown initially. @@ -76,8 +82,8 @@ EXPECT_FALSE(eche_tray()->get_bubble_wrapper_for_test()); EXPECT_FALSE(eche_tray()->GetVisible()); - eche_tray()->SetUrl(GURL("http://google.com")); eche_tray()->SetVisiblePreferred(true); + eche_tray()->LoadBubble(GURL("http://google.com"), gfx::Image()); eche_tray()->ShowBubble(); EXPECT_TRUE(eche_tray()->is_active()); @@ -115,15 +121,13 @@ // Allow us to create the bubble but it is not visible until we need this // bubble to show up. - eche_tray()->SetUrl(GURL("http://google.com")); - eche_tray()->InitBubble(); - eche_tray()->HideBubble(); + eche_tray()->LoadBubble(GURL("http://google.com"), gfx::Image()); EXPECT_FALSE(eche_tray()->is_active()); EXPECT_TRUE(eche_tray()->get_bubble_wrapper_for_test()); EXPECT_FALSE( eche_tray()->get_bubble_wrapper_for_test()->bubble_view()->GetVisible()); - EXPECT_TRUE(eche_tray()->loading_indicator_->GetAnimating()); + EXPECT_TRUE(phone_hub_tray()->eche_loading_indicator()->GetAnimating()); // Request this bubble to show up. eche_tray()->ShowBubble(); @@ -133,7 +137,7 @@ EXPECT_TRUE(eche_tray()->get_bubble_wrapper_for_test()); EXPECT_TRUE( eche_tray()->get_bubble_wrapper_for_test()->bubble_view()->GetVisible()); - EXPECT_FALSE(eche_tray()->loading_indicator_->GetAnimating()); + EXPECT_FALSE(phone_hub_tray()->eche_loading_indicator()->GetAnimating()); } } // namespace ash
diff --git a/ash/system/palette/stylus_battery_delegate.h b/ash/system/palette/stylus_battery_delegate.h index f42f41a..4355292 100644 --- a/ash/system/palette/stylus_battery_delegate.h +++ b/ash/system/palette/stylus_battery_delegate.h
@@ -10,6 +10,7 @@ #include "base/callback_forward.h" #include "base/scoped_observation.h" #include "base/time/time.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image_skia.h" namespace ash {
diff --git a/ash/system/phonehub/phone_hub_tray.cc b/ash/system/phonehub/phone_hub_tray.cc index 5bfa713..092b8bc 100644 --- a/ash/system/phonehub/phone_hub_tray.cc +++ b/ash/system/phonehub/phone_hub_tray.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "ash/system/phonehub/phone_hub_tray.h" +#include <utility> #include "ash/accessibility/accessibility_controller_impl.h" #include "ash/components/phonehub/phone_hub_manager.h" @@ -14,6 +15,7 @@ #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" #include "ash/style/ash_color_provider.h" +#include "ash/system/eche/eche_icon_loading_indicator_view.h" #include "ash/system/model/system_tray_model.h" #include "ash/system/phonehub/phone_hub_content_view.h" #include "ash/system/phonehub/phone_hub_metrics.h" @@ -27,8 +29,10 @@ #include "ash/system/tray/tray_popup_utils.h" #include "ash/system/tray/tray_utils.h" #include "base/bind.h" +#include "base/callback_helpers.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/events/event.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/border.h" @@ -38,7 +42,7 @@ namespace { -// Padding for tray icon (dp; the button that shows the phone_hub menu). +// Padding for tray icons (dp; the button that shows the phone_hub menu). constexpr int kTrayIconMainAxisInset = 6; constexpr int kTrayIconCrossAxisInset = 0; @@ -51,10 +55,29 @@ observed_phone_hub_ui_controller_.Observe(ui_controller_.get()); observed_session_.Observe(Shell::Get()->session_controller()); - auto icon = std::make_unique<views::ImageView>(); + tray_container()->SetMargin(kTrayIconMainAxisInset, kTrayIconCrossAxisInset); + // TODO(nayebi): Think about constructing the eche_icon outside of this class, + // either as an input argument or being set through a setter. + if (features::IsEcheCustomWidgetEnabled()) { + auto eche_icon = std::make_unique<views::ImageButton>(base::BindRepeating( + &PhoneHubTray::EcheIconActivated, weak_factory_.GetWeakPtr())); + // TODO(nayebi): Needs a different tooltip text. + eche_icon->SetTooltipText( + l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_TRAY_ACCESSIBLE_NAME)); + eche_icon->SetImageVerticalAlignment( + views::ImageButton::VerticalAlignment::ALIGN_MIDDLE); + eche_icon->SetVisible(false); + eche_loading_indicator_ = eche_icon->AddChildView( + std::make_unique<EcheIconLoadingIndicatorView>(eche_icon.get())); + eche_loading_indicator_->SetVisible(false); + eche_icon_ = tray_container()->AddChildView(std::move(eche_icon)); + } + auto icon = std::make_unique<views::ImageButton>(base::BindRepeating( + &PhoneHubTray::PhoneHubIconActivated, weak_factory_.GetWeakPtr())); icon->SetTooltipText( l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_TRAY_ACCESSIBLE_NAME)); - tray_container()->SetMargin(kTrayIconMainAxisInset, kTrayIconCrossAxisInset); + icon->SetImageVerticalAlignment( + views::ImageButton::VerticalAlignment::ALIGN_MIDDLE); icon_ = tray_container()->AddChildView(std::move(icon)); } @@ -131,7 +154,8 @@ } void PhoneHubTray::OnSessionStateChanged(session_manager::SessionState state) { - icon_->SetImage(CreateVectorIcon(kPhoneHubPhoneIcon, TrayIconColor(state))); + icon_->SetImage(views::ImageButton::STATE_NORMAL, + CreateVectorIcon(kPhoneHubPhoneIcon, TrayIconColor(state))); TemporarilyDisableAnimation(); } @@ -200,6 +224,13 @@ content_view_->GetScreenForMetrics()); } +bool PhoneHubTray::PerformAction(const ui::Event& event) { + // By default, if the individual buttons did not handle the event consider it + // as a phone hub icon event. + PhoneHubIconActivated(event); + return true; +} + TrayBubbleView* PhoneHubTray::GetBubbleView() { return bubble_ ? bubble_->bubble_view() : nullptr; } @@ -214,9 +245,12 @@ void PhoneHubTray::OnThemeChanged() { TrayBackgroundView::OnThemeChanged(); - icon_->SetImage(CreateVectorIcon( - kPhoneHubPhoneIcon, - TrayIconColor(Shell::Get()->session_controller()->GetSessionState()))); + icon_->SetImage( + views::ImageButton::STATE_NORMAL, + CreateVectorIcon( + kPhoneHubPhoneIcon, + TrayIconColor( + Shell::Get()->session_controller()->GetSessionState()))); } bool PhoneHubTray::CanOpenConnectedDeviceSettings() { @@ -240,6 +274,11 @@ bubble_->bubble_view()->UpdateBubble(); } +void PhoneHubTray::SetEcheIconActivationCallback( + base::RepeatingCallback<bool(const ui::Event&)> callback) { + eche_icon_callback_ = std::move(callback); +} + void PhoneHubTray::CloseBubble() { if (!bubble_) return; @@ -272,4 +311,17 @@ FROM_HERE, DisableShowAnimation().Release(), base::Seconds(5)); } +void PhoneHubTray::EcheIconActivated(const ui::Event& event) { + eche_icon_callback_.Run(event); +} + +void PhoneHubTray::PhoneHubIconActivated(const ui::Event& event) { + // Simply toggle between visible/invisibvle + if (bubble_ && bubble_->bubble_view()->GetVisible()) { + CloseBubble(); + } else { + ShowBubble(); + } +} + } // namespace ash
diff --git a/ash/system/phonehub/phone_hub_tray.h b/ash/system/phonehub/phone_hub_tray.h index 84115e7..225ceae 100644 --- a/ash/system/phonehub/phone_hub_tray.h +++ b/ash/system/phonehub/phone_hub_tray.h
@@ -11,15 +11,22 @@ #include "ash/system/phonehub/phone_hub_content_view.h" #include "ash/system/phonehub/phone_hub_ui_controller.h" #include "ash/system/phonehub/phone_status_view.h" +#include "ash/system/status_area_widget.h" #include "ash/system/tray/tray_background_view.h" +#include "base/bind.h" +#include "base/callback.h" +#include "base/callback_forward.h" +#include "base/callback_helpers.h" #include "base/scoped_observation.h" +#include "ui/events/event.h" +#include "ui/views/controls/button/image_button.h" namespace views { -class ImageView; +class ImageButton; } - namespace ash { +class EcheIconLoadingIndicatorView; class PhoneHubContentView; class TrayBubbleWrapper; class SessionControllerImpl; @@ -53,6 +60,7 @@ void Initialize() override; void CloseBubble() override; void ShowBubble() override; + bool PerformAction(const ui::Event& event) override; TrayBubbleView* GetBubbleView() override; views::Widget* GetBubbleWidget() const override; const char* GetClassName() const override; @@ -65,6 +73,20 @@ // OnboardingView::Delegate: void HideStatusHeaderView() override; + // Provides the Eche icon and Eche loading indicator to + // `EcheTray` in order to let `EcheTray` control the visibiliity + // of them. Please note that these views are in control of 'EcheTray' + // and the phone hub area is "borrowed" by `EcheTray` for the + // purpose of grouping the icons together. + views::ImageButton* eche_icon_view() { return eche_icon_; } + EcheIconLoadingIndicatorView* eche_loading_indicator() { + return eche_loading_indicator_; + } + + // Sets a callback that will be called when eche icon is activated. + void SetEcheIconActivationCallback( + base::RepeatingCallback<bool(const ui::Event&)> callback); + views::View* content_view_for_testing() { return content_view_; } PhoneHubUiController* ui_controller_for_testing() { @@ -95,8 +117,23 @@ // connected. void TemporarilyDisableAnimation(); + // Button click/press handlers for main phone hub icon and secondary + // Eche icon. + void EcheIconActivated(const ui::Event& event); + void PhoneHubIconActivated(const ui::Event& event); + // Icon of the tray. Unowned. - views::ImageView* icon_; + views::ImageButton* icon_; + + // Icon for Eche. Unowned. + views::ImageButton* eche_icon_ = nullptr; + + // The loading indicator, showing a throbber animation on top of the icon. + EcheIconLoadingIndicatorView* eche_loading_indicator_ = nullptr; + + // This callback is called when the Eche icon is activated. + base::RepeatingCallback<bool(const ui::Event&)> eche_icon_callback_ = + base::BindRepeating([](const ui::Event&) { return true; }); // Controls the main content view displayed in the bubble based on the current // PhoneHub state. @@ -116,6 +153,8 @@ observed_phone_hub_ui_controller_{this}; base::ScopedObservation<SessionControllerImpl, SessionObserver> observed_session_{this}; + + base::WeakPtrFactory<PhoneHubTray> weak_factory_{this}; }; } // namespace ash
diff --git a/ash/system/phonehub/phone_hub_ui_controller_unittest.cc b/ash/system/phonehub/phone_hub_ui_controller_unittest.cc index be939d6..cef3c67 100644 --- a/ash/system/phonehub/phone_hub_ui_controller_unittest.cc +++ b/ash/system/phonehub/phone_hub_ui_controller_unittest.cc
@@ -326,8 +326,7 @@ TEST_F(PhoneHubUiControllerTest, HandleBubbleOpenedShouldCloseEcheBubble) { EcheTray* eche_tray = StatusAreaWidgetTestHelper::GetStatusAreaWidget()->eche_tray(); - eche_tray->SetUrl(GURL("http://google.com")); - eche_tray->SetVisiblePreferred(true); + eche_tray->LoadBubble(GURL("http://google.com"), gfx::Image()); eche_tray->ShowBubble(); EXPECT_TRUE( eche_tray->get_bubble_wrapper_for_test()->bubble_view()->GetVisible());
diff --git a/ash/system/power/power_status.h b/ash/system/power/power_status.h index 3aaa4a6..1a20cf1 100644 --- a/ash/system/power/power_status.h +++ b/ash/system/power/power_status.h
@@ -14,6 +14,7 @@ #include "chromeos/dbus/power/power_manager_client.h" #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image_skia.h" namespace gfx {
diff --git a/ash/webui/personalization_app/resources/trusted/personalization_store.ts b/ash/webui/personalization_app/resources/trusted/personalization_store.ts index 44d97fc1..dd2ec403 100644 --- a/ash/webui/personalization_app/resources/trusted/personalization_store.ts +++ b/ash/webui/personalization_app/resources/trusted/personalization_store.ts
@@ -5,6 +5,7 @@ import {Action, Store} from 'chrome://resources/js/cr/ui/store.js'; import {StoreClient, StoreClientInterface} from 'chrome://resources/js/cr/ui/store_client.js'; import {I18nMixin, I18nMixinInterface} from 'chrome://resources/js/i18n_mixin.js'; +import {ListPropertyUpdateMixin, ListPropertyUpdateMixinInterface} from 'chrome://resources/js/list_property_update_mixin.js'; import {IronResizableBehavior} from 'chrome://resources/polymer/v3_0/iron-resizable-behavior/iron-resizable-behavior.js'; import {mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -107,7 +108,8 @@ export const WithPersonalizationStore: { new (): PolymerElement&I18nMixinInterface&IronResizableBehavior& - PersonalizationStoreClient&StoreClientInterface + ListPropertyUpdateMixinInterface&PersonalizationStoreClient& + StoreClientInterface } = mixinBehaviors( [ @@ -115,4 +117,4 @@ PersonalizationStoreClientImpl, IronResizableBehavior, ], - I18nMixin(PolymerElement)); + I18nMixin(ListPropertyUpdateMixin(PolymerElement)));
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_albums_element.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_albums_element.ts index 307afab1..58f215a 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_albums_element.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_albums_element.ts
@@ -11,12 +11,12 @@ import './styles.js'; import '../../common/styles.js'; -import {assert} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {IronListElement} from 'chrome://resources/polymer/v3_0/iron-list/iron-list.js'; import {IronScrollThresholdElement} from 'chrome://resources/polymer/v3_0/iron-scroll-threshold/iron-scroll-threshold.js'; import {afterNextRender, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {getCountText, isNonEmptyArray, isSelectionEvent} from '../../common/utils.js'; +import {getCountText, isSelectionEvent} from '../../common/utils.js'; import {GooglePhotosAlbum, WallpaperProviderInterface} from '../personalization_app.mojom-webui.js'; import {PersonalizationRouter} from '../personalization_router_element.js'; import {WithPersonalizationStore} from '../personalization_store.js'; @@ -51,7 +51,11 @@ observer: 'onAlbumsChanged_', }, - albumsForDisplay_: Array, + albumsForDisplay_: { + type: Array, + value: [], + }, + albumsLoading_: Boolean, albumsResumeToken_: { @@ -68,7 +72,7 @@ private albums_: GooglePhotosAlbum[]|null|undefined; /** The list of |albums_| which is updated in place for display. */ - private albumsForDisplay_: GooglePhotosAlbum[]|null|undefined; + private albumsForDisplay_: GooglePhotosAlbum[]; /** Whether the list of albums is currently loading. */ private albumsLoading_: boolean; @@ -104,39 +108,20 @@ /** Invoked on changes to |albums_|. */ private onAlbumsChanged_(albums: GooglePhotosAlbums['albums_']) { - if (!isNonEmptyArray(albums)) { - this.albumsForDisplay_ = null; - return; - } - - // Case: First batch of albums. - if (this.albumsForDisplay_ === null || - this.albumsForDisplay_ === undefined) { - this.albumsForDisplay_ = albums; - return; - } - - // Case: Subsequent batches of albums. // NOTE: |albumsForDisplay_| is updated in place to avoid resetting the - // scroll position of the grid but it will be deeply equal to |albums_| - // after being updated. - albums.forEach((album, i) => { - if (i < this.albumsForDisplay_!.length) { - this.set(`albumsForDisplay_.${i}`, album); - } else { - this.push('albumsForDisplay_', album); - } - }); - - while (this.albumsForDisplay_.length > albums.length) { - this.pop(`albumsForDisplay_`); - } + // scroll position of the grid which would otherwise occur during + // reassignment but it will be deeply equal to |albums_| after updating. + this.updateList( + /*propertyPath=*/ 'albumsForDisplay_', + /*identityGetter=*/ (album: GooglePhotosAlbum) => album.id, + /*newList=*/ albums ?? [], + /*identityBasedUpdate=*/ true); } /** Invoked on changes to |albumsResumeToken_|. */ private onAlbumsResumeTokenChanged_( albumsResumeToken: GooglePhotosAlbums['albumsResumeToken_']) { - if (albumsResumeToken?.length) { + if (albumsResumeToken) { this.$.gridScrollThreshold.clearTriggers(); } } @@ -151,7 +136,7 @@ // Ignore this event if albums are already being loading or if there is no // resume token (indicating there are no additional albums to load). - if (this.albumsLoading_ === true || this.albumsResumeToken_ === null) { + if (this.albumsLoading_ === true || !this.albumsResumeToken_) { return; }
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_collection_element.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_collection_element.ts index e7c1d569..bc1f22d 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_collection_element.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_collection_element.ts
@@ -11,7 +11,7 @@ import './styles.js'; import '/common/styles.js'; -import {assertNotReached} from 'chrome://resources/js/assert.m.js'; +import {assertNotReached} from 'chrome://resources/js/assert_ts.js'; import {html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {isNonEmptyArray} from '../../common/utils.js';
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.html b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.html index 5c8e7ee..76bd82d 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.html +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.html
@@ -3,21 +3,26 @@ overflow: hidden; } + iron-scroll-threshold, iron-list { height: 100%; width: 100%; } </style> -<iron-list id="grid" items="[[album_]]" as="photo" grid> - <template> - <wallpaper-grid-item - class="photo" - image-src="[[photo.url.url]]" - on-click="onPhotoSelected_" - on-keypress="onPhotoSelected_" - selected="[[isPhotoSelected_( - photo, currentSelected_, pendingSelected_)]]" - tabindex$="[[tabIndex]]"> - </wallpaper-grid-item> - </template> -</iron-list> +<iron-scroll-threshold id="gridScrollThreshold" + on-lower-threshold="onGridScrollThresholdReached_"> + <iron-list id="grid" items="[[album_]]" as="photo" grid + scroll-target="gridScrollThreshold"> + <template> + <wallpaper-grid-item + class="photo" + image-src="[[photo.url.url]]" + on-click="onPhotoSelected_" + on-keypress="onPhotoSelected_" + selected="[[isPhotoSelected_( + photo, currentSelected_, pendingSelected_)]]" + tabindex$="[[tabIndex]]"> + </wallpaper-grid-item> + </template> + </iron-list> +</iron-scroll-threshold>
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.ts index bed9538..a646402 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_by_album_id_element.ts
@@ -7,12 +7,15 @@ * for the currently selected album id. */ +import 'chrome://resources/polymer/v3_0/iron-list/iron-list.js'; +import 'chrome://resources/polymer/v3_0/iron-scroll-threshold/iron-scroll-threshold.js'; import './styles.js'; import '/common/styles.js'; -import {assert} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {FilePath} from 'chrome://resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js'; import {IronListElement} from 'chrome://resources/polymer/v3_0/iron-list/iron-list.js'; +import {IronScrollThresholdElement} from 'chrome://resources/polymer/v3_0/iron-scroll-threshold/iron-scroll-threshold.js'; import {afterNextRender, html} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {isSelectionEvent} from '../../common/utils.js'; @@ -24,7 +27,7 @@ import {getWallpaperProvider} from './wallpaper_interface_provider.js'; export interface GooglePhotosPhotosByAlbumId { - $: {grid: IronListElement;}; + $: {grid: IronListElement; gridScrollThreshold: IronScrollThresholdElement}; } export class GooglePhotosPhotosByAlbumId extends WithPersonalizationStore { @@ -38,9 +41,7 @@ static get properties() { return { - albumId: { - type: String, - }, + albumId: String, hidden: { type: Boolean, @@ -51,17 +52,24 @@ album_: { type: Array, - computed: - 'computeAlbum_(albumId, photosByAlbumId_, photosByAlbumIdLoading_)', + value: [], }, currentSelected_: Object, pendingSelected_: Object, photosByAlbumId_: Object, photosByAlbumIdLoading_: Object, + photosByAlbumIdResumeTokens_: Object, }; } + static get observers() { + return [ + 'onAlbumIdOrPhotosByAlbumIdChanged_(albumId, photosByAlbumId_)', + 'onAlbumIdOrPhotosByAlbumIdResumeTokensChanged_(albumId, photosByAlbumIdResumeTokens_)', + ]; + } + /** The currently selected album id. */ albumId: string|undefined; @@ -69,7 +77,7 @@ override hidden: boolean; /** The list of photos for the currently selected album id. */ - private album_: GooglePhotosPhoto[]|null|undefined; + private album_: GooglePhotosPhoto[]; /** The currently selected wallpaper. */ private currentSelected_: CurrentWallpaper|null; @@ -83,6 +91,9 @@ /** Whether the list of photos by album id is currently loading. */ private photosByAlbumIdLoading_: Record<string, boolean>; + /** The resume tokens needed to fetch the next page of photos by album id. */ + private photosByAlbumIdResumeTokens_: Record<string, string|null>; + /** The singleton wallpaper provider interface. */ private wallpaperProvider_: WallpaperProviderInterface = getWallpaperProvider(); @@ -100,10 +111,33 @@ this.watch<GooglePhotosPhotosByAlbumId['photosByAlbumIdLoading_']>( 'photosByAlbumIdLoading_', state => state.wallpaper.loading.googlePhotos.photosByAlbumId); + this.watch<GooglePhotosPhotosByAlbumId['photosByAlbumIdResumeTokens_']>( + 'photosByAlbumIdResumeTokens_', + state => state.wallpaper.googlePhotos.resumeTokens.photosByAlbumId); this.updateFromStore(); } + /** Invoked on grid scroll threshold reached. */ + private onGridScrollThresholdReached_() { + // Ignore this event if fired during initialization. + if (!this.$.gridScrollThreshold.scrollHeight || !this.albumId) { + this.$.gridScrollThreshold.clearTriggers(); + return; + } + + // Ignore this event if photos are already being loaded or if there is no + // resume token (indicating there are no additional photos to load). + if (this.photosByAlbumIdLoading_[this.albumId] === true || + !this.photosByAlbumIdResumeTokens_[this.albumId]) { + return; + } + + // Fetch the next page of photos. + fetchGooglePhotosAlbum( + this.wallpaperProvider_, this.getStore(), this.albumId); + } + /** Invoked on changes to this element's |hidden| state. */ private onHiddenChanged_(hidden: GooglePhotosPhotosByAlbumId['hidden']) { if (hidden) { @@ -116,36 +150,49 @@ afterNextRender(this, () => this.$.grid.fire('iron-resize')); } - /** Invoked on selection of a photo. */ - private onPhotoSelected_(e: Event&{model: {photo: GooglePhotosPhoto}}) { - assert(e.model.photo); - if (isSelectionEvent(e)) { - selectWallpaper(e.model.photo, this.wallpaperProvider_, this.getStore()); - } - } - - /** Invoked to compute |album_|. */ - private computeAlbum_( + /** Invoked on changes to |albumId| or |photosByAlbumId_|. */ + private onAlbumIdOrPhotosByAlbumIdChanged_( albumId: GooglePhotosPhotosByAlbumId['albumId'], - photosByAlbumId: GooglePhotosPhotosByAlbumId['photosByAlbumId_'], - photosByAlbumIdLoading: - GooglePhotosPhotosByAlbumId['photosByAlbumIdLoading_']): - GooglePhotosPhoto[]|null { - // If no album is currently selected or if the currently selected album is - // still loading then there is nothing to display. - if (!albumId || photosByAlbumIdLoading[albumId]) { - return null; + photosByAlbumId: GooglePhotosPhotosByAlbumId['photosByAlbumId_']) { + // If no album is currently selected there is nothing to display. + if (!albumId) { + this.album_ = []; + return; } // If the currently selected album has not already been fetched, do so // though there is still nothing to display. if (!photosByAlbumId.hasOwnProperty(albumId)) { fetchGooglePhotosAlbum(this.wallpaperProvider_, this.getStore(), albumId); - return null; + this.album_ = []; + return; } - // Once the currently selected album has been fetched it can be displayed. - return photosByAlbumId[albumId]!; + // NOTE: |album_| is updated in place to avoid resetting the scroll + // position of the grid which would otherwise occur during reassignment. + this.updateList( + /*propertyPath=*/ 'album_', + /*identityGetter=*/ (photo: GooglePhotosPhoto) => photo.id, + /*newList=*/ photosByAlbumId[albumId] ?? [], + /*identityBasedUpdate=*/ true); + } + + /** Invoked on changes to |albumId| or |photosByAlbumIdResumeTokens_|. */ + private onAlbumIdOrPhotosByAlbumIdResumeTokensChanged_( + albumId: GooglePhotosPhotosByAlbumId['albumId'], + photosByAlbumIdResumeTokens: + GooglePhotosPhotosByAlbumId['photosByAlbumIdResumeTokens_']) { + if (albumId && photosByAlbumIdResumeTokens[albumId]) { + this.$.gridScrollThreshold.clearTriggers(); + } + } + + /** Invoked on selection of a photo. */ + private onPhotoSelected_(e: Event&{model: {photo: GooglePhotosPhoto}}) { + assert(e.model.photo); + if (isSelectionEvent(e)) { + selectWallpaper(e.model.photo, this.wallpaperProvider_, this.getStore()); + } } // Returns whether the specified |photo| is currently selected.
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_element.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_element.ts index 6b3e7d4..a55725d 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_element.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/google_photos_photos_element.ts
@@ -11,7 +11,7 @@ import './styles.js'; import '../../common/styles.js'; -import {assert} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {FilePath} from 'chrome://resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js'; import {IronListElement} from 'chrome://resources/polymer/v3_0/iron-list/iron-list.js'; import {IronScrollThresholdElement} from 'chrome://resources/polymer/v3_0/iron-scroll-threshold/iron-scroll-threshold.js'; @@ -65,7 +65,11 @@ pendingSelected_: Object, photos_: Array, - photosByRow_: Array, + + photosByRow_: { + type: Array, + value: [], + }, photosBySection_: { type: Array, @@ -108,7 +112,7 @@ * The list of |photos_| split into the appropriate number of |photosPerRow_| * so as to be rendered in a grid. */ - private photosByRow_: GooglePhotosPhoto[][]|null; + private photosByRow_: GooglePhotosPhotosRow[]; /** * The list of |photos_| split into the appropriate number of |photosPerRow_| @@ -159,7 +163,7 @@ // Ignore this event if photos are already being loading or if there is no // resume token (indicating there are no additional photos to load). - if (this.photosLoading_ === true || this.photosResumeToken_ === null) { + if (this.photosLoading_ === true || !this.photosResumeToken_) { return; } @@ -240,39 +244,19 @@ /** Invoked on changes to |photosBySection_|. */ private onPhotosBySectionChanged_( photosBySection: GooglePhotosPhotos['photosBySection_']) { - if (!isNonEmptyArray(photosBySection)) { - this.photosByRow_ = null; - return; - } - - const photosByRow = photosBySection.flatMap(section => section.rows); - - // Case: First batch of photos. - if (this.photosByRow_ === null || this.photosByRow_ === undefined) { - this.photosByRow_ = photosByRow; - return; - } - - // Case: Subsequent batches of photos. // NOTE: |photosByRow_| is updated in place to avoid resetting the scroll - // position of the grid. - photosByRow.forEach((row, i) => { - if (i < this.photosByRow_!.length) { - this.set(`photosByRow_.${i}`, row); - } else { - this.push('photosByRow_', row); - } - }); - - while (this.photosByRow_.length > photosByRow.length) { - this.pop('photosByRow_'); - } + // position of the grid which would otherwise occur during reassignment. + this.updateList( + /*propertyPath=*/ 'photosByRow_', /*identityGetter=*/ + (row: GooglePhotosPhotosRow) => row.map(photo => photo.id).join('_'), + /*newList=*/ photosBySection?.flatMap(section => section.rows) ?? [], + /*identityBasedUpdate=*/ true); } /** Invoked on changes to |photosResumeToken_|. */ private onPhotosResumeTokenChanged_( photosResumeToken: GooglePhotosPhotos['photosResumeToken_']) { - if (photosResumeToken?.length) { + if (photosResumeToken) { this.$.gridScrollThreshold.clearTriggers(); } }
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_actions.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_actions.ts index f9d3a81..8f9876d 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_actions.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_actions.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} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {Action} from 'chrome://resources/js/cr/ui/store.js'; import {FilePath} from 'chrome://resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js'; @@ -14,6 +14,7 @@ */ export enum WallpaperActionName { + APPEND_GOOGLE_PHOTOS_ALBUM = 'append_google_photos_album', APPEND_GOOGLE_PHOTOS_ALBUMS = 'append_google_photos_albums', APPEND_GOOGLE_PHOTOS_PHOTOS = 'append_google_photos_photos', BEGIN_LOAD_GOOGLE_PHOTOS_ALBUM = 'begin_load_google_photos_album', @@ -30,7 +31,6 @@ END_SELECT_IMAGE = 'end_select_image', SET_COLLECTIONS = 'set_collections', SET_DAILY_REFRESH_COLLECTION_ID = 'set_daily_refresh_collection_id', - SET_GOOGLE_PHOTOS_ALBUM = 'set_google_photos_album', SET_GOOGLE_PHOTOS_COUNT = 'set_google_photos_count', SET_GOOGLE_PHOTOS_ENABLED = 'set_google_photos_enabled', SET_IMAGES_FOR_COLLECTION = 'set_images_for_collection', @@ -42,19 +42,41 @@ } export type WallpaperActions = - AppendGooglePhotosAlbumsAction|AppendGooglePhotosPhotosAction| - BeginLoadGooglePhotosAlbumAction|BeginLoadGooglePhotosAlbumsAction| - BeginLoadGooglePhotosCountAction|BeginLoadGooglePhotosEnabledAction| - BeginLoadGooglePhotosPhotosAction|BeginLoadImagesForCollectionsAction| - BeginLoadLocalImagesAction|BeginLoadLocalImageDataAction| - BeginUpdateDailyRefreshImageAction|BeginLoadSelectedImageAction| - BeginSelectImageAction|EndSelectImageAction|SetCollectionsAction| - SetDailyRefreshCollectionIdAction|SetGooglePhotosAlbumAction| + AppendGooglePhotosAlbumAction|AppendGooglePhotosAlbumsAction| + AppendGooglePhotosPhotosAction|BeginLoadGooglePhotosAlbumAction| + BeginLoadGooglePhotosAlbumsAction|BeginLoadGooglePhotosCountAction| + BeginLoadGooglePhotosEnabledAction|BeginLoadGooglePhotosPhotosAction| + BeginLoadImagesForCollectionsAction|BeginLoadLocalImagesAction| + BeginLoadLocalImageDataAction|BeginUpdateDailyRefreshImageAction| + BeginLoadSelectedImageAction|BeginSelectImageAction|EndSelectImageAction| + SetCollectionsAction|SetDailyRefreshCollectionIdAction| SetGooglePhotosCountAction|SetGooglePhotosEnabledAction| SetImagesForCollectionAction|SetLocalImageDataAction|SetLocalImagesAction| SetUpdatedDailyRefreshImageAction|SetSelectedImageAction| SetFullscreenEnabledAction; +export type AppendGooglePhotosAlbumAction = Action&{ + name: WallpaperActionName.APPEND_GOOGLE_PHOTOS_ALBUM; + albumId: string; + photos: GooglePhotosPhoto[]|null; + resumeToken: string|null; +}; + +/** + * Appends to the list of Google Photos photos for the album associated with the + * specified id. May be called with null on error. + */ +export function appendGooglePhotosAlbumAction( + albumId: string, photos: GooglePhotosPhoto[]|null, + resumeToken: string|null): AppendGooglePhotosAlbumAction { + return { + albumId, + photos, + resumeToken, + name: WallpaperActionName.APPEND_GOOGLE_PHOTOS_ALBUM + }; +} + export type AppendGooglePhotosAlbumsAction = Action&{ name: WallpaperActionName.APPEND_GOOGLE_PHOTOS_ALBUMS; albums: GooglePhotosAlbum[]|null; @@ -285,22 +307,6 @@ }; } -export type SetGooglePhotosAlbumAction = Action&{ - name: WallpaperActionName.SET_GOOGLE_PHOTOS_ALBUM; - albumId: string; - photos: GooglePhotosPhoto[]|null; -}; - -/** - * Sets the list of Google Photos photos for the album associated with the - * specified id. May be called with null on error. - */ -export function setGooglePhotosAlbumAction( - albumId: string, - photos: GooglePhotosPhoto[]|null): SetGooglePhotosAlbumAction { - return {albumId, photos, name: WallpaperActionName.SET_GOOGLE_PHOTOS_ALBUM}; -} - export type SetGooglePhotosCountAction = Action&{ name: WallpaperActionName.SET_GOOGLE_PHOTOS_COUNT; count: number|null;
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_controller.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_controller.ts index 307e939b..a0db3a3 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_controller.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_controller.ts
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {assert} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; import {FilePath} from 'chrome://resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js'; import {isNonEmptyArray} from '../../common/utils.js'; -import {FetchGooglePhotosAlbumsResponse, FetchGooglePhotosPhotosResponse, GooglePhotosAlbum, GooglePhotosEnablementState, GooglePhotosPhoto, WallpaperCollection, WallpaperImage, WallpaperLayout, WallpaperProviderInterface, WallpaperType} from '../personalization_app.mojom-webui.js'; +import {GooglePhotosAlbum, GooglePhotosEnablementState, GooglePhotosPhoto, WallpaperCollection, WallpaperImage, WallpaperLayout, WallpaperProviderInterface, WallpaperType} from '../personalization_app.mojom-webui.js'; import {PersonalizationStore} from '../personalization_store.js'; import {appendMaxResolutionSuffix, isFilePath, isGooglePhotosPhoto, isWallpaperImage} from '../utils.js'; @@ -71,22 +71,21 @@ store.dispatch(action.beginLoadGooglePhotosAlbumAction(albumId)); let photos: Array<GooglePhotosPhoto>|null = []; - let resumeToken: string|null|undefined = null; + let resumeToken = + store.data.wallpaper.googlePhotos.resumeTokens.photosByAlbumId[albumId] ?? + null; - // TODO(b/216882690): Support incremental load of photos as the user scrolls - // through their library as opposed to loading them all at once. - do { - const {response} = await provider.fetchGooglePhotosPhotos( - /*itemId=*/ null, albumId, resumeToken) as - {response: FetchGooglePhotosPhotosResponse}; - if (!Array.isArray(response.photos)) { - console.warn('Failed to fetch Google Photos album'); - photos = null; - break; - } + const {response} = await provider.fetchGooglePhotosPhotos( + /*itemId=*/ null, albumId, resumeToken); + if (Array.isArray(response.photos)) { photos.push(...response.photos); - resumeToken = response.resumeToken; - } while (resumeToken); + resumeToken = response.resumeToken ?? null; + } else { + console.warn('Failed to fetch Google Photos album'); + photos = null; + // NOTE: `resumeToken` is intentionally *not* modified so that the request + // which failed can be reattempted. + } // Impose max resolution. if (photos !== null) { @@ -94,7 +93,8 @@ photo => ({...photo, url: appendMaxResolutionSuffix(photo.url)})); } - store.dispatch(action.setGooglePhotosAlbumAction(albumId, photos)); + store.dispatch( + action.appendGooglePhotosAlbumAction(albumId, photos, resumeToken)); } /** Fetches the list of Google Photos albums and saves it to the store. */ @@ -106,8 +106,7 @@ let albums: Array<GooglePhotosAlbum>|null = []; let resumeToken = store.data.wallpaper.googlePhotos.resumeTokens.albums; - const {response} = await provider.fetchGooglePhotosAlbums(resumeToken) as - {response: FetchGooglePhotosAlbumsResponse}; + const {response} = await provider.fetchGooglePhotosAlbums(resumeToken); if (Array.isArray(response.albums)) { albums.push(...response.albums); resumeToken = response.resumeToken ?? null; @@ -159,8 +158,7 @@ let resumeToken = store.data.wallpaper.googlePhotos.resumeTokens.photos; const {response} = await provider.fetchGooglePhotosPhotos( - /*itemId=*/ null, /*albumId=*/ null, resumeToken) as - {response: FetchGooglePhotosPhotosResponse}; + /*itemId=*/ null, /*albumId=*/ null, resumeToken); if (Array.isArray(response.photos)) { photos.push(...response.photos); resumeToken = response.resumeToken ?? null;
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_reducers.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_reducers.ts index 63f2fa4a..6a53ab1 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_reducers.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_reducers.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} from 'chrome://resources/js/assert.m.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {FilePath} from 'chrome://resources/mojo/mojo/public/mojom/base/file_path.mojom-webui.js'; import {Actions} from '../personalization_actions.js'; @@ -124,7 +124,7 @@ case WallpaperActionName.SET_UPDATED_DAILY_REFRESH_IMAGE: return {...state, refreshWallpaper: false}; case WallpaperActionName.BEGIN_LOAD_GOOGLE_PHOTOS_ALBUM: - assert(state.googlePhotos.photosByAlbumId[action.albumId] === undefined); + assert(!state.googlePhotos.photosByAlbumId[action.albumId]); return { ...state, googlePhotos: { @@ -135,7 +135,7 @@ }, }, }; - case WallpaperActionName.SET_GOOGLE_PHOTOS_ALBUM: + case WallpaperActionName.APPEND_GOOGLE_PHOTOS_ALBUM: assert(state.googlePhotos.photosByAlbumId[action.albumId] === true); return { ...state, @@ -345,19 +345,61 @@ _: PersonalizationState): WallpaperState['googlePhotos'] { switch (action.name) { case WallpaperActionName.BEGIN_LOAD_GOOGLE_PHOTOS_ALBUM: - // The list of photos for an album should be loaded only once. + // The list of photos for an album should be loaded only while additional + // photos exist. assert(state.albums?.some(album => album.id === action.albumId)); - assert(state.photosByAlbumId[action.albumId] === undefined); + assert( + state.photosByAlbumId[action.albumId] === undefined || + state.resumeTokens.photosByAlbumId[action.albumId]); return state; - case WallpaperActionName.SET_GOOGLE_PHOTOS_ALBUM: + case WallpaperActionName.APPEND_GOOGLE_PHOTOS_ALBUM: assert(state.albums?.some(album => album.id === action.albumId)); assert(action.albumId !== undefined); assert(action.photos !== undefined); + // Case: First batch of photos. + if (!Array.isArray(state.photosByAlbumId[action.albumId])) { + return { + ...state, + photosByAlbumId: { + ...state.photosByAlbumId, + [action.albumId]: action.photos, + }, + resumeTokens: { + ...state.resumeTokens, + photosByAlbumId: { + ...state.resumeTokens.photosByAlbumId, + [action.albumId]: action.resumeToken, + }, + }, + }; + } + // Case: Subsequent batches of photos. + if (Array.isArray(action.photos)) { + return { + ...state, + photosByAlbumId: { + ...state.photosByAlbumId, + [action.albumId]: + [...state.photosByAlbumId[action.albumId]!, ...action.photos], + }, + resumeTokens: { + ...state.resumeTokens, + photosByAlbumId: { + ...state.resumeTokens.photosByAlbumId, + [action.albumId]: action.resumeToken, + }, + }, + }; + } + // Case: Error. return { ...state, - photosByAlbumId: { - ...state.photosByAlbumId, - [action.albumId]: action.photos, + resumeTokens: { + ...state.resumeTokens, + photosByAlbumId: { + ...state.resumeTokens.photosByAlbumId, + [action.albumId]: action.resumeToken, + }, }, }; case WallpaperActionName.BEGIN_LOAD_GOOGLE_PHOTOS_ALBUMS:
diff --git a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_state.ts b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_state.ts index ca1dc8d036..4098c1f 100644 --- a/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_state.ts +++ b/ash/webui/personalization_app/resources/trusted/wallpaper/wallpaper_state.ts
@@ -34,7 +34,11 @@ albums: GooglePhotosAlbum[]|null|undefined; photos: GooglePhotosPhoto[]|null|undefined; photosByAlbumId: Record<string, GooglePhotosPhoto[]|null|undefined>; - resumeTokens: {albums: string|null, photos: string|null}; + resumeTokens: { + albums: string|null, + photos: string|null, + photosByAlbumId: Record<string, string|null>, + }; } /** @@ -121,7 +125,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }; }
diff --git a/ash/wm/desks/desk.cc b/ash/wm/desks/desk.cc index e03c7e8..6b27c92 100644 --- a/ash/wm/desks/desk.cc +++ b/ash/wm/desks/desk.cc
@@ -82,7 +82,8 @@ // its desk is removed. The save desk as template widget is not activatable // but should also be moved to the next active desk. if (window->GetId() == kShellWindowId_DesksBarWindow || - window->GetId() == kShellWindowId_SaveDeskAsTemplateWindow) { + window->GetId() == kShellWindowId_SaveDeskAsTemplateWindow || + window->GetId() == kShellWindowId_OverviewNoWindowsLabelWindow) { return true; }
diff --git a/ash/wm/overview/overview_grid.cc b/ash/wm/overview/overview_grid.cc index e7096590..f6c9148 100644 --- a/ash/wm/overview/overview_grid.cc +++ b/ash/wm/overview/overview_grid.cc
@@ -1836,6 +1836,7 @@ aura::Window* widget_window = no_windows_widget_->GetNativeWindow(); widget_window->parent()->StackChildAtBottom(widget_window); + widget_window->SetId(kShellWindowId_OverviewNoWindowsLabelWindow); ScopedOverviewAnimationSettings settings(OVERVIEW_ANIMATION_NO_RECENTS_FADE, widget_window); no_windows_widget_->SetOpacity(1.f);
diff --git a/base/memory/ref_counted_memory.cc b/base/memory/ref_counted_memory.cc index 09e84d3..e60dfcf 100644 --- a/base/memory/ref_counted_memory.cc +++ b/base/memory/ref_counted_memory.cc
@@ -71,8 +71,14 @@ // static scoped_refptr<RefCountedString> RefCountedString::TakeString( std::string* to_destroy) { + return TakeString(std::move(*to_destroy)); +} + +// static +scoped_refptr<RefCountedString> RefCountedString::TakeString( + std::string&& str) { auto self = MakeRefCounted<RefCountedString>(); - to_destroy->swap(self->data_); + str.swap(self->data_); return self; } @@ -92,8 +98,14 @@ // static scoped_refptr<RefCountedString16> RefCountedString16::TakeString( std::u16string* to_destroy) { + return TakeString(std::move(*to_destroy)); +} + +// static +scoped_refptr<RefCountedString16> RefCountedString16::TakeString( + std::u16string&& str) { auto self = MakeRefCounted<RefCountedString16>(); - to_destroy->swap(self->data_); + str.swap(self->data_); return self; }
diff --git a/base/memory/ref_counted_memory.h b/base/memory/ref_counted_memory.h index 24e2d4c7..0e6f6f0 100644 --- a/base/memory/ref_counted_memory.h +++ b/base/memory/ref_counted_memory.h
@@ -135,6 +135,8 @@ // copy into object->data()). static scoped_refptr<RefCountedString> TakeString(std::string* to_destroy); + static scoped_refptr<RefCountedString> TakeString(std::string&& str); + // RefCountedMemory: const unsigned char* front() const override; size_t size() const override; @@ -161,6 +163,8 @@ static scoped_refptr<RefCountedString16> TakeString( std::u16string* to_destroy); + static scoped_refptr<RefCountedString16> TakeString(std::u16string&& str); + // RefCountedMemory: const unsigned char* front() const override; size_t size() const override;
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py index a097cc85..5deee7df 100644 --- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py +++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -739,9 +739,14 @@ try: if not os.path.exists(self._test_instance.coverage_directory): os.makedirs(self._test_instance.coverage_directory) - device.PullFile(coverage_device_file, - self._test_instance.coverage_directory) - device.RemovePath(coverage_device_file, True) + # Retries add time to test execution. + if device.PathExists(coverage_device_file, retries=0): + device.PullFile(coverage_device_file, + self._test_instance.coverage_directory) + device.RemovePath(coverage_device_file, True) + else: + logging.warning('Coverage file does not exist: %s', + coverage_device_file) except (OSError, base_error.BaseError) as e: logging.warning('Failed to handle coverage data after tests: %s', e)
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 4c9acdb..46a6147 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -7.20220323.1.1 +7.20220323.2.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 4c9acdb..46a6147 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -7.20220323.1.1 +7.20220323.2.1
diff --git a/chrome/android/java/res/drawable-hdpi/tab_strip_fade_long.png b/chrome/android/java/res/drawable-hdpi/tab_strip_fade_long.png index ab9cbfb..3a8346a77 100644 --- a/chrome/android/java/res/drawable-hdpi/tab_strip_fade_long.png +++ b/chrome/android/java/res/drawable-hdpi/tab_strip_fade_long.png Binary files differ
diff --git a/chrome/android/java/res/drawable-hdpi/tab_strip_fade_short.png b/chrome/android/java/res/drawable-hdpi/tab_strip_fade_short.png index e833f57..1e99b7d 100644 --- a/chrome/android/java/res/drawable-hdpi/tab_strip_fade_short.png +++ b/chrome/android/java/res/drawable-hdpi/tab_strip_fade_short.png Binary files differ
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java index 97c8b9a..fe78345 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java
@@ -112,6 +112,9 @@ return 0 /*ServicificationStartupUma.ServicificationStartup.CHROME_COLD*/; } + @Override + public void setDisableLibraryLoadForCast(boolean disabled) {} + public void setIsStartupSuccessfullyCompleted(boolean flag) { mStartupSucceeded = flag; }
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index cc6167f7..3d09f9d8 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc
@@ -144,7 +144,6 @@ #include "chrome/browser/flags/android/chrome_feature_list.h" #include "chrome/common/chrome_descriptors.h" #include "components/crash/android/pure_java_exception_handler.h" -#include "components/power_scheduler/power_scheduler.h" #include "net/android/network_change_notifier_factory_android.h" #else // BUILDFLAG(IS_ANDROID) // Diagnostics is only available on non-android platforms. @@ -655,14 +654,6 @@ // it if not already overridden by command line, field trial etc. net::HttpCache::SplitCacheFeatureEnableByDefault(); -#if BUILDFLAG(IS_ANDROID) - // For child processes, this requires allowlisting of the sched_setaffinity() - // syscall in the sandbox (baseline_policy_android.cc). When this call is - // removed, the sandbox allowlist should be updated too. - power_scheduler::PowerScheduler::GetInstance() - ->InitializePolicyFromFeatureList(); -#endif - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) // Threading features. base::PlatformThread::InitThreadPostFieldTrial();
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 910701dd..66053f8 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -12534,7 +12534,7 @@ <!-- ChromeLabs Tab Search Media Tabs --> <message name='IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_NAME' desc="Name for the Tab Search Media Tabs experiment"> - Tab Search Media Tabs + Media Tabs Section in Tab Search </message> <message name='IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_DESCRIPTION' desc='Description for the Tab Search Media Tabs experiment'> Adds a new section in 'Search Tabs' to easily find your tabs playing audio or video. Access through the button on the top corner of your browser.
diff --git a/chrome/app/generated_resources_grd/IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_NAME.png.sha1 b/chrome/app/generated_resources_grd/IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_NAME.png.sha1 index 67ee4169..f888125 100644 --- a/chrome/app/generated_resources_grd/IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_NAME.png.sha1 +++ b/chrome/app/generated_resources_grd/IDS_TAB_SEARCH_MEDIA_TABS_EXPERIMENT_NAME.png.sha1
@@ -1 +1 @@ -cbe280d1df55cc1b5d548106fcc3bb80834a2a11 \ No newline at end of file +adc0e841d57b79a617f686f1af365f0604c73e81 \ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 40049ac..937b23c 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -222,7 +222,6 @@ #include "components/content_creation/notes/core/note_features.h" #include "components/content_creation/reactions/core/reactions_features.h" #include "components/external_intents/android/external_intents_features.h" -#include "components/power_scheduler/power_scheduler_features.h" #include "components/translate/content/android/translate_message.h" #include "components/webapps/browser/android/features.h" #else // BUILDFLAG(IS_ANDROID) @@ -6195,14 +6194,6 @@ "MetricsSettingsAndroid")}, #endif -#if BUILDFLAG(IS_ANDROID) - {"safe-browsing-password-protection-for-signed-in-users", - flag_descriptions::kPasswordProtectionForSignedInUsersName, - flag_descriptions::kPasswordProtectionForSignedInUsersDescription, - kOsAndroid, - FEATURE_VALUE_TYPE(safe_browsing::kPasswordProtectionForSignedInUsers)}, -#endif - #if BUILDFLAG(IS_CHROMEOS_ASH) {"gesture-properties-dbus-service", flag_descriptions::kEnableGesturePropertiesDBusServiceName, @@ -6972,13 +6963,6 @@ FEATURE_VALUE_TYPE(features::kConsolidatedSiteStorageControls)}, #if BUILDFLAG(IS_ANDROID) - {"cpu-affinity-restrict-to-little-cores", - flag_descriptions::kCpuAffinityRestrictToLittleCoresName, - flag_descriptions::kCpuAffinityRestrictToLittleCoresDescription, - kOsAndroid, - FEATURE_VALUE_TYPE( - power_scheduler::features::kCpuAffinityRestrictToLittleCores)}, - {"enable-surface-control", flag_descriptions::kAndroidSurfaceControlName, flag_descriptions::kAndroidSurfaceControlDescription, kOsAndroid, FEATURE_VALUE_TYPE(features::kAndroidSurfaceControl)},
diff --git a/chrome/browser/apps/app_service/browser_app_launcher.cc b/chrome/browser/apps/app_service/browser_app_launcher.cc index a5241d9..f2b7d13 100644 --- a/chrome/browser/apps/app_service/browser_app_launcher.cc +++ b/chrome/browser/apps/app_service/browser_app_launcher.cc
@@ -151,34 +151,4 @@ } #endif -void BrowserAppLauncher::LaunchAppWithCallback( - const std::string& app_id, - const base::CommandLine& command_line, - const base::FilePath& current_directory, - const absl::optional<GURL>& url_handler_launch_url, - const absl::optional<GURL>& protocol_handler_launch_url, - const std::vector<base::FilePath>& launch_files, - base::OnceCallback<void(Browser* browser, - apps::mojom::LaunchContainer container)> callback) { - // old-style app shortcuts - if (app_id.empty()) { - ::LaunchAppWithCallback(profile_, app_id, command_line, current_directory, - std::move(callback)); - return; - } - - const extensions::Extension* extension = - extensions::ExtensionRegistry::Get(profile_)->GetInstalledExtension( - app_id); - if (!extension) { - web_app_launch_manager_.LaunchApplication( - app_id, command_line, current_directory, url_handler_launch_url, - protocol_handler_launch_url, launch_files, std::move(callback)); - return; - } - - ::LaunchAppWithCallback(profile_, app_id, command_line, current_directory, - std::move(callback)); -} - } // namespace apps
diff --git a/chrome/browser/apps/app_service/browser_app_launcher.h b/chrome/browser/apps/app_service/browser_app_launcher.h index 00628bfb..1aaaf62c 100644 --- a/chrome/browser/apps/app_service/browser_app_launcher.h +++ b/chrome/browser/apps/app_service/browser_app_launcher.h
@@ -5,9 +5,6 @@ #ifndef CHROME_BROWSER_APPS_APP_SERVICE_BROWSER_APP_LAUNCHER_H_ #define CHROME_BROWSER_APPS_APP_SERVICE_BROWSER_APP_LAUNCHER_H_ -#include <memory> -#include <string> - #include "base/callback.h" #include "base/memory/raw_ptr.h" #include "chrome/browser/apps/app_service/app_launch_params.h" @@ -15,15 +12,8 @@ #include "components/services/app_service/public/mojom/types.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" -class Browser; -class GURL; class Profile; -namespace base { -class CommandLine; -class FilePath; -} // namespace base - namespace content { class WebContents; } @@ -76,29 +66,6 @@ void LaunchPlayStoreWithExtensions(); #endif - // Attempts to open `app_id` in a new window or tab. Open an empty browser - // window if unsuccessful. The user's preferred launch container for the app - // (standalone window or browser tab) is used. `callback` will be called with - // the container type used to open the app, kLaunchContainerNone if an empty - // browser window was opened. `callback`'s `browser` will be nullptr if the - // navigation failed. - // `url_handler_launch_url` is the launch URL when a PWA should be launched - // as the URL handler. It's null if it's not a URL handler launch. - // `protocol_handler_launch_url` is the protocol URL when a PWA is launched - // as a protocol handler. It's null if it's not a protocol handler launch. - // `launch_files` is a list of files to be passed to the PWA when it is - // launched as a file handler, or empty if it's not a file handling launch. - void LaunchAppWithCallback( - const std::string& app_id, - const base::CommandLine& command_line, - const base::FilePath& current_directory, - const absl::optional<GURL>& url_handler_launch_url, - const absl::optional<GURL>& protocol_handler_launch_url, - const std::vector<base::FilePath>& launch_files, - base::OnceCallback<void(Browser* browser, - apps::mojom::LaunchContainer container)> - callback); - private: const raw_ptr<Profile> profile_; web_app::WebAppLaunchManager web_app_launch_manager_;
diff --git a/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.cc b/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.cc index e28d6e7..a992e5e 100644 --- a/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.cc +++ b/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.cc
@@ -138,11 +138,9 @@ AppPlatformInputMetrics::AppPlatformInputMetrics( Profile* profile, - apps::AppRegistryCache& app_registry_cache, InstanceRegistry& instance_registry) : profile_(profile) { InstanceRegistry::Observer::Observe(&instance_registry); - AppRegistryCache::Observer::Observe(&app_registry_cache); if (ash::Shell::HasInstance()) { ash::Shell::Get()->AddPreTargetHandler(this); } @@ -186,15 +184,14 @@ } void AppPlatformInputMetrics::OnTwoHours() { - for (const auto& event_counts : app_id_to_event_count_per_two_hours_) { - ukm::SourceId source_id = GetSourceId(event_counts.first); - if (source_id == ukm::kInvalidSourceId) { - continue; - } + if (!ShouldRecordUkm(profile_)) { + return; + } + for (const auto& event_counts : app_id_to_event_count_per_two_hours_) { // `event_counts.second` is the map from InputEventSource to the event // counts. - RecordInputEventsUkm(source_id, event_counts.second); + RecordInputEventsUkm(event_counts.first, event_counts.second); } app_id_to_event_count_per_two_hours_.clear(); @@ -235,29 +232,6 @@ InstanceRegistry::Observer::Observe(nullptr); } -void AppPlatformInputMetrics::OnAppRegistryCacheWillBeDestroyed( - AppRegistryCache* cache) { - AppRegistryCache::Observer::Observe(nullptr); -} - -void AppPlatformInputMetrics::OnAppUpdate(const AppUpdate& update) { - if (!update.ReadinessChanged() || - apps_util::IsInstalled(update.Readiness())) { - return; - } - - auto it = app_id_to_source_id_.find(update.AppId()); - if (it == app_id_to_source_id_.end()) { - return; - } - - // Remove the source id when the app is removed. The source id will be added - // when record the UKM, so we don't need to add the source id here when the - // app is installed. - AppPlatformMetrics::RemoveSourceId(it->second); - app_id_to_source_id_.erase(it); -} - void AppPlatformInputMetrics::SetAppInfoForActivatedWindow( AppType app_type, const std::string& app_id, @@ -338,35 +312,33 @@ return; } + if (!ShouldRecordUkmForAppTypeName(GetAppType(profile_, it->second.app_id))) { + return; + } + ++app_id_to_event_count_per_two_hours_[it->second.app_id][event_source] [it->second.app_type_name]; } -ukm::SourceId AppPlatformInputMetrics::GetSourceId(const std::string& app_id) { - auto it = app_id_to_source_id_.find(app_id); - if (it != app_id_to_source_id_.end()) { - return it->second; - } - - auto source_id = AppPlatformMetrics::GetSourceId(profile_, app_id); - app_id_to_source_id_[app_id] = source_id; - return source_id; -} - void AppPlatformInputMetrics::RecordInputEventsUkm( - ukm::SourceId source_id, + const std::string& app_id, const EventSourceToCounts& event_counts) { for (const auto& counts : event_counts) { InputEventSource event_source = counts.first; // `counts.second` is the map from AppTypeName to the event count. for (const auto& count : counts.second) { + auto source_id = AppPlatformMetrics::GetSourceId(profile_, app_id); + if (source_id == ukm::kInvalidSourceId) { + continue; + } ukm::builders::ChromeOSApp_InputEvent builder(source_id); builder.SetAppType((int)count.first) .SetAppInputEventSource((int)event_source) .SetAppInputEventCount(count.second) .SetUserDeviceMatrix(GetUserTypeByDeviceTypeMetrics()) .Record(ukm::UkmRecorder::Get()); + AppPlatformMetrics::RemoveSourceId(source_id); } } } @@ -382,6 +354,10 @@ } void AppPlatformInputMetrics::RecordInputEventsUkmFromPref() { + if (!ShouldRecordUkm(profile_)) { + return; + } + DictionaryPrefUpdate input_events_update(profile_->GetPrefs(), kAppInputEventsKey); if (!input_events_update->is_dict()) { @@ -389,8 +365,7 @@ } for (const auto [app_id, events] : input_events_update->GetDict()) { - ukm::SourceId source_id = GetSourceId(app_id); - if (source_id == ukm::kInvalidSourceId) { + if (!ShouldRecordUkmForAppTypeName(GetAppType(profile_, app_id))) { continue; } @@ -401,7 +376,7 @@ EventSourceToCounts event_counts = ConvertDictValueToEventCounts(*events_dict); - RecordInputEventsUkm(source_id, event_counts); + RecordInputEventsUkm(app_id, event_counts); } }
diff --git a/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.h b/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.h index d0a8b9ba..bcc8228 100644 --- a/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.h +++ b/chrome/browser/apps/app_service/metrics/app_platform_input_metrics.h
@@ -11,7 +11,6 @@ #include "chrome/browser/apps/app_service/metrics/app_platform_metrics_utils.h" #include "chrome/browser/apps/app_service/metrics/browser_to_tab_list.h" #include "chrome/browser/profiles/profile.h" -#include "components/services/app_service/public/cpp/app_registry_cache.h" #include "components/services/app_service/public/cpp/instance_registry.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "ui/events/event_handler.h" @@ -37,7 +36,6 @@ // This class is used to record the input events for the app windows. class AppPlatformInputMetrics : public ui::EventHandler, - public AppRegistryCache::Observer, public InstanceRegistry::Observer { public: // For web apps and Chrome apps, there might be different app type name for @@ -48,7 +46,6 @@ using EventSourceToCounts = base::flat_map<InputEventSource, CountPerAppType>; AppPlatformInputMetrics(Profile* profile, - AppRegistryCache& app_registry_cache, InstanceRegistry& instance_registry); AppPlatformInputMetrics(const AppPlatformInputMetrics&) = delete; @@ -76,10 +73,6 @@ void OnInstanceUpdate(const InstanceUpdate& update) override; void OnInstanceRegistryWillBeDestroyed(InstanceRegistry* cache) override; - // AppRegistryCache::Observer: - void OnAppRegistryCacheWillBeDestroyed(AppRegistryCache* cache) override; - void OnAppUpdate(const AppUpdate& update) override; - void SetAppInfoForActivatedWindow(AppType app_type, const std::string& app_id, aura::Window* window, @@ -93,7 +86,7 @@ ukm::SourceId GetSourceId(const std::string& app_id); - void RecordInputEventsUkm(ukm::SourceId source_id, + void RecordInputEventsUkm(const std::string& app_id, const EventSourceToCounts& event_counts); // Saves the input events in `app_id_to_event_count_per_two_hours_` to the @@ -123,12 +116,6 @@ // The map from the window to the app info. base::flat_map<aura::Window*, AppInfo> window_to_app_info_; - // The map from the app id to the source id to reuse the existing source id - // for the same app id based on the UKM guidelines. When the app is removed, - // the record for the app will be removed, and inform UKM service that the - // source_id is no longer used. - std::map<std::string, ukm::SourceId> app_id_to_source_id_; - // Records the input even count for each app id in the past five minutes. Each // app id might have multiple events. For web apps and Chrome apps, there // might be different app type name, e.g. Chrome browser for apps opening in
diff --git a/chrome/browser/apps/app_service/metrics/app_platform_metrics_service.cc b/chrome/browser/apps/app_service/metrics/app_platform_metrics_service.cc index f402104c..2d0d26e 100644 --- a/chrome/browser/apps/app_service/metrics/app_platform_metrics_service.cc +++ b/chrome/browser/apps/app_service/metrics/app_platform_metrics_service.cc
@@ -62,7 +62,7 @@ app_platform_app_metrics_ = std::make_unique<apps::AppPlatformMetrics>( profile_, app_registry_cache, instance_registry); app_platform_input_metrics_ = std::make_unique<apps::AppPlatformInputMetrics>( - profile_, app_registry_cache, instance_registry); + profile_, instance_registry); day_id_ = profile_->GetPrefs()->GetInteger(kAppPlatformMetricsDayId); CheckForNewDay();
diff --git a/chrome/browser/ash/eche_app/eche_app_manager_factory.cc b/chrome/browser/ash/eche_app/eche_app_manager_factory.cc index 1ab9ca0..c6975f7 100644 --- a/chrome/browser/ash/eche_app/eche_app_manager_factory.cc +++ b/chrome/browser/ash/eche_app/eche_app_manager_factory.cc
@@ -75,17 +75,7 @@ void LaunchBubble(const GURL& url, const gfx::Image& icon) { auto* eche_tray = GetEcheTray(); DCHECK(eche_tray); - eche_tray->SetUrl(url); - eche_tray->SetIcon(icon); - eche_tray->SetVisiblePreferred(true); - if (!features::IsEcheSWAInBackgroundEnabled() || eche_tray->IsInitialized()) { - eche_tray->ShowBubble(); - } else { - eche_tray->InitBubble(); - - // Hide bubble first until the streaming is ready. - eche_tray->HideBubble(); - } + eche_tray->LoadBubble(url, icon); } void LaunchWebApp(const std::string& package_name, @@ -209,7 +199,9 @@ // static void EcheAppManagerFactory::CloseEche(Profile* profile) { if (features::IsEcheCustomWidgetEnabled()) { - GetEcheTray()->PurgeAndClose(); + auto* eche_tray = GetEcheTray(); + if (eche_tray) + eche_tray->PurgeAndClose(); return; } for (auto* browser : *(BrowserList::GetInstance())) { @@ -247,9 +239,10 @@ Profile* profile, const mojom::StreamStatus status) { if (status == mojom::StreamStatus::kStreamStatusStarted && - features::IsEcheCustomWidgetEnabled() && - features::IsEcheSWAInBackgroundEnabled()) { - GetEcheTray()->ShowBubble(); + features::IsEcheCustomWidgetEnabled()) { + auto* eche_tray = GetEcheTray(); + if (eche_tray) + eche_tray->ShowBubble(); } else if (status == mojom::StreamStatus::kStreamStatusStopped) { CloseEche(profile); }
diff --git a/chrome/browser/ash/eche_app/eche_app_manager_factory_unittest.cc b/chrome/browser/ash/eche_app/eche_app_manager_factory_unittest.cc index 7c6626f..c3bb8d6 100644 --- a/chrome/browser/ash/eche_app/eche_app_manager_factory_unittest.cc +++ b/chrome/browser/ash/eche_app/eche_app_manager_factory_unittest.cc
@@ -6,6 +6,7 @@ #include "ash/constants/ash_features.h" #include "ash/system/eche/eche_tray.h" +#include "ash/system/phonehub/phone_hub_tray.h" #include "ash/system/status_area_widget_test_helper.h" #include "ash/system/tray/tray_bubble_wrapper.h" #include "ash/test/test_ash_web_view_factory.h" @@ -42,17 +43,21 @@ ChromeAshTestBase::SetUp(); eche_tray_ = ash::StatusAreaWidgetTestHelper::GetStatusAreaWidget()->eche_tray(); + phone_hub_tray_ = ash::StatusAreaWidgetTestHelper::GetStatusAreaWidget() + ->phone_hub_tray(); } TestingProfile* GetProfile() { return profile_; } EcheTray* eche_tray() { return eche_tray_; } + PhoneHubTray* phone_hub_tray() { return phone_hub_tray_; } private: base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr<TestingProfileManager> profile_manager_; TestingProfile* profile_; EcheTray* eche_tray_ = nullptr; + PhoneHubTray* phone_hub_tray_ = nullptr; // Calling the factory constructor is enough to set it up. std::unique_ptr<TestAshWebViewFactory> test_web_view_factory_ = std::make_unique<TestAshWebViewFactory>(); @@ -109,8 +114,8 @@ visible_name_1, user_id, gfx::Image()); // Wait for Eche Tray to load Eche Web to complete base::RunLoop().RunUntilIdle(); - // Eche tray should be visible after launch. - EXPECT_TRUE(eche_tray()->is_active()); + // Eche icon should be visible after launch. + EXPECT_TRUE(phone_hub_tray()->eche_icon_view()->GetVisible()); // Launch different application should not recreate widget views::Widget* widget = eche_tray()->GetBubbleWidget();
diff --git a/chrome/browser/ash/file_manager/file_manager_browsertest.cc b/chrome/browser/ash/file_manager/file_manager_browsertest.cc index 239c0a0..2c99a78 100644 --- a/chrome/browser/ash/file_manager/file_manager_browsertest.cc +++ b/chrome/browser/ash/file_manager/file_manager_browsertest.cc
@@ -1789,8 +1789,8 @@ FilesAppBrowserTest, ::testing::Values( TestCase("fakesListed").EnableGuestOsFiles(), - TestCase("mountGuestError").EnableGuestOsFiles(), TestCase("listUpdatedWhenGuestsChanged").EnableGuestOsFiles(), + TestCase("mountGuestSuccess").EnableGuestOsFiles(), TestCase("notListedWithoutFlag"))); } // namespace file_manager
diff --git a/chrome/browser/ash/file_manager/file_manager_browsertest_base.cc b/chrome/browser/ash/file_manager/file_manager_browsertest_base.cc index f2606d2..7e2c534a 100644 --- a/chrome/browser/ash/file_manager/file_manager_browsertest_base.cc +++ b/chrome/browser/ash/file_manager/file_manager_browsertest_base.cc
@@ -46,6 +46,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/test/bind.h" #include "base/threading/thread_restrictions.h" @@ -1661,16 +1662,47 @@ class MockGuestOsMountProvider : public guest_os::GuestOsMountProvider { public: - explicit MockGuestOsMountProvider(std::string name) : name_(name) {} + MockGuestOsMountProvider(Profile* profile, std::string name) + : profile_(profile), name_(name) {} + + MockGuestOsMountProvider(const MockGuestOsMountProvider&) = delete; + MockGuestOsMountProvider& operator=(const MockGuestOsMountProvider&) = delete; std::string DisplayName() override { return name_; } - Profile* profile() override { return nullptr; } + Profile* profile() override { return profile_; } crostini::ContainerId ContainerId() override { return crostini::ContainerId::GetDefault(); } + int cid_; + int cid() override { return cid_; } + private: + Profile* profile_; std::string name_; + std::unique_ptr<GuestOsTestVolume> volume_; +}; + +// GuestOsTestVolume: local test volume for the "Guest OS" directories. +class GuestOsTestVolume : public LocalTestVolume { + public: + explicit GuestOsTestVolume(Profile* profile, + MockGuestOsMountProvider* provider) + : LocalTestVolume(util::GetGuestOsMountPointName( + profile, + crostini::ContainerId::GetDefault())), + provider_(provider) {} + + GuestOsTestVolume(const GuestOsTestVolume&) = delete; + GuestOsTestVolume& operator=(const GuestOsTestVolume&) = delete; + + ~GuestOsTestVolume() override = default; + + bool Mount(Profile* profile) override { return CreateRootDirectory(profile); } + + const base::FilePath& mount_path() const { return root_path(); } + + MockGuestOsMountProvider* provider_; }; FileManagerBrowserTestBase::FileManagerBrowserTestBase() = default; @@ -1947,6 +1979,11 @@ ->AddCustomMountPointCallback( base::BindRepeating(&FileManagerBrowserTestBase::MaybeMountCrostini, base::Unretained(this))); + static_cast<chromeos::FakeCrosDisksClient*>( + dbus_thread_manager->GetCrosDisksClient()) + ->AddCustomMountPointCallback( + base::BindRepeating(&FileManagerBrowserTestBase::MaybeMountGuestOs, + base::Unretained(this))); if (arc::IsArcAvailable()) { // When ARC is available, create and register a fake FileSystemInstance @@ -3030,12 +3067,24 @@ const base::DictionaryValue& value, std::string* output) { if (name == "registerMountableGuest") { - const std::string* displayName = value.GetDict().FindString("displayName"); + auto* displayName = value.GetDict().FindString("displayName"); + auto* canMount = value.GetDict().Find("canMount"); CHECK(displayName != nullptr); auto* registry = guest_os::GuestOsService::GetForProfile(profile()) ->MountProviderRegistry(); auto id = registry->Register( - std::make_unique<MockGuestOsMountProvider>(*displayName)); + std::make_unique<MockGuestOsMountProvider>(profile(), *displayName)); + MockGuestOsMountProvider* ptr = + reinterpret_cast<MockGuestOsMountProvider*>(registry->Get(id)); + ptr->cid_ = id; + if (canMount && canMount->GetBool()) { + // If we ask for the volume to be mountable we add it to the map, and it's + // mountable. If not then it's an unknown volume and the mount request + // fails. + guest_os_volumes_[base::StringPrintf("sftp://%d:0", id)] = + std::make_unique<GuestOsTestVolume>(profile(), ptr); + } + base::JSONWriter::Write(base::Value(id), output); return true; } @@ -3087,6 +3136,21 @@ return crostini_volume_->mount_path(); } +base::FilePath FileManagerBrowserTestBase::MaybeMountGuestOs( + const std::string& source_path, + const std::vector<std::string>& mount_options) { + GURL source_url(source_path); + DCHECK(source_url.is_valid()); + if (source_url.scheme() != "sftp") { + return {}; + } + if (!guest_os_volumes_.contains(source_path)) { + return {}; + } + guest_os_volumes_[source_path]->Mount(profile()); + return guest_os_volumes_[source_path]->mount_path(); +} + void FileManagerBrowserTestBase::EnableVirtualKeyboard() { ash::ShellTestApi().EnableVirtualKeyboard(); }
diff --git a/chrome/browser/ash/file_manager/file_manager_browsertest_base.h b/chrome/browser/ash/file_manager/file_manager_browsertest_base.h index af34db7..e127acfa 100644 --- a/chrome/browser/ash/file_manager/file_manager_browsertest_base.h +++ b/chrome/browser/ash/file_manager/file_manager_browsertest_base.h
@@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "base/containers/flat_map.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/metrics/user_action_tester.h" #include "base/test/scoped_feature_list.h" @@ -50,6 +51,7 @@ class MediaViewTestVolume; class SmbfsTestVolume; class HiddenTestVolume; +class GuestOsTestVolume; class FileManagerBrowserTestBase : public content::DevToolsAgentHostObserver, public extensions::ExtensionApiTest { @@ -202,6 +204,10 @@ const std::string& source_path, const std::vector<std::string>& mount_options); + base::FilePath MaybeMountGuestOs( + const std::string& source_path, + const std::vector<std::string>& mount_options); + // Called during tablet mode test setup to enable the Ash virtual keyboard. void EnableVirtualKeyboard(); @@ -249,6 +255,10 @@ std::unique_ptr<SmbfsTestVolume> smbfs_volume_; std::unique_ptr<HiddenTestVolume> hidden_volume_; + // Map from source path (e.g. sftp://1:2) to volume. + base::flat_map<std::string, std::unique_ptr<GuestOsTestVolume>> + guest_os_volumes_; + drive::DriveIntegrationServiceFactory::FactoryCallback create_drive_integration_service_; std::unique_ptr<drive::DriveIntegrationServiceFactory::ScopedFactoryForTest>
diff --git a/chrome/browser/ash/login/demo_mode/demo_session.h b/chrome/browser/ash/login/demo_mode/demo_session.h index a7565cf9..2d0c3b3 100644 --- a/chrome/browser/ash/login/demo_mode/demo_session.h +++ b/chrome/browser/ash/login/demo_mode/demo_session.h
@@ -76,8 +76,8 @@ // TODO(crbug.com/983359): Sort these by country name in the current locale // instead of using this hard-coded US-centric order. static constexpr char kSupportedCountries[][3] = { - "US", "BE", "CA", "DK", "FI", "FR", "DE", "IE", - "IT", "JP", "LU", "NL", "NO", "ES", "SE", "GB"}; + "US", "AU", "BE", "CA", "DK", "FI", "FR", "DE", "IN", "IE", "IT", + "JP", "LU", "MX", "NL", "NO", "PL", "ZA", "ES", "SE", "GB"}; static constexpr char kCountryNotSelectedId[] = "N/A";
diff --git a/chrome/browser/ash/login/demo_mode/demo_setup_browsertest.cc b/chrome/browser/ash/login/demo_mode/demo_setup_browsertest.cc index a4ae45b..ea6b3bf 100644 --- a/chrome/browser/ash/login/demo_mode/demo_setup_browsertest.cc +++ b/chrome/browser/ash/login/demo_mode/demo_setup_browsertest.cc
@@ -377,23 +377,17 @@ // Verify the country names are displayed correctly. Regression test for // potential country code changes. const base::flat_map<std::string, std::string> kCountryCodeToNameMap = { - {"US", "United States"}, - {"BE", "Belgium"}, - {"CA", "Canada"}, - {"DK", "Denmark"}, - {"FI", "Finland"}, - {"FR", "France"}, - {"DE", "Germany"}, - {"IE", "Ireland"}, - {"IT", "Italy"}, - {"JP", "Japan"}, - {"LU", "Luxembourg"}, - {"NL", "Netherlands"}, - {"NO", "Norway"}, - {"ES", "Spain"}, - {"SE", "Sweden"}, - {"GB", "United Kingdom"}, - {"N/A", "Please select a country"}}; + {"US", "United States"}, {"AU", "Australia"}, + {"BE", "Belgium"}, {"CA", "Canada"}, + {"DK", "Denmark"}, {"FI", "Finland"}, + {"FR", "France"}, {"DE", "Germany"}, + {"IN", "India"}, {"IE", "Ireland"}, + {"IT", "Italy"}, {"JP", "Japan"}, + {"LU", "Luxembourg"}, {"MX", "Mexico"}, + {"NL", "Netherlands"}, {"NO", "Norway"}, + {"PL", "Poland"}, {"ZA", "South Africa"}, + {"ES", "Spain"}, {"SE", "Sweden"}, + {"GB", "United Kingdom"}, {"N/A", "Please select a country"}}; system::ScopedFakeStatisticsProvider statistics_provider_;
diff --git a/chrome/browser/ash/login/demo_mode/demo_setup_controller_unittest.cc b/chrome/browser/ash/login/demo_mode/demo_setup_controller_unittest.cc index 0728dbb..a186a440 100644 --- a/chrome/browser/ash/login/demo_mode/demo_setup_controller_unittest.cc +++ b/chrome/browser/ash/login/demo_mode/demo_setup_controller_unittest.cc
@@ -266,8 +266,8 @@ // Test other supported countries. const std::string testing_supported_countries[] = { - "US", "BE", "CA", "DK", "FI", "FR", "DE", "IE", - "IT", "JP", "LU", "NL", "NO", "ES", "SE", "GB"}; + "US", "AU", "BE", "CA", "DK", "FI", "FR", "DE", "IN", "IE", "IT", + "JP", "LU", "MX", "NL", "NO", "PL", "ZA", "ES", "SE", "GB"}; for (auto country : testing_supported_countries) { g_browser_process->local_state()->SetString(prefs::kDemoModeCountry,
diff --git a/chrome/browser/chrome_browser_interface_binders.cc b/chrome/browser/chrome_browser_interface_binders.cc index 840face..2b46aad 100644 --- a/chrome/browser/chrome_browser_interface_binders.cc +++ b/chrome/browser/chrome_browser_interface_binders.cc
@@ -158,7 +158,7 @@ #include "chrome/browser/ui/webui/read_later/read_later.mojom.h" #include "chrome/browser/ui/webui/read_later/read_later_ui.h" #include "chrome/browser/ui/webui/read_later/side_panel/bookmarks_side_panel_ui.h" -#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h" #include "chrome/browser/ui/webui/settings/settings_ui.h" #include "chrome/browser/ui/webui/tab_search/tab_search.mojom.h" #include "chrome/browser/ui/webui/tab_search/tab_search_ui.h" @@ -878,8 +878,7 @@ if (features::IsReadAnythingEnabled()) { if (base::FeatureList::IsEnabled(features::kUnifiedSidePanel)) { RegisterWebUIControllerInterfaceBinder< - read_anything::mojom::PageHandlerFactory, ReadAnythingSidePanelUI>( - map); + read_anything::mojom::PageHandlerFactory, ReadAnythingUI>(map); } else { RegisterWebUIControllerInterfaceBinder< read_anything::mojom::PageHandlerFactory, ReadLaterUI>(map);
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.cc index 0edde1e..eb6be11 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.cc
@@ -4,9 +4,12 @@ #include "chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.h" +#include "base/bind.h" +#include "base/strings/stringprintf.h" #include "base/values.h" #include "chrome/browser/ash/guest_os/public/guest_os_service.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/common/extensions/api/file_manager_private.h" #include "extensions/browser/extension_function.h" namespace { @@ -44,8 +47,30 @@ default; ExtensionFunction::ResponseAction FileManagerPrivateMountGuestFunction::Run() { - LOG(ERROR) << "Mount not implemented"; - return RespondNow(Error("Not implemented")); + using extensions::api::file_manager_private::MountGuest::Params; + const std::unique_ptr<Params> params(Params::Create(args())); + EXTENSION_FUNCTION_VALIDATE(params); + Profile* profile = Profile::FromBrowserContext(browser_context()); + auto* registry = + guest_os::GuestOsService::GetForProfile(profile)->MountProviderRegistry(); + auto* provider = registry->Get(params->id); + if (provider == nullptr) { + auto error = + base::StringPrintf("Unable to find guest for id %d", params->id); + LOG(ERROR) << error; + return RespondNow(Error(error)); + } + provider->Mount(base::BindOnce( + &FileManagerPrivateMountGuestFunction::MountCallback, this)); + return RespondLater(); +} + +void FileManagerPrivateMountGuestFunction::MountCallback(bool success) { + if (!success) { + Respond(Error("Error mounting guest")); + return; + } + Respond(NoArguments()); } } // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.h b/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.h index bbce147..2973d0d8 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.h +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_guest_os.h
@@ -42,6 +42,10 @@ private: ~FileManagerPrivateMountGuestFunction() override; + // Callback for when the mount event completes. `success` is true if the mount + // succeeded, false on error. + void MountCallback(bool success); + ResponseAction Run() override; };
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc index 4907fb09a..a9555ff 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_mount.cc
@@ -177,6 +177,11 @@ ash::smb_client::SmbServiceFactory::Get(profile)->UnmountSmbFs( volume->mount_path()); break; + case file_manager::VOLUME_TYPE_GUEST_OS: + // TODO(crbug/1293229): Figure out if we need to support unmounting. I'm + // not actually sure if it's possible to reach here. + NOTREACHED(); + break; default: // Requested unmounting a device which is not unmountable. return RespondNow(Error("Invalid volume type"));
diff --git a/chrome/browser/component_updater/recovery_component_installer.cc b/chrome/browser/component_updater/recovery_component_installer.cc index fb16cd6..839de739 100644 --- a/chrome/browser/component_updater/recovery_component_installer.cc +++ b/chrome/browser/component_updater/recovery_component_installer.cc
@@ -172,6 +172,90 @@ } } +void DoElevatedInstallRecoveryComponent(const base::FilePath& path) { + const base::FilePath main_file = path.Append(kRecoveryFileName); + const base::FilePath manifest_file = + path.Append(FILE_PATH_LITERAL("manifest.json")); + if (!base::PathExists(main_file) || !base::PathExists(manifest_file)) + return; + + std::unique_ptr<base::DictionaryValue> manifest(ReadManifest(manifest_file)); + const std::string* name = manifest->FindStringKey("name"); + if (!name || *name != kRecoveryManifestName) + return; + std::string proposed_version; + if (const std::string* ptr = manifest->FindStringKey("version")) { + if (base::IsStringASCII(*ptr)) + proposed_version = *ptr; + } + const base::Version version(proposed_version); + if (!version.IsValid()) + return; + + const bool is_deferred_run = true; +#if BUILDFLAG(IS_WIN) + const auto cmdline = BuildRecoveryInstallCommandLine( + main_file, *manifest, is_deferred_run, version); + + RecordRecoveryComponentUMAEvent(RCE_RUNNING_ELEVATED); + + base::LaunchOptions options; + options.start_hidden = true; + options.elevated = true; + base::Process process = base::LaunchElevatedProcess(cmdline, options); +#elif BUILDFLAG(IS_MAC) + base::mac::ScopedAuthorizationRef authRef( + base::mac::AuthorizationCreateToRunAsRoot(nullptr)); + if (!authRef.get()) { + RecordRecoveryComponentUMAEvent(RCE_ELEVATED_FAILED); + return; + } + + const auto arguments = GetRecoveryInstallArguments( + *manifest, is_deferred_run, version); + // Convert the arguments memory layout to the format required by + // ExecuteWithPrivilegesAndGetPID(): an array of string pointers + // that ends with a null pointer. + std::vector<const char*> raw_string_args; + for (const auto& arg : arguments) + raw_string_args.push_back(arg.c_str()); + raw_string_args.push_back(nullptr); + + pid_t pid = -1; + const OSStatus status = base::mac::ExecuteWithPrivilegesAndGetPID( + authRef.get(), main_file.value().c_str(), kAuthorizationFlagDefaults, + raw_string_args.data(), nullptr, &pid); + if (status != errAuthorizationSuccess) { + RecordRecoveryComponentUMAEvent(RCE_ELEVATED_FAILED); + return; + } + + // The child process must print its PID in the first line of its STDOUT. See + // https://cs.chromium.org/chromium/src/base/mac/authorization_util.h?l=8 + // for more details. When |pid| cannot be determined, we are not able to + // get process exit code, thus bail out early. + if (pid < 0) { + RecordRecoveryComponentUMAEvent(RCE_ELEVATED_UNKNOWN_RESULT); + return; + } + base::Process process = base::Process::Open(pid); +#endif + // This task joins a process, hence .WithBaseSyncPrimitives(). + base::ThreadPool::PostTask( + FROM_HERE, + {base::WithBaseSyncPrimitives(), base::TaskPriority::BEST_EFFORT, + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, + base::BindOnce(&WaitForElevatedInstallToComplete, std::move(process))); +} + +void ElevatedInstallRecoveryComponent(const base::FilePath& installer_path) { + base::ThreadPool::PostTask( + FROM_HERE, + {base::MayBlock(), base::TaskPriority::BEST_EFFORT, + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, + base::BindOnce(&DoElevatedInstallRecoveryComponent, installer_path)); +} + } // namespace // Component installer that is responsible to repair the chrome installation @@ -442,6 +526,14 @@ void AcceptedElevatedRecoveryInstall(PrefService* prefs) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + ElevatedInstallRecoveryComponent( + prefs->GetFilePath(prefs::kRecoveryComponentUnpackPath)); +#endif +#endif + prefs->SetBoolean(prefs::kRecoveryComponentNeedsElevation, false); }
diff --git a/chrome/browser/extensions/api/declarative_content/content_action.cc b/chrome/browser/extensions/api/declarative_content/content_action.cc index ed040e8..fb24064 100644 --- a/chrome/browser/extensions/api/declarative_content/content_action.cc +++ b/chrome/browser/extensions/api/declarative_content/content_action.cc
@@ -32,6 +32,7 @@ #include "extensions/common/mojom/host_id.mojom.h" #include "extensions/common/mojom/run_location.mojom-shared.h" #include "extensions/common/script_constants.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h"
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc index 232c112..da346a2 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
@@ -27,6 +27,8 @@ const char kDesktopCaptureApiInvalidTabIdError[] = "Invalid tab specified."; const char kDesktopCaptureApiTabUrlNotSecure[] = "URL scheme for the specified tab is not secure."; +const char kTargetTabRequiredFromServiceWorker[] = + "A target tab is required when called from a service worker context."; } // namespace DesktopCaptureChooseDesktopMediaFunction:: @@ -96,7 +98,9 @@ target_name = base::UTF8ToUTF16(GetExtensionTargetName()); target_render_frame_host = render_frame_host(); } - DCHECK(target_render_frame_host); + + if (!target_render_frame_host) + return RespondNow(Error(kTargetTabRequiredFromServiceWorker)); return Execute(params->sources, target_render_frame_host, origin, target_name);
diff --git a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc index 44ff579..055eaed 100644 --- a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc +++ b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc
@@ -572,15 +572,6 @@ "newheader", base::FeatureList::IsEnabled( chromeos::features::kVirtualKeyboardNewHeader))); - // Flag used to enable system built-in IME decoder instead of NaCl. - features.Append(GenerateFeatureFlag("usemojodecoder", true)); - // Enabling MojoDecoder implies the 2 previous flags are auto-enabled. - // * fstinputlogic - // * hmminputlogic - // TODO(b/171846787): Remove the 3 flags after they are removed from clients. - features.Append(GenerateFeatureFlag("fstinputlogic", true)); - features.Append(GenerateFeatureFlag("hmminputlogic", true)); - features.Append(GenerateFeatureFlag( "borderedkey", base::FeatureList::IsEnabled( chromeos::features::kVirtualKeyboardBorderedKey)));
diff --git a/chrome/browser/extensions/service_worker_apitest.cc b/chrome/browser/extensions/service_worker_apitest.cc index 2898f1b..00b956ff0 100644 --- a/chrome/browser/extensions/service_worker_apitest.cc +++ b/chrome/browser/extensions/service_worker_apitest.cc
@@ -2642,6 +2642,44 @@ << message_; } +// Tests that two extensions with the same ServiceWorkerContext* can be +// disabled successfully. This test ensures that the DCHECK in +// ServiceWorkerTaskQueue::StopObserving does not fail in such a scenario. + +// Regression test for https://crbug.com/1223476 +IN_PROC_BROWSER_TEST_F(ServiceWorkerBasedBackgroundTest, + ObserveServiceWorkerContext) { + static constexpr char kManifest[] = R"({ + "name": "Test", + "manifest_version": 3, + "version": "0.1", + "background": {"service_worker": "worker.js"} + })"; + static constexpr char kScript[] = ""; + + TestExtensionDir test_dir1; + test_dir1.WriteManifest(kManifest); + test_dir1.WriteFile(FILE_PATH_LITERAL("worker.js"), kScript); + + scoped_refptr<const Extension> extension1 = + LoadExtension(test_dir1.UnpackedPath()); + ASSERT_TRUE(extension1); + + TestExtensionDir test_dir2; + test_dir2.WriteManifest(kManifest); + test_dir2.WriteFile(FILE_PATH_LITERAL("worker.js"), kScript); + + scoped_refptr<const Extension> extension2 = + LoadExtension(test_dir2.UnpackedPath()); + ASSERT_TRUE(extension2); + EXPECT_NE(extension1->id(), extension2->id()); + + extension_service()->DisableExtension(extension1->id(), + disable_reason::DISABLE_USER_ACTION); + extension_service()->DisableExtension(extension2->id(), + disable_reason::DISABLE_USER_ACTION); +} + // Tests that an extension's service worker can't be used to relax the extension // CSP. IN_PROC_BROWSER_TEST_P(ServiceWorkerWithManifestVersionTest,
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index d50f605a..3219b239 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -722,12 +722,12 @@ { "name": "cellular-forbid-attach-apn", "owners": [ "hsuregan", "cros-connectivity@google.com" ], - "expiry_milestone": 100 + "expiry_milestone": 105 }, { "name": "cellular-use-attach-apn", "owners": [ "andrewlassalle", "ejcaruso", "chromeos-cellular-platform@google.com" ], - "expiry_milestone": 100 + "expiry_milestone": 105 }, { "name": "cellular-use-external-euicc", @@ -5177,14 +5177,6 @@ "expiry_milestone": 99 }, { - "name": "safe-browsing-password-protection-for-signed-in-users", - "owners": [ - "xinghuilu", - "chrome-safebrowsing-alerts@google.com" - ], - "expiry_milestone": 99 - }, - { "name": "sameparty-cookies-considered-first-party", "owners": ["cfredric", "chrome-first-party-sets@chromium.org"], "expiry_milestone": 108
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index ce2ca65b..29872bc6 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -3347,13 +3347,6 @@ const char kPageInfoStoreInfoDescription[] = "Enable a store info row to the page info menu on eligible pages."; -const char kPasswordProtectionForSignedInUsersName[] = - "Password Protection for Signed-In Users"; -const char kPasswordProtectionForSignedInUsersDescription[] = - "Enable signed-in (Google account) password protection for signed-in " - "users and allows users to change their signed-in password through " - "password reuse warnings on phishing or low reputation sites."; - const char kPersistShareHubOnAppSwitchName[] = "Persist sharing hub"; const char kPersistShareHubOnAppSwitchDescription[] = "Persist the sharing hub across app pauses/resumes.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index ae03a4f..b9b663a 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1916,9 +1916,6 @@ extern const char kPageInfoStoreInfoName[]; extern const char kPageInfoStoreInfoDescription[]; -extern const char kPasswordProtectionForSignedInUsersName[]; -extern const char kPasswordProtectionForSignedInUsersDescription[]; - extern const char kPersistShareHubOnAppSwitchName[]; extern const char kPersistShareHubOnAppSwitchDescription[];
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc index 6e4b397b..ac1e785 100644 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/media/webrtc/desktop_media_list.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image.h" using content::BrowserThread;
diff --git a/chrome/browser/media/webrtc/fake_desktop_media_list.cc b/chrome/browser/media/webrtc/fake_desktop_media_list.cc index 87f2e8d0..2bf8011 100644 --- a/chrome/browser/media/webrtc/fake_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/fake_desktop_media_list.cc
@@ -10,6 +10,7 @@ #include "base/strings/string_number_conversions.h" #include "chrome/browser/media/webrtc/desktop_media_list.h" #include "chrome/browser/media/webrtc/desktop_media_list_observer.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/skia_conversions.h" using content::DesktopMediaID;
diff --git a/chrome/browser/media/webrtc/window_icon_util_mac.mm b/chrome/browser/media/webrtc/window_icon_util_mac.mm index 169218d..7878676 100644 --- a/chrome/browser/media/webrtc/window_icon_util_mac.mm +++ b/chrome/browser/media/webrtc/window_icon_util_mac.mm
@@ -9,6 +9,7 @@ #include "base/mac/foundation_util.h" #include "base/mac/scoped_cftyperef.h" #include "third_party/libyuv/include/libyuv/convert_argb.h" +#include "third_party/skia/include/core/SkBitmap.h" gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) { DCHECK(id.type == content::DesktopMediaID::TYPE_WINDOW);
diff --git a/chrome/browser/media/webrtc/window_icon_util_win.cc b/chrome/browser/media/webrtc/window_icon_util_win.cc index 0a14a8a..005f79e 100644 --- a/chrome/browser/media/webrtc/window_icon_util_win.cc +++ b/chrome/browser/media/webrtc/window_icon_util_win.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/media/webrtc/window_icon_util.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/icon_util.h" gfx::ImageSkia GetWindowIcon(content::DesktopMediaID id) {
diff --git a/chrome/browser/nearby_sharing/common/nearby_share_features.cc b/chrome/browser/nearby_sharing/common/nearby_share_features.cc index b823040..4de9890 100644 --- a/chrome/browser/nearby_sharing/common/nearby_share_features.cc +++ b/chrome/browser/nearby_sharing/common/nearby_share_features.cc
@@ -43,7 +43,7 @@ // Enables notification to reminde users of their visibility selections. const base::Feature kNearbySharingVisibilityReminder( "NearbyShareVisibilityReminder", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); // Enables use of WebRTC in Nearby Share. const base::Feature kNearbySharingWebRtc{"NearbySharingWebRtc",
diff --git a/chrome/browser/notifications/win/notification_template_builder_unittest.cc b/chrome/browser/notifications/win/notification_template_builder_unittest.cc index 0286525e..9bcb423 100644 --- a/chrome/browser/notifications/win/notification_template_builder_unittest.cc +++ b/chrome/browser/notifications/win/notification_template_builder_unittest.cc
@@ -17,6 +17,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/grit/chromium_strings.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util_win.h" #include "ui/message_center/public/cpp/notification.h"
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 4c82fc16..d3432819 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -386,6 +386,7 @@ #include "chromeos/network/cellular_esim_profile_handler_impl.h" #include "chromeos/network/cellular_metrics_logger.h" #include "chromeos/network/fast_transition_observer.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/network_metadata_store.h" #include "chromeos/network/proxy/proxy_config_handler.h" #include "chromeos/services/assistant/public/cpp/assistant_prefs.h" @@ -1053,6 +1054,7 @@ ash::AudioDevicesPrefHandlerImpl::RegisterPrefs(registry); ash::cert_provisioning::RegisterLocalStatePrefs(registry); chromeos::CellularESimProfileHandlerImpl::RegisterLocalStatePrefs(registry); + chromeos::ManagedCellularPrefHandler::RegisterLocalStatePrefs(registry); ash::ChromeUserManagerImpl::RegisterPrefs(registry); crosapi::browser_util::RegisterLocalStatePrefs(registry); ash::CupsPrintersManager::RegisterLocalStatePrefs(registry);
diff --git a/chrome/browser/recovery/recovery_install_global_error.h b/chrome/browser/recovery/recovery_install_global_error.h index 6bd9522..572dacae 100644 --- a/chrome/browser/recovery/recovery_install_global_error.h +++ b/chrome/browser/recovery/recovery_install_global_error.h
@@ -14,10 +14,6 @@ class Profile; -// TODO(crbug.com/1309161) - remove the `RecoveryInstallGlobalError` class -// which is not used because the old recovery component is not registered -// anymore. The code has never been used on macOS either. -// // Shows elevation needed for recovery component install on the wrench menu // using a bubble view and a menu item. class RecoveryInstallGlobalError : public GlobalErrorWithStandardBubble,
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/BUILD.gn b/chrome/browser/resources/chromeos/accessibility/chromevox/BUILD.gn index ae9d111..3661acd4 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/BUILD.gn +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/BUILD.gn
@@ -36,7 +36,6 @@ "background/chromevox_state.js", "background/command_handler_interface.js", "background/custom_automation_event.js", - "background/editing/editable_line.js", "background/event_source.js", "background/gesture_command_data.js", "background/keymaps/key_map.js", @@ -61,7 +60,6 @@ "braille/bluetooth_braille_display_ui.js", "braille/braille_display_manager.js", "braille/braille_input_handler.js", - "braille/braille_key_event_rewriter.js", "braille/braille_key_types.js", "braille/braille_table.js", "braille/braille_translator_manager.js", @@ -105,6 +103,7 @@ "background/download_handler.js", "background/earcon_engine.js", "background/earcons.js", + "background/editing/editable_line.js", "background/editing/editing.js", "background/editing/intent_handler.js", "background/es6_loader.js", @@ -121,6 +120,7 @@ "background/pointer_handler.js", "background/smart_sticky_mode.js", "background/logging/log.js", + "braille/braille_key_event_rewriter.js", "common/composite_tts.js", "common/editable_text_base.js", "common/tts_background.js",
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/braille_background.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/braille_background.js index be73221..a6a2f21 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/braille_background.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/braille_background.js
@@ -5,6 +5,7 @@ /** * @fileoverview Sends Braille commands to the Braille API. */ +import {BrailleKeyEventRewriter} from '../braille/braille_key_event_rewriter.js'; /** * @implements {BrailleInterface}
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_line.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_line.js index 96b9959..dbb785f 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_line.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editable_line.js
@@ -9,22 +9,17 @@ * of a line get saved. */ -goog.provide('editing.EditableLine'); - -goog.scope(function() { const AutomationEvent = chrome.automation.AutomationEvent; const AutomationNode = chrome.automation.AutomationNode; -const Cursor = cursors.Cursor; const Dir = constants.Dir; const EventType = chrome.automation.EventType; const FormType = LibLouis.FormType; -const Range = cursors.Range; const RoleType = chrome.automation.RoleType; const StateType = chrome.automation.StateType; const Movement = cursors.Movement; const Unit = cursors.Unit; -editing.EditableLine = class { +export class EditableLine { /** * @param {!AutomationNode} startNode * @param {number} startIndex @@ -35,11 +30,11 @@ * automatically truncated up to either the line start or end. */ constructor(startNode, startIndex, endNode, endIndex, opt_baseLineOnStart) { - /** @private {!Cursor} */ - this.start_ = new Cursor(startNode, startIndex); + /** @private {!cursors.Cursor} */ + this.start_ = new cursors.Cursor(startNode, startIndex); this.start_ = this.start_.deepEquivalent || this.start_; - /** @private {!Cursor} */ - this.end_ = new Cursor(endNode, endIndex); + /** @private {!cursors.Cursor} */ + this.end_ = new cursors.Cursor(endNode, endIndex); this.end_ = this.end_.deepEquivalent || this.end_; /** @private {AutomationNode|undefined} */ @@ -511,7 +506,7 @@ /** * Returns true if |otherLine| surrounds the same line as |this|. Note that * the contents of the line might be different. - * @param {editing.EditableLine} otherLine + * @param {EditableLine} otherLine * @return {boolean} */ isSameLine(otherLine) { @@ -533,7 +528,7 @@ /** * Returns true if |otherLine| surrounds the same line as |this| and has the * same selection. - * @param {editing.EditableLine} otherLine + * @param {EditableLine} otherLine * @return {boolean} */ isSameLineAndSelection(otherLine) { @@ -544,7 +539,7 @@ /** * Returns whether this line comes before |otherLine| in document order. - * @param {!editing.EditableLine} otherLine + * @param {!EditableLine} otherLine * @return {boolean} */ isBeforeLine(otherLine) { @@ -623,7 +618,7 @@ /** * Speaks the line using text to speech. - * @param {editing.EditableLine} prevLine + * @param {EditableLine} prevLine */ speakLine(prevLine) { // Detect when the entire line is just a breaking space. This occurs on @@ -657,8 +652,8 @@ } o.withRichSpeech( - Range.fromNode(cur), - prev ? Range.fromNode(prev) : Range.fromNode(cur), + cursors.Range.fromNode(cur), + prev ? cursors.Range.fromNode(prev) : cursors.Range.fromNode(cur), OutputEventType.NAVIGATE) .onSpeechEnd(() => { speakNodeAtIndex(++index, cur); @@ -679,7 +674,7 @@ /** * Creates a range around the character to the right of the line's starting * position. - * @return {!Range} + * @return {!cursors.Range} */ createCharRange() { const start = this.start_; @@ -693,12 +688,12 @@ start.equals(end)) { end = new cursors.Cursor(start.node, start.index + 1); } - return new Range(start, end); + return new cursors.Range(start, end); } /** * @param {boolean} shouldMoveToPreviousWord - * @return {!Range} + * @return {!cursors.Range} */ createWordRange(shouldMoveToPreviousWord) { const pos = this.start_; @@ -711,7 +706,6 @@ shouldMoveToPreviousWord ? Movement.DIRECTIONAL : Movement.BOUND, Dir.BACKWARD); const end = start.move(Unit.WORD, Movement.BOUND, Dir.FORWARD); - return new Range(start, end); + return new cursors.Range(start, end); } -}; -}); // goog.scope +}
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing.js index 9feeb51..d0d8cd5 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing.js
@@ -10,6 +10,7 @@ import {BrailleBackground} from '../braille_background.js'; import {Color} from '../color.js'; +import {EditableLine} from './editable_line.js'; import {IntentHandler} from './intent_handler.js'; const AutomationEvent = chrome.automation.AutomationEvent; @@ -336,14 +337,14 @@ return; } - this.startLine_ = new editing.EditableLine( + this.startLine_ = new EditableLine( root.selectionStartObject, root.selectionStartOffset, root.selectionStartObject, root.selectionStartOffset); - this.endLine_ = new editing.EditableLine( + this.endLine_ = new EditableLine( root.selectionEndObject, root.selectionEndOffset, root.selectionEndObject, root.selectionEndOffset); - this.line_ = new editing.EditableLine( + this.line_ = new EditableLine( root.selectionStartObject, root.selectionStartOffset, root.selectionEndObject, root.selectionEndOffset); @@ -421,10 +422,10 @@ return; } - const startLine = new editing.EditableLine( + const startLine = new EditableLine( root.selectionStartObject, root.selectionStartOffset, root.selectionStartObject, root.selectionStartOffset); - const endLine = new editing.EditableLine( + const endLine = new EditableLine( root.selectionEndObject, root.selectionEndOffset, root.selectionEndObject, root.selectionEndOffset); @@ -442,7 +443,7 @@ // Nothing changed, return. return; } else { - cur = new editing.EditableLine( + cur = new EditableLine( root.selectionStartObject, root.selectionStartOffset, root.selectionEndObject, root.selectionEndOffset, baseLineOnStart); } @@ -456,12 +457,12 @@ } /** - * @param {!editing.EditableLine} cur - * @param {!editing.EditableLine} prev - * @param {!editing.EditableLine} startLine - * @param {!editing.EditableLine} endLine - * @param {!editing.EditableLine} prevStartLine - * @param {!editing.EditableLine} prevEndLine + * @param {!EditableLine} cur + * @param {!EditableLine} prev + * @param {!EditableLine} startLine + * @param {!EditableLine} endLine + * @param {!EditableLine} prevStartLine + * @param {!EditableLine} prevEndLine * @param {boolean} baseLineOnStart * @param {!Array<AutomationIntent>} intents * @private @@ -906,7 +907,7 @@ /** * @private - * @param {editing.EditableLine} cur Current line. + * @param {EditableLine} cur Current line. */ updateIntraLineState_(cur) { let text = cur.text; @@ -920,8 +921,8 @@ /** * @param {!Array<AutomationIntent>} intents - * @param {!editing.EditableLine} cur - * @param {!editing.EditableLine} prev + * @param {!EditableLine} cur + * @param {!EditableLine} prev * @return {boolean} * @private */ @@ -936,7 +937,7 @@ } /** - * @param {!editing.EditableLine} cur + * @param {!EditableLine} cur * @private */ speakAllMarkers_(cur) { @@ -959,7 +960,7 @@ * table output when over email or url text fields. * @implements {ChromeVoxStateObserver} */ -editing.EditingChromeVoxStateObserver = class { +class EditingChromeVoxStateObserver { constructor() { ChromeVoxState.addObserver(this); } @@ -979,10 +980,10 @@ BrailleBackground.getInstance().getTranslatorManager().refresh( localStorage['brailleTable']); } -}; +} /** * @private {ChromeVoxStateObserver} */ -editing.observer_ = new editing.EditingChromeVoxStateObserver(); +EditingChromeVoxStateObserver.instance_ = new EditingChromeVoxStateObserver();
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js index cb9c41d..bf80b15c 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js
@@ -24,6 +24,8 @@ 'DesktopAutomationInterface', '/chromevox/background/desktop_automation_interface.js'); await importModule( + 'EditableLine', '/chromevox/background/editing/editable_line.js'); + await importModule( 'TextEditHandler', '/chromevox/background/editing/editing.js'); await importModule('TtsBackground', '/chromevox/common/tts_background.js'); await super.setUpDeferred(); @@ -910,7 +912,7 @@ function(root) { const staticText = root.find({role: RoleType.STATIC_TEXT}); - let e = new editing.EditableLine(staticText, 0, staticText, 0); + let e = new EditableLine(staticText, 0, staticText, 0); assertEquals('this ', e.text); assertEquals(0, e.startOffset); @@ -921,7 +923,7 @@ assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); - e = new editing.EditableLine(staticText, 1, staticText, 1); + e = new EditableLine(staticText, 1, staticText, 1); assertEquals('this ', e.text); assertEquals(1, e.startOffset); @@ -932,7 +934,7 @@ assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); - e = new editing.EditableLine(staticText, 5, staticText, 5); + e = new EditableLine(staticText, 5, staticText, 5); assertEquals('is ', e.text); assertEquals(0, e.startOffset); @@ -943,7 +945,7 @@ assertEquals(0, e.containerStartOffset); assertEquals(2, e.containerEndOffset); - e = new editing.EditableLine(staticText, 7, staticText, 7); + e = new EditableLine(staticText, 7, staticText, 7); assertEquals('is ', e.text); assertEquals(2, e.startOffset); @@ -965,7 +967,7 @@ const text = root.find({role: RoleType.STATIC_TEXT}); const bold = text.nextSibling; - let e = new editing.EditableLine(text, 0, text, 0); + let e = new EditableLine(text, 0, text, 0); assertEquals('hello world', e.text); assertEquals(0, e.startOffset); @@ -976,7 +978,7 @@ assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); - e = new editing.EditableLine(text, 5, text, 5); + e = new EditableLine(text, 5, text, 5); assertEquals('hello world', e.text); assertEquals(5, e.startOffset); @@ -987,7 +989,7 @@ assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); - e = new editing.EditableLine(bold, 0, bold, 0); + e = new EditableLine(bold, 0, bold, 0); assertEquals('hello world', e.text); assertEquals(6, e.startOffset); @@ -998,7 +1000,7 @@ assertEquals(6, e.containerStartOffset); assertEquals(10, e.containerEndOffset); - e = new editing.EditableLine(bold, 4, bold, 4); + e = new EditableLine(bold, 4, bold, 4); assertEquals('hello world', e.text); assertEquals(10, e.startOffset); @@ -1026,20 +1028,20 @@ const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. - let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); + let e1 = new EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLine(e1)); // Offset into the same soft line. - let e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); + let e2 = new EditableLine(thisIsATest, 1, thisIsATest, 1); assertTrue(e1.isSameLine(e2)); // Boundary. - e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); + e2 = new EditableLine(thisIsATest, 4, thisIsATest, 4); assertTrue(e1.isSameLine(e2)); // Offsets into different soft lines. - e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); + e2 = new EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLine(e2)); @@ -1047,46 +1049,46 @@ assertTrue(e2.isSameLine(e2)); // Different offsets into second soft line. - e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); + e1 = new EditableLine(thisIsATest, 6, thisIsATest, 6); assertTrue(e1.isSameLine(e2)); // Boundary. - e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); + e1 = new EditableLine(thisIsATest, 7, thisIsATest, 7); assertTrue(e1.isSameLine(e2)); // Third line. - e1 = new editing.EditableLine(thisIsATest, 8, thisIsATest, 8); + e1 = new EditableLine(thisIsATest, 8, thisIsATest, 8); assertEquals('a ', e1.text); assertFalse(e1.isSameLine(e2)); // Last line. - e2 = new editing.EditableLine(thisIsATest, 10, thisIsATest, 10); + e2 = new EditableLine(thisIsATest, 10, thisIsATest, 10); assertEquals('test', e2.text); assertFalse(e1.isSameLine(e2)); // Boundary. - e1 = new editing.EditableLine(thisIsATest, 13, thisIsATest, 13); + e1 = new EditableLine(thisIsATest, 13, thisIsATest, 13); assertTrue(e1.isSameLine(e2)); // Cross into new paragraph. - e2 = new editing.EditableLine(hello, 0, hello, 0); + e2 = new EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLine(e2)); // On same node, with multi-static text line. - e1 = new editing.EditableLine(hello, 1, hello, 1); + e1 = new EditableLine(hello, 1, hello, 1); assertTrue(e1.isSameLine(e2)); // On same node, with multi-static text line; boundary. - e1 = new editing.EditableLine(hello, 5, hello, 5); + e1 = new EditableLine(hello, 5, hello, 5); assertTrue(e1.isSameLine(e2)); // On different node, with multi-static text line. - e1 = new editing.EditableLine(world, 1, world, 1); + e1 = new EditableLine(world, 1, world, 1); assertTrue(e1.isSameLine(e2)); // Another mix of lines. - e2 = new editing.EditableLine(thisIsATest, 9, thisIsATest, 9); + e2 = new EditableLine(thisIsATest, 9, thisIsATest, 9); assertFalse(e1.isSameLine(e2)); }); }); @@ -1106,20 +1108,20 @@ const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. - let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); + let e1 = new EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLineAndSelection(e1)); // Offset into the same soft line. - let e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); + let e2 = new EditableLine(thisIsATest, 1, thisIsATest, 1); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. - e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); + e2 = new EditableLine(thisIsATest, 4, thisIsATest, 4); assertFalse(e1.isSameLineAndSelection(e2)); // Offsets into different soft lines. - e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); + e2 = new EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); @@ -1127,24 +1129,24 @@ assertTrue(e2.isSameLineAndSelection(e2)); // Different offsets into second soft line. - e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); + e1 = new EditableLine(thisIsATest, 6, thisIsATest, 6); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. - e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); + e1 = new EditableLine(thisIsATest, 7, thisIsATest, 7); assertFalse(e1.isSameLineAndSelection(e2)); // Cross into new paragraph. - e2 = new editing.EditableLine(hello, 0, hello, 0); + e2 = new EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line. - e1 = new editing.EditableLine(hello, 1, hello, 1); + e1 = new EditableLine(hello, 1, hello, 1); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line; boundary. - e1 = new editing.EditableLine(hello, 5, hello, 5); + e1 = new EditableLine(hello, 5, hello, 5); assertFalse(e1.isSameLineAndSelection(e2)); }); }); @@ -1164,11 +1166,11 @@ const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. - let e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0, true); + let e1 = new EditableLine(thisIsATest, 0, thisIsATest, 0, true); assertEquals('this ', e1.text); // Offsets into different soft lines; base on focus (default). - e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6); + e1 = new EditableLine(thisIsATest, 0, thisIsATest, 6); assertEquals('is ', e1.text); // Notice that the offset is truncated at the beginning of the line. assertEquals(0, e1.startOffset); @@ -1176,7 +1178,7 @@ assertEquals(1, e1.endOffset); // Offsets into different soft lines; base on anchor. - e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6, true); + e1 = new EditableLine(thisIsATest, 0, thisIsATest, 6, true); assertEquals('this ', e1.text); assertEquals(0, e1.startOffset); // Notice that the end offset is truncated up to the end of @@ -1184,13 +1186,13 @@ assertEquals(5, e1.endOffset); // Across paragraph selection with base line on focus. - e1 = new editing.EditableLine(thisIsATest, 5, hello, 2); + e1 = new EditableLine(thisIsATest, 5, hello, 2); assertEquals('hello world', e1.text); assertEquals(0, e1.startOffset); assertEquals(2, e1.endOffset); // Across paragraph selection with base line on anchor. - e1 = new editing.EditableLine(thisIsATest, 5, hello, 2, true); + e1 = new EditableLine(thisIsATest, 5, hello, 2, true); assertEquals('is ', e1.text); assertEquals(0, e1.startOffset); assertEquals(3, e1.endOffset); @@ -1211,7 +1213,7 @@ // The EditableLine object automatically adjusts to surround the line no // matter what the input is. - const line = new editing.EditableLine(text, 0, text, 0); + const line = new EditableLine(text, 0, text, 0); assertTrue(line.isValidLine()); // During the course of editing operations, this line may become
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/intent_handler.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/intent_handler.js index 98aa6e0..4e82b6d 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/intent_handler.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/intent_handler.js
@@ -6,6 +6,7 @@ * @fileoverview Handles automation intents for speech feedback. * Braille is *not* handled in this module. */ +import {EditableLine} from './editable_line.js'; const AutomationIntent = chrome.automation.AutomationIntent; const Cursor = cursors.Cursor; @@ -24,8 +25,8 @@ /** * Called when intents are received from an AutomationEvent. * @param {!Array<AutomationIntent>} intents - * @param {!editing.EditableLine} cur The current line. - * @param {editing.EditableLine} prev The previous line. + * @param {!EditableLine} cur The current line. + * @param {EditableLine} prev The previous line. * @return {boolean} Whether intents are handled. */ static onIntents(intents, cur, prev) { @@ -46,8 +47,8 @@ /** * Called when an intent is received. * @param {!AutomationIntent} intent - * @param {!editing.EditableLine} cur The current line. - * @param {editing.EditableLine} prev The previous line. + * @param {!EditableLine} cur The current line. + * @param {EditableLine} prev The previous line. * @return {boolean} Whether the intent was handled. */ static onIntent(intent, cur, prev) { @@ -75,8 +76,8 @@ * Called when the text selection moves. * @param {!AutomationIntent} intent A move selection * intent. - * @param {!editing.EditableLine} cur The current line. - * @param {editing.EditableLine} prev The previous line. + * @param {!EditableLine} cur The current line. + * @param {EditableLine} prev The previous line. * @return {boolean} Whether the intent was handled. */ static onMoveSelection(intent, cur, prev) {
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/loader.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/loader.js index aa9ce4f..f89bbd5 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/loader.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/loader.js
@@ -19,7 +19,6 @@ goog.require('BrailleInterface'); goog.require('BrailleKeyCommand'); goog.require('BrailleKeyEvent'); -goog.require('BrailleKeyEventRewriter'); goog.require('BrailleTranslatorManager'); goog.require('ChromeVox'); goog.require('ChromeVoxKbHandler'); @@ -56,4 +55,3 @@ goog.require('constants'); goog.require('cursors.Cursor'); goog.require('cursors.Range'); -goog.require('editing.EditableLine');
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/braille/braille_key_event_rewriter.js b/chrome/browser/resources/chromeos/accessibility/chromevox/braille/braille_key_event_rewriter.js index a347d58..4a9e456a 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/braille/braille_key_event_rewriter.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/braille/braille_key_event_rewriter.js
@@ -6,16 +6,11 @@ * @fileoverview Rewrites a braille key event. */ -goog.provide('BrailleKeyEventRewriter'); - -goog.require('Output'); -goog.require('BrailleKeyEvent'); - /** * A class that transforms a sequence of braille key events into a standard key * event. */ -BrailleKeyEventRewriter = class { +export class BrailleKeyEventRewriter { constructor() { /** @private {Object} */ this.incrementalKey_ = null; @@ -76,4 +71,4 @@ this.incrementalKey_ = null; return false; } -}; +}
diff --git a/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc b/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc index 457e741..0162d29 100644 --- a/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc +++ b/chrome/browser/safe_browsing/android/password_reuse_controller_android.cc
@@ -7,10 +7,8 @@ #include <memory> #include "base/callback.h" -#include "base/feature_list.h" #include "chrome/browser/ui/android/safe_browsing/password_reuse_dialog_view_android.h" #include "components/safe_browsing/core/browser/password_protection/metrics_util.h" -#include "components/safe_browsing/core/common/features.h" #include "components/strings/grit/components_strings.h" #include "ui/android/window_android.h" #include "ui/base/l10n/l10n_util.h" @@ -73,16 +71,10 @@ std::u16string PasswordReuseControllerAndroid::GetPrimaryButtonText() const { if (password_type_.account_type() == ReusedPasswordAccountType::GMAIL && - password_type_.is_account_syncing() && - base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers)) { + password_type_.is_account_syncing()) { return l10n_util::GetStringUTF16(IDS_PAGE_INFO_PROTECT_ACCOUNT_BUTTON); - } else if ( - password_type_.account_type() == - ReusedPasswordAccountType::SAVED_PASSWORD && - base::FeatureList::IsEnabled( - safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid)) { + } else if (password_type_.account_type() == + ReusedPasswordAccountType::SAVED_PASSWORD) { return l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHECK_PASSWORDS_BUTTON); } @@ -91,14 +83,9 @@ std::u16string PasswordReuseControllerAndroid::GetSecondaryButtonText() const { if ((password_type_.account_type() == ReusedPasswordAccountType::GMAIL && - password_type_.is_account_syncing() && - base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers)) || + password_type_.is_account_syncing()) || (password_type_.account_type() == - ReusedPasswordAccountType::SAVED_PASSWORD && - base::FeatureList::IsEnabled( - safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid))) { + ReusedPasswordAccountType::SAVED_PASSWORD)) { return l10n_util::GetStringUTF16( IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON); } @@ -112,10 +99,7 @@ std::u16string PasswordReuseControllerAndroid::GetTitle() const { if (password_type_.account_type() == - ReusedPasswordAccountType::SAVED_PASSWORD && - base::FeatureList::IsEnabled( - safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid)) { + ReusedPasswordAccountType::SAVED_PASSWORD) { return l10n_util::GetStringUTF16( IDS_PAGE_INFO_CHANGE_PASSWORD_SAVED_PASSWORD_SUMMARY); }
diff --git a/chrome/browser/safe_browsing/android/password_reuse_controller_android_unittest.cc b/chrome/browser/safe_browsing/android/password_reuse_controller_android_unittest.cc index 90d0521..f1dfef7 100644 --- a/chrome/browser/safe_browsing/android/password_reuse_controller_android_unittest.cc +++ b/chrome/browser/safe_browsing/android/password_reuse_controller_android_unittest.cc
@@ -9,10 +9,8 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/mock_callback.h" -#include "base/test/scoped_feature_list.h" #include "chrome/browser/safe_browsing/chrome_password_protection_service.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" -#include "components/safe_browsing/core/common/features.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/web_contents.h" #include "content/public/test/test_renderer_host.h" @@ -81,14 +79,7 @@ controller->GetPrimaryButtonText()); ASSERT_EQ(std::u16string(), controller->GetSecondaryButtonText()); } - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid}, - {}); - password_type.set_account_type(ReusedPasswordAccountType::SAVED_PASSWORD); password_type.set_is_account_syncing(false); @@ -100,47 +91,7 @@ l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), controller->GetSecondaryButtonText()); } - { - // TODO(crbug.com/1237388): Remove it once the flags are completed removed. - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid}, - {safe_browsing::kPasswordProtectionForSignedInUsers}); - - password_type.set_account_type(ReusedPasswordAccountType::GMAIL); - password_type.set_is_account_syncing(true); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_CLOSE), - controller->GetPrimaryButtonText()); - ASSERT_EQ(std::u16string(), controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing::kPasswordProtectionForSignedInUsers}, - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid}); - - password_type.set_account_type(ReusedPasswordAccountType::SAVED_PASSWORD); - password_type.set_is_account_syncing(false); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_CLOSE), - controller->GetPrimaryButtonText()); - ASSERT_EQ(std::u16string(), controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing::kPasswordProtectionForSignedInUsers}, {}); - password_type.set_account_type(ReusedPasswordAccountType::GMAIL); password_type.set_is_account_syncing(true); @@ -152,15 +103,7 @@ l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), controller->GetSecondaryButtonText()); } - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - ReusedPasswordAccountType empty_reused_password; controller->SetReusedPasswordAccountTypeForTesting(empty_reused_password); @@ -168,95 +111,7 @@ controller->GetPrimaryButtonText()); ASSERT_EQ(std::u16string(), controller->GetSecondaryButtonText()); } - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - - password_type.set_account_type(ReusedPasswordAccountType::SAVED_PASSWORD); - password_type.set_is_account_syncing(false); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHECK_PASSWORDS_BUTTON), - controller->GetPrimaryButtonText()); - ASSERT_EQ( - l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), - controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - - password_type.set_account_type(ReusedPasswordAccountType::GMAIL); - password_type.set_is_account_syncing(true); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_PAGE_INFO_PROTECT_ACCOUNT_BUTTON), - controller->GetPrimaryButtonText()); - ASSERT_EQ( - l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), - controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - - password_type.set_account_type(ReusedPasswordAccountType::SAVED_PASSWORD); - password_type.set_is_account_syncing(false); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_PAGE_INFO_CHECK_PASSWORDS_BUTTON), - controller->GetPrimaryButtonText()); - ASSERT_EQ( - l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), - controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - - password_type.set_account_type(ReusedPasswordAccountType::GMAIL); - password_type.set_is_account_syncing(true); - - controller->SetReusedPasswordAccountTypeForTesting(password_type); - - ASSERT_EQ(l10n_util::GetStringUTF16(IDS_PAGE_INFO_PROTECT_ACCOUNT_BUTTON), - controller->GetPrimaryButtonText()); - ASSERT_EQ( - l10n_util::GetStringUTF16(IDS_PAGE_INFO_IGNORE_PASSWORD_WARNING_BUTTON), - controller->GetSecondaryButtonText()); - } - - { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures( - {safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, - safe_browsing::kPasswordProtectionForSignedInUsers}, - {}); - password_type.set_account_type(ReusedPasswordAccountType::GMAIL); password_type.set_is_account_syncing(false);
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.cc b/chrome/browser/safe_browsing/chrome_password_protection_service.cc index 75b6cd5..752acdc8 100644 --- a/chrome/browser/safe_browsing/chrome_password_protection_service.cc +++ b/chrome/browser/safe_browsing/chrome_password_protection_service.cc
@@ -369,12 +369,9 @@ if (password_type == PasswordType::ENTERPRISE_PASSWORD) return service->HasUnhandledEnterprisePasswordReuse(web_contents); - bool enable_warning_for_non_sync_users = base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers); DCHECK(password_type == PasswordType::PRIMARY_ACCOUNT_PASSWORD || password_type == PasswordType::SAVED_PASSWORD || - (enable_warning_for_non_sync_users && - password_type == PasswordType::OTHER_GAIA_PASSWORD)); + password_type == PasswordType::OTHER_GAIA_PASSWORD); // Otherwise, checks if there's any unhandled sync password reuses matches // this origin. auto* unhandled_sync_password_reuses = profile->GetPrefs()->GetDictionary( @@ -1028,15 +1025,10 @@ /*in_new_tab=*/true); } else { #if BUILDFLAG(IS_ANDROID) - if (base::FeatureList::IsEnabled( - safe_browsing:: - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid)) { - JNIEnv* env = base::android::AttachCurrentThread(); - - PasswordCheckupLauncherHelper:: - LaunchLocalCheckupFromPhishGuardWarningDialog( - env, web_contents->GetTopLevelNativeWindow()->GetJavaObject()); - } + JNIEnv* env = base::android::AttachCurrentThread(); + PasswordCheckupLauncherHelper:: + LaunchLocalCheckupFromPhishGuardWarningDialog( + env, web_contents->GetTopLevelNativeWindow()->GetJavaObject()); #endif #if BUILDFLAG(FULL_SAFE_BROWSING) // Opens chrome://settings/passwords/check in a new tab. @@ -1127,10 +1119,7 @@ IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_SAVED); } - bool enable_warning_for_non_sync_users = base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers); - if (enable_warning_for_non_sync_users && - !password_type.is_account_syncing()) { + if (!password_type.is_account_syncing()) { return l10n_util::GetStringUTF16( IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_SIGNED_IN_NON_SYNC); }
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h index 6834350..a046a9d15 100644 --- a/chrome/browser/safe_browsing/chrome_password_protection_service.h +++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
@@ -399,14 +399,8 @@ // Unit tests FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, VerifyUserPopulationForPasswordOnFocusPing); - FRIEND_TEST_ALL_PREFIXES( - ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, - VerifyUserPopulationForSyncPasswordEntryPing); -#if BUILDFLAG(IS_ANDROID) - FRIEND_TEST_ALL_PREFIXES( - ChromePasswordProtectionServiceWithProtectionForSignedInUsersDisabledTest, - VerifyUserPopulationForSyncPasswordEntryPing); -#endif + FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, + VerifyUserPopulationForSyncPasswordEntryPing); FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, VerifyUserPopulationForSavedPasswordEntryPing); FRIEND_TEST_ALL_PREFIXES( @@ -433,9 +427,8 @@ VerifyUnhandledSyncPasswordReuseUponClearHistoryDeletion); FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, VerifyCanShowInterstitial); - FRIEND_TEST_ALL_PREFIXES( - ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, - VerifyCanShowInterstitial); + FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, + VerifyCanShowInterstitial); FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest, VerifySendsPingForAboutBlank); FRIEND_TEST_ALL_PREFIXES(ChromePasswordProtectionServiceTest,
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc b/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc index 30ed0745..4ff082f 100644 --- a/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc +++ b/chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc
@@ -437,25 +437,6 @@ mock_remove_callback_; }; -class ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest - : public ChromePasswordProtectionServiceTest { - private: - base::test::ScopedFeatureList feature_list_{ - safe_browsing::kPasswordProtectionForSignedInUsers}; -}; - -class ChromePasswordProtectionServiceWithProtectionForSignedInUsersDisabledTest - : public ChromePasswordProtectionServiceTest { - public: - ChromePasswordProtectionServiceWithProtectionForSignedInUsersDisabledTest() { - feature_list_.InitAndDisableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - } - - private: - base::test::ScopedFeatureList feature_list_; -}; - TEST_F(ChromePasswordProtectionServiceTest, VerifyUserPopulationForPasswordOnFocusPing) { ReusedPasswordAccountType reused_password_type; @@ -517,7 +498,7 @@ reused_password_type)); } -TEST_F(ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, +TEST_F(ChromePasswordProtectionServiceTest, VerifyUserPopulationForSyncPasswordEntryPing) { // Sets up the account as a gmail account as there is no hosted domain. ReusedPasswordAccountType reused_password_type; @@ -526,9 +507,6 @@ // Sync password entry pinging is enabled by default. service_->ConfigService(false /*incognito*/, false /*SBER*/); - // Sync password pings are now gated by Safe Browsing, not Safe Browsing - // Enhanced Reporting (SBER), on Android, because warnings are now enabled - // with kPasswordProtectionForSignedInUsers. EXPECT_TRUE(service_->IsPingingEnabled( LoginReputationClientRequest::PASSWORD_REUSE_EVENT, reused_password_type)); @@ -539,9 +517,6 @@ reused_password_type)); service_->ConfigService(true /*incognito*/, false /*SBER*/); - // Sync password pings are now gated by Safe Browsing, not Safe Browsing - // Enhanced Reporting (SBER), on Android, because warnings are now enabled - // with kPasswordProtectionForSignedInUsers. EXPECT_TRUE(service_->IsPingingEnabled( LoginReputationClientRequest::PASSWORD_REUSE_EVENT, reused_password_type)); @@ -558,50 +533,17 @@ profile()->GetPrefs()->SetInteger(prefs::kPasswordProtectionWarningTrigger, PASSWORD_PROTECTION_OFF); service_->ConfigService(false /*incognito*/, false /*SBER*/); - // Sync password pings are now gated by Safe Browsing, not Safe Browsing - // Enhanced Reporting (SBER), on Android, because warnings are now enabled - // with kPasswordProtectionForSignedInUsers. EXPECT_TRUE(service_->IsPingingEnabled( LoginReputationClientRequest::PASSWORD_REUSE_EVENT, reused_password_type)); profile()->GetPrefs()->SetInteger(prefs::kPasswordProtectionWarningTrigger, PASSWORD_REUSE); - // Sync password pings are now gated by Safe Browsing, not Safe Browsing - // Enhanced Reporting (SBER), on Android, because warnings are now enabled. EXPECT_TRUE(service_->IsPingingEnabled( LoginReputationClientRequest::PASSWORD_REUSE_EVENT, reused_password_type)); } -#if BUILDFLAG(IS_ANDROID) -TEST_F( - ChromePasswordProtectionServiceWithProtectionForSignedInUsersDisabledTest, - VerifyUserPopulationForSyncPasswordEntryPing) { - // Sets up the account as a gmail account as there is no hosted domain. - ReusedPasswordAccountType reused_password_type; - reused_password_type.set_account_type(ReusedPasswordAccountType::GMAIL); - reused_password_type.set_is_account_syncing(true); - - profile()->GetPrefs()->SetInteger(prefs::kPasswordProtectionWarningTrigger, - PASSWORD_REUSE); - - service_->ConfigService(false /*incognito*/, false /*SBER*/); - // Sync password pings are now gated by Safe Browsing Enhanced Reporting, - // because kPasswordProtectionForSignedInUsers is disabled. - EXPECT_FALSE(service_->IsPingingEnabled( - LoginReputationClientRequest::PASSWORD_REUSE_EVENT, - reused_password_type)); - - // Sync password pings are now gated by Safe Browsing Enhanced Reporting, - // because kPasswordProtectionForSignedInUsers is disabled. - service_->ConfigService(false /*incognito*/, true /*SBER*/); - EXPECT_TRUE(service_->IsPingingEnabled( - LoginReputationClientRequest::PASSWORD_REUSE_EVENT, - reused_password_type)); -} -#endif - TEST_F(ChromePasswordProtectionServiceTest, VerifyPingingIsSkippedIfMatchEnterpriseAllowlist) { ASSERT_FALSE( @@ -1320,7 +1262,7 @@ EXPECT_EQ(warning_text, service_->GetWarningDetailText(reused_password_type)); } -TEST_F(ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, +TEST_F(ChromePasswordProtectionServiceTest, VerifyGetWarningDetailTextEnterprise) { std::u16string warning_text_non_sync = l10n_util::GetStringUTF16( IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_SIGNED_IN_NON_SYNC); @@ -1359,8 +1301,7 @@ service_->GetWarningDetailText(reused_password_type)); } -TEST_F(ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, - VerifyGetWarningDetailTextGmail) { +TEST_F(ChromePasswordProtectionServiceTest, VerifyGetWarningDetailTextGmail) { std::u16string warning_text_non_sync = l10n_util::GetStringUTF16( IDS_PAGE_INFO_CHANGE_PASSWORD_DETAILS_SIGNED_IN_NON_SYNC); std::u16string warning_text_sync = @@ -1374,25 +1315,6 @@ service_->GetWarningDetailText(reused_password_type)); } -TEST_F(ChromePasswordProtectionServiceWithProtectionForSignedInUsersEnabledTest, - VerifyCanShowInterstitial) { - // Do not show interstitial if policy not set for password_alert. - ASSERT_FALSE( - profile()->GetPrefs()->HasPrefPath(prefs::kSafeBrowsingAllowlistDomains)); - GURL trigger_url = GURL(kPhishingURL); - ReusedPasswordAccountType reused_password_type; - reused_password_type.set_account_type(ReusedPasswordAccountType::GSUITE); - reused_password_type.set_is_account_syncing(false); - service_->SetAccountInfo(kUserName); - EXPECT_FALSE( - service_->CanShowInterstitial(reused_password_type, trigger_url)); - - // Show interstitial if the policy is set to password_alert. - profile()->GetPrefs()->SetInteger(prefs::kPasswordProtectionWarningTrigger, - PASSWORD_REUSE); - EXPECT_TRUE(service_->CanShowInterstitial(reused_password_type, trigger_url)); -} - TEST_F(ChromePasswordProtectionServiceTest, VerifyCanShowInterstitial) { // Do not show interstitial if policy not set for password_alert. ASSERT_FALSE(
diff --git a/chrome/browser/safe_browsing/tailored_security/chrome_tailored_security_service.cc b/chrome/browser/safe_browsing/tailored_security/chrome_tailored_security_service.cc index 654faee0..f308b0a7 100644 --- a/chrome/browser/safe_browsing/tailored_security/chrome_tailored_security_service.cc +++ b/chrome/browser/safe_browsing/tailored_security/chrome_tailored_security_service.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/safe_browsing/tailored_security/chrome_tailored_security_service.h" +#include "base/metrics/histogram_functions.h" #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/identity_manager_factory.h" @@ -66,6 +67,12 @@ return; } + if (is_enabled) { + base::UmaHistogramBoolean( + "SafeBrowsing.TailoredSecurity.SyncPromptSkippedAlreadyEnabled", + IsEnhancedProtectionEnabled(*prefs())); + } + if (is_enabled && !IsEnhancedProtectionEnabled(*prefs())) { ShowSyncNotification(true); }
diff --git a/chrome/browser/sessions/session_restore_browsertest_chromeos.cc b/chrome/browser/sessions/session_restore_browsertest_chromeos.cc index 1974606..599f51c 100644 --- a/chrome/browser/sessions/session_restore_browsertest_chromeos.cc +++ b/chrome/browser/sessions/session_restore_browsertest_chromeos.cc
@@ -21,7 +21,6 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/web_applications/system_web_apps/test/system_web_app_browsertest_base.h" -#include "chrome/browser/web_applications/test/web_app_test.h" #include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h"
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 3c8e5cf..951421b 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1584,10 +1584,15 @@ "webui/read_later/side_panel/bookmarks_page_handler.h", "webui/read_later/side_panel/bookmarks_side_panel_ui.cc", "webui/read_later/side_panel/bookmarks_side_panel_ui.h", + "webui/read_later/side_panel/read_anything/read_anything_constants.h", + "webui/read_later/side_panel/read_anything/read_anything_container_view.cc", + "webui/read_later/side_panel/read_anything/read_anything_container_view.h", "webui/read_later/side_panel/read_anything/read_anything_page_handler.cc", "webui/read_later/side_panel/read_anything/read_anything_page_handler.h", - "webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.cc", - "webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h", + "webui/read_later/side_panel/read_anything/read_anything_toolbar_view.cc", + "webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h", + "webui/read_later/side_panel/read_anything/read_anything_ui.cc", + "webui/read_later/side_panel/read_anything/read_anything_ui.h", "webui/realbox/realbox_handler.cc", "webui/realbox/realbox_handler.h", "webui/sanitized_image_source.cc",
diff --git a/chrome/browser/ui/app_list/reorder/app_list_reorder_util.cc b/chrome/browser/ui/app_list/reorder/app_list_reorder_util.cc index 7476c73..2798dca 100644 --- a/chrome/browser/ui/app_list/reorder/app_list_reorder_util.cc +++ b/chrome/browser/ui/app_list/reorder/app_list_reorder_util.cc
@@ -7,6 +7,9 @@ #include "ash/public/cpp/app_list/app_list_types.h" #include "ash/strings/grit/ash_strings.h" #include "chrome/browser/ui/ash/app_icon_color_cache.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/skia/include/core/SkColorType.h" +#include "third_party/skia/include/core/SkScalar.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/color_analysis.h"
diff --git a/chrome/browser/ui/app_list/reorder/app_list_reorder_util.h b/chrome/browser/ui/app_list/reorder/app_list_reorder_util.h index 369fec8..ed730b9 100644 --- a/chrome/browser/ui/app_list/reorder/app_list_reorder_util.h +++ b/chrome/browser/ui/app_list/reorder/app_list_reorder_util.h
@@ -15,6 +15,9 @@ #include "chrome/browser/ui/app_list/chrome_app_list_item.h" #include "components/sync/model/string_ordinal.h" #include "third_party/icu/source/i18n/unicode/coll.h" +#include "third_party/skia/include/core/SkColor.h" + +class SkBitmap; namespace app_list { namespace reorder {
diff --git a/chrome/browser/ui/app_list/reorder/app_list_reorder_util_unittest.cc b/chrome/browser/ui/app_list/reorder/app_list_reorder_util_unittest.cc index 3fba52e..f3ce7b07 100644 --- a/chrome/browser/ui/app_list/reorder/app_list_reorder_util_unittest.cc +++ b/chrome/browser/ui/app_list/reorder/app_list_reorder_util_unittest.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/app_list/reorder/app_list_reorder_util.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image_skia.h" using AppListReorderUtilTest = testing::Test;
diff --git a/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc b/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc index 33d9164..bd7f9d8 100644 --- a/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc +++ b/chrome/browser/ui/app_list/test/chrome_app_list_test_support.cc
@@ -20,6 +20,7 @@ #include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" #include "chrome/browser/ui/app_list/chrome_app_list_item.h" #include "components/crx_file/id_util.h" +#include "third_party/skia/include/core/SkBitmap.h" namespace test {
diff --git a/chrome/browser/ui/ash/app_icon_color_cache.cc b/chrome/browser/ui/ash/app_icon_color_cache.cc index 7b4587699..cb9fc35 100644 --- a/chrome/browser/ui/ash/app_icon_color_cache.cc +++ b/chrome/browser/ui/ash/app_icon_color_cache.cc
@@ -6,6 +6,7 @@ #include "base/callback.h" #include "base/no_destructor.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/color_analysis.h" #include "ui/gfx/image/image_skia.h"
diff --git a/chrome/browser/ui/ash/app_icon_color_cache_unittest.cc b/chrome/browser/ui/ash/app_icon_color_cache_unittest.cc index 1eafce5..4feaa3a9 100644 --- a/chrome/browser/ui/ash/app_icon_color_cache_unittest.cc +++ b/chrome/browser/ui/ash/app_icon_color_cache_unittest.cc
@@ -6,6 +6,7 @@ #include "chrome/browser/ui/ash/app_icon_color_cache.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/image/image_skia.h"
diff --git a/chrome/browser/ui/ash/clipboard_history_browsertest.cc b/chrome/browser/ui/ash/clipboard_history_browsertest.cc index bbec053c..a87ae97 100644 --- a/chrome/browser/ui/ash/clipboard_history_browsertest.cc +++ b/chrome/browser/ui/ash/clipboard_history_browsertest.cc
@@ -20,9 +20,11 @@ #include "base/scoped_observation.h" #include "base/test/bind.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/repeating_test_future.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/ash/login/login_manager_test.h" #include "chrome/browser/ash/login/test/login_manager_mixin.h" +#include "chrome/browser/ash/login/test/session_manager_state_waiter.h" #include "chrome/browser/ash/login/ui/user_adding_screen.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/profiles/profile.h" @@ -32,6 +34,7 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "chromeos/crosapi/mojom/clipboard_history.mojom.h" +#include "chromeos/dbus/session_manager/session_manager_client.h" #include "components/user_manager/user_manager.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" @@ -202,36 +205,6 @@ return widget; } -void FlushMessageLoop() { - base::RunLoop run_loop; - base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE, - run_loop.QuitClosure()); - run_loop.Run(); -} - -void SetClipboardText(const std::string& text) { - ui::ScopedClipboardWriter(ui::ClipboardBuffer::kCopyPaste) - .WriteText(base::UTF8ToUTF16(text)); - - // ClipboardHistory will post a task to process clipboard data in order to - // debounce multiple clipboard writes occurring in sequence. Here we give - // ClipboardHistory the chance to run its posted tasks before proceeding. - FlushMessageLoop(); -} - -void SetClipboardTextAndHtml(const std::string& text, const std::string& html) { - { - ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste); - scw.WriteText(base::UTF8ToUTF16(text)); - scw.WriteHTML(base::UTF8ToUTF16(html), /*source_url=*/""); - } - - // ClipboardHistory will post a task to process clipboard data in order to - // debounce multiple clipboard writes occurring in sequence. Here we give - // ClipboardHistory the chance to run its posted tasks before proceeding. - FlushMessageLoop(); -} - ash::ClipboardHistoryControllerImpl* GetClipboardHistoryController() { return ash::Shell::Get()->clipboard_history_controller(); } @@ -265,13 +238,6 @@ return true; } -void WaitForOperationConfirmed() { - base::RunLoop run_loop; - GetClipboardHistoryController()->set_confirmed_operation_callback_for_test( - run_loop.QuitClosure()); - run_loop.Run(); -} - } // namespace class ClipboardHistoryBrowserTest : public ash::LoginManagerTest { @@ -290,6 +256,16 @@ } protected: + // ash::LoginManagerTest: + void SetUpOnMainThread() override { + ash::LoginManagerTest::SetUpOnMainThread(); + event_generator_ = std::make_unique<ui::test::EventGenerator>( + ash::Shell::GetPrimaryRootWindow()); + LoginUser(account_id1_); + GetClipboardHistoryController()->set_confirmed_operation_callback_for_test( + operation_confirmed_future_.GetCallback()); + } + // Click at the delete button of the menu entry specified by `index`. void ClickAtDeleteButton(int index) { auto* item_view = GetContextMenu()->GetMenuItemViewAtForTest(index); @@ -390,18 +366,38 @@ EXPECT_TRUE(item_view->IsSelected()); } - // ash::LoginManagerTest: - void SetUpOnMainThread() override { - ash::LoginManagerTest::SetUpOnMainThread(); - event_generator_ = std::make_unique<ui::test::EventGenerator>( - ash::Shell::GetPrimaryRootWindow()); - LoginUser(account_id1_); + void WaitForOperationConfirmed(bool success_expected) { + EXPECT_EQ(operation_confirmed_future_.Take(), success_expected); + } + + void SetClipboardText(const std::string& text) { + ui::ScopedClipboardWriter(ui::ClipboardBuffer::kCopyPaste) + .WriteText(base::UTF8ToUTF16(text)); + + // ClipboardHistory will post a task to process clipboard data in order to + // debounce multiple clipboard writes occurring in sequence. Here we give + // ClipboardHistory the chance to run its posted tasks before proceeding. + WaitForOperationConfirmed(/*success_expected=*/true); + } + + void SetClipboardTextAndHtml(const std::string& text, + const std::string& html) { + { + ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste); + scw.WriteText(base::UTF8ToUTF16(text)); + scw.WriteHTML(base::UTF8ToUTF16(html), /*source_url=*/""); + } + + // ClipboardHistory will post a task to process clipboard data in order to + // debounce multiple clipboard writes occurring in sequence. Here we give + // ClipboardHistory the chance to run its posted tasks before proceeding. + WaitForOperationConfirmed(/*success_expected=*/true); } AccountId account_id1_; ash::LoginManagerMixin login_mixin_{&mixin_host_}; - std::unique_ptr<ui::test::EventGenerator> event_generator_; + base::test::RepeatingTestFuture<bool> operation_confirmed_future_; base::test::ScopedFeatureList feature_list_; }; @@ -1044,7 +1040,7 @@ ASSERT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); ShowContextMenuViaAccelerator(/*wait_for_selection=*/true); PressAndRelease(ui::VKEY_RETURN); - WaitForOperationConfirmed(); + WaitForOperationConfirmed(/*success_expected=*/true); } std::unique_ptr<views::Widget> widget_; @@ -1066,7 +1062,7 @@ GetEventGenerator()->GestureTapAt( second_menu_item_view->GetBoundsInScreen().CenterPoint()); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); } @@ -1077,13 +1073,9 @@ base::HistogramTester histogram_tester; SetClipboardText("A"); - WaitForOperationConfirmed(); - PasteFromClipboardHistoryMenuAndWait(); PasteFromClipboardHistoryMenuAndWait(); - SetClipboardText("B"); - WaitForOperationConfirmed(); histogram_tester.ExpectTotalCount("Ash.ClipboardHistory.ConsecutivePastes", /*count=*/1); @@ -1121,7 +1113,7 @@ PressAndRelease(ui::KeyboardCode::VKEY_UP, ui::EF_NONE); PressAndRelease(ui::VKEY_RETURN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("B", base::UTF16ToUTF8(textfield_->GetText())); } @@ -1141,7 +1133,7 @@ PressAndRelease(ui::KeyboardCode::VKEY_RETURN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("C", base::UTF16ToUTF8(textfield_->GetText())); histogram_tester.ExpectTotalCount( "Ash.ClipboardHistory.ContextMenu.DisplayFormatPasted", 1); @@ -1156,7 +1148,7 @@ PressAndRelease(ui::KeyboardCode::VKEY_V, ui::EF_COMMAND_DOWN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("C", base::UTF16ToUTF8(textfield_->GetText())); textfield_->SetText(std::u16string()); @@ -1170,7 +1162,7 @@ PressAndRelease(ui::KeyboardCode::VKEY_RETURN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); textfield_->SetText(std::u16string()); @@ -1185,7 +1177,7 @@ PressAndRelease(ui::KeyboardCode::VKEY_V, ui::EF_COMMAND_DOWN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); } @@ -1202,7 +1194,7 @@ EXPECT_TRUE(GetClipboardHistoryController()->IsMenuShowing()); PressAndRelease(ui::KeyboardCode::VKEY_V, ui::EF_COMMAND_DOWN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("C", base::UTF16ToUTF8(textfield_->GetText())); Release(ui::KeyboardCode::VKEY_COMMAND); @@ -1217,11 +1209,41 @@ PressAndRelease(ui::KeyboardCode::VKEY_DOWN, ui::EF_COMMAND_DOWN); PressAndRelease(ui::KeyboardCode::VKEY_V, ui::EF_COMMAND_DOWN); EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); Release(ui::KeyboardCode::VKEY_COMMAND); } +IN_PROC_BROWSER_TEST_F(ClipboardHistoryTextfieldBrowserTest, + PasteWithLockedScreen) { + // Write an item to the clipboard. + SetClipboardText("A"); + + // Verify that the item can be pasted successfully. + ShowContextMenuViaAccelerator(/*wait_for_selection=*/true); + EXPECT_TRUE(GetClipboardHistoryController()->IsMenuShowing()); + PressAndRelease(ui::KeyboardCode::VKEY_RETURN); + EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); + WaitForOperationConfirmed(/*success_expected=*/true); + EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); + + // Start a new paste. + textfield_->SetText(std::u16string()); + EXPECT_TRUE(textfield_->GetText().empty()); + ShowContextMenuViaAccelerator(/*wait_for_selection=*/true); + EXPECT_TRUE(GetClipboardHistoryController()->IsMenuShowing()); + PressAndRelease(ui::KeyboardCode::VKEY_RETURN); + EXPECT_FALSE(GetClipboardHistoryController()->IsMenuShowing()); + + // Lock the screen. + chromeos::SessionManagerClient::Get()->RequestLockScreen(); + ash::SessionStateWaiter(session_manager::SessionState::LOCKED).Wait(); + + // Verify that the item was not pasted. + WaitForOperationConfirmed(/*success_expected=*/false); + EXPECT_TRUE(textfield_->GetText().empty()); +} + class FakeDataTransferPolicyController : public ui::DataTransferPolicyController { public: @@ -1283,7 +1305,7 @@ // ClipboardHistory will post a task to process clipboard data in order to // debounce multiple clipboard writes occurring in sequence. Here we give // ClipboardHistory the chance to run its posted tasks before proceeding. - FlushMessageLoop(); + WaitForOperationConfirmed(/*success_expected=*/true); } private: @@ -1309,7 +1331,7 @@ accessible_menu_item_view->GetBoundsInScreen().CenterPoint()); ASSERT_TRUE(accessible_menu_item_view->IsSelected()); GetEventGenerator()->ClickLeftButton(); - base::RunLoop().RunUntilIdle(); + WaitForOperationConfirmed(/*success_expected=*/true); EXPECT_EQ("A", base::UTF16ToUTF8(textfield_->GetText())); // Clear `textfield_`'s contents.
diff --git a/chrome/browser/ui/ash/thumbnail_loader.cc b/chrome/browser/ui/ash/thumbnail_loader.cc index 1adfd37d..f091835 100644 --- a/chrome/browser/ui/ash/thumbnail_loader.cc +++ b/chrome/browser/ui/ash/thumbnail_loader.cc
@@ -33,6 +33,7 @@ #include "storage/browser/file_system/file_system_context.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/re2/src/re2/re2.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/skia_conversions.h"
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index 7136e92..493f60f9 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc
@@ -658,6 +658,8 @@ FocusToolbar(browser_); break; case IDC_FOCUS_LOCATION: + if (!window()->IsLocationBarVisible()) + break; base::RecordAction(base::UserMetricsAction("Accel_Focus_Location")); FocusLocationBar(browser_); break;
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc index 9797048..ded8282 100644 --- a/chrome/browser/ui/browser_command_controller_unittest.cc +++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -280,6 +280,7 @@ } void ExitFullscreen() override { fullscreen_ = false; } bool IsToolbarShowing() const override { return toolbar_showing_; } + bool IsLocationBarVisible() const override { return true; } ExclusiveAccessContext* GetExclusiveAccessContext() override { return this; }
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index 9220a35..51fff1f 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h
@@ -392,6 +392,9 @@ // Visible() functions are renamed to Available(). virtual bool IsToolbarShowing() const = 0; + // Returns whether the location bar is visible. + virtual bool IsLocationBarVisible() const = 0; + // Shows the dialog for a sharing feature. virtual SharingDialog* ShowSharingDialog(content::WebContents* contents, SharingDialogData data) = 0;
diff --git a/chrome/browser/ui/global_error/global_error_browsertest.cc b/chrome/browser/ui/global_error/global_error_browsertest.cc index 5a998147..354a9bc 100644 --- a/chrome/browser/ui/global_error/global_error_browsertest.cc +++ b/chrome/browser/ui/global_error/global_error_browsertest.cc
@@ -242,6 +242,14 @@ ShowAndVerifyUi(); } +// RecoveryInstallGlobalError only exists on Windows and Mac. +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest, + InvokeUi_RecoveryInstallGlobalError) { + ShowAndVerifyUi(); +} +#endif + // Signin global errors never happon on ChromeOS. #if !BUILDFLAG(IS_CHROMEOS_ASH) IN_PROC_BROWSER_TEST_F(GlobalErrorBubbleTest, InvokeUi_SigninGlobalError) {
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc index 431e25c97..bfe5a55 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.cc +++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -60,6 +60,7 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_list_observer.h" #include "chrome/browser/ui/browser_window.h" +#include "chrome/browser/ui/extensions/application_launch.h" #include "chrome/browser/ui/startup/launch_mode_recorder.h" #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" #include "chrome/browser/ui/startup/startup_tab_provider.h" @@ -85,6 +86,7 @@ #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/navigation_controller.h" #include "content/public/common/content_switches.h" +#include "extensions/browser/extension_registry.h" #include "extensions/common/switches.h" #include "printing/buildflags/buildflags.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -421,7 +423,7 @@ } #endif // !BUILDFLAG(IS_CHROMEOS_ASH) -#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_CHROMEOS_ASH) StartupProfileInfo GetProfilePickerStartupProfileInfo() { auto path_info = GetProfilePickerStartupProfilePathInfo(); DCHECK_EQ(path_info.mode, StartupProfileMode::kProfilePicker); @@ -442,7 +444,7 @@ return {nullptr, StartupProfileMode::kError}; } -#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_CHROMEOS_ASH) void ShowProfilePicker(chrome::startup::IsProcessStartup process_startup) { #if !BUILDFLAG(IS_CHROMEOS_ASH) @@ -514,6 +516,27 @@ return false; } +bool MaybeLaunchExtensionApp(const base::CommandLine& command_line, + const base::FilePath& cur_dir, + chrome::startup::IsFirstRun is_first_run, + Profile* profile) { + if (!command_line.HasSwitch(switches::kAppId)) + return false; + + std::string app_id = command_line.GetSwitchValueASCII(switches::kAppId); + const extensions::Extension* extension = + extensions::ExtensionRegistry::Get(profile)->GetInstalledExtension( + app_id); + if (!extension) + return false; + + LaunchAppWithCallback(profile, app_id, command_line, cur_dir, + base::BindOnce(&web_app::startup::FinalizeWebAppLaunch, + LaunchMode::kAsWebAppInWindowByAppId, + command_line, is_first_run)); + return true; +} + // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. Updates need to be reflected in // enum IncognitoForcedStart in tools/metrics/histograms/enums.xml. @@ -1165,10 +1188,22 @@ return true; } - // Try a web app launch (--app-id is present). + // Try a platform app launch. + if (MaybeLaunchExtensionApp(command_line, cur_dir, is_first_run, + privacy_safe_profile)) { + return true; + } + + // On Mac, PWA launch is handled in web_app_shim_manager_delegate_mac.cc. + // On Chrome OS, app launches are routed through the AppService and + // WebAppPublisherHelper. This path is mostly used for Window and Linux, + // but also session restore for Lacros. +#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_CHROMEOS_ASH) + // Try a web app launch. if (web_app::startup::MaybeHandleWebAppLaunch( command_line, cur_dir, privacy_safe_profile, is_first_run)) return true; +#endif LaunchBrowserForLastProfiles(command_line, cur_dir, process_startup, is_first_run, profile_info, @@ -1411,7 +1446,7 @@ StartupProfileMode::kBrowserWindow}; } -#if !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) +#if !BUILDFLAG(IS_CHROMEOS_ASH) StartupProfileInfo GetStartupProfile(const base::FilePath& cur_dir, const base::CommandLine& command_line) { ProfileManager* profile_manager = g_browser_process->profile_manager(); @@ -1485,4 +1520,4 @@ return {nullptr, StartupProfileMode::kError}; } -#endif // !BUILDFLAG(IS_CHROMEOS_ASH) && !BUILDFLAG(IS_ANDROID) +#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc index 8680150..3c9d017 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -820,6 +820,9 @@ base::CommandLine command_line(base::CommandLine::NO_PROGRAM); command_line.AppendSwitchASCII(switches::kAppId, extension_app->id()); + + ui_test_utils::BrowserChangeObserver browser_waiter( + nullptr, ui_test_utils::BrowserChangeObserver::ChangeType::kAdded); ASSERT_TRUE(StartupBrowserCreator().ProcessCmdLineImpl( command_line, base::FilePath(), chrome::startup::IsProcessStartup::kNo, {browser()->profile(), StartupProfileMode::kBrowserWindow}, {})); @@ -828,7 +831,7 @@ // Pref was set to open in a window, so the app should have opened in a // window. The launch should have created a new browser. Find the new // browser. - Browser* new_browser = ui_test_utils::WaitForBrowserToOpen(); + Browser* new_browser = browser_waiter.Wait(); ASSERT_TRUE(new_browser); // Expect an app window.
diff --git a/chrome/browser/ui/startup/web_app_startup_utils.cc b/chrome/browser/ui/startup/web_app_startup_utils.cc index 56be9f61..d1b5275 100644 --- a/chrome/browser/ui/startup/web_app_startup_utils.cc +++ b/chrome/browser/ui/startup/web_app_startup_utils.cc
@@ -106,6 +106,7 @@ profile_(profile), is_first_run_(is_first_run), app_id_(app_id), + web_app_launch_manager_(profile), profile_keep_alive_( profile, ProfileKeepAliveOrigin::kWebAppPermissionDialogWindow), @@ -148,13 +149,12 @@ absl::optional<GURL> protocol; if (!protocol_url_.is_empty()) protocol = protocol_url_; - apps::AppServiceProxyFactory::GetForProfile(profile_) - ->BrowserAppLauncher() - ->LaunchAppWithCallback( - app_id_, command_line_, cur_dir_, - /*url_handler_launch_url=*/absl::nullopt, protocol, launch_files_, - base::BindOnce(&StartupWebAppCreator::OnAppLaunched, - base::WrapRefCounted(this))); + + web_app_launch_manager_.LaunchApplication( + app_id_, command_line_, cur_dir_, + /*url_handler_launch_url=*/absl::nullopt, protocol, launch_files_, + base::BindOnce(&StartupWebAppCreator::OnAppLaunched, + base::WrapRefCounted(this))); } // Determines if the launch is a protocol handler launch. If so, takes @@ -312,6 +312,8 @@ // The app id for this launch, corresponding to --app-id on the command line. const AppId app_id_; + WebAppLaunchManager web_app_launch_manager_; + // This object keeps the profile and browser process alive while determining // whether to launch a window. ScopedProfileKeepAlive profile_keep_alive_;
diff --git a/chrome/browser/ui/thumbnails/thumbnail_image.cc b/chrome/browser/ui/thumbnails/thumbnail_image.cc index 319ef1b81..de635eb6 100644 --- a/chrome/browser/ui/thumbnails/thumbnail_image.cc +++ b/chrome/browser/ui/thumbnails/thumbnail_image.cc
@@ -15,6 +15,7 @@ #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "chrome/browser/ui/thumbnails/thumbnail_stats_tracker.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/codec/jpeg_codec.h" #include "ui/gfx/geometry/skia_conversions.h"
diff --git a/chrome/browser/ui/thumbnails/thumbnail_image_unittest.cc b/chrome/browser/ui/thumbnails/thumbnail_image_unittest.cc index bcdb772..1b0fdfc8 100644 --- a/chrome/browser/ui/thumbnails/thumbnail_image_unittest.cc +++ b/chrome/browser/ui/thumbnails/thumbnail_image_unittest.cc
@@ -13,6 +13,7 @@ #include "base/test/task_environment.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image_skia.h" namespace {
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.cc b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.cc index 15813c1..cc40d68 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.cc
@@ -8,6 +8,7 @@ #include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/visibility.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rounded_corners_f.h" #include "ui/views/bubble/bubble_border.h" #include "ui/views/controls/webview/webview.h" @@ -125,5 +126,11 @@ event, GetFocusManager()); } +gfx::Rect WebUIBubbleDialogView::GetAnchorRect() const { + if (anchor_rect()) + return anchor_rect().value(); + return BubbleDialogDelegateView::GetAnchorRect(); +} + BEGIN_METADATA(WebUIBubbleDialogView, views::BubbleDialogDelegateView) END_METADATA
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.h b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.h index fa9b557..5148fc7 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.h +++ b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view.h
@@ -19,6 +19,9 @@ } // namespace views // A Views bubble host for a BubbleContentsWrapper. +// NOTE: The anchor rect takes precedence over the anchor view in this class. +// This is the opposite of the behaviour specified in the +// BubbleDialogDelegateView base class. class WebUIBubbleDialogView : public views::WidgetObserver, public views::BubbleDialogDelegateView, public BubbleContentsWrapper::Host { @@ -56,6 +59,15 @@ } void ResetWebUIContentsForTesting(); + // TODO(ffred): This is necessary because the default behaviour of the bubble + // dialog is that anchor view positioning takes precedent over anchor rect. + // This will not work because the anchor rect is used to explicitly specify + // the positioning of the bubble and the anchor view cannot be null. + // + // That being said, the base class should reconsider its behaviour so that + // this type of override is not necessary. + gfx::Rect GetAnchorRect() const override; + virtual void Redraw() {} private:
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc index 6ad14bdb..112dcfc 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_dialog_view_unittest.cc
@@ -12,6 +12,7 @@ #include "chrome/test/base/testing_profile.h" #include "chrome/test/views/chrome_views_test_base.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/gfx/geometry/rect.h" #include "ui/views/controls/webview/webview.h" #include "ui/views/widget/unique_widget_ptr.h" @@ -121,5 +122,13 @@ EXPECT_EQ(nullptr, web_view()->web_contents()); } +TEST_F(WebUIBubbleDialogViewTest, GetAnchorRect) { + gfx::Rect anchor(666, 666, 0, 0); + + EXPECT_NE(bubble_dialog_view()->GetAnchorRect(), anchor); + bubble_dialog_view()->SetAnchorRect(anchor); + EXPECT_EQ(bubble_dialog_view()->GetAnchorRect(), anchor); +} + } // namespace test } // namespace views
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_manager.cc b/chrome/browser/ui/views/bubble/webui_bubble_manager.cc index 4dfb6da..494165b5 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_manager.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_manager.cc
@@ -6,6 +6,7 @@ #include "base/timer/timer.h" #include "chrome/browser/ui/browser_list.h" +#include "ui/gfx/geometry/rect.h" #include "ui/views/widget/widget.h" namespace { @@ -23,13 +24,13 @@ WebUIBubbleManager::~WebUIBubbleManager() = default; -bool WebUIBubbleManager::ShowBubble() { +bool WebUIBubbleManager::ShowBubble(const absl::optional<gfx::Rect>& anchor) { if (bubble_view_) return false; cache_timer_->Stop(); - bubble_view_ = CreateWebUIBubbleDialog(); + bubble_view_ = CreateWebUIBubbleDialog(anchor); bubble_widget_observation_.Observe(bubble_view_->GetWidget()); // Some bubbles can be triggered when there is no active browser (e.g. emoji
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_manager.h b/chrome/browser/ui/views/bubble/webui_bubble_manager.h index 9651502..552ee7e 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_manager.h +++ b/chrome/browser/ui/views/bubble/webui_bubble_manager.h
@@ -32,13 +32,14 @@ const WebUIBubbleManager& operator=(const WebUIBubbleManager&) = delete; ~WebUIBubbleManager() override; - bool ShowBubble(); + bool ShowBubble(const absl::optional<gfx::Rect>& anchor = absl::nullopt); void CloseBubble(); views::Widget* GetBubbleWidget() const; bool bubble_using_cached_web_contents() const { return bubble_using_cached_web_contents_; } - virtual base::WeakPtr<WebUIBubbleDialogView> CreateWebUIBubbleDialog() = 0; + virtual base::WeakPtr<WebUIBubbleDialogView> CreateWebUIBubbleDialog( + const absl::optional<gfx::Rect>& anchor) = 0; // views::WidgetObserver: void OnWidgetDestroying(views::Widget* widget) override; @@ -110,7 +111,8 @@ } ~WebUIBubbleManagerT() override = default; - base::WeakPtr<WebUIBubbleDialogView> CreateWebUIBubbleDialog() override { + base::WeakPtr<WebUIBubbleDialogView> CreateWebUIBubbleDialog( + const absl::optional<gfx::Rect>& anchor) override { BubbleContentsWrapper* contents_wrapper = nullptr; // Only use per profile peristence if the flag is set and if a @@ -151,6 +153,8 @@ auto bubble_view = std::make_unique<WebUIBubbleDialogView>(anchor_view_, contents_wrapper); + if (anchor) + bubble_view->SetAnchorRect(anchor.value()); auto weak_ptr = bubble_view->GetWeakPtr(); views::BubbleDialogDelegateView::CreateBubble(std::move(bubble_view)); return weak_ptr;
diff --git a/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc b/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc index f16df73..4668e9c 100644 --- a/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc +++ b/chrome/browser/ui/views/bubble/webui_bubble_manager_unittest.cc
@@ -142,6 +142,24 @@ profile_manager()->DeleteTestingProfile(kProfileName); } +TEST_F(WebUIBubbleManagerTest, CreateWebUIBubbleDialogWithAnchorProvided) { + const char* kProfileName = "Person 1"; + auto* test_profile = profile_manager()->CreateTestingProfile(kProfileName); + + std::unique_ptr<views::Widget> anchor_widget = + CreateTestWidget(views::Widget::InitParams::TYPE_WINDOW); + auto bubble_manager = + std::make_unique<WebUIBubbleManagerT<TestWebUIController>>( + anchor_widget->GetContentsView(), test_profile, GURL(kTestURL), 1); + bubble_manager->DisableCloseBubbleHelperForTesting(); + + gfx::Rect anchor(666, 666, 0, 0); + bubble_manager->ShowBubble(anchor); + auto bubble_view = bubble_manager->bubble_view_for_testing(); + + EXPECT_EQ(bubble_view->GetAnchorRect(), anchor); +} + #if !BUILDFLAG(IS_CHROMEOS_ASH) // No multi-profile on ChromeOS. TEST_F(WebUIBubbleManagerTest,
diff --git a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc index f47029e8..c84dada 100644 --- a/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc +++ b/chrome/browser/ui/views/desktop_capture/desktop_media_tab_list_unittest.cc
@@ -16,6 +16,7 @@ #include "content/public/test/browser_task_environment.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image_skia.h" #include "ui/views/controls/table/table_view.h" #include "ui/views/layout/layout_provider.h"
diff --git a/chrome/browser/ui/views/elevation_icon_setter.cc b/chrome/browser/ui/views/elevation_icon_setter.cc index 0af84378..05eed7824 100644 --- a/chrome/browser/ui/views/elevation_icon_setter.cc +++ b/chrome/browser/ui/views/elevation_icon_setter.cc
@@ -9,6 +9,7 @@ #include "base/task/post_task.h" #include "base/task/thread_pool.h" #include "build/build_config.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/views/controls/button/label_button.h" #if BUILDFLAG(IS_WIN)
diff --git a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc index b5d274e..f77236a 100644 --- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc +++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.cc
@@ -699,17 +699,6 @@ DragDropCleanup(dragged_extension_id); } -DragOperation ExtensionsToolbarContainer::OnPerformDrop( - const ui::DropTargetEvent& event) { - auto drop_callback = GetDropCallback(event); - if (!drop_callback) - return DragOperation::kNone; - - DragOperation output_drag_op = DragOperation::kNone; - std::move(drop_callback).Run(event, output_drag_op); - return output_drag_op; -} - views::View::DropCallback ExtensionsToolbarContainer::GetDropCallback( const ui::DropTargetEvent& event) { BrowserActionDragData data;
diff --git a/chrome/browser/ui/views/extensions/extensions_toolbar_container.h b/chrome/browser/ui/views/extensions/extensions_toolbar_container.h index 3577ef2b..db0427c9 100644 --- a/chrome/browser/ui/views/extensions/extensions_toolbar_container.h +++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container.h
@@ -122,8 +122,6 @@ void OnDragEntered(const ui::DropTargetEvent& event) override; int OnDragUpdated(const ui::DropTargetEvent& event) override; void OnDragExited() override; - ui::mojom::DragOperation OnPerformDrop( - const ui::DropTargetEvent& event) override; views::View::DropCallback GetDropCallback( const ui::DropTargetEvent& event) override;
diff --git a/chrome/browser/ui/views/extensions/extensions_toolbar_container_unittest.cc b/chrome/browser/ui/views/extensions/extensions_toolbar_container_unittest.cc index 2a8c7644..548ee94f 100644 --- a/chrome/browser/ui/views/extensions/extensions_toolbar_container_unittest.cc +++ b/chrome/browser/ui/views/extensions/extensions_toolbar_container_unittest.cc
@@ -13,6 +13,7 @@ #include "extensions/common/extension_id.h" #include "testing/gmock/include/gmock/gmock.h" #include "ui/base/dragdrop/drag_drop_types.h" +#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h" class ExtensionsToolbarContainerUnitTest : public ExtensionsToolbarUnitTest { public: @@ -82,7 +83,9 @@ ui::DropTargetEvent drop_event(drag_data, drop_point, drop_point, ui::DragDropTypes::DRAG_MOVE); extensions_container()->OnDragUpdated(drop_event); - extensions_container()->OnPerformDrop(drop_event); + auto drop_cb = extensions_container()->GetDropCallback(drop_event); + ui::mojom::DragOperation output_drag_op = ui::mojom::DragOperation::kNone; + std::move(drop_cb).Run(drop_event, output_drag_op); WaitForAnimation(); // Verify the new order is C, A, B.
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index cbba7054..0c95f72 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -216,6 +216,7 @@ #include "ui/gfx/canvas.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/rect_conversions.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/scoped_canvas.h" #include "ui/gfx/scrollbar_size.h" #include "ui/views/accessibility/view_accessibility.h" @@ -1750,6 +1751,8 @@ if (!IsActive()) return; #endif + if (!IsLocationBarVisible()) + return; LocationBarView* location_bar = GetLocationBarView(); location_bar->FocusLocation(is_user_initiated); @@ -2156,6 +2159,11 @@ return IsToolbarVisible(); } +bool BrowserView::IsLocationBarVisible() const { + return browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR) && + GetLocationBarView()->GetVisible(); +} + void BrowserView::ShowUpdateChromeDialog() { UpdateRecommendedMessageBox::Show(GetNativeWindow()); }
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index a3bfa908..786a096 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -481,6 +481,8 @@ bool IsTabStripEditable() const override; bool IsToolbarVisible() const override; bool IsToolbarShowing() const override; + bool IsLocationBarVisible() const override; + SharingDialog* ShowSharingDialog(content::WebContents* contents, SharingDialogData data) override; void ShowUpdateChromeDialog() override;
diff --git a/chrome/browser/ui/views/page_action/page_action_icon_view_unittest.cc b/chrome/browser/ui/views/page_action/page_action_icon_view_unittest.cc index 9f7ff91..21baa7c 100644 --- a/chrome/browser/ui/views/page_action/page_action_icon_view_unittest.cc +++ b/chrome/browser/ui/views/page_action/page_action_icon_view_unittest.cc
@@ -8,6 +8,7 @@ #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/command_updater_impl.h" #include "chrome/test/views/chrome_views_test_base.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/events/test/event_generator.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h"
diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc index a9d23be..f7435aca 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
@@ -21,7 +21,7 @@ #include "chrome/browser/ui/views/side_panel/side_panel_web_ui_view.h" #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/webui/read_later/side_panel/bookmarks_side_panel_ui.h" -#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.h" #include "chrome/common/webui_url_constants.h" #include "chrome/grit/generated_resources.h" #include "components/feature_engagement/public/feature_constants.h" @@ -346,14 +346,7 @@ std::unique_ptr<views::View> SidePanelCoordinator::CreateReadAnythingWebView( Browser* browser) { - return std::make_unique<SidePanelWebUIViewT<ReadAnythingSidePanelUI>>( - browser, base::RepeatingClosure(), - base::BindRepeating(&SidePanelCoordinator::Close, base::Unretained(this)), - std::make_unique<BubbleContentsWrapperT<ReadAnythingSidePanelUI>>( - GURL(chrome::kChromeUIReadAnythingSidePanelURL), browser->profile(), - IDS_READ_ANYTHING_TITLE, - /*webui_resizes_host=*/false, - /*esc_closes_ui=*/false)); + return std::make_unique<ReadAnythingContainerView>(browser); } void SidePanelCoordinator::OnEntryRegistered(SidePanelEntry* entry) {
diff --git a/chrome/browser/ui/views/tab_search_bubble_host.cc b/chrome/browser/ui/views/tab_search_bubble_host.cc index 4c574a5a..34b7fee 100644 --- a/chrome/browser/ui/views/tab_search_bubble_host.cc +++ b/chrome/browser/ui/views/tab_search_bubble_host.cc
@@ -5,9 +5,11 @@ #include "chrome/browser/ui/views/tab_search_bubble_host.h" #include "base/bind.h" +#include "base/i18n/rtl.h" #include "base/metrics/histogram_functions.h" #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/feature_engagement/tracker_factory.h" +#include "chrome/browser/ui/layout_constants.h" #include "chrome/browser/ui/views/tabs/tab_strip_controller.h" #include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h" #include "chrome/common/webui_url_constants.h" @@ -17,6 +19,7 @@ #include "components/feature_engagement/public/tracker.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/compositor/compositor.h" +#include "ui/display/screen.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/gfx/presentation_feedback.h" #include "ui/views/widget/widget.h" @@ -106,8 +109,26 @@ if (controller) controller->CloseBubble(feature_engagement::kIPHTabSearchFeature); + absl::optional<gfx::Rect> anchor; + if (button_->GetWidget()->IsFullscreen()) { + // An anchor is necessary because the tabstrip used for bubble positioning + // is not available in fullscreen mode. The padding gives the bubble a + // more similar relative positioning to its non-fullscreen positioning. + // The mirrored position is needed to get the correct position in RTL + // mode. + auto display = display::Screen::GetScreen()->GetDisplayNearestView( + button_->GetWidget()->GetNativeView()); + gfx::Rect bounds = display.bounds(); + int offset = GetLayoutConstant(TABSTRIP_REGION_VIEW_CONTROL_PADDING); + + int x = base::i18n::IsRTL() ? bounds.x() + offset + : bounds.x() + bounds.width() - offset; + + anchor.emplace(gfx::Rect(x, bounds.y() + offset, 0, 0)); + } + bubble_created_time_ = base::TimeTicks::Now(); - webui_bubble_manager_.ShowBubble(); + webui_bubble_manager_.ShowBubble(anchor); auto* tracker = feature_engagement::TrackerFactory::GetForBrowserContext(profile_);
diff --git a/chrome/browser/ui/views/tab_search_bubble_host_browsertest.cc b/chrome/browser/ui/views/tab_search_bubble_host_browsertest.cc index a0f97b10..12759528 100644 --- a/chrome/browser/ui/views/tab_search_bubble_host_browsertest.cc +++ b/chrome/browser/ui/views/tab_search_bubble_host_browsertest.cc
@@ -2,16 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/views/tab_search_bubble_host.h" #include "base/run_loop.h" #include "build/build_config.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" #include "chrome/browser/ui/views/bubble/webui_bubble_manager.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/test/base/in_process_browser_test.h" #include "content/public/test/browser_test.h" #include "ui/base/accelerators/accelerator.h" +#include "ui/gfx/geometry/point.h" +#include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/size.h" class TabSearchBubbleHostBrowserTest : public InProcessBrowserTest { public: @@ -56,6 +61,27 @@ RunUntilBubbleWidgetDestroyed(); } +IN_PROC_BROWSER_TEST_F(TabSearchBubbleHostBrowserTest, + BubbleShowCorrectlyInFullscreen) { + browser() + ->exclusive_access_manager() + ->fullscreen_controller() + ->ToggleBrowserFullscreenMode(); + + gfx::Rect rect(gfx::Point(20, 4), gfx::Size()); + bubble_manager()->ShowBubble(rect); + + bubble_manager()->bubble_view_for_testing()->ShowUI(); + EXPECT_TRUE(bubble_manager()->GetBubbleWidget()->IsVisible()); + + gfx::Rect bound = + bubble_manager()->bubble_view_for_testing()->GetAnchorRect(); + EXPECT_EQ(bound, rect); + + tab_search_bubble_host()->CloseTabSearchBubble(); + RunUntilBubbleWidgetDestroyed(); +} + // On macOS, most accelerators are handled by CommandDispatcher. #if !BUILDFLAG(IS_MAC) IN_PROC_BROWSER_TEST_F(TabSearchBubbleHostBrowserTest, @@ -75,3 +101,26 @@ RunUntilBubbleWidgetDestroyed(); } #endif + +class FullscreenTabSearchBubbleDialogTest : public DialogBrowserTest { + public: + FullscreenTabSearchBubbleDialogTest() = default; + + FullscreenTabSearchBubbleDialogTest( + const FullscreenTabSearchBubbleDialogTest&) = delete; + FullscreenTabSearchBubbleDialogTest& operator=( + const FullscreenTabSearchBubbleDialogTest&) = delete; + + void ShowUi(const std::string& name) override { + browser() + ->exclusive_access_manager() + ->fullscreen_controller() + ->ToggleBrowserFullscreenMode(); + BrowserView* view = BrowserView::GetBrowserViewForBrowser(browser()); + view->CreateTabSearchBubble(); + } +}; + +IN_PROC_BROWSER_TEST_F(FullscreenTabSearchBubbleDialogTest, InvokeUi_default) { + ShowAndVerifyUi(); +}
diff --git a/chrome/browser/ui/views/tab_sharing/tab_sharing_ui_views.cc b/chrome/browser/ui/views/tab_sharing/tab_sharing_ui_views.cc index a68c6ef..d7cd863 100644 --- a/chrome/browser/ui/views/tab_sharing/tab_sharing_ui_views.cc +++ b/chrome/browser/ui/views/tab_sharing/tab_sharing_ui_views.cc
@@ -33,6 +33,7 @@ #include "extensions/common/constants.h" #include "net/base/url_util.h" #include "services/network/public/cpp/is_potentially_trustworthy.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/views/border.h" #if BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc index 468dad0..a6ff0c5 100644 --- a/chrome/browser/ui/views/toolbar/toolbar_view.cc +++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -391,6 +391,9 @@ // Start global error services now so we set the icon on the menu correctly. #if !BUILDFLAG(IS_CHROMEOS_ASH) SigninGlobalErrorFactory::GetForProfile(browser_->profile()); +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) + RecoveryInstallGlobalErrorFactory::GetForProfile(browser_->profile()); +#endif #endif // BUILDFLAG(IS_CHROMEOS_ASH) // Set the button icon based on the system state. Do this after
diff --git a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc index c70fe58..a00300d 100644 --- a/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc
@@ -48,7 +48,8 @@ } // namespace // Tests for the `FileHandlerLaunchDialogView` as well as -// `startup::web_app::MaybeHandleWebAppLaunch()`. +// `startup::web_app::MaybeHandleWebAppLaunch()`. As Chrome OS uses the app +// service to launch PWAs, this test suite is not run there. class FileHandlerLaunchDialogTest : public InProcessBrowserTest { public: void SetUpOnMainThread() override {
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc index fd3f71d..0090aff 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc
@@ -11,15 +11,6 @@ // Manual tests: -IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTest, - LaunchFromPlatformShortcut) { - helper_.InstallCreateShortcutWindowed("SiteA"); - helper_.CheckWindowCreated(); - helper_.ClosePwa(); - helper_.LaunchFromPlatformShortcut("SiteA"); - helper_.CheckWindowCreated(); -} - IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTest, UninstallFromList) { helper_.InstallCreateShortcutWindowed("SiteA"); helper_.UninstallFromList("SiteA");
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_mac_win_linux.cc b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_mac_win_linux.cc index de4f7c3..7b0b481d 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_mac_win_linux.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_mac_win_linux.cc
@@ -13,6 +13,15 @@ // Manual tests: +IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTest, + LaunchFromPlatformShortcut) { + helper_.InstallCreateShortcutWindowed("SiteA"); + helper_.CheckWindowCreated(); + helper_.ClosePwa(); + helper_.LaunchFromPlatformShortcut("SiteA"); + helper_.CheckWindowCreated(); +} + IN_PROC_BROWSER_TEST_F(WebAppIntegrationBrowserTestMacWinLinux, CheckPlatformShortcutAndIcon) { helper_.CheckPlatformShortcutNotExists("SiteA");
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc b/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc index 07d4861..60b7611 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_test_driver.cc
@@ -832,6 +832,7 @@ void WebAppIntegrationTestDriver::LaunchFromPlatformShortcut( const std::string& site_mode) { +#if !BUILDFLAG(IS_CHROMEOS) BeforeStateChangeAction(__FUNCTION__); absl::optional<AppState> app_state = GetAppBySiteMode( before_state_change_action_state_.get(), profile(), site_mode); @@ -858,6 +859,9 @@ app_banner_manager->WaitForInstallableCheck(); } AfterStateChangeAction(); +#else + NOTREACHED() << "Not implemented on Chrome OS."; +#endif } void WebAppIntegrationTestDriver::OpenAppSettingsFromAppMenu(
diff --git a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc index d315b10..150c7c8 100644 --- a/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_engagement_browsertest.cc
@@ -475,6 +475,9 @@ TestEngagementEventsAfterLaunch(histograms, browser()); } +// On Chrome OS, PWAs are launched via the app service rather than via command +// line flags. +#if !BUILDFLAG(IS_CHROMEOS) IN_PROC_BROWSER_TEST_F(WebAppEngagementBrowserTest, CommandLineWindowByUrl) { base::HistogramTester tester; ASSERT_TRUE(embedded_test_server()->Start()); @@ -626,5 +629,6 @@ EXPECT_EQ(expected_browsers, chrome::GetBrowserCount(browser()->profile())); EXPECT_EQ(expected_tabs, browser()->tab_strip_model()->count()); } +#endif } // namespace web_app
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc index 4cdfd09..191ce0bb 100644 --- a/chrome/browser/ui/webui/about_ui.cc +++ b/chrome/browser/ui/webui/about_ui.cc
@@ -265,7 +265,8 @@ ui::ResourceBundle::GetSharedInstance().LoadLocalizedResourceString( IDS_TERMS_HTML); } - std::move(callback_).Run(base::RefCountedString::TakeString(&contents_)); + std::move(callback_).Run( + base::RefCountedString::TakeString(std::move(contents_))); } // Path in the URL. @@ -336,7 +337,8 @@ ui::ResourceBundle::GetSharedInstance().LoadDataResourceString( IDR_OS_CREDITS_HTML); } - std::move(callback_).Run(base::RefCountedString::TakeString(&contents_)); + std::move(callback_).Run( + base::RefCountedString::TakeString(std::move(contents_))); } // Path in the URL. @@ -354,7 +356,8 @@ if (credits_html.empty()) { credits_html = l10n_util::GetStringUTF8(IDS_BOREALIS_CREDITS_PLACEHOLDER); } - std::move(callback).Run(base::RefCountedString::TakeString(&credits_html)); + std::move(callback).Run( + base::RefCountedString::TakeString(std::move(credits_html))); } void HandleBorealisCredits(Profile* profile, @@ -438,7 +441,8 @@ if (contents_.empty() && path_ != kKeyboardUtilsPath) { contents_ = l10n_util::GetStringUTF8(IDS_CROSTINI_CREDITS_PLACEHOLDER); } - std::move(callback_).Run(base::RefCountedString::TakeString(&contents_)); + std::move(callback_).Run( + base::RefCountedString::TakeString(std::move(contents_))); } // Path in the URL. @@ -713,7 +717,8 @@ const std::string& html, content::URLDataSource::GotDataCallback callback) { std::string html_copy(html); - std::move(callback).Run(base::RefCountedString::TakeString(&html_copy)); + std::move(callback).Run( + base::RefCountedString::TakeString(std::move(html_copy))); } std::string AboutUIHTMLSource::GetMimeType(const std::string& path) {
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 ca3b83b..ae16fbf 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -151,7 +151,7 @@ #include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_dialog_ui.h" #include "chrome/browser/ui/webui/read_later/read_later_ui.h" #include "chrome/browser/ui/webui/read_later/side_panel/bookmarks_side_panel_ui.h" -#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h" #include "chrome/browser/ui/webui/settings/settings_ui.h" #include "chrome/browser/ui/webui/settings/settings_utils.h" #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" @@ -864,7 +864,7 @@ return &NewWebUI<BookmarksSidePanelUI>; if (features::IsReadAnythingEnabled()) { if (url.host_piece() == chrome::kChromeUIReadAnythingSidePanelHost) - return &NewWebUI<ReadAnythingSidePanelUI>; + return &NewWebUI<ReadAnythingUI>; } // Settings are implemented with native UI elements on Android. if (url.host_piece() == chrome::kChromeUISettingsHost)
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc index c6eea23..cdede97 100644 --- a/chrome/browser/ui/webui/chromeos/login/l10n_util.cc +++ b/chrome/browser/ui/webui/chromeos/login/l10n_util.cc
@@ -6,6 +6,7 @@ #include <stddef.h> +#include <algorithm> #include <iterator> #include <map> #include <memory> @@ -58,10 +59,10 @@ const std::string& ime_id = method.id(); std::unique_ptr<base::DictionaryValue> input_method( new base::DictionaryValue); - input_method->SetStringKey("value", ime_id); - input_method->SetStringKey("title", - util->GetInputMethodLongNameStripped(method)); - input_method->SetBoolKey("selected", ime_id == selected); + input_method->GetDict().Set("value", ime_id); + input_method->GetDict().Set("title", + util->GetInputMethodLongNameStripped(method)); + input_method->GetDict().Set("selected", ime_id == selected); return input_method; } @@ -74,7 +75,7 @@ void AddOptgroupOtherLayouts(base::ListValue* input_methods_list) { std::unique_ptr<base::DictionaryValue> optgroup(new base::DictionaryValue); - optgroup->SetStringKey( + optgroup->GetDict().Set( "optionGroupName", l10n_util::GetStringUTF16(IDS_OOBE_OTHER_KEYBOARD_LAYOUTS)); input_methods_list->Append(std::move(optgroup)); @@ -94,10 +95,10 @@ const std::string directionality = has_rtl_chars ? "rtl" : "ltr"; auto dictionary = std::make_unique<base::DictionaryValue>(); - dictionary->SetStringKey("code", language_code); - dictionary->SetStringKey("displayName", language_display_name); - dictionary->SetStringKey("textDirection", directionality); - dictionary->SetStringKey("nativeDisplayName", language_native_display_name); + dictionary->GetDict().Set("code", language_code); + dictionary->GetDict().Set("displayName", language_display_name); + dictionary->GetDict().Set("textDirection", directionality); + dictionary->GetDict().Set("nativeDisplayName", language_native_display_name); return dictionary; } @@ -270,7 +271,7 @@ if (insert_divider && display_name == divider16) { // Insert divider. auto dictionary = std::make_unique<base::DictionaryValue>(); - dictionary->SetStringKey("code", kMostRelevantLanguagesDivider); + dictionary->GetDict().Set("code", kMostRelevantLanguagesDivider); language_list->Append(std::move(dictionary)); continue; } @@ -398,20 +399,21 @@ if (!language_info.is_dict()) NOTREACHED(); - std::string value = language_info.FindStringKey("code") - ? *language_info.FindStringKey("code") + std::string value = language_info.GetDict().FindString("code") + ? *language_info.GetDict().FindString("code") : ""; - std::string display_name = language_info.FindStringKey("displayName") - ? *language_info.FindStringKey("displayName") - : ""; + std::string display_name = + language_info.GetDict().FindString("displayName") + ? *language_info.GetDict().FindString("displayName") + : ""; std::string native_name = - language_info.FindStringKey("nativeDisplayName") - ? *language_info.FindStringKey("nativeDisplayName") + language_info.GetDict().FindString("nativeDisplayName") + ? *language_info.GetDict().FindString("nativeDisplayName") : ""; // If it's an option group divider, add field name. if (value == kMostRelevantLanguagesDivider) { - language_info.SetStringKey( + language_info.GetDict().Set( "optionGroupName", l10n_util::GetStringUTF16(IDS_OOBE_OTHER_LANGUAGES)); } @@ -420,10 +422,10 @@ native_name.c_str()); } - language_info.SetStringKey("value", value); - language_info.SetStringKey("title", display_name); + language_info.GetDict().Set("value", value); + language_info.GetDict().Set("title", display_name); if (value == selected) - language_info.SetBoolKey("selected", true); + language_info.GetDict().Set("selected", true); } } @@ -486,7 +488,7 @@ for (const auto& entry : available_locales.GetListDeprecated()) { const std::string* available_locale = nullptr; if (entry.is_dict()) - available_locale = entry.FindStringKey("value"); + available_locale = entry.GetDict().FindString("value"); if (!available_locale) { NOTREACHED();
diff --git a/chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc b/chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc index 544c3a9..87553de9 100644 --- a/chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc +++ b/chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc
@@ -28,7 +28,7 @@ for (const base::Value& value : list.GetListDeprecated()) { ASSERT_TRUE(value.is_dict()); const base::DictionaryValue& dict = base::Value::AsDictionaryValue(value); - const std::string* code = dict.FindStringKey("code"); + const std::string* code = dict.GetDict().FindString("code"); ASSERT_TRUE(code); EXPECT_NE("ga", *code) << "Irish is an example language which has input method " @@ -42,7 +42,7 @@ const base::Value& value = list.GetListDeprecated()[index]; ASSERT_TRUE(value.is_dict()); const base::DictionaryValue& dict = base::Value::AsDictionaryValue(value); - const std::string* actual_code = dict.FindStringKey("code"); + const std::string* actual_code = dict.GetDict().FindString("code"); ASSERT_TRUE(actual_code); EXPECT_EQ(expected_code, *actual_code) << "Wrong language code at index " << index << "."; @@ -108,13 +108,13 @@ TEST_F(L10nUtilTest, FindMostRelevantLocale) { base::ListValue available_locales; std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue); - dict->SetStringKey("value", "de"); + dict->GetDict().Set("value", "de"); available_locales.Append(std::move(dict)); dict = std::make_unique<base::DictionaryValue>(); - dict->SetStringKey("value", "fr"); + dict->GetDict().Set("value", "fr"); available_locales.Append(std::move(dict)); dict = std::make_unique<base::DictionaryValue>(); - dict->SetStringKey("value", "en-GB"); + dict->GetDict().Set("value", "en-GB"); available_locales.Append(std::move(dict)); std::vector<std::string> most_relevant_language_codes;
diff --git a/chrome/browser/ui/webui/chromeos/multidevice_internals/multidevice_internals_phone_hub_handler.cc b/chrome/browser/ui/webui/chromeos/multidevice_internals/multidevice_internals_phone_hub_handler.cc index 5fb2c49..aa782eb4 100644 --- a/chrome/browser/ui/webui/chromeos/multidevice_internals/multidevice_internals_phone_hub_handler.cc +++ b/chrome/browser/ui/webui/chromeos/multidevice_internals/multidevice_internals_phone_hub_handler.cc
@@ -4,6 +4,11 @@ #include "chrome/browser/ui/webui/chromeos/multidevice_internals/multidevice_internals_phone_hub_handler.h" +#include <memory> +#include <string> +#include <utility> +#include <vector> + #include "ash/components/multidevice/logging/logging.h" #include "ash/components/phonehub/camera_roll_item.h" #include "ash/components/phonehub/fake_phone_hub_manager.h" @@ -67,23 +72,23 @@ phonehub::Notification::AppMetadata DictToAppMetadata( const base::DictionaryValue* app_metadata_dict) { const std::string* visible_app_name_ptr = - app_metadata_dict->FindStringKey("visibleAppName"); + app_metadata_dict->GetDict().FindString("visibleAppName"); CHECK(visible_app_name_ptr); std::u16string visible_app_name = base::UTF8ToUTF16(*visible_app_name_ptr); const std::string* package_name = - app_metadata_dict->FindStringKey("packageName"); + app_metadata_dict->GetDict().FindString("packageName"); CHECK(package_name); absl::optional<int> icon_image_type_as_int = - app_metadata_dict->FindIntKey("icon"); + app_metadata_dict->GetDict().FindInt("icon"); CHECK(icon_image_type_as_int); auto icon_image_type = static_cast<ImageType>(*icon_image_type_as_int); gfx::Image icon = gfx::Image::CreateFrom1xBitmap( ImageTypeToBitmap(icon_image_type, kIconSize)); - int user_id = app_metadata_dict->FindIntKey("userId").value_or(0); + int user_id = app_metadata_dict->GetDict().FindInt("userId").value_or(0); return phonehub::Notification::AppMetadata( visible_app_name, *package_name, icon, /*icon_color=*/absl::nullopt, @@ -99,22 +104,23 @@ if (!browser_tab_status_dict->GetDictionary(key, &browser_tab_metadata)) return; - const std::string* url = browser_tab_metadata->FindStringKey("url"); + const std::string* url = browser_tab_metadata->GetDict().FindString("url"); if (!url || url->empty()) return; - const std::string* title = browser_tab_metadata->FindStringKey("title"); + const std::string* title = + browser_tab_metadata->GetDict().FindString("title"); if (!title) return; // JavaScript time stamps don't fit in int. absl::optional<double> last_accessed_timestamp = - browser_tab_metadata->FindDoubleKey("lastAccessedTimeStamp"); + browser_tab_metadata->GetDict().FindDouble("lastAccessedTimeStamp"); if (!last_accessed_timestamp) return; int favicon_image_type_as_int = - browser_tab_metadata->FindIntKey("favicon").value_or(0); + browser_tab_metadata->GetDict().FindInt("favicon").value_or(0); if (!favicon_image_type_as_int) return; @@ -292,7 +298,7 @@ void MultidevicePhoneHubHandler::OnCameraRollViewUiStateUpdated() { base::Value camera_roll_dict(base::Value::Type::DICTIONARY); - camera_roll_dict.SetBoolKey( + camera_roll_dict.GetDict().Set( "isCameraRollEnabled", fake_phone_hub_manager_->fake_camera_roll_manager() ->is_camera_roll_enabled()); FireWebUIListener("camera-roll-ui-view-state-updated", camera_roll_dict); @@ -405,13 +411,13 @@ CHECK(phones_status_value.is_dict()); absl::optional<int> mobile_status_as_int = - phones_status_value.FindIntKey("mobileStatus"); + phones_status_value.GetDict().FindInt("mobileStatus"); CHECK(mobile_status_as_int); auto mobile_status = static_cast<phonehub::PhoneStatusModel::MobileStatus>( *mobile_status_as_int); absl::optional<int> signal_strength_as_int = - phones_status_value.FindIntKey("signalStrength"); + phones_status_value.GetDict().FindInt("signalStrength"); CHECK(signal_strength_as_int); auto signal_strength = @@ -421,25 +427,25 @@ const base::DictionaryValue* phones_status_dict = static_cast<const base::DictionaryValue*>(&phones_status_value); const std::string* mobile_provider_ptr = - phones_status_dict->FindStringKey("mobileProvider"); + phones_status_dict->GetDict().FindString("mobileProvider"); CHECK(mobile_provider_ptr); std::u16string mobile_provider = base::UTF8ToUTF16(*mobile_provider_ptr); absl::optional<int> charging_state_as_int = - phones_status_value.FindIntKey("chargingState"); + phones_status_value.GetDict().FindInt("chargingState"); CHECK(charging_state_as_int); auto charging_state = static_cast<phonehub::PhoneStatusModel::ChargingState>( *charging_state_as_int); absl::optional<int> battery_saver_state_as_int = - phones_status_value.FindIntKey("batterySaverState"); + phones_status_value.GetDict().FindInt("batterySaverState"); CHECK(battery_saver_state_as_int); auto battery_saver_state = static_cast<phonehub::PhoneStatusModel::BatterySaverState>( *battery_saver_state_as_int); absl::optional<int> battery_percentage = - phones_status_value.FindIntKey("batteryPercentage"); + phones_status_value.GetDict().FindInt("batteryPercentage"); CHECK(battery_percentage); phonehub::PhoneStatusModel::MobileConnectionMetadata connection_metadata = { @@ -468,7 +474,7 @@ const base::DictionaryValue* browser_tab_status_dict = static_cast<const base::DictionaryValue*>(&browser_tab_status_value); bool is_tab_sync_enabled = - browser_tab_status_dict->FindBoolKey("isTabSyncEnabled").value(); + browser_tab_status_dict->GetDict().FindBool("isTabSyncEnabled").value(); if (!is_tab_sync_enabled) { fake_phone_hub_manager_->mutable_phone_model()->SetBrowserTabsModel( @@ -502,7 +508,7 @@ const base::Value& notification_data_value = args->GetListDeprecated()[0]; CHECK(notification_data_value.is_dict()); - absl::optional<int> id = notification_data_value.FindIntKey("id"); + absl::optional<int> id = notification_data_value.GetDict().FindInt("id"); CHECK(id); const base::DictionaryValue* notification_data_dict = @@ -515,35 +521,36 @@ // JavaScript time stamps don't fit in int. absl::optional<double> js_timestamp = - notification_data_value.FindDoubleKey("timestamp"); + notification_data_value.GetDict().FindDouble("timestamp"); CHECK(js_timestamp); auto timestamp = base::Time::FromJsTime(*js_timestamp); absl::optional<int> importance_as_int = - notification_data_value.FindIntKey("importance"); + notification_data_value.GetDict().FindInt("importance"); CHECK(importance_as_int); auto importance = static_cast<phonehub::Notification::Importance>(*importance_as_int); absl::optional<int> inline_reply_id = - notification_data_value.FindIntKey("inlineReplyId"); + notification_data_value.GetDict().FindInt("inlineReplyId"); CHECK(inline_reply_id); absl::optional<std::u16string> opt_title; - const std::string* title = notification_data_dict->FindStringKey("title"); + const std::string* title = + notification_data_dict->GetDict().FindString("title"); if (title && !title->empty()) opt_title = base::UTF8ToUTF16(*title); absl::optional<std::u16string> opt_text_content; if (const std::string* text_content = - notification_data_dict->FindStringKey("textContent")) { + notification_data_dict->GetDict().FindString("textContent")) { if (!text_content->empty()) opt_text_content = base::UTF8ToUTF16(*text_content); } absl::optional<gfx::Image> opt_shared_image; int shared_image_type_as_int = - notification_data_value.FindIntKey("sharedImage").value_or(0); + notification_data_value.GetDict().FindInt("sharedImage").value_or(0); if (shared_image_type_as_int) { auto shared_image_type = static_cast<ImageType>(shared_image_type_as_int); opt_shared_image = gfx::Image::CreateFrom1xBitmap( @@ -552,7 +559,7 @@ absl::optional<gfx::Image> opt_contact_image; int contact_image_type_as_int = - notification_data_value.FindIntKey("contactImage").value_or(0); + notification_data_value.GetDict().FindInt("contactImage").value_or(0); if (contact_image_type_as_int) { auto shared_contact_image_type = static_cast<ImageType>(contact_image_type_as_int); @@ -603,25 +610,25 @@ CHECK(camera_roll_dict.is_dict()); absl::optional<bool> is_camera_roll_enabled = - camera_roll_dict.FindBoolKey("isCameraRollEnabled"); + camera_roll_dict.GetDict().FindBool("isCameraRollEnabled"); CHECK(is_camera_roll_enabled); fake_phone_hub_manager_->fake_camera_roll_manager() ->SetIsCameraRollAvailableToBeEnabled(!*is_camera_roll_enabled); absl::optional<bool> is_file_access_granted = - camera_roll_dict.FindBoolKey("isFileAccessGranted"); + camera_roll_dict.GetDict().FindBool("isFileAccessGranted"); CHECK(is_file_access_granted); fake_phone_hub_manager_->fake_camera_roll_manager() ->SetIsAndroidStorageGranted(*is_file_access_granted); absl::optional<int> number_of_thumbnails = - camera_roll_dict.FindIntKey("numberOfThumbnails"); + camera_roll_dict.GetDict().FindInt("numberOfThumbnails"); CHECK(number_of_thumbnails); absl::optional<int> file_type_as_int = - camera_roll_dict.FindIntKey("fileType"); + camera_roll_dict.GetDict().FindInt("fileType"); CHECK(file_type_as_int); const char* file_type; const char* file_ext; @@ -656,7 +663,7 @@ } absl::optional<int> download_result_as_int = - camera_roll_dict.FindIntKey("downloadResult"); + camera_roll_dict.GetDict().FindInt("downloadResult"); CHECK(download_result_as_int); const char* download_result; if (*download_result_as_int == 0) {
diff --git a/chrome/browser/ui/webui/chromeos/network_ui.cc b/chrome/browser/ui/webui/chromeos/network_ui.cc index 2c3822de..3ac3d8a 100644 --- a/chrome/browser/ui/webui/chromeos/network_ui.cc +++ b/chrome/browser/ui/webui/chromeos/network_ui.cc
@@ -89,7 +89,8 @@ } void SetDeviceProperties(base::Value* dictionary) { - const std::string* device = dictionary->FindStringKey(shill::kDeviceProperty); + const std::string* device = + dictionary->GetDict().FindString(shill::kDeviceProperty); if (!device) return; const DeviceState* device_state = @@ -104,10 +105,12 @@ for (auto iter : device_state->ip_configs().DictItems()) { ip_configs.Append(iter.second.Clone()); } - device_dictionary.SetKey(shill::kIPConfigsProperty, std::move(ip_configs)); + device_dictionary.GetDict().Set(shill::kIPConfigsProperty, + std::move(ip_configs)); } if (!device_dictionary.DictEmpty()) - dictionary->SetKey(shill::kDeviceProperty, std::move(device_dictionary)); + dictionary->GetDict().Set(shill::kDeviceProperty, + std::move(device_dictionary)); } bool IsGuestModeActive() { @@ -292,7 +295,7 @@ return; } // Set the 'service_path' property for debugging. - result->SetKey("service_path", base::Value(service_path)); + result->GetDict().Set("service_path", base::Value(service_path)); // Set the device properties for debugging. SetDeviceProperties(&result.value()); base::ListValue return_arg_list; @@ -335,9 +338,9 @@ } const NetworkState* eap = list.front(); base::Value properties(base::Value::Type::DICTIONARY); - properties.SetStringKey("guid", eap->guid()); - properties.SetStringKey("name", eap->name()); - properties.SetStringKey("type", eap->type()); + properties.GetDict().Set("guid", eap->guid()); + properties.GetDict().Set("name", eap->name()); + properties.GetDict().Set("type", eap->type()); base::Value response(base::Value::Type::LIST); response.Append(std::move(properties)); Respond(callback_id, response); @@ -431,7 +434,7 @@ } // Set the 'device_path' property for debugging. - result->SetKey("device_path", base::Value(device_path)); + result->GetDict().Set("device_path", base::Value(device_path)); base::ListValue return_arg_list; return_arg_list.Append(std::move(*result)); @@ -471,8 +474,8 @@ std::string key = function_name == kGetDeviceProperties ? shill::kTypeProperty : shill::kGuidProperty; - dictionary.SetKey(key, base::Value(guid_or_type)); - dictionary.SetKey("ShillError", base::Value(error_name)); + dictionary.GetDict().Set(key, base::Value(guid_or_type)); + dictionary.GetDict().Set("ShillError", base::Value(error_name)); return_arg_list.Append(std::move(dictionary)); Respond(callback_id, return_arg_list); } @@ -490,168 +493,168 @@ // static void NetworkUI::GetLocalizedStrings(base::DictionaryValue* localized_strings) { - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "titleText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TITLE)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "generalTab", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TAB_GENERAL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkHealthTab", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TAB_NETWORK_HEALTH)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsTab", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TAB_NETWORK_LOGS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkStateTab", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TAB_NETWORK_STATE)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkSelectTab", l10n_util::GetStringUTF16(IDS_NETWORK_UI_TAB_NETWORK_SELECT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "autoRefreshText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_AUTO_REFRESH)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "deviceLogLinkText", l10n_util::GetStringUTF16(IDS_DEVICE_LOG_LINK_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkRefreshText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_REFRESH)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "clickToExpandText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_EXPAND)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "propertyFormatText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_PROPERTY_FORMAT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "normalFormatOption", l10n_util::GetStringUTF16(IDS_NETWORK_UI_FORMAT_NORMAL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "managedFormatOption", l10n_util::GetStringUTF16(IDS_NETWORK_UI_FORMAT_MANAGED)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "stateFormatOption", l10n_util::GetStringUTF16(IDS_NETWORK_UI_FORMAT_STATE)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "shillFormatOption", l10n_util::GetStringUTF16(IDS_NETWORK_UI_FORMAT_SHILL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "dhcpHostnameLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_DHCP_HOSTNAME)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "globalPolicyLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_GLOBAL_POLICY)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkListsLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LISTS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkHealthLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_HEALTH)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkDiagnosticsLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_DIAGNOSTICS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "visibleNetworksLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_VISIBLE_NETWORKS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "favoriteNetworksLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_FAVORITE_NETWORKS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "ethernetEapNetworkLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_ETHERNET_EAP)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "devicesLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_DEVICES)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "cellularActivationLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NO_CELLULAR_ACTIVATION_LABEL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "cellularActivationButtonText", l10n_util::GetStringUTF16( IDS_NETWORK_UI_OPEN_CELLULAR_ACTIVATION_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "noCellularErrorText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NO_CELLULAR_ERROR_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "resetESimCacheLabel", l10n_util::GetStringUTF16( IDS_NETWORK_UI_RESET_ESIM_PROFILES_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "resetESimCacheButtonText", l10n_util::GetStringUTF16( IDS_NETWORK_UI_RESET_ESIM_PROFILES_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "disableESimProfilesLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_DISABLE_ESIM_PROFILES_LABEL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "disableActiveESimProfileButtonText", l10n_util::GetStringUTF16( IDS_NETWORK_UI_DISABLE_ACTIVE_ESIM_PROFILE_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "resetEuiccLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_RESET_EUICC_LABEL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "addNewWifiLabel", l10n_util::GetStringUTF16(IDS_NETWORK_UI_ADD_NEW_WIFI_LABEL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "addNewWifiButtonText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_ADD_NEW_WIFI_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "importOncButtonText", l10n_util::GetStringUTF16(IDS_NETWORK_UI_IMPORT_ONC_BUTTON_TEXT)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "addWiFiListItemName", l10n_util::GetStringUTF16(IDS_NETWORK_ADD_WI_FI_LIST_ITEM_NAME)); // Network logs - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDescription", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_DESCRIPTION)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsSystemLogs", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_SYSTEM_LOGS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsFilterPii", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_FILTER_PII)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsPolicies", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_POLICIES)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDebugLogs", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_DEBUG_LOGS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsChromeLogs", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_CHROME_LOGS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsStoreButton", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_STORE_BUTTON)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsStatus", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_STATUS)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDebuggingTitle", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_DEBUGGING_TITLE)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDebuggingDescription", l10n_util::GetStringUTF16( IDS_NETWORK_UI_NETWORK_LOGS_DEBUGGING_DESCRIPTION)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDebuggingNone", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_DEBUGGING_NONE)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "networkLogsDebuggingUnknown", l10n_util::GetStringUTF16(IDS_NETWORK_UI_NETWORK_LOGS_DEBUGGING_UNKNOWN)); // Network Diagnostics - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "NetworkDiagnosticsRunAll", l10n_util::GetStringUTF16(IDS_NETWORK_DIAGNOSTICS_RUN_ALL)); - localized_strings->SetStringKey( + localized_strings->GetDict().Set( "NetworkDiagnosticsSendFeedback", l10n_util::GetStringUTF16(IDS_NETWORK_DIAGNOSTICS_SEND_FEEDBACK)); }
diff --git a/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.cc b/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.cc index 50f3538..ad791553 100644 --- a/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.cc +++ b/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.cc
@@ -36,40 +36,39 @@ ~MediaRouterInternalsWebUIMessageHandler() = default; void MediaRouterInternalsWebUIMessageHandler::RegisterMessages() { - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "getState", base::BindRepeating( &MediaRouterInternalsWebUIMessageHandler::HandleGetState, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "getProviderState", base::BindRepeating( &MediaRouterInternalsWebUIMessageHandler::HandleGetProviderState, base::Unretained(this))); - web_ui()->RegisterDeprecatedMessageCallback( + web_ui()->RegisterMessageCallback( "getLogs", base::BindRepeating( &MediaRouterInternalsWebUIMessageHandler::HandleGetLogs, base::Unretained(this))); } void MediaRouterInternalsWebUIMessageHandler::HandleGetState( - const base::ListValue* args) { + const base::Value::List& args) { AllowJavascript(); - const base::Value& callback_id = args->GetListDeprecated()[0]; + const base::Value& callback_id = args[0]; ResolveJavascriptCallback(callback_id, router_->GetState()); } void MediaRouterInternalsWebUIMessageHandler::HandleGetProviderState( - const base::ListValue* args) { + const base::Value::List& args) { AllowJavascript(); - base::Value callback_id = args->GetListDeprecated()[0].Clone(); - if (args->GetListDeprecated().size() != 2 || - !args->GetListDeprecated()[1].is_string()) { + base::Value callback_id = args[0].Clone(); + if (args.size() != 2 || !args[1].is_string()) { RejectJavascriptCallback(callback_id, base::Value("Invalid arguments")); return; } absl::optional<mojom::MediaRouteProviderId> provider_id = - ProviderIdFromString(args->GetListDeprecated()[1].GetString()); + ProviderIdFromString(args[1].GetString()); if (!provider_id) { RejectJavascriptCallback(callback_id, base::Value("Unknown MediaRouteProviderId")); @@ -82,9 +81,9 @@ } void MediaRouterInternalsWebUIMessageHandler::HandleGetLogs( - const base::ListValue* args) { + const base::Value::List& args) { AllowJavascript(); - const base::Value& callback_id = args->GetListDeprecated()[0]; + const base::Value& callback_id = args[0]; ResolveJavascriptCallback(callback_id, router_->GetLogs()); }
diff --git a/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.h b/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.h index 29cb7812..9cab546 100644 --- a/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.h +++ b/chrome/browser/ui/webui/media_router/media_router_internals_webui_message_handler.h
@@ -28,9 +28,9 @@ void RegisterMessages() override; // Handlers for JavaScript messages. - void HandleGetState(const base::ListValue* args); - void HandleGetProviderState(const base::ListValue* args); - void HandleGetLogs(const base::ListValue* args); + void HandleGetState(const base::Value::List& args); + void HandleGetProviderState(const base::Value::List& args); + void HandleGetLogs(const base::Value::List& args); void OnProviderState(base::Value callback_id, mojom::ProviderStatePtr state);
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/DEPS b/chrome/browser/ui/webui/read_later/side_panel/read_anything/DEPS new file mode 100644 index 0000000..55c8a9c --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/DEPS
@@ -0,0 +1,5 @@ +specific_include_rules = { + "read_anything_container_view.cc": [ + "+chrome/browser/ui/views", + ], +} \ No newline at end of file
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_constants.h b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_constants.h new file mode 100644 index 0000000..fd06525 --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_constants.h
@@ -0,0 +1,25 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONSTANTS_H_ +#define CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONSTANTS_H_ + +#include "ui/gfx/color_palette.h" +#include "ui/views/layout/flex_layout.h" + +// Various constants used throughout the Read Anything feature. +namespace { + +// Visual constants for Read Anything feature. +// TODO(1226555): Replace these with final values provided by UI. +const SkColor kReadAnythingBackgroundColor = SK_ColorWHITE; +const SkColor kReadAnythingSeperatorColor = gfx::kGoogleGrey700; +const int kInternalInsets = 6; +const int kFontSize = 16; +const int kIconSize = 16; +const int kIconCornerRadius = 2; + +} // namespace + +#endif // CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONSTANTS_H_
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.cc b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.cc new file mode 100644 index 0000000..714930c --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.cc
@@ -0,0 +1,71 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.h" + +#include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/side_panel/side_panel_web_ui_view.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_constants.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/grit/generated_resources.h" +#include "ui/gfx/geometry/geometry_export.h" +#include "ui/views/background.h" +#include "ui/views/controls/separator.h" +#include "ui/views/layout/flex_layout.h" + +ReadAnythingContainerView::ReadAnythingContainerView(Browser* browser) { + // Create and set a FlexLayout LayoutManager for this view, set background. + auto layout = std::make_unique<views::FlexLayout>(); + layout->SetOrientation(views::LayoutOrientation::kVertical) + .SetMainAxisAlignment(views::LayoutAlignment::kStart) + .SetCrossAxisAlignment(views::LayoutAlignment::kStretch) + .SetInteriorMargin(gfx::Insets(kInternalInsets)); + + SetLayoutManager(std::move(layout)); + SetBackground(views::CreateSolidBackground(kReadAnythingBackgroundColor)); + + // Create the toolbar for the side panel. + auto toolbar = std::make_unique<ReadAnythingToolbarView>(); + toolbar->SetProperty( + views::kFlexBehaviorKey, + views::FlexSpecification(views::MinimumFlexSizeRule::kPreferred, + views::MaximumFlexSizeRule::kScaleToMaximum) + .WithOrder(1)); + + // Create a separator. + auto separator = std::make_unique<views::Separator>(); + separator->SetColor(kReadAnythingSeperatorColor); + separator->SetProperty( + views::kFlexBehaviorKey, + views::FlexSpecification(views::MinimumFlexSizeRule::kPreferred, + views::MaximumFlexSizeRule::kScaleToMaximum) + .WithOrder(2)); + + // Create the main content view for the side panel. + auto content_web_view = std::make_unique<SidePanelWebUIViewT<ReadAnythingUI>>( + browser, + /* on_show_cb= */ base::RepeatingClosure(), + /* close_cb= */ base::RepeatingClosure(), + /* contents_wrapper= */ + std::make_unique<BubbleContentsWrapperT<ReadAnythingUI>>( + /* webui_url= */ GURL(chrome::kChromeUIReadAnythingSidePanelURL), + /* browser_context= */ browser->profile(), + /* task_manager_string_id= */ IDS_READ_ANYTHING_TITLE, + /* webui_resizes_host= */ false, + /* esc_closes_ui= */ false)); + content_web_view->SetProperty( + views::kFlexBehaviorKey, + views::FlexSpecification(views::MinimumFlexSizeRule::kPreferred, + views::MaximumFlexSizeRule::kUnbounded) + .WithOrder(3)); + + // Add all components to view. + AddChildView(std::move(toolbar)); + AddChildView(std::move(separator)); + AddChildView(std::move(content_web_view)); +} + +ReadAnythingContainerView::~ReadAnythingContainerView() = default;
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.h b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.h new file mode 100644 index 0000000..6e81fbc --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_container_view.h
@@ -0,0 +1,19 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONTAINER_VIEW_H_ +#define CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONTAINER_VIEW_H_ + +#include "ui/views/view.h" + +class Browser; + +// Generic View to hold the entirety of the "Read Anything" side panel. +class ReadAnythingContainerView : public views::View { + public: + explicit ReadAnythingContainerView(Browser* browser); + ReadAnythingContainerView(const ReadAnythingContainerView&) = delete; + ~ReadAnythingContainerView() override; +}; +#endif // CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_CONTAINER_VIEW_H_
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.cc b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.cc new file mode 100644 index 0000000..55e328f --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.cc
@@ -0,0 +1,59 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h" + +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_constants.h" +#include "components/vector_icons/vector_icons.h" +#include "ui/gfx/color_palette.h" +#include "ui/gfx/geometry/geometry_export.h" +#include "ui/views/background.h" +#include "ui/views/controls/button/image_button.h" +#include "ui/views/controls/button/image_button_factory.h" +#include "ui/views/controls/highlight_path_generator.h" +#include "ui/views/controls/label.h" +#include "ui/views/layout/box_layout.h" +#include "ui/views/layout/layout_types.h" + +ReadAnythingToolbarView::ReadAnythingToolbarView() { + // Create and set a BoxLayout LayoutManager for this view. + auto layout = std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kHorizontal); + layout->set_main_axis_alignment(views::BoxLayout::MainAxisAlignment::kStart); + layout->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::kStretch); + layout->set_inside_border_insets(gfx::Insets(kInternalInsets)); + + SetLayoutManager(std::move(layout)); + + // Create a title for the toolbar. + // TODO(1266555): This is a placeholder title/content, remove for final UI. + auto title = std::make_unique<views::Label>(); + title->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); + title->SetText(u" sans-serif \u25BE"); + title->SetBackground(views::CreateSolidBackground(SK_ColorWHITE)); + title->SetFontList(gfx::FontList({"Roboto", "Arial", "sans-serif"}, + gfx::Font::FontStyle::NORMAL, kFontSize, + gfx::Font::Weight::NORMAL)); + + // Create a Settings button with a callback. + views::Button::PressedCallback settings_callback = + base::BindRepeating(&ReadAnythingToolbarView::OnSettingsClicked, + weak_pointer_factory_.GetWeakPtr()); + auto settings_button = + views::CreateVectorImageButton(std::move(settings_callback)); + views::SetImageFromVectorIcon(settings_button.get(), + vector_icons::kSettingsIcon, kIconSize, + SK_ColorBLACK); + views::InstallCircleHighlightPathGenerator(settings_button.get(), + gfx::Insets(kIconCornerRadius)); + + // Add all components to view. + AddChildView(std::move(settings_button)); + AddChildView(std::move(title)); +} + +void ReadAnythingToolbarView::OnSettingsClicked() {} + +ReadAnythingToolbarView::~ReadAnythingToolbarView() = default;
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h new file mode 100644 index 0000000..639fca0 --- /dev/null +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_toolbar_view.h
@@ -0,0 +1,23 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_TOOLBAR_VIEW_H_ +#define CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_TOOLBAR_VIEW_H_ + +#include "base/memory/weak_ptr.h" +#include "ui/views/view.h" + +// Generic View for the toolbar of the Read Anything side panel. +class ReadAnythingToolbarView : public views::View { + public: + ReadAnythingToolbarView(); + ReadAnythingToolbarView(const ReadAnythingToolbarView&) = delete; + ~ReadAnythingToolbarView() override; + + private: + void OnSettingsClicked(); + base::WeakPtrFactory<ReadAnythingToolbarView> weak_pointer_factory_{this}; +}; + +#endif // CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_TOOLBAR_VIEW_H_
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.cc b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.cc similarity index 86% rename from chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.cc rename to chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.cc index c81eaab1..7bd6a0f 100644 --- a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.cc +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h" +#include "chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h" #include <string> #include <utility> @@ -22,7 +22,7 @@ #include "ui/base/webui/web_ui_util.h" #include "ui/views/style/platform_style.h" -ReadAnythingSidePanelUI::ReadAnythingSidePanelUI(content::WebUI* web_ui) +ReadAnythingUI::ReadAnythingUI(content::WebUI* web_ui) : ui::MojoBubbleWebUIController(web_ui) { content::WebUIDataSource* source = content::WebUIDataSource::Create( chrome::kChromeUIReadAnythingSidePanelHost); @@ -39,16 +39,17 @@ source); } -ReadAnythingSidePanelUI::~ReadAnythingSidePanelUI() = default; +ReadAnythingUI::~ReadAnythingUI() = default; -WEB_UI_CONTROLLER_TYPE_IMPL(ReadAnythingSidePanelUI) +WEB_UI_CONTROLLER_TYPE_IMPL(ReadAnythingUI) -void ReadAnythingSidePanelUI::BindInterface( +void ReadAnythingUI::BindInterface( mojo::PendingReceiver<read_anything::mojom::PageHandlerFactory> receiver) { read_anything_page_factory_receiver_.reset(); read_anything_page_factory_receiver_.Bind(std::move(receiver)); } -void ReadAnythingSidePanelUI::CreatePageHandler( + +void ReadAnythingUI::CreatePageHandler( mojo::PendingRemote<read_anything::mojom::Page> page, mojo::PendingReceiver<read_anything::mojom::PageHandler> receiver) { DCHECK(page);
diff --git a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h similarity index 74% rename from chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h rename to chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h index e9b59f0..32267b6 100644 --- a/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_side_panel_ui.h +++ b/chrome/browser/ui/webui/read_later/side_panel/read_anything/read_anything_ui.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_UI_H_ -#define CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_UI_H_ +#ifndef CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_UI_H_ +#define CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_UI_H_ #include <memory> @@ -15,14 +15,14 @@ class ReadAnythingPageHandler; -class ReadAnythingSidePanelUI - : public ui::MojoBubbleWebUIController, - public read_anything::mojom::PageHandlerFactory { +// WebUI that holds the distilled page contents. +class ReadAnythingUI : public ui::MojoBubbleWebUIController, + public read_anything::mojom::PageHandlerFactory { public: - explicit ReadAnythingSidePanelUI(content::WebUI* web_ui); - ReadAnythingSidePanelUI(const ReadAnythingSidePanelUI&) = delete; - ReadAnythingSidePanelUI& operator=(const ReadAnythingSidePanelUI&) = delete; - ~ReadAnythingSidePanelUI() override; + explicit ReadAnythingUI(content::WebUI* web_ui); + ReadAnythingUI(const ReadAnythingUI&) = delete; + ReadAnythingUI& operator=(const ReadAnythingUI&) = delete; + ~ReadAnythingUI() override; // Instantiates the implementor of the mojom::PageHandlerFactory mojo // interface passing the pending receiver that will be internally bound. @@ -43,4 +43,4 @@ WEB_UI_CONTROLLER_TYPE_DECL(); }; -#endif // CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_SIDE_PANEL_UI_H_ +#endif // CHROME_BROWSER_UI_WEBUI_READ_LATER_SIDE_PANEL_READ_ANYTHING_READ_ANYTHING_UI_H_
diff --git a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc index 0a04204..a37f3579 100644 --- a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
@@ -43,6 +43,7 @@ #include "content/public/common/url_constants.h" #include "net/base/data_url.h" #include "services/audio/public/cpp/sounds/sounds_manager.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/webui/web_ui_util.h"
diff --git a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler_unittest.cc b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler_unittest.cc index 085a5310..6f44f704 100644 --- a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler_unittest.cc +++ b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler_unittest.cc
@@ -23,6 +23,7 @@ #include "content/public/test/test_web_ui.h" #include "services/audio/public/cpp/sounds/sounds_manager.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" namespace chromeos { namespace settings {
diff --git a/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc b/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc index 80c55920..97db949 100644 --- a/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc +++ b/chrome/browser/ui/webui/settings/settings_manage_profile_handler_unittest.cc
@@ -17,6 +17,7 @@ #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_web_ui.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/webui/web_ui_util.h" #include "ui/gfx/image/image_unittest_util.h"
diff --git a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc index 5d086a86..368ff9c 100644 --- a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc +++ b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_handler.cc
@@ -22,6 +22,7 @@ #include "chrome/grit/generated_resources.h" #include "components/policy/core/common/management/management_service.h" #include "content/public/browser/web_ui.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/web_ui_util.h"
diff --git a/chrome/browser/ui/webui/signin/profile_customization_handler.cc b/chrome/browser/ui/webui/signin/profile_customization_handler.cc index 72888fe..6b4ff6e 100644 --- a/chrome/browser/ui/webui/signin/profile_customization_handler.cc +++ b/chrome/browser/ui/webui/signin/profile_customization_handler.cc
@@ -22,6 +22,7 @@ #include "components/signin/public/identity_manager/account_info.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/web_ui_util.h" #include "ui/gfx/color_utils.h"
diff --git a/chrome/browser/ui/webui/signin/signin_reauth_ui.cc b/chrome/browser/ui/webui/signin/signin_reauth_ui.cc index 846460ba..650bddb 100644 --- a/chrome/browser/ui/webui/signin/signin_reauth_ui.cc +++ b/chrome/browser/ui/webui/signin/signin_reauth_ui.cc
@@ -29,6 +29,7 @@ #include "google_apis/gaia/core_account_id.h" #include "services/network/public/mojom/content_security_policy.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/resource_path.h" #include "ui/base/webui/web_ui_util.h"
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc index bfa7200..91910ab1 100644 --- a/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc +++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.cc
@@ -30,6 +30,7 @@ #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" #include "services/network/public/mojom/content_security_policy.mojom.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/resource_path.h" #include "ui/base/webui/web_ui_util.h"
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_ui.h b/chrome/browser/ui/webui/signin/sync_confirmation_ui.h index 4c919c3..3e73365 100644 --- a/chrome/browser/ui/webui/signin/sync_confirmation_ui.h +++ b/chrome/browser/ui/webui/signin/sync_confirmation_ui.h
@@ -12,6 +12,7 @@ #include "base/memory/raw_ptr.h" #include "chrome/browser/ui/webui/signin/signin_web_dialog_ui.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkColor.h" class Browser; class Profile;
diff --git a/chrome/browser/webid/federated_identity_active_session_permission_context.cc b/chrome/browser/webid/federated_identity_active_session_permission_context.cc index cb14d3c..3090159 100644 --- a/chrome/browser/webid/federated_identity_active_session_permission_context.cc +++ b/chrome/browser/webid/federated_identity_active_session_permission_context.cc
@@ -83,14 +83,13 @@ const url::Origin& relying_party, const url::Origin& identity_provider, const std::string& account_identifier) { - DCHECK( - HasActiveSession(relying_party, identity_provider, account_identifier)); - auto idp_string = identity_provider.Serialize(); const auto object = GetGrantedObject(relying_party, idp_string); + if (!object) + return; auto new_object = object->value.Clone(); auto& account_ids = *new_object.FindListKey(kAccountIdsKey); - account_ids.EraseListValue(base::Value((account_identifier))); + account_ids.EraseListValue(base::Value(account_identifier)); // Remove the permission object if there is no account left. if (account_ids.GetListDeprecated().size() == 0) {
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 65afb77..57337ab 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1648036705-788bf8a9044df5f57f6616f37a407df44bf1ce6e.profdata +chrome-linux-main-1648058190-adf01fc78c756eddecbc3a7e86520f0ba46c8b60.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index eee6a7b..93767302 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1648036705-7ef0f8821cc832484de629800cc8f0c5aa62a19b.profdata +chrome-mac-main-1648058190-9f024efd93e000e5805b35b0e28b3f06e423369d.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 4630955..c45de60 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1648047456-26b7d157a39e9f6f21f406092173d3226e0738d6.profdata +chrome-win32-main-1648058190-36e77ae44ee326b6b95f3f2e6cb58c2f2c0ba079.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index f0eebe9..5a5b4cad 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1648047456-71b02391a91eaf9e9dcd35dc653881e10af88894.profdata +chrome-win64-main-1648058190-1cca018ea40a54ab31045ba4dfaad8db1c91f989.profdata
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn index 0a7f45e..fbc20f5 100644 --- a/chrome/installer/linux/BUILD.gn +++ b/chrome/installer/linux/BUILD.gn
@@ -41,6 +41,12 @@ ] packaging_files_shlibs = [] +# TODO(https://crbug.com/1299021): Implement building these NaCl targets as +# ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). +if (target_cpu == "arm64") { + enable_nacl = false +} + if (enable_nacl) { packaging_files_executables += [ "$root_out_dir/nacl_helper",
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn index bb67e39b..6ad9cb2 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn
@@ -211,9 +211,15 @@ if (enable_nacl) { deps += [ - "//components/nacl/loader", "//components/nacl/renderer", ] + # TODO(https://crbug.com/1299021): Implement building this NaCl target as + # ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu != "arm64") { + deps += [ + "//components/nacl/loader", + ] + } } if (enable_plugins) { sources += [
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 322628c6..3a3318c 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2121,7 +2121,6 @@ "../browser/ui/views/toolbar/app_menu_browsertest.cc", "../browser/ui/views/toolbar/avatar_toolbar_button_browsertest.cc", "../browser/ui/views/toolbar/chrome_labs_browsertest.cc", - "../browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc", "../browser/ui/views/web_apps/frame_toolbar/web_app_frame_toolbar_browsertest.cc", "../browser/ui/views/web_apps/frame_toolbar/web_app_minimal_ui_test.cc", "../browser/ui/views/web_apps/web_app_protocol_handler_intent_picker_dialog_browsertest.cc", @@ -2668,10 +2667,17 @@ ] deps += [ "//chrome/browser/chromeos" ] data_deps += [ - "//components/nacl/loader:nacl_helper", - "//ppapi/native_client:irt", "//third_party/liblouis:liblouis_test_data", ] + # TODO(https://crbug.com/1299021): Implement building these NaCl + # targets as ARM32 when Chrome is built for ARM64 (for Linux/Chrome + # OS). + if (target_cpu != "arm64") { + data_deps += [ + "//components/nacl/loader:nacl_helper", + "//ppapi/native_client:irt", + ] + } } if (is_win || is_linux || is_chromeos) { @@ -2683,7 +2689,9 @@ # browser process as needed by this test. See http://crbug.com/157312. sources -= [ "../browser/nacl_host/test/gdb_debug_stub_browsertest.cc" ] } - if (is_linux || is_chromeos) { + # TODO(https://crbug.com/1299021): Implement building this NaCl target + # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if ((is_linux || is_chromeos) && target_cpu != "arm64") { data_deps += [ "//components/nacl/loader:nacl_helper" ] } } @@ -2940,6 +2948,7 @@ sources += [ "../browser/enterprise/connectors/device_trust/device_trust_browsertest.cc", "../browser/extensions/api/system_indicator/system_indicator_apitest.cc", + "../browser/ui/views/web_apps/file_handler_launch_dialog_browsertest.cc", ] deps += [
diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index 1ad88f8..904af265 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc
@@ -235,6 +235,10 @@ return false; } +bool TestBrowserWindow::IsLocationBarVisible() const { + return false; +} + ShowTranslateBubbleResult TestBrowserWindow::ShowTranslateBubble( content::WebContents* contents, translate::TranslateStep step,
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index bdc5a41..79fae96f 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h
@@ -140,6 +140,7 @@ bool IsTabStripEditable() const override; void SetIsTabStripEditable(bool is_editable); bool IsToolbarVisible() const override; + bool IsLocationBarVisible() const override; bool IsToolbarShowing() const override; SharingDialog* ShowSharingDialog(content::WebContents* contents, SharingDialogData data) override;
diff --git a/chrome/test/data/nacl/BUILD.gn b/chrome/test/data/nacl/BUILD.gn index b57d6a1..31d5213 100644 --- a/chrome/test/data/nacl/BUILD.gn +++ b/chrome/test/data/nacl/BUILD.gn
@@ -83,6 +83,11 @@ ":sysconf_nprocessors_onln_test($glibc)", ] } + # TODO(https://crbug.com/1299021): Implement building these NaCl targets as + # ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu == "arm64") { + data_deps = [] + } } if (is_nacl) {
diff --git a/chrome/test/data/webui/chromeos/personalization_app/google_photos_albums_element_test.ts b/chrome/test/data/webui/chromeos/personalization_app/google_photos_albums_element_test.ts index f611146f..0f11412 100644 --- a/chrome/test/data/webui/chromeos/personalization_app/google_photos_albums_element_test.ts +++ b/chrome/test/data/webui/chromeos/personalization_app/google_photos_albums_element_test.ts
@@ -8,7 +8,7 @@ import {initializeGooglePhotosData} from 'chrome://personalization/trusted/wallpaper/wallpaper_controller.js'; import {WallpaperGridItem} from 'chrome://personalization/trusted/wallpaper/wallpaper_grid_item_element.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; -import {assertEquals, assertNotReached} from 'chrome://webui-test/chai_assert.js'; +import {assertEquals} from 'chrome://webui-test/chai_assert.js'; import {waitAfterNextRender} from 'chrome://webui-test/test_util.js'; import {baseSetup, initElement, teardownElement} from './personalization_app_test_utils.js'; @@ -30,17 +30,10 @@ return matches ? [...matches] : null; } - /** Scrolls the specified |element| until |predicate| returns true. */ - async function scrollElementUntil( - element: HTMLElement, predicate: () => boolean) { - const timeout = +new Date() + 2000; - while (!predicate()) { - element.scrollBy(0, 1000); - await waitAfterNextRender(googlePhotosAlbumsElement!); - if (+new Date() > timeout) { - assertNotReached('Timed out while scrolling.'); - } - } + /** Scrolls the specified |element| to the bottom. */ + async function scrollToBottom(element: HTMLElement) { + element.scrollTop = element.scrollHeight; + await waitAfterNextRender(googlePhotosAlbumsElement!); } setup(() => { @@ -178,18 +171,9 @@ initElement(GooglePhotosAlbums, {hidden: false}); await waitAfterNextRender(googlePhotosAlbumsElement); - // Register an event listener to cache whether the |gridScrollThreshold| has - // been reached. - let gridScrollThresholdReached = false; + // Scroll to the bottom of the grid. const gridScrollThreshold = googlePhotosAlbumsElement.$.gridScrollThreshold; - gridScrollThreshold.addEventListener('lower-threshold', () => { - gridScrollThresholdReached = true; - }); - - // Scroll until the |gridScrollThreshold| is reached. - await scrollElementUntil(gridScrollThreshold, () => { - return gridScrollThresholdReached; - }); + scrollToBottom(gridScrollThreshold); // Wait for and verify that the next batch of albums has been // requested. @@ -201,13 +185,8 @@ // Reset |wallpaperProvider| expectations. wallpaperProvider.resetResolver('fetchGooglePhotosAlbums'); - // Scroll until the bottom of the grid is reached. - let scrollTop = -1; - await scrollElementUntil(gridScrollThreshold, () => { - const oldScrollTop = scrollTop; - scrollTop = gridScrollThreshold.scrollTop; - return scrollTop === oldScrollTop; - }); + // Scroll to the bottom of the grid. + scrollToBottom(gridScrollThreshold); // Verify that no next batch of albums has been requested. assertEquals(wallpaperProvider.getCallCount('fetchGooglePhotosAlbums'), 0);
diff --git a/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_by_album_id_element_test.ts b/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_by_album_id_element_test.ts index 094bffec..e7ccb6ee 100644 --- a/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_by_album_id_element_test.ts +++ b/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_by_album_id_element_test.ts
@@ -4,9 +4,9 @@ import {GooglePhotosAlbum, GooglePhotosPhoto, WallpaperLayout, WallpaperType} from 'chrome://personalization/trusted/personalization_app.mojom-webui.js'; import {GooglePhotosPhotosByAlbumId} from 'chrome://personalization/trusted/wallpaper/google_photos_photos_by_album_id_element.js'; -import {initializeGooglePhotosData} from 'chrome://personalization/trusted/wallpaper/wallpaper_controller.js'; +import {fetchGooglePhotosAlbum, initializeGooglePhotosData} from 'chrome://personalization/trusted/wallpaper/wallpaper_controller.js'; import {WallpaperGridItem} from 'chrome://personalization/trusted/wallpaper/wallpaper_grid_item_element.js'; -import {assertEquals} from 'chrome://webui-test/chai_assert.js'; +import {assertDeepEquals, assertEquals} from 'chrome://webui-test/chai_assert.js'; import {waitAfterNextRender} from 'chrome://webui-test/test_util.js'; import {baseSetup, initElement, teardownElement} from './personalization_app_test_utils.js'; @@ -29,6 +29,12 @@ return matches ? [...matches] : null; } + /** Scrolls the specified |element| to the bottom. */ + async function scrollToBottom(element: HTMLElement) { + element.scrollTop = element.scrollHeight; + await waitAfterNextRender(googlePhotosPhotosByAlbumIdElement!); + } + setup(() => { const mocks = baseSetup(); personalizationStore = mocks.personalizationStore; @@ -271,6 +277,114 @@ assertEquals(photoEls[1]!.selected, false); }); + test('incrementally loads photos', async () => { + personalizationStore.setReducersEnabled(true); + + const photosCount = 200; + const album: GooglePhotosAlbum = + {id: '1', title: '', photoCount: photosCount, preview: {url: ''}}; + + // Set photos count returned by |wallpaperProvider|. + wallpaperProvider.setGooglePhotosCount(photosCount); + + // Set albums returned by |wallpaperProvider|. + wallpaperProvider.setGooglePhotosAlbums([album]); + + // Set initial list of photos returned by |wallpaperProvider|. + let nextPhotoId = 1; + wallpaperProvider.setGooglePhotosPhotosByAlbumId( + album.id, Array.from({length: photosCount / 2}).map(() => { + return { + id: `id-${nextPhotoId}`, + name: `name-${nextPhotoId}`, + date: {data: []}, + url: {url: `url-${nextPhotoId++}`}, + }; + })); + + // Set initial photos resume token returned by |wallpaperProvider|. When + // resume token is defined, it indicates additional photos exist. + const resumeToken = 'resumeToken'; + wallpaperProvider.setGooglePhotosPhotosByAlbumIdResumeToken( + album.id, resumeToken); + + // Initialize Google Photos data in |personalizationStore|. + await initializeGooglePhotosData(wallpaperProvider, personalizationStore); + assertDeepEquals( + await wallpaperProvider.whenCalled('fetchGooglePhotosPhotos'), + [/*itemId=*/ null, /*albumId=*/ null, /*resumeToken=*/ null]); + + // Reset |wallpaperProvider| expectations. + wallpaperProvider.resetResolver('fetchGooglePhotosPhotos'); + + // Initialize Google Photos album in |personalizationStore|. + await fetchGooglePhotosAlbum( + wallpaperProvider, personalizationStore, album.id); + assertDeepEquals( + await wallpaperProvider.whenCalled('fetchGooglePhotosPhotos'), + [/*itemId=*/ null, album.id, /*resumeToken=*/ null]); + + // Reset |wallpaperProvider| expectations. + wallpaperProvider.resetResolver('fetchGooglePhotosPhotos'); + + // Set the next list of photos returned by |wallpaperProvider|. + wallpaperProvider.setGooglePhotosPhotosByAlbumId( + album.id, Array.from({length: photosCount / 2}).map(() => { + return { + id: `id-${nextPhotoId}`, + name: `name-${nextPhotoId}`, + date: {data: []}, + url: {url: `url-${nextPhotoId++}`}, + }; + })); + + // Set the next photos resume token returned by |wallpaperProvider|. When + // resume token is undefined, it indicates no additional photos exist. + wallpaperProvider.setGooglePhotosPhotosByAlbumIdResumeToken( + album.id, undefined); + + // Restrict the viewport so that |googlePhotosPhotosByAlbumIdElement| will + // lazily create photos instead of creating them all at once. + const style = document.createElement('style'); + style.appendChild(document.createTextNode(` + html, + body { + height: 100%; + width: 100%; + } + `)); + document.head.appendChild(style); + + // Initialize |googlePhotosPhotosByAlbumIdElement|. + googlePhotosPhotosByAlbumIdElement = + initElement(GooglePhotosPhotosByAlbumId, {hidden: false}); + await waitAfterNextRender(googlePhotosPhotosByAlbumIdElement); + + // Select |album|. + googlePhotosPhotosByAlbumIdElement.setAttribute('album-id', album.id); + await waitAfterNextRender(googlePhotosPhotosByAlbumIdElement); + + // Scroll to the bottom of the grid. + const gridScrollThreshold = + googlePhotosPhotosByAlbumIdElement.$.gridScrollThreshold; + scrollToBottom(gridScrollThreshold); + + // Wait for and verify that the next batch of photos have been requested. + assertDeepEquals( + await wallpaperProvider.whenCalled('fetchGooglePhotosPhotos'), + [/*itemId=*/ null, album.id, /*resumeToken=*/ resumeToken]); + await waitAfterNextRender(googlePhotosPhotosByAlbumIdElement); + + // Reset |wallpaperProvider| expectations. + wallpaperProvider.resetResolver('fetchGooglePhotosPhotos'); + + // Scroll to the bottom of the grid. + scrollToBottom(gridScrollThreshold); + + // Verify that no next batch of photos has been requested. + assertEquals(wallpaperProvider.getCallCount('fetchGooglePhotosPhotos'), 0); + }); + test('selects photo', async () => { personalizationStore.setReducersEnabled(true);
diff --git a/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_element_test.ts b/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_element_test.ts index 36f867d..055c8d074 100644 --- a/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_element_test.ts +++ b/chrome/test/data/webui/chromeos/personalization_app/google_photos_photos_element_test.ts
@@ -9,7 +9,7 @@ import {WallpaperGridItem} from 'chrome://personalization/trusted/wallpaper/wallpaper_grid_item_element.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; import {String16} from 'chrome://resources/mojo/mojo/public/mojom/base/string16.mojom-webui.js'; -import {assertDeepEquals, assertEquals, assertNotEquals, assertNotReached} from 'chrome://webui-test/chai_assert.js'; +import {assertDeepEquals, assertEquals, assertNotEquals} from 'chrome://webui-test/chai_assert.js'; import {waitAfterNextRender} from 'chrome://webui-test/test_util.js'; import {baseSetup, initElement, teardownElement} from './personalization_app_test_utils.js'; @@ -39,17 +39,10 @@ return matches ? [...matches] : null; } - /** Scrolls the specified |element| until |predicate| returns true. */ - async function scrollElementUntil( - element: HTMLElement, predicate: () => boolean) { - const timeout = +new Date() + 2000; - while (!predicate()) { - element.scrollBy(0, 1000); - await waitAfterNextRender(googlePhotosPhotosElement!); - if (+new Date() > timeout) { - assertNotReached('Timed out while scrolling.'); - } - } + /** Scrolls the specified |element| to the bottom. */ + async function scrollToBottom(element: HTMLElement) { + element.scrollTop = element.scrollHeight; + await waitAfterNextRender(googlePhotosPhotosElement!); } /** @@ -376,18 +369,9 @@ initElement(GooglePhotosPhotos, {hidden: false}); await waitAfterNextRender(googlePhotosPhotosElement); - // Register an event listener to cache whether the |gridScrollThreshold| has - // been reached. - let gridScrollThresholdReached = false; + // Scroll to the bottom of the grid. const gridScrollThreshold = googlePhotosPhotosElement.$.gridScrollThreshold; - gridScrollThreshold.addEventListener('lower-threshold', () => { - gridScrollThresholdReached = true; - }); - - // Scroll until the |gridScrollThreshold| is reached. - await scrollElementUntil(gridScrollThreshold, () => { - return gridScrollThresholdReached; - }); + scrollToBottom(gridScrollThreshold); // Wait for and verify that the next batch of photos have been requested. assertDeepEquals( @@ -398,13 +382,8 @@ // Reset |wallpaperProvider| expectations. wallpaperProvider.resetResolver('fetchGooglePhotosPhotos'); - // Scroll until the bottom of the grid is reached. - let scrollTop = -1; - await scrollElementUntil(gridScrollThreshold, () => { - const oldScrollTop = scrollTop; - scrollTop = gridScrollThreshold.scrollTop; - return scrollTop === oldScrollTop; - }); + // Scroll to the bottom of the grid. + scrollToBottom(gridScrollThreshold); // Verify that no next batch of photos has been requested. assertEquals(wallpaperProvider.getCallCount('fetchGooglePhotosPhotos'), 0);
diff --git a/chrome/test/data/webui/chromeos/personalization_app/personalization_app_controller_test.ts b/chrome/test/data/webui/chromeos/personalization_app/personalization_app_controller_test.ts index efb1d7fb..f7fdfc8 100644 --- a/chrome/test/data/webui/chromeos/personalization_app/personalization_app_controller_test.ts +++ b/chrome/test/data/webui/chromeos/personalization_app/personalization_app_controller_test.ts
@@ -119,7 +119,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // SET_GOOGLE_PHOTOS_ENABLED. @@ -137,7 +137,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // BEGIN_LOAD_GOOGLE_PHOTOS_COUNT. @@ -155,7 +155,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // SET_GOOGLE_PHOTOS_COUNT. @@ -173,7 +173,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // BEGIN_LOAD_GOOGLE_PHOTOS_ALBUMS. @@ -191,7 +191,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // BEGIN_LOAD_GOOGLE_PHOTOS_PHOTOS. @@ -209,7 +209,7 @@ albums: undefined, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // APPEND_GOOGLE_PHOTOS_ALBUMS. @@ -227,7 +227,7 @@ albums: expectedAlbums, photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, // APPEND_GOOGLE_PHOTOS_PHOTOS. @@ -245,7 +245,7 @@ albums: expectedAlbums, photos: expectedPhotos, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, ], @@ -291,9 +291,10 @@ albumId: album.id, }, { - name: 'set_google_photos_album', + name: 'append_google_photos_album', albumId: album.id, photos: photos, + resumeToken: null, }, ], personalizationStore.actions); @@ -321,10 +322,10 @@ ], photos: undefined, photosByAlbumId: {}, - resumeTokens: {albums: null, photos: null}, + resumeTokens: {albums: null, photos: null, photosByAlbumId: {}}, }, }, - // SET_GOOGLE_PHOTOS_ALBUM + // APPEND_GOOGLE_PHOTOS_ALBUM { 'wallpaper.loading.googlePhotos': { enabled: false, @@ -347,7 +348,11 @@ photosByAlbumId: { [album.id]: photos, }, - resumeTokens: {albums: null, photos: null}, + resumeTokens: { + albums: null, + photos: null, + photosByAlbumId: {[album.id]: null}, + }, }, }, ],
diff --git a/chrome/test/data/webui/chromeos/personalization_app/test_wallpaper_interface_provider.ts b/chrome/test/data/webui/chromeos/personalization_app/test_wallpaper_interface_provider.ts index 2cda9c5..a94caea 100644 --- a/chrome/test/data/webui/chromeos/personalization_app/test_wallpaper_interface_provider.ts +++ b/chrome/test/data/webui/chromeos/personalization_app/test_wallpaper_interface_provider.ts
@@ -105,6 +105,8 @@ private googlePhotosPhotosResumeToken_: string|undefined; private googlePhotosPhotosByAlbumId_: Record<string, GooglePhotosPhoto[]|undefined> = {}; + private googlePhotosPhotosByAlbumIdResumeTokens_: + Record<string, string|undefined> = {}; localImages: FilePath[]|null; localImageData: Record<string, string>; currentWallpaper: CurrentWallpaper; @@ -178,8 +180,9 @@ albumId ? this.googlePhotosPhotosByAlbumId_[albumId] : this.googlePhotosPhotos_ : undefined; - response.resumeToken = - albumId ? undefined : this.googlePhotosPhotosResumeToken_; + response.resumeToken = albumId ? + this.googlePhotosPhotosByAlbumIdResumeTokens_[albumId] : + this.googlePhotosPhotosResumeToken_; return Promise.resolve({response}); } @@ -287,6 +290,12 @@ this.googlePhotosPhotosByAlbumId_[albumId] = googlePhotosPhotos; } + setGooglePhotosPhotosByAlbumIdResumeToken( + albumId: string, googlePhotosPhotosResumeToken: string|undefined) { + this.googlePhotosPhotosByAlbumIdResumeTokens_[albumId] = + googlePhotosPhotosResumeToken; + } + setImages(images: WallpaperImage[]) { this.images_ = images; }
diff --git a/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc b/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc index 6692336..a13f7529 100644 --- a/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc +++ b/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc
@@ -8,7 +8,7 @@ #include "chrome/test/base/test_browser_window.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/skia/include/core/SkImageInfo.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/native_widget_types.h" #include "ui/views/test/widget_test.h" #include "ui/views/view.h"
diff --git a/chromecast/BUILD.gn b/chromecast/BUILD.gn index 7e33528d..f6c9b97 100644 --- a/chromecast/BUILD.gn +++ b/chromecast/BUILD.gn
@@ -721,11 +721,6 @@ } if (chromecast_branding != "public") { - module_desc_java("cast_browser_module_desc_java") { - module_name = "cast_browser" - shared_libraries = [ "//chromecast/internal/service/main/android:libmonocast_service_cast_browser" ] - } - android_app_bundle_module("cast_browser_bundle_module") { is_base_module = false base_module_target = "//chromecast/internal/service/main/android:cast_service_bundle_module" @@ -744,16 +739,19 @@ # modules' ID (0x7f). package_id = 125 - shared_libraries = [ "//chromecast/internal/service/main/android:libmonocast_service_cast_browser" ] + shared_libraries = [ "//chromecast/android:libcast_browser_android" ] product_config_java_packages = [ "org.chromium.chromecast.shell" ] deps = [ - ":cast_browser_module_desc_java", "//base:base_java", "//chromecast/browser/android:cast_browser_java", "//components/crash/core/app:chrome_crashpad_handler_named_as_so", + "//third_party/crashpad/crashpad/handler:crashpad_handler_trampoline", ] - loadable_modules = [ "$root_out_dir/libchrome_crashpad_handler.so" ] + loadable_modules = [ + "$root_out_dir/libchrome_crashpad_handler.so", + "$root_out_dir/libcrashpad_handler_trampoline.so", + ] enable_multidex = true
diff --git a/chromecast/android/BUILD.gn b/chromecast/android/BUILD.gn index 4f48946..8540124 100644 --- a/chromecast/android/BUILD.gn +++ b/chromecast/android/BUILD.gn
@@ -70,6 +70,7 @@ deps = [ ":common_apk_deps", "//chromecast:cast_shell_lib_simple", + "//components/module_installer/android:native", ] }
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java index 035b4c7..2f65483 100644 --- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java +++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastBrowserHelper.java
@@ -21,6 +21,7 @@ public class CastBrowserHelper { private static final String TAG = "CastBrowserHelper"; private static final String COMMAND_LINE_FILE = "castshell-command-line"; + private static final String CAST_BROWSER_LIB = "cast_browser_android"; private static boolean sIsBrowserInitialized; @@ -44,15 +45,25 @@ DeviceUtils.addDeviceSpecificUserAgentSwitch(); - LibraryLoader.getInstance().ensureInitialized(); if (CastBrowserModule.isInstalled()) { - Log.d(TAG, "Loading cast_browser native lib."); - CastBrowserModule.ensureNativeLoaded(); + // CommandLine.java doesn't expect there to be two copies of //base and it ignores + // the second attempt to initialize the native command line. + // LibraryLoader.ensureInitialized() is not called because it loads the main + // shared lib (libcast_service) and initializes the native command line in its copy of + // //base, which leaves the native command line in the libcast_browser_android's copy of + // //base uninitialized. The end state of the following two lines is + // libcast_browser_android's native command line is initialized and libcast_service's + // copy is uninitialized. + System.loadLibrary(CAST_BROWSER_LIB); + CommandLine.enableNativeProxy(); + } else { + LibraryLoader.getInstance().ensureInitialized(); } Log.d(TAG, "Loading BrowserStartupController..."); + BrowserStartupController.getInstance().setDisableLibraryLoadForCast(true); BrowserStartupController.getInstance().startBrowserProcessesSync( - LibraryProcessType.PROCESS_BROWSER, false); + LibraryProcessType.PROCESS_BROWSER, /*singleProcess=*/false); NetworkChangeNotifier.init(); // Cast shell always expects to receive notifications to track network state. NetworkChangeNotifier.registerToReceiveNotificationsAlways();
diff --git a/chromecast/browser/cast_web_view_default.cc b/chromecast/browser/cast_web_view_default.cc index da91313d..6add506 100644 --- a/chromecast/browser/cast_web_view_default.cc +++ b/chromecast/browser/cast_web_view_default.cc
@@ -50,7 +50,7 @@ DCHECK(browser_context); content::WebContents::CreateParams create_params(browser_context, nullptr); create_params.site_instance = site_instance; - create_params.enable_wake_locks = params.keep_screen_on; + return content::WebContents::Create(create_params); }
diff --git a/chromeos/network/BUILD.gn b/chromeos/network/BUILD.gn index a8b091b..9c5d58a 100644 --- a/chromeos/network/BUILD.gn +++ b/chromeos/network/BUILD.gn
@@ -35,6 +35,7 @@ "//crypto", "//dbus", "//net", + "//services/preferences/public/cpp", "//skia", "//url", ] @@ -77,6 +78,8 @@ "geolocation_handler.h", "hermes_metrics_util.cc", "hermes_metrics_util.h", + "managed_cellular_pref_handler.cc", + "managed_cellular_pref_handler.h", "managed_network_configuration_handler.cc", "managed_network_configuration_handler.h", "managed_network_configuration_handler_impl.cc", @@ -281,6 +284,7 @@ "//dbus", "//net", "//net:test_support", + "//services/preferences/public/cpp", "//testing/gmock", "//testing/gtest", ] @@ -300,6 +304,7 @@ "fast_transition_observer_unittest.cc", "firewall_hole_unittest.cc", "geolocation_handler_unittest.cc", + "managed_cellular_pref_handler_unittest.cc", "managed_network_configuration_handler_unittest.cc", "metrics/connection_info_metrics_logger_unittest.cc", "metrics/esim_policy_login_metrics_logger_unittest.cc",
diff --git a/chromeos/network/DEPS b/chromeos/network/DEPS index c3414429..a748f27 100644 --- a/chromeos/network/DEPS +++ b/chromeos/network/DEPS
@@ -23,6 +23,7 @@ "+crypto", "+dbus", "+net", + "+services/preferences/public/cpp", "+testing", "+third_party/abseil-cpp/absl", "+third_party/cros_system_api",
diff --git a/chromeos/network/auto_connect_handler_unittest.cc b/chromeos/network/auto_connect_handler_unittest.cc index 3f543e5c..1009c6e1 100644 --- a/chromeos/network/auto_connect_handler_unittest.cc +++ b/chromeos/network/auto_connect_handler_unittest.cc
@@ -152,9 +152,10 @@ managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); managed_config_handler_->Init( - /*cellular_policy_handler=*/nullptr, helper_.network_state_handler(), - network_profile_handler_.get(), network_config_handler_.get(), - nullptr /* network_device_handler */, + /*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, + helper_.network_state_handler(), network_profile_handler_.get(), + network_config_handler_.get(), nullptr /* network_device_handler */, nullptr /* prohibited_technologies_handler */); test_network_connection_handler_ =
diff --git a/chromeos/network/cellular_esim_uninstall_handler.cc b/chromeos/network/cellular_esim_uninstall_handler.cc index 245a44d..f0784e8 100644 --- a/chromeos/network/cellular_esim_uninstall_handler.cc +++ b/chromeos/network/cellular_esim_uninstall_handler.cc
@@ -13,6 +13,7 @@ #include "chromeos/network/cellular_inhibitor.h" #include "chromeos/network/device_state.h" #include "chromeos/network/hermes_metrics_util.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/network_configuration_handler.h" #include "chromeos/network/network_connection_handler.h" #include "chromeos/network/network_handler.h" @@ -48,11 +49,13 @@ void CellularESimUninstallHandler::Init( CellularInhibitor* cellular_inhibitor, CellularESimProfileHandler* cellular_esim_profile_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, NetworkConfigurationHandler* network_configuration_handler, NetworkConnectionHandler* network_connection_handler, NetworkStateHandler* network_state_handler) { cellular_inhibitor_ = cellular_inhibitor; cellular_esim_profile_handler_ = cellular_esim_profile_handler; + managed_cellular_pref_handler_ = managed_cellular_pref_handler; network_configuration_handler_ = network_configuration_handler; network_connection_handler_ = network_connection_handler; network_state_handler_ = network_state_handler; @@ -304,22 +307,26 @@ DCHECK_EQ(state_, UninstallState::kUninstallingProfile); if (uninstall_requests_.front()->reset_euicc) { + base::flat_set<std::string> iccids = + GetAllIccidsOnEuicc(*uninstall_requests_.front()->euicc_path); HermesEuiccClient::Get()->ResetMemory( *uninstall_requests_.front()->euicc_path, hermes::euicc::ResetOptions::kDeleteOperationalProfiles, base::BindOnce(&CellularESimUninstallHandler::OnUninstallProfile, - weak_ptr_factory_.GetWeakPtr())); + weak_ptr_factory_.GetWeakPtr(), iccids)); return; } + base::flat_set<std::string> iccids{*uninstall_requests_.front()->iccid}; HermesEuiccClient::Get()->UninstallProfile( *uninstall_requests_.front()->euicc_path, *uninstall_requests_.front()->esim_profile_path, base::BindOnce(&CellularESimUninstallHandler::OnUninstallProfile, - weak_ptr_factory_.GetWeakPtr())); + weak_ptr_factory_.GetWeakPtr(), iccids)); } void CellularESimUninstallHandler::OnUninstallProfile( + const base::flat_set<std::string>& removed_iccids, HermesResponseStatus status) { DCHECK_EQ(state_, UninstallState::kUninstallingProfile); @@ -334,6 +341,10 @@ return; } + if (managed_cellular_pref_handler_) { + for (const auto& iccid : removed_iccids) + managed_cellular_pref_handler_->RemovePairWithIccid(iccid); + } TransitionToUninstallState(UninstallState::kRemovingShillService); AttemptRemoveShillService(); } @@ -435,6 +446,21 @@ return absl::nullopt; } +base::flat_set<std::string> CellularESimUninstallHandler::GetAllIccidsOnEuicc( + const dbus::ObjectPath& euicc_path) { + HermesEuiccClient::Properties* euicc_properties = + HermesEuiccClient::Get()->GetProperties(euicc_path); + const std::string& eid = euicc_properties->eid().value(); + base::flat_set<std::string> iccids; + for (const auto& esim_profile : + cellular_esim_profile_handler_->GetESimProfiles()) { + if (esim_profile.eid() == eid) { + iccids.emplace(esim_profile.iccid()); + } + } + return iccids; +} + const NetworkState* CellularESimUninstallHandler::GetNextResetServiceToRemove() const { HermesEuiccClient::Properties* euicc_properties =
diff --git a/chromeos/network/cellular_esim_uninstall_handler.h b/chromeos/network/cellular_esim_uninstall_handler.h index 0cf56f5..de5cf021 100644 --- a/chromeos/network/cellular_esim_uninstall_handler.h +++ b/chromeos/network/cellular_esim_uninstall_handler.h
@@ -9,6 +9,7 @@ #include "base/component_export.h" #include "base/containers/circular_deque.h" +#include "base/containers/flat_set.h" #include "base/containers/queue.h" #include "base/gtest_prod_util.h" #include "chromeos/dbus/hermes/hermes_response_status.h" @@ -22,6 +23,7 @@ class CellularESimProfileHandler; class CellularInhibitor; +class ManagedCellularPrefHandler; class NetworkState; class NetworkConfigurationHandler; class NetworkConnectionHandler; @@ -56,6 +58,7 @@ void Init(CellularInhibitor* cellular_inhibitor, CellularESimProfileHandler* cellular_esim_profile_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, NetworkConfigurationHandler* network_configuration_handler, NetworkConnectionHandler* network_connection_handler, NetworkStateHandler* network_state_handler); @@ -171,7 +174,8 @@ void OnDisableProfile(HermesResponseStatus status); void AttemptUninstallProfile(); - void OnUninstallProfile(HermesResponseStatus status); + void OnUninstallProfile(const base::flat_set<std::string>& removed_iccids, + HermesResponseStatus status); void AttemptRemoveShillService(); void OnRemoveServiceSuccess(); @@ -181,6 +185,8 @@ absl::optional<dbus::ObjectPath> GetEnabledCellularESimProfilePath(); NetworkStateHandler::NetworkStateList GetESimCellularNetworks() const; const NetworkState* GetNextResetServiceToRemove() const; + base::flat_set<std::string> GetAllIccidsOnEuicc( + const dbus::ObjectPath& euicc_path); UninstallState state_ = UninstallState::kIdle; base::circular_deque<std::unique_ptr<UninstallRequest>> uninstall_requests_; @@ -189,6 +195,7 @@ CellularInhibitor* cellular_inhibitor_ = nullptr; CellularESimProfileHandler* cellular_esim_profile_handler_ = nullptr; + ManagedCellularPrefHandler* managed_cellular_pref_handler_ = nullptr; NetworkConfigurationHandler* network_configuration_handler_ = nullptr; NetworkConnectionHandler* network_connection_handler_ = nullptr; NetworkStateHandler* network_state_handler_ = nullptr;
diff --git a/chromeos/network/cellular_esim_uninstall_handler_unittest.cc b/chromeos/network/cellular_esim_uninstall_handler_unittest.cc index 11342c3..6b434c4 100644 --- a/chromeos/network/cellular_esim_uninstall_handler_unittest.cc +++ b/chromeos/network/cellular_esim_uninstall_handler_unittest.cc
@@ -20,11 +20,13 @@ #include "chromeos/network/cellular_inhibitor.h" #include "chromeos/network/fake_network_connection_handler.h" #include "chromeos/network/fake_stub_cellular_networks_provider.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/network_configuration_handler.h" #include "chromeos/network/network_connection_handler.h" #include "chromeos/network/network_device_handler.h" #include "chromeos/network/network_state_handler.h" #include "chromeos/network/test_cellular_esim_profile_handler.h" +#include "components/prefs/testing_pref_service.h" #include "dbus/object_path.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -40,6 +42,7 @@ const char kTestCarrierProfilePath[] = "/org/chromium/Hermes/Profile/123"; const char kTestNetworkServicePath[] = "/service/cellular123"; const char kTestCellularIccid[] = "100000000000000001"; +const char kTestCellularSmdpAddress[] = "smdp_address1"; const char kTestProfileName[] = "TestCellularNetwork"; const char kTestServiceProvider[] = "Test Wireless"; @@ -74,11 +77,17 @@ std::make_unique<TestCellularESimProfileHandler>(); cellular_esim_profile_handler_->Init(network_state_handler_.get(), cellular_inhibitor_.get()); + managed_cellular_pref_handler_ = + std::make_unique<ManagedCellularPrefHandler>(); + ManagedCellularPrefHandler::RegisterLocalStatePrefs( + device_prefs_.registry()); + managed_cellular_pref_handler_->SetDevicePrefs(&device_prefs_); cellular_esim_uninstall_handler_ = std::make_unique<CellularESimUninstallHandler>(); cellular_esim_uninstall_handler_->Init( cellular_inhibitor_.get(), cellular_esim_profile_handler_.get(), + managed_cellular_pref_handler_.get(), network_configuration_handler_.get(), network_connection_handler_.get(), network_state_handler_.get()); @@ -93,6 +102,7 @@ cellular_esim_uninstall_handler_.reset(); cellular_esim_profile_handler_.reset(); cellular_inhibitor_.reset(); + managed_cellular_pref_handler_.reset(); network_device_handler_.reset(); network_state_handler_.reset(); network_configuration_handler_.reset(); @@ -118,6 +128,10 @@ first_profile_state, hermes::profile::ProfileClass::kOperational, HermesEuiccClient::TestInterface::AddCarrierProfileBehavior:: kAddProfileWithService); + // Setup as a managed profile and has iccid and smdp address pair in pref. + managed_cellular_pref_handler_->AddIccidSmdpPair(kTestCellularIccid, + kTestCellularSmdpAddress); + HermesEuiccClient::Get()->GetTestInterface()->AddCarrierProfile( dbus::ObjectPath(kTestCarrierProfilePath2), dbus::ObjectPath(kDefaultEuiccPath), kTestCellularIccid2, @@ -180,6 +194,10 @@ return !profile_paths.empty(); } + const std::string* GetSmdpAddressFromPref(const std::string& iccid) { + return managed_cellular_pref_handler_->GetSmdpAddressFromIccid(iccid); + } + void AddStub(const std::string& stub_iccid, const std::string& eid) { stub_cellular_networks_provider_->AddStub(stub_iccid, eid); network_state_handler_->SyncStubCellularNetworks(); @@ -212,12 +230,14 @@ std::unique_ptr<CellularInhibitor> cellular_inhibitor_; std::unique_ptr<TestCellularESimProfileHandler> cellular_esim_profile_handler_; + std::unique_ptr<ManagedCellularPrefHandler> managed_cellular_pref_handler_; std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_; std::unique_ptr<FakeNetworkConnectionHandler> network_connection_handler_; std::unique_ptr<CellularESimUninstallHandler> cellular_esim_uninstall_handler_; std::unique_ptr<FakeStubCellularNetworksProvider> stub_cellular_networks_provider_; + TestingPrefServiceSimple device_prefs_; }; TEST_F(CellularESimUninstallHandlerTest, Success) { @@ -239,6 +259,7 @@ EXPECT_EQ(1u, euicc_properties->installed_carrier_profiles().value().size()); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath)); EXPECT_TRUE(status); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid)); ExpectResult(CellularESimUninstallHandler::UninstallESimResult::kSuccess); } @@ -262,6 +283,7 @@ EXPECT_EQ(1u, euicc_properties->installed_carrier_profiles().value().size()); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath)); EXPECT_TRUE(status); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid)); ExpectResult(CellularESimUninstallHandler::UninstallESimResult::kSuccess); } @@ -277,6 +299,7 @@ run_loop.Run(); EXPECT_FALSE(status); EXPECT_TRUE(ESimServiceConfigExists(kTestNetworkServicePath)); + EXPECT_TRUE(GetSmdpAddressFromPref(kTestCellularIccid)); ExpectResult( CellularESimUninstallHandler::UninstallESimResult::kDisconnectFailed); @@ -295,6 +318,7 @@ run_loop.Run(); EXPECT_FALSE(status); EXPECT_TRUE(ESimServiceConfigExists(kTestNetworkServicePath)); + EXPECT_TRUE(GetSmdpAddressFromPref(kTestCellularIccid)); ExpectResult(CellularESimUninstallHandler::UninstallESimResult:: kRefreshProfilesFailed); @@ -331,6 +355,8 @@ EXPECT_TRUE(euicc_properties->installed_carrier_profiles().value().empty()); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath)); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath2)); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid)); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid2)); ExpectResult(CellularESimUninstallHandler::UninstallESimResult::kSuccess, /*expected_count=*/2); @@ -359,6 +385,8 @@ EXPECT_TRUE(euicc_properties->installed_carrier_profiles().value().empty()); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath)); EXPECT_FALSE(ESimServiceConfigExists(kTestNetworkServicePath2)); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid)); + EXPECT_FALSE(GetSmdpAddressFromPref(kTestCellularIccid2)); ExpectResult(CellularESimUninstallHandler::UninstallESimResult::kSuccess, /*expected_count=*/1);
diff --git a/chromeos/network/cellular_policy_handler.cc b/chromeos/network/cellular_policy_handler.cc index 043bdc0..23de5a6 100644 --- a/chromeos/network/cellular_policy_handler.cc +++ b/chromeos/network/cellular_policy_handler.cc
@@ -11,6 +11,7 @@ #include "chromeos/dbus/hermes/hermes_profile_client.h" #include "chromeos/network/cellular_esim_installer.h" #include "chromeos/network/cellular_utils.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/managed_network_configuration_handler.h" #include "chromeos/network/network_event_log.h" #include "chromeos/network/network_profile_handler.h" @@ -61,11 +62,13 @@ CellularESimInstaller* cellular_esim_installer, NetworkProfileHandler* network_profile_handler, NetworkStateHandler* network_state_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, ManagedNetworkConfigurationHandler* managed_network_configuration_handler) { cellular_esim_profile_handler_ = cellular_esim_profile_handler; cellular_esim_installer_ = cellular_esim_installer; network_profile_handler_ = network_profile_handler; network_state_handler_ = network_state_handler; + managed_cellular_pref_handler_ = managed_cellular_pref_handler; managed_network_configuration_handler_ = managed_network_configuration_handler; @@ -249,15 +252,18 @@ auto current_request = std::move(remaining_install_requests_.front()); PopRequest(); - if (service_path) { - NET_LOG(EVENT) - << "Successfully configured service for existing eSIM profile"; - current_request->retry_backoff.InformOfRequest(/*succeeded=*/true); + if (!service_path) { + ScheduleRetry(std::move(current_request)); ProcessRequests(); return; } - ScheduleRetry(std::move(current_request)); + NET_LOG(EVENT) << "Successfully configured service for existing eSIM profile"; + current_request->retry_backoff.InformOfRequest(/*succeeded=*/true); + const std::string* iccid = + policy_util::GetIccidFromONC(current_request->onc_config); + managed_cellular_pref_handler_->AddIccidSmdpPair( + *iccid, current_request->smdp_address); ProcessRequests(); } @@ -269,18 +275,23 @@ auto current_request = std::move(remaining_install_requests_.front()); PopRequest(); - if (hermes_status == HermesResponseStatus::kSuccess) { - NET_LOG(EVENT) << "Successfully installed eSIM profile with SMDP address: " - << current_request->smdp_address; - current_request->retry_backoff.InformOfRequest(/*succeeded=*/true); - managed_network_configuration_handler_->NotifyPolicyAppliedToNetwork( - *service_path); - + if (hermes_status != HermesResponseStatus::kSuccess) { + ScheduleRetry(std::move(current_request)); ProcessRequests(); return; } - ScheduleRetry(std::move(current_request)); + NET_LOG(EVENT) << "Successfully installed eSIM profile with SMDP address: " + << current_request->smdp_address; + current_request->retry_backoff.InformOfRequest(/*succeeded=*/true); + HermesProfileClient::Properties* profile_properties = + HermesProfileClient::Get()->GetProperties(*profile_path); + managed_cellular_pref_handler_->AddIccidSmdpPair( + profile_properties->iccid().value(), current_request->smdp_address); + + managed_network_configuration_handler_->NotifyPolicyAppliedToNetwork( + *service_path); + ProcessRequests(); } @@ -326,15 +337,8 @@ absl::optional<dbus::ObjectPath> CellularPolicyHandler::FindExistingMatchingESimProfile() { - const base::Value* cellular_properties = - remaining_install_requests_.front()->onc_config.FindDictKey( - ::onc::network_config::kCellular); - if (!cellular_properties) { - NET_LOG(ERROR) << "Missing Cellular properties in ONC config."; - return absl::nullopt; - } - const std::string* iccid = - cellular_properties->FindStringKey(::onc::cellular::kICCID); + const std::string* iccid = policy_util::GetIccidFromONC( + remaining_install_requests_.front()->onc_config); if (!iccid) { return absl::nullopt; }
diff --git a/chromeos/network/cellular_policy_handler.h b/chromeos/network/cellular_policy_handler.h index 6131057f..8d2434c 100644 --- a/chromeos/network/cellular_policy_handler.h +++ b/chromeos/network/cellular_policy_handler.h
@@ -26,6 +26,7 @@ class CellularESimInstaller; class NetworkProfileHandler; class NetworkStateHandler; +class ManagedCellularPrefHandler; class ManagedNetworkConfigurationHandler; enum class HermesResponseStatus; @@ -50,6 +51,7 @@ CellularESimInstaller* cellular_esim_installer, NetworkProfileHandler* network_profile_handler, NetworkStateHandler* network_state_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, ManagedNetworkConfigurationHandler* managed_network_configuration_handler); @@ -117,6 +119,7 @@ CellularESimInstaller* cellular_esim_installer_ = nullptr; NetworkProfileHandler* network_profile_handler_ = nullptr; NetworkStateHandler* network_state_handler_ = nullptr; + ManagedCellularPrefHandler* managed_cellular_pref_handler_ = nullptr; ManagedNetworkConfigurationHandler* managed_network_configuration_handler_ = nullptr;
diff --git a/chromeos/network/cellular_policy_handler_unittest.cc b/chromeos/network/cellular_policy_handler_unittest.cc index 3bf1b4a..55f45a8 100644 --- a/chromeos/network/cellular_policy_handler_unittest.cc +++ b/chromeos/network/cellular_policy_handler_unittest.cc
@@ -21,6 +21,7 @@ #include "chromeos/network/cellular_esim_installer.h" #include "chromeos/network/cellular_inhibitor.h" #include "chromeos/network/fake_network_connection_handler.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/managed_network_configuration_handler.h" #include "chromeos/network/network_configuration_handler.h" #include "chromeos/network/network_connection_handler.h" @@ -29,6 +30,7 @@ #include "chromeos/network/network_state_handler.h" #include "chromeos/network/shill_property_util.h" #include "chromeos/network/test_cellular_esim_profile_handler.h" +#include "components/prefs/testing_pref_service.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/cros_system_api/dbus/shill/dbus-constants.h" @@ -136,10 +138,16 @@ network_state_handler_.get(), network_profile_handler_.get(), network_device_handler_.get(), network_configuration_handler_.get(), /*UIProxyConfigService=*/nullptr); + managed_cellular_pref_handler_ = + std::make_unique<ManagedCellularPrefHandler>(); + ManagedCellularPrefHandler::RegisterLocalStatePrefs( + device_prefs_.registry()); + managed_cellular_pref_handler_->SetDevicePrefs(&device_prefs_); cellular_policy_handler_ = std::make_unique<CellularPolicyHandler>(); cellular_policy_handler_->Init( cellular_esim_profile_handler_.get(), cellular_esim_installer_.get(), network_profile_handler_.get(), network_state_handler_.get(), + managed_cellular_pref_handler_.get(), managed_network_configuration_handler_.get()); } @@ -183,6 +191,7 @@ cellular_inhibitor_.reset(); network_configuration_handler_.reset(); managed_network_configuration_handler_.reset(); + managed_cellular_pref_handler_.reset(); network_profile_handler_.reset(); network_device_handler_.reset(); network_state_handler_.reset(); @@ -211,6 +220,17 @@ base::RunLoop().RunUntilIdle(); } + void CheckIccidSmdpPairInPref(bool is_installed) { + const std::string* smdp_address = + managed_cellular_pref_handler_->GetSmdpAddressFromIccid(kICCID); + if (!is_installed) { + EXPECT_FALSE(smdp_address); + return; + } + EXPECT_TRUE(smdp_address); + EXPECT_FALSE(smdp_address->empty()); + } + void FastForwardProfileRefreshDelay() { const base::TimeDelta kProfileRefreshCallbackDelay = base::Milliseconds(150); @@ -237,9 +257,11 @@ std::unique_ptr<CellularESimInstaller> cellular_esim_installer_; std::unique_ptr<NetworkProfileHandler> network_profile_handler_; std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_; + std::unique_ptr<ManagedCellularPrefHandler> managed_cellular_pref_handler_; std::unique_ptr<ManagedNetworkConfigurationHandler> managed_network_configuration_handler_; std::unique_ptr<CellularPolicyHandler> cellular_policy_handler_; + TestingPrefServiceSimple device_prefs_; }; TEST_F(CellularPolicyHandlerTest, InstallProfileSuccess) { @@ -257,6 +279,7 @@ ->GenerateFakeActivationCode(), /*expect_install_success=*/true); CheckShillConfiguration(/*is_installed=*/true); + CheckIccidSmdpPairInPref(/*is_installed=*/true); histogram_tester.ExpectBucketCount( kInstallViaPolicyOperationHistogram, @@ -315,6 +338,7 @@ FastForwardProfileRefreshDelay(); base::RunLoop().RunUntilIdle(); CheckShillConfiguration(/*is_installed=*/true); + CheckIccidSmdpPairInPref(/*is_installed=*/true); } TEST_F(CellularPolicyHandlerTest, InstallProfileFailure) { @@ -340,6 +364,7 @@ CellularESimInstaller::InstallESimProfileResult::kHermesInstallFailed, /*expected_count=*/1); CheckShillConfiguration(/*is_installed=*/false); + CheckIccidSmdpPairInPref(/*is_installed=*/false); } TEST_F(CellularPolicyHandlerTest, InstallOnExternalEUICC) { @@ -359,6 +384,7 @@ ->GenerateFakeActivationCode(), /*expect_install_success=*/true); CheckShillConfiguration(/*is_installed=*/true); + CheckIccidSmdpPairInPref(/*is_installed=*/true); } TEST_F(CellularPolicyHandlerTest, InstallNoEUICCAvailable) { @@ -377,6 +403,7 @@ ->GenerateFakeActivationCode(), /*expect_install_success=*/false); CheckShillConfiguration(/*is_installed=*/false); + CheckIccidSmdpPairInPref(/*is_installed=*/false); } TEST_F(CellularPolicyHandlerTest, UpdateSMDPAddress) { @@ -397,6 +424,7 @@ ->GenerateFakeActivationCode(), /*expect_install_success=*/true); CheckShillConfiguration(/*is_installed=*/true); + CheckIccidSmdpPairInPref(/*is_installed=*/true); } TEST_F(CellularPolicyHandlerTest, InstallExistingESimProfile) { @@ -414,6 +442,7 @@ ->GenerateFakeActivationCode(), /*expect_install_success=*/false); CheckShillConfiguration(/*is_installed=*/true); + CheckIccidSmdpPairInPref(/*is_installed=*/true); } } // namespace chromeos
diff --git a/chromeos/network/client_cert_resolver_unittest.cc b/chromeos/network/client_cert_resolver_unittest.cc index c3a3062..23ea2b54 100644 --- a/chromeos/network/client_cert_resolver_unittest.cc +++ b/chromeos/network/client_cert_resolver_unittest.cc
@@ -250,7 +250,8 @@ network_config_handler_->Init(network_state_handler_.get(), nullptr /* network_device_handler */); managed_config_handler_->Init( - /*cellular_policy_handler=*/nullptr, network_state_handler_.get(), + /*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, network_state_handler_.get(), network_profile_handler_.get(), network_config_handler_.get(), nullptr /* network_device_handler */, nullptr /* prohibited_technologies_handler */);
diff --git a/chromeos/network/managed_cellular_pref_handler.cc b/chromeos/network/managed_cellular_pref_handler.cc new file mode 100644 index 0000000..659fb6b --- /dev/null +++ b/chromeos/network/managed_cellular_pref_handler.cc
@@ -0,0 +1,73 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromeos/network/managed_cellular_pref_handler.h" + +#include "ash/constants/ash_pref_names.h" +#include "chromeos/network/network_event_log.h" +#include "components/prefs/pref_registry_simple.h" +#include "services/preferences/public/cpp/dictionary_value_update.h" +#include "services/preferences/public/cpp/scoped_pref_update.h" + +namespace chromeos { + +// static +void ManagedCellularPrefHandler::RegisterLocalStatePrefs( + PrefRegistrySimple* registry) { + registry->RegisterDictionaryPref(ash::prefs::kManagedCellularIccidSmdpPair); +} + +ManagedCellularPrefHandler::ManagedCellularPrefHandler() = default; +ManagedCellularPrefHandler::~ManagedCellularPrefHandler() = default; + +void ManagedCellularPrefHandler::SetDevicePrefs(PrefService* device_prefs) { + device_prefs_ = device_prefs; +} + +void ManagedCellularPrefHandler::AddIccidSmdpPair( + const std::string& iccid, + const std::string& smdp_address) { + if (!device_prefs_) { + NET_LOG(ERROR) << "Device pref not available yet."; + return; + } + const std::string* existed_smdp_address = GetSmdpAddressFromIccid(iccid); + if (existed_smdp_address && *existed_smdp_address == smdp_address) + return; + + NET_LOG(EVENT) << "Adding iccid smdp pair to device pref, iccid: " << iccid + << ", smdp: " << smdp_address; + ::prefs::ScopedDictionaryPrefUpdate update( + device_prefs_, ash::prefs::kManagedCellularIccidSmdpPair); + update->SetString(iccid, smdp_address); +} + +void ManagedCellularPrefHandler::RemovePairWithIccid(const std::string& iccid) { + if (!device_prefs_) { + NET_LOG(ERROR) << "Device pref not available yet."; + return; + } + const std::string* existed_smdp_address = GetSmdpAddressFromIccid(iccid); + if (!existed_smdp_address) + return; + + NET_LOG(EVENT) << "Removing iccid smdp pair from device pref, iccid: " + << iccid; + ::prefs::ScopedDictionaryPrefUpdate update( + device_prefs_, ash::prefs::kManagedCellularIccidSmdpPair); + update->Remove(iccid); +} + +const std::string* ManagedCellularPrefHandler::GetSmdpAddressFromIccid( + const std::string& iccid) const { + if (!device_prefs_) { + NET_LOG(ERROR) << "Device pref not available yet."; + return nullptr; + } + const base::Value* iccid_smdp_pairs = + device_prefs_->GetDictionary(ash::prefs::kManagedCellularIccidSmdpPair); + return iccid_smdp_pairs->FindStringKey(iccid); +} + +} // namespace chromeos
diff --git a/chromeos/network/managed_cellular_pref_handler.h b/chromeos/network/managed_cellular_pref_handler.h new file mode 100644 index 0000000..97e0506a --- /dev/null +++ b/chromeos/network/managed_cellular_pref_handler.h
@@ -0,0 +1,51 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROMEOS_NETWORK_MANAGED_CELLULAR_PREF_HANDLER_H_ +#define CHROMEOS_NETWORK_MANAGED_CELLULAR_PREF_HANDLER_H_ + +#include "base/component_export.h" +#include "components/prefs/pref_service.h" + +class PrefService; +class PrefRegistrySimple; + +namespace chromeos { + +// This class provides the ability to add, remove and get ICCID and SMDP+ +// address pair for managed cellular networks and stores it persistently in +// prefs. +class COMPONENT_EXPORT(CHROMEOS_NETWORK) ManagedCellularPrefHandler { + public: + ManagedCellularPrefHandler(); + ManagedCellularPrefHandler(const ManagedCellularPrefHandler&) = delete; + ManagedCellularPrefHandler& operator=(const ManagedCellularPrefHandler&) = + delete; + ~ManagedCellularPrefHandler(); + + static void RegisterLocalStatePrefs(PrefRegistrySimple* registry); + + void SetDevicePrefs(PrefService* device_prefs); + + // Add a new ICCID and SMDP+ address pair to device pref for a managed + // cellular network. + void AddIccidSmdpPair(const std::string& iccid, + const std::string& smdp_address); + + // Remove the ICCID and SMDP+ address pair from the device pref with given + // |iccid|. + void RemovePairWithIccid(const std::string& iccid); + + // Returns the corresponding SMDP+ address for the given |iccid|. Returns + // nullptr if no such |iccid| is found. + const std::string* GetSmdpAddressFromIccid(const std::string& iccid) const; + + private: + // Initialized to null and set once SetDevicePrefs() is called. + PrefService* device_prefs_ = nullptr; +}; + +} // namespace chromeos + +#endif // CHROMEOS_NETWORK_MANAGED_CELLULAR_PREF_HANDLER_H_
diff --git a/chromeos/network/managed_cellular_pref_handler_unittest.cc b/chromeos/network/managed_cellular_pref_handler_unittest.cc new file mode 100644 index 0000000..f636051 --- /dev/null +++ b/chromeos/network/managed_cellular_pref_handler_unittest.cc
@@ -0,0 +1,94 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chromeos/network/managed_cellular_pref_handler.h" + +#include "base/test/task_environment.h" +#include "chromeos/network/network_state_test_helper.h" +#include "components/prefs/testing_pref_service.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace chromeos { + +namespace { + +const char kIccid[] = "1234567890"; +const char kSmdpAddress[] = "LPA:1$SmdpAddress$ActivationCode"; + +} // namespace + +class ManagedCellularPrefHandlerTest : public testing::Test { + protected: + ManagedCellularPrefHandlerTest() = default; + ~ManagedCellularPrefHandlerTest() override = default; + + // testing::Test: + void SetUp() override { + ManagedCellularPrefHandler::RegisterLocalStatePrefs( + device_prefs_.registry()); + } + + void TearDown() override { managed_cellular_pref_handler_.reset(); } + + void Init() { + managed_cellular_pref_handler_ = + std::make_unique<ManagedCellularPrefHandler>(); + } + + void SetDevicePrefs(bool set_to_null = false) { + managed_cellular_pref_handler_->SetDevicePrefs( + set_to_null ? nullptr : &device_prefs_); + } + + void AddIccidSmdpPair(const std::string& iccid, + const std::string& smdp_address) { + managed_cellular_pref_handler_->AddIccidSmdpPair(iccid, smdp_address); + } + + void RemovePairForIccid(const std::string& iccid) { + managed_cellular_pref_handler_->RemovePairWithIccid(iccid); + } + + const std::string* GetSmdpAddressFromIccid(const std::string& iccid) { + return managed_cellular_pref_handler_->GetSmdpAddressFromIccid(iccid); + } + + private: + base::test::TaskEnvironment task_environment_{ + base::test::TaskEnvironment::TimeSource::MOCK_TIME}; + TestingPrefServiceSimple device_prefs_; + + std::unique_ptr<ManagedCellularPrefHandler> managed_cellular_pref_handler_; +}; + +TEST_F(ManagedCellularPrefHandlerTest, AddRemoveIccidSmdpPair) { + Init(); + SetDevicePrefs(); + + // Add a pair of ICCID - SMDP address pair to pref and verify that the correct + // value can be retrieved. + AddIccidSmdpPair(kIccid, kSmdpAddress); + const std::string* smdp_address = GetSmdpAddressFromIccid(kIccid); + EXPECT_TRUE(smdp_address); + EXPECT_EQ(kSmdpAddress, *smdp_address); + EXPECT_FALSE(GetSmdpAddressFromIccid("00000000000")); + RemovePairForIccid(kIccid); + smdp_address = GetSmdpAddressFromIccid(kIccid); + EXPECT_FALSE(smdp_address); +} + +TEST_F(ManagedCellularPrefHandlerTest, NoDevicePrefSet) { + Init(); + SetDevicePrefs(/*set_to_null=*/true); + + // Verify that when there's no device prefs, no SMDP address can be + // retrieved. + const std::string* smdp_address = GetSmdpAddressFromIccid(kIccid); + EXPECT_FALSE(smdp_address); + AddIccidSmdpPair(kIccid, kSmdpAddress); + smdp_address = GetSmdpAddressFromIccid(kIccid); + EXPECT_FALSE(smdp_address); +} + +} // namespace chromeos
diff --git a/chromeos/network/managed_network_configuration_handler.cc b/chromeos/network/managed_network_configuration_handler.cc index cea1dee..2f4faf1c 100644 --- a/chromeos/network/managed_network_configuration_handler.cc +++ b/chromeos/network/managed_network_configuration_handler.cc
@@ -25,9 +25,10 @@ NetworkConfigurationHandler* network_configuration_handler, UIProxyConfigService* ui_proxy_config_service) { auto* handler = new ManagedNetworkConfigurationHandlerImpl(); - handler->Init(/*cellular_policy_handler=*/nullptr, network_state_handler, - network_profile_handler, network_configuration_handler, - network_device_handler, + handler->Init(/*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, + network_state_handler, network_profile_handler, + network_configuration_handler, network_device_handler, /*prohibitied_technologies_handler=*/nullptr); handler->set_ui_proxy_config_service(ui_proxy_config_service); return base::WrapUnique(handler);
diff --git a/chromeos/network/managed_network_configuration_handler_impl.cc b/chromeos/network/managed_network_configuration_handler_impl.cc index 102684e..ff0551be 100644 --- a/chromeos/network/managed_network_configuration_handler_impl.cc +++ b/chromeos/network/managed_network_configuration_handler_impl.cc
@@ -619,7 +619,7 @@ auto policy_applicator = std::make_unique<PolicyApplicator>( *profile, CloneGuidToPolicyMap(policies->per_network_config), policies->global_network_config.Clone(), this, cellular_policy_handler_, - modified_policies); + managed_cellular_pref_handler_, modified_policies); auto* policy_applicator_unowned = policy_applicator.get(); policy_applicators_[userhash] = std::move(policy_applicator); policy_applicator_unowned->Run(); @@ -944,12 +944,14 @@ void ManagedNetworkConfigurationHandlerImpl::Init( CellularPolicyHandler* cellular_policy_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, NetworkStateHandler* network_state_handler, NetworkProfileHandler* network_profile_handler, NetworkConfigurationHandler* network_configuration_handler, NetworkDeviceHandler* network_device_handler, ProhibitedTechnologiesHandler* prohibited_technologies_handler) { cellular_policy_handler_ = cellular_policy_handler; + managed_cellular_pref_handler_ = managed_cellular_pref_handler; network_state_handler_ = network_state_handler; network_profile_handler_ = network_profile_handler; network_configuration_handler_ = network_configuration_handler;
diff --git a/chromeos/network/managed_network_configuration_handler_impl.h b/chromeos/network/managed_network_configuration_handler_impl.h index bc1e26b6..9bce706 100644 --- a/chromeos/network/managed_network_configuration_handler_impl.h +++ b/chromeos/network/managed_network_configuration_handler_impl.h
@@ -26,6 +26,7 @@ namespace chromeos { class CellularPolicyHandler; +class ManagedCellularPrefHandler; class NetworkConfigurationHandler; struct NetworkProfile; class NetworkProfileHandler; @@ -171,6 +172,7 @@ // Handlers may be null in tests so long as they do not execute any paths // that require the handlers. void Init(CellularPolicyHandler* cellular_policy_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, NetworkStateHandler* network_state_handler, NetworkProfileHandler* network_profile_handler, NetworkConfigurationHandler* network_configuration_handler, @@ -248,6 +250,7 @@ // Local references to the associated handler instances. CellularPolicyHandler* cellular_policy_handler_ = nullptr; + ManagedCellularPrefHandler* managed_cellular_pref_handler_ = nullptr; NetworkStateHandler* network_state_handler_ = nullptr; NetworkProfileHandler* network_profile_handler_ = nullptr; NetworkConfigurationHandler* network_configuration_handler_ = nullptr;
diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc index 4ed5f35..d4db1e1 100644 --- a/chromeos/network/managed_network_configuration_handler_unittest.cc +++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
@@ -29,6 +29,7 @@ #include "chromeos/network/cellular_inhibitor.h" #include "chromeos/network/cellular_policy_handler.h" #include "chromeos/network/fake_network_connection_handler.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/managed_network_configuration_handler_impl.h" #include "chromeos/network/mock_network_state_handler.h" #include "chromeos/network/network_configuration_handler.h" @@ -179,6 +180,12 @@ network_state_handler_.get()); cellular_policy_handler_ = std::make_unique<CellularPolicyHandler>(); + managed_cellular_pref_handler_ = + std::make_unique<ManagedCellularPrefHandler>(); + ManagedCellularPrefHandler::RegisterLocalStatePrefs( + device_prefs_.registry()); + managed_cellular_pref_handler_->SetDevicePrefs(&device_prefs_); + // ManagedNetworkConfigurationHandlerImpl's ctor is private. managed_network_configuration_handler_.reset( new ManagedNetworkConfigurationHandlerImpl()); @@ -192,9 +199,9 @@ &user_prefs_, &local_state_, network_state_handler_.get(), network_profile_handler_.get()); managed_network_configuration_handler_->Init( - cellular_policy_handler_.get(), network_state_handler_.get(), - network_profile_handler_.get(), network_configuration_handler_.get(), - network_device_handler_.get(), + cellular_policy_handler_.get(), managed_cellular_pref_handler_.get(), + network_state_handler_.get(), network_profile_handler_.get(), + network_configuration_handler_.get(), network_device_handler_.get(), nullptr /* no ProhibitedTechnologiesHandler */); managed_network_configuration_handler_->set_ui_proxy_config_service( ui_proxy_config_service_.get()); @@ -202,6 +209,7 @@ cellular_policy_handler_->Init( cellular_esim_profile_handler_.get(), cellular_esim_installer_.get(), network_profile_handler_.get(), network_state_handler_.get(), + managed_cellular_pref_handler_.get(), managed_network_configuration_handler_.get()); base::RunLoop().RunUntilIdle(); @@ -216,6 +224,7 @@ cellular_esim_profile_handler_.reset(); cellular_connection_handler_.reset(); cellular_inhibitor_.reset(); + managed_cellular_pref_handler_.reset(); network_configuration_handler_.reset(); ui_proxy_config_service_.reset(); network_profile_handler_.reset(); @@ -343,6 +352,7 @@ std::unique_ptr<NetworkProfileHandler> network_profile_handler_; std::unique_ptr<NetworkConfigurationHandler> network_configuration_handler_; std::unique_ptr<UIProxyConfigService> ui_proxy_config_service_; + std::unique_ptr<ManagedCellularPrefHandler> managed_cellular_pref_handler_; std::unique_ptr<ManagedNetworkConfigurationHandlerImpl> managed_network_configuration_handler_; std::unique_ptr<NetworkDeviceHandler> network_device_handler_; @@ -355,7 +365,7 @@ std::unique_ptr<CellularPolicyHandler> cellular_policy_handler_; sync_preferences::TestingPrefServiceSyncable user_prefs_; - TestingPrefServiceSimple local_state_; + TestingPrefServiceSimple local_state_, device_prefs_; }; TEST_F(ManagedNetworkConfigurationHandlerTest, RemoveIrrelevantFields) { @@ -396,6 +406,9 @@ GetShillServiceClient()->GetServiceProperties(service_path); ASSERT_TRUE(properties); EXPECT_THAT(*properties, DictionaryHasValues(expected_shill_properties)); + const std::string* iccid = properties->FindStringKey(shill::kIccidProperty); + ASSERT_TRUE(iccid); + EXPECT_TRUE(managed_cellular_pref_handler_->GetSmdpAddressFromIccid(*iccid)); // Verify that applying a new cellular policy with same ICCID should update // the old shill configuration.
diff --git a/chromeos/network/metrics/esim_policy_login_metrics_logger_unittest.cc b/chromeos/network/metrics/esim_policy_login_metrics_logger_unittest.cc index c79614e..d7d10af2 100644 --- a/chromeos/network/metrics/esim_policy_login_metrics_logger_unittest.cc +++ b/chromeos/network/metrics/esim_policy_login_metrics_logger_unittest.cc
@@ -63,6 +63,7 @@ managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); managed_config_handler_->Init( /*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, network_state_test_helper_.network_state_handler(), network_profile_handler_.get(), network_config_handler_.get(), /*network_device_handler=*/nullptr,
diff --git a/chromeos/network/network_connection_handler_impl_unittest.cc b/chromeos/network/network_connection_handler_impl_unittest.cc index 50231f1..03e603d 100644 --- a/chromeos/network/network_connection_handler_impl_unittest.cc +++ b/chromeos/network/network_connection_handler_impl_unittest.cc
@@ -194,9 +194,10 @@ managed_config_handler_.reset(new ManagedNetworkConfigurationHandlerImpl()); managed_config_handler_->Init( - /*cellular_policy_handler=*/nullptr, helper_.network_state_handler(), - network_profile_handler_.get(), network_config_handler_.get(), - nullptr /* network_device_handler */, + /*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, + helper_.network_state_handler(), network_profile_handler_.get(), + network_config_handler_.get(), nullptr /* network_device_handler */, nullptr /* prohibited_tecnologies_handler */); cellular_inhibitor_ = std::make_unique<CellularInhibitor>();
diff --git a/chromeos/network/network_handler.cc b/chromeos/network/network_handler.cc index 6ce8399..3da0b75 100644 --- a/chromeos/network/network_handler.cc +++ b/chromeos/network/network_handler.cc
@@ -16,6 +16,7 @@ #include "chromeos/network/cellular_policy_handler.h" #include "chromeos/network/client_cert_resolver.h" #include "chromeos/network/geolocation_handler.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/managed_network_configuration_handler_impl.h" #include "chromeos/network/metrics/connection_info_metrics_logger.h" #include "chromeos/network/metrics/esim_policy_login_metrics_logger.h" @@ -59,6 +60,7 @@ if (features::IsESimPolicyEnabled()) { cellular_policy_handler_.reset(new CellularPolicyHandler()); esim_policy_login_metrics_logger_.reset(new ESimPolicyLoginMetricsLogger()); + managed_cellular_pref_handler_.reset(new ManagedCellularPrefHandler()); } cellular_metrics_logger_.reset(new CellularMetricsLogger()); connection_info_metrics_logger_.reset(new ConnectionInfoMetricsLogger()); @@ -95,9 +97,10 @@ network_configuration_handler_->Init(network_state_handler_.get(), network_device_handler_.get()); managed_network_configuration_handler_->Init( - cellular_policy_handler_.get(), network_state_handler_.get(), - network_profile_handler_.get(), network_configuration_handler_.get(), - network_device_handler_.get(), prohibited_technologies_handler_.get()); + cellular_policy_handler_.get(), managed_cellular_pref_handler_.get(), + network_state_handler_.get(), network_profile_handler_.get(), + network_configuration_handler_.get(), network_device_handler_.get(), + prohibited_technologies_handler_.get()); network_connection_handler_->Init( network_state_handler_.get(), network_configuration_handler_.get(), managed_network_configuration_handler_.get(), @@ -108,12 +111,14 @@ network_state_handler_.get()); cellular_esim_uninstall_handler_->Init( cellular_inhibitor_.get(), cellular_esim_profile_handler_.get(), + managed_cellular_pref_handler_.get(), network_configuration_handler_.get(), network_connection_handler_.get(), network_state_handler_.get()); if (features::IsESimPolicyEnabled()) { cellular_policy_handler_->Init( cellular_esim_profile_handler_.get(), cellular_esim_installer_.get(), network_profile_handler_.get(), network_state_handler_.get(), + managed_cellular_pref_handler_.get(), managed_network_configuration_handler_.get()); esim_policy_login_metrics_logger_->Init( network_state_handler_.get(), @@ -174,6 +179,9 @@ PrefService* logged_in_profile_prefs, PrefService* device_prefs) { cellular_esim_profile_handler_->SetDevicePrefs(device_prefs); + if (features::IsESimPolicyEnabled()) { + managed_cellular_pref_handler_->SetDevicePrefs(device_prefs); + } ui_proxy_config_service_.reset(new UIProxyConfigService( logged_in_profile_prefs, device_prefs, network_state_handler_.get(), network_profile_handler_.get())); @@ -187,6 +195,9 @@ void NetworkHandler::ShutdownPrefServices() { cellular_esim_profile_handler_->SetDevicePrefs(nullptr); + if (features::IsESimPolicyEnabled()) { + managed_cellular_pref_handler_->SetDevicePrefs(nullptr); + } ui_proxy_config_service_.reset(); network_metadata_store_.reset(); } @@ -233,6 +244,10 @@ return cellular_policy_handler_.get(); } +ManagedCellularPrefHandler* NetworkHandler::managed_cellular_pref_handler() { + return managed_cellular_pref_handler_.get(); +} + NetworkDeviceHandler* NetworkHandler::network_device_handler() { return network_device_handler_.get(); }
diff --git a/chromeos/network/network_handler.h b/chromeos/network/network_handler.h index 7682caf5..18c21621 100644 --- a/chromeos/network/network_handler.h +++ b/chromeos/network/network_handler.h
@@ -27,6 +27,7 @@ class ConnectionInfoMetricsLogger; class ESimPolicyLoginMetricsLogger; class GeolocationHandler; +class ManagedCellularPrefHandler; class ManagedNetworkConfigurationHandler; class ManagedNetworkConfigurationHandlerImpl; class NetworkActivationHandler; @@ -102,6 +103,7 @@ NetworkDeviceHandler* network_device_handler(); NetworkProfileHandler* network_profile_handler(); NetworkConfigurationHandler* network_configuration_handler(); + ManagedCellularPrefHandler* managed_cellular_pref_handler(); ManagedNetworkConfigurationHandler* managed_network_configuration_handler(); NetworkActivationHandler* network_activation_handler(); NetworkCertificateHandler* network_certificate_handler(); @@ -137,6 +139,7 @@ std::unique_ptr<CellularESimUninstallHandler> cellular_esim_uninstall_handler_; std::unique_ptr<CellularPolicyHandler> cellular_policy_handler_; + std::unique_ptr<ManagedCellularPrefHandler> managed_cellular_pref_handler_; std::unique_ptr<CellularMetricsLogger> cellular_metrics_logger_; std::unique_ptr<ConnectionInfoMetricsLogger> connection_info_metrics_logger_; std::unique_ptr<ESimPolicyLoginMetricsLogger>
diff --git a/chromeos/network/network_handler_test_helper.cc b/chromeos/network/network_handler_test_helper.cc index 27d3790..517d75e 100644 --- a/chromeos/network/network_handler_test_helper.cc +++ b/chromeos/network/network_handler_test_helper.cc
@@ -5,6 +5,7 @@ #include "chromeos/network/network_handler_test_helper.h" #include "chromeos/network/cellular_esim_profile_handler_impl.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/network_handler.h" #include "chromeos/network/network_metadata_store.h" #include "chromeos/network/network_test_helper_base.h" @@ -30,6 +31,7 @@ DCHECK(device_registry); ::onc::RegisterPrefs(device_registry); NetworkMetadataStore::RegisterPrefs(device_registry); + ManagedCellularPrefHandler::RegisterLocalStatePrefs(device_registry); CellularESimProfileHandlerImpl::RegisterLocalStatePrefs(device_registry); if (user_registry) { NetworkMetadataStore::RegisterPrefs(user_registry);
diff --git a/chromeos/network/policy_applicator.cc b/chromeos/network/policy_applicator.cc index 755fe80..4496fae 100644 --- a/chromeos/network/policy_applicator.cc +++ b/chromeos/network/policy_applicator.cc
@@ -16,6 +16,7 @@ #include "chromeos/components/onc/onc_signature.h" #include "chromeos/dbus/shill/shill_profile_client.h" #include "chromeos/network/cellular_policy_handler.h" +#include "chromeos/network/managed_cellular_pref_handler.h" #include "chromeos/network/network_event_log.h" #include "chromeos/network/network_type_pattern.h" #include "chromeos/network/network_ui_data.h" @@ -66,12 +67,6 @@ return guid_value->GetString(); } -bool IsCellularPolicy(const base::Value& onc_config) { - const std::string* type = - onc_config.FindStringKey(::onc::network_config::kType); - return type && *type == ::onc::network_type::kCellular; -} - const std::string* GetSMDPAddressFromONC(const base::Value& onc_config) { const std::string* type = onc_config.FindStringKey(::onc::network_config::kType); @@ -127,9 +122,11 @@ base::Value global_network_config, ConfigurationHandler* handler, CellularPolicyHandler* cellular_policy_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, std::set<std::string>* modified_policy_guids) : cellular_policy_handler_(cellular_policy_handler), handler_(handler), + managed_cellular_pref_handler_(managed_cellular_pref_handler), profile_(profile), all_policies_(std::move(all_policies)), global_network_config_(std::move(global_network_config)) { @@ -251,6 +248,13 @@ ApplyNewPolicy(entry_identifier, entry_properties, std::move(ui_data), old_guid, new_guid, *new_policy, std::move(profile_entry_finished_callback)); + + const std::string* iccid = policy_util::GetIccidFromONC(*new_policy); + const std::string* smdp_address = GetSMDPAddressFromONC(*new_policy); + if (was_managed && managed_cellular_pref_handler_ && iccid && + smdp_address) { + managed_cellular_pref_handler_->AddIccidSmdpPair(*iccid, *smdp_address); + } return; } @@ -262,6 +266,11 @@ // Note: An alternative might be to preserve the user settings, but it's // unclear which values originating the policy should be removed. DeleteEntry(entry_identifier, std::move(profile_entry_finished_callback)); + + const std::string* iccid = policy_util::GetIccidFromONC(onc_part); + if (managed_cellular_pref_handler_ && iccid) { + managed_cellular_pref_handler_->RemovePairWithIccid(*iccid); + } return; } @@ -437,7 +446,7 @@ NET_LOG(EVENT) << "Creating new configuration managed by policy " << guid << " in profile " << profile_.ToDebugString() << "."; - if (IsCellularPolicy(*network_policy)) { + if (policy_util::IsCellularPolicy(*network_policy)) { const std::string* smdp_address = GetSMDPAddressFromONC(*network_policy); if (features::IsESimPolicyEnabled() && smdp_address) { NET_LOG(EVENT)
diff --git a/chromeos/network/policy_applicator.h b/chromeos/network/policy_applicator.h index 7bc192a6..025e25d9 100644 --- a/chromeos/network/policy_applicator.h +++ b/chromeos/network/policy_applicator.h
@@ -20,6 +20,7 @@ namespace chromeos { class CellularPolicyHandler; +class ManagedCellularPrefHandler; class NetworkUIData; // This class compares (entry point is Run()) |modified_policies| with the @@ -62,6 +63,7 @@ base::Value global_network_config, ConfigurationHandler* handler, CellularPolicyHandler* cellular_policy_handler, + ManagedCellularPrefHandler* managed_cellular_pref_handler, std::set<std::string>* modified_policy_guids); PolicyApplicator(const PolicyApplicator&) = delete; @@ -147,6 +149,7 @@ CellularPolicyHandler* cellular_policy_handler_ = nullptr; ConfigurationHandler* handler_; + ManagedCellularPrefHandler* managed_cellular_pref_handler_ = nullptr; NetworkProfile profile_; std::map<std::string, base::Value> all_policies_; base::Value global_network_config_;
diff --git a/chromeos/network/policy_util.cc b/chromeos/network/policy_util.cc index 94b523c..1b464c06 100644 --- a/chromeos/network/policy_util.cc +++ b/chromeos/network/policy_util.cc
@@ -388,6 +388,24 @@ return false; } +bool IsCellularPolicy(const base::Value& onc_config) { + const std::string* type = + onc_config.FindStringKey(::onc::network_config::kType); + return type && *type == ::onc::network_type::kCellular; +} + +const std::string* GetIccidFromONC(const base::Value& onc_config) { + if (!IsCellularPolicy(onc_config)) + return nullptr; + + const base::Value* cellular_dict = + onc_config.FindDictKey(::onc::network_config::kCellular); + if (!cellular_dict || !cellular_dict->is_dict()) + return nullptr; + + return cellular_dict->FindStringKey(::onc::cellular::kICCID); +} + } // namespace policy_util } // namespace chromeos
diff --git a/chromeos/network/policy_util.h b/chromeos/network/policy_util.h index 782bcfd3e..5ee7a23 100644 --- a/chromeos/network/policy_util.h +++ b/chromeos/network/policy_util.h
@@ -62,6 +62,13 @@ bool IsPolicyMatching(const base::Value& policy, const base::Value& actual_network); +// Returns if the given |onc_config| is Cellular type configuration. +bool IsCellularPolicy(const base::Value& onc_config); + +// Returns the ICCID value from the given |onc_config|, returns nullptr if it +// is not a Cellular type ONC or no ICCID field is found. +const std::string* GetIccidFromONC(const base::Value& onc_config); + } // namespace policy_util } // namespace chromeos
diff --git a/chromeos/network/prohibited_technologies_handler_unittest.cc b/chromeos/network/prohibited_technologies_handler_unittest.cc index 7d8471a..ca9724e 100644 --- a/chromeos/network/prohibited_technologies_handler_unittest.cc +++ b/chromeos/network/prohibited_technologies_handler_unittest.cc
@@ -54,9 +54,10 @@ base::WrapUnique(new ProhibitedTechnologiesHandler()); managed_config_handler_->Init( - /*cellular_policy_handler=*/nullptr, helper_.network_state_handler(), - network_profile_handler_.get(), network_config_handler_.get(), - nullptr /* network_device_handler */, + /*cellular_policy_handler=*/nullptr, + /*managed_cellular_pref_handler=*/nullptr, + helper_.network_state_handler(), network_profile_handler_.get(), + network_config_handler_.get(), nullptr /* network_device_handler */, prohibited_technologies_handler_.get()); prohibited_technologies_handler_->Init(managed_config_handler_.get(),
diff --git a/chromeos/services/cros_healthd/OWNERS b/chromeos/services/cros_healthd/OWNERS index be1eb14..de7367c 100644 --- a/chromeos/services/cros_healthd/OWNERS +++ b/chromeos/services/cros_healthd/OWNERS
@@ -1,5 +1,3 @@ -pmoy@chromium.org - menghuan@chromium.org kerker@chromium.org chungsheng@chromium.org
diff --git a/components/autofill/core/browser/payments/credit_card_access_manager.cc b/components/autofill/core/browser/payments/credit_card_access_manager.cc index 714cc26..40d2d82 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager.cc +++ b/components/autofill/core/browser/payments/credit_card_access_manager.cc
@@ -616,19 +616,6 @@ unmask_auth_flow_type_); } - // Store request options temporarily if given. They will be used for - // AdditionallyPerformFidoAuth. - absl::optional<base::Value> request_options = absl::nullopt; - if (unmask_details_.fido_request_options.has_value()) { - // For opted-in user (CVC then FIDO case), request options are returned in - // unmask detail response. - request_options = unmask_details_.fido_request_options->Clone(); - } else if (response.request_options.has_value()) { - // For Android users, request_options are provided from GetRealPan if the - // user has chosen to opt-in. - request_options = response.request_options->Clone(); - } - // Local boolean denotes whether to fill the form immediately. If CVC // authentication failed, report error immediately. If GetRealPan did not // return card authorization token (we can't call any FIDO-related flows, @@ -697,6 +684,16 @@ response.card, response.cvc); unmask_auth_flow_type_ = UnmaskAuthFlowType::kNone; } else if (should_authorize_with_fido) { + absl::optional<base::Value> request_options = absl::nullopt; + if (unmask_details_.fido_request_options.has_value()) { + // For opted-in user (CVC then FIDO case), request options are returned in + // unmask detail response. + request_options = unmask_details_.fido_request_options->Clone(); + } else if (response.request_options.has_value()) { + // For Android users, request_options are provided from GetRealPan if the + // user has chosen to opt-in. + request_options = response.request_options->Clone(); + } AdditionallyPerformFidoAuth(response, request_options->Clone()); } if (should_offer_fido_auth) {
diff --git a/components/cast_streaming/browser/playback_command_dispatcher.cc b/components/cast_streaming/browser/playback_command_dispatcher.cc index 3aee33a..5323986 100644 --- a/components/cast_streaming/browser/playback_command_dispatcher.cc +++ b/components/cast_streaming/browser/playback_command_dispatcher.cc
@@ -22,7 +22,8 @@ mojo::Remote<media::mojom::Renderer> renderer; control_configuration->SetPlaybackController( renderer.BindNewPipeAndPassReceiver()); - muxer_ = std::make_unique<RendererControlMultiplexer>(std::move(renderer)); + muxer_ = std::make_unique<RendererControlMultiplexer>(std::move(renderer), + task_runner_); // Create a "fake" media::mojom::Renderer so that the RpcCallTranslator can // pass commands to the |muxer_|.
diff --git a/components/cast_streaming/browser/receiver_session_impl.cc b/components/cast_streaming/browser/receiver_session_impl.cc index 837cda47..e8317282 100644 --- a/components/cast_streaming/browser/receiver_session_impl.cc +++ b/components/cast_streaming/browser/receiver_session_impl.cc
@@ -26,7 +26,8 @@ ReceiverSession::Client* client) : message_port_provider_(std::move(message_port_provider)), av_constraints_(std::move(av_constraints)), - client_(client) { + client_(client), + weak_factory_(this) { // TODO(crbug.com/1218495): Validate the provided codecs against build flags. DCHECK(av_constraints_); DCHECK(message_port_provider_); @@ -42,13 +43,10 @@ DVLOG(1) << __func__; cast_streaming_receiver_ = std::move(cast_streaming_receiver); - // It is fine to use an unretained pointer to |this| here as the - // AssociatedRemote, is owned by |this| and will be torn-down at the same time - // as |this|. cast_streaming_receiver_->EnableReceiver(base::BindOnce( - &ReceiverSessionImpl::OnReceiverEnabled, base::Unretained(this))); + &ReceiverSessionImpl::OnReceiverEnabled, weak_factory_.GetWeakPtr())); cast_streaming_receiver_.set_disconnect_handler(base::BindOnce( - &ReceiverSessionImpl::OnMojoDisconnect, base::Unretained(this))); + &ReceiverSessionImpl::OnMojoDisconnect, weak_factory_.GetWeakPtr())); } void ReceiverSessionImpl::StartStreamingAsync( @@ -56,7 +54,9 @@ cast_streaming_receiver, mojo::AssociatedRemote<mojom::RendererController> renderer_controller) { DCHECK(!renderer_control_config_); - external_renderer_controls_ = std::make_unique<RendererControllerImpl>(); + external_renderer_controls_ = + std::make_unique<RendererControllerImpl>(base::BindOnce( + &ReceiverSessionImpl::OnMojoDisconnect, weak_factory_.GetWeakPtr())); renderer_control_config_.emplace(std::move(renderer_controller), external_renderer_controls_->Bind()); @@ -189,7 +189,12 @@ video_remote_.reset(); } -ReceiverSessionImpl::RendererControllerImpl::RendererControllerImpl() = default; +ReceiverSessionImpl::RendererControllerImpl::RendererControllerImpl( + base::OnceCallback<void()> on_mojo_disconnect) + : on_mojo_disconnect_(std::move(on_mojo_disconnect)) { + DCHECK(on_mojo_disconnect_); +} + ReceiverSessionImpl::RendererControllerImpl::~RendererControllerImpl() = default; @@ -216,7 +221,9 @@ mojo::PendingReceiver<media::mojom::Renderer> ReceiverSessionImpl::RendererControllerImpl::Bind() { - return renderer_controls_.BindNewPipeAndPassReceiver(); + auto receiver = renderer_controls_.BindNewPipeAndPassReceiver(); + renderer_controls_.set_disconnect_handler(std::move(on_mojo_disconnect_)); + return receiver; } } // namespace cast_streaming
diff --git a/components/cast_streaming/browser/receiver_session_impl.h b/components/cast_streaming/browser/receiver_session_impl.h index dba6d1fc7..c8c58f3 100644 --- a/components/cast_streaming/browser/receiver_session_impl.h +++ b/components/cast_streaming/browser/receiver_session_impl.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_CAST_STREAMING_BROWSER_RECEIVER_SESSION_IMPL_H_ #define COMPONENTS_CAST_STREAMING_BROWSER_RECEIVER_SESSION_IMPL_H_ +#include "base/memory/weak_ptr.h" #include "components/cast_streaming/browser/cast_streaming_session.h" #include "components/cast_streaming/browser/public/receiver_session.h" #include "components/cast_streaming/public/mojom/cast_streaming_session.mojom.h" @@ -45,7 +46,8 @@ private: class RendererControllerImpl : public ReceiverSession::RendererController { public: - RendererControllerImpl(); + explicit RendererControllerImpl( + base::OnceCallback<void()> on_mojo_disconnect); ~RendererControllerImpl() override; mojo::PendingReceiver<media::mojom::Renderer> Bind(); @@ -57,6 +59,8 @@ void SetVolume(float volume) override; private: + base::OnceCallback<void()> on_mojo_disconnect_; + mojo::Remote<media::mojom::Renderer> renderer_controls_; }; @@ -95,6 +99,8 @@ ReceiverSession::Client* const client_; std::unique_ptr<RendererControllerImpl> external_renderer_controls_; absl::optional<RendererControllerConfig> renderer_control_config_; + + base::WeakPtrFactory<ReceiverSessionImpl> weak_factory_; }; } // namespace cast_streaming
diff --git a/components/cast_streaming/browser/renderer_control_multiplexer.cc b/components/cast_streaming/browser/renderer_control_multiplexer.cc index af4d7eb..0e7142d 100644 --- a/components/cast_streaming/browser/renderer_control_multiplexer.cc +++ b/components/cast_streaming/browser/renderer_control_multiplexer.cc
@@ -4,16 +4,27 @@ #include "components/cast_streaming/browser/renderer_control_multiplexer.h" +#include "base/task/bind_post_task.h" + namespace cast_streaming { RendererControlMultiplexer::RendererControlMultiplexer( - mojo::Remote<media::mojom::Renderer> renderer_remote) - : renderer_remote_(std::move(renderer_remote)) {} + mojo::Remote<media::mojom::Renderer> renderer_remote, + scoped_refptr<base::SequencedTaskRunner> task_runner) + : renderer_remote_(std::move(renderer_remote)), + task_runner_(std::move(task_runner)), + weak_factory_(this) { + renderer_remote_.set_disconnect_handler(base::BindPostTask( + task_runner_, + base::BindOnce(&RendererControlMultiplexer::OnMojoDisconnect, + weak_factory_.GetWeakPtr()))); +} RendererControlMultiplexer::~RendererControlMultiplexer() = default; void RendererControlMultiplexer::RegisterController( mojo::PendingReceiver<media::mojom::Renderer> controls) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); DCHECK(controls); auto bound_controls = std::make_unique<mojo::Receiver<media::mojom::Renderer>>( @@ -22,20 +33,24 @@ } void RendererControlMultiplexer::StartPlayingFrom(::base::TimeDelta time) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->StartPlayingFrom(time); } void RendererControlMultiplexer::SetPlaybackRate(double playback_rate) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->SetPlaybackRate(playback_rate); } void RendererControlMultiplexer::SetVolume(float volume) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->SetVolume(volume); } void RendererControlMultiplexer::SetCdm( const absl::optional<::base::UnguessableToken>& cdm_id, SetCdmCallback callback) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->SetCdm(cdm_id, std::move(callback)); } @@ -46,13 +61,19 @@ streams, media::mojom::MediaUrlParamsPtr media_url_params, InitializeCallback callback) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->Initialize(std::move(client), std::move(streams), std::move(media_url_params), std::move(callback)); } void RendererControlMultiplexer::Flush(FlushCallback callback) { + DCHECK(task_runner_->RunsTasksInCurrentSequence()); renderer_remote_->Flush(std::move(callback)); } +void RendererControlMultiplexer::OnMojoDisconnect() { + receiver_list_.clear(); +} + } // namespace cast_streaming
diff --git a/components/cast_streaming/browser/renderer_control_multiplexer.h b/components/cast_streaming/browser/renderer_control_multiplexer.h index 1fc6902..acce86a7 100644 --- a/components/cast_streaming/browser/renderer_control_multiplexer.h +++ b/components/cast_streaming/browser/renderer_control_multiplexer.h
@@ -8,6 +8,7 @@ #include <memory> #include <vector> +#include "base/memory/weak_ptr.h" #include "media/mojo/mojom/renderer.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" @@ -19,8 +20,9 @@ // callers by forwarding all such calls across a single mojo pipe. class RendererControlMultiplexer : public media::mojom::Renderer { public: - explicit RendererControlMultiplexer( - mojo::Remote<media::mojom::Renderer> renderer_remote); + RendererControlMultiplexer( + mojo::Remote<media::mojom::Renderer> renderer_remote, + scoped_refptr<base::SequencedTaskRunner> task_runner); ~RendererControlMultiplexer() override; // Adds a new mojo pipe for which calls should be forwarded to @@ -48,10 +50,14 @@ void Flush(FlushCallback callback) override; private: - mojo::Remote<media::mojom::Renderer> renderer_remote_; + void OnMojoDisconnect(); + mojo::Remote<media::mojom::Renderer> renderer_remote_; std::vector<std::unique_ptr<mojo::Receiver<media::mojom::Renderer>>> receiver_list_; + + scoped_refptr<base::SequencedTaskRunner> task_runner_; + base::WeakPtrFactory<RendererControlMultiplexer> weak_factory_; }; } // namespace cast_streaming
diff --git a/components/cast_streaming/renderer/playback_command_forwarding_renderer.cc b/components/cast_streaming/renderer/playback_command_forwarding_renderer.cc index dc2fa0f..58fee2c 100644 --- a/components/cast_streaming/renderer/playback_command_forwarding_renderer.cc +++ b/components/cast_streaming/renderer/playback_command_forwarding_renderer.cc
@@ -5,6 +5,7 @@ #include "components/cast_streaming/renderer/playback_command_forwarding_renderer.h" #include "base/notreached.h" +#include "base/task/bind_post_task.h" namespace cast_streaming { namespace { @@ -25,10 +26,16 @@ // |owning_renderer| is expected to outlive this class. RendererCommandForwarder( PlaybackCommandForwardingRenderer* owning_renderer, - mojo::PendingReceiver<media::mojom::Renderer> playback_controller) + mojo::PendingReceiver<media::mojom::Renderer> playback_controller, + scoped_refptr<base::SingleThreadTaskRunner> task_runner) : owning_renderer_(owning_renderer), playback_controller_(this, std::move(playback_controller)) { DCHECK(owning_renderer_); + + playback_controller_.set_disconnect_handler(base::BindPostTask( + std::move(task_runner), + base::BindOnce(&PlaybackCommandForwardingRenderer::OnMojoDisconnect, + owning_renderer_->weak_factory_.GetWeakPtr()))); } ~RendererCommandForwarder() override = default; @@ -83,11 +90,7 @@ DCHECK(real_renderer_); DCHECK(pending_renderer_controls_); - send_timestamp_update_caller_.Start( - FROM_HERE, kTimeUpdateInterval, - base::BindRepeating( - &PlaybackCommandForwardingRenderer::SendTimestampUpdate, - weak_factory_.GetWeakPtr())); + InitializeSendTimestampUpdateCaller(); } PlaybackCommandForwardingRenderer::~PlaybackCommandForwardingRenderer() = @@ -103,9 +106,10 @@ init_cb_ = std::move(init_cb); real_renderer_->Initialize( media_resource, this, - base::BindOnce(&PlaybackCommandForwardingRenderer:: - OnRealRendererInitializationComplete, - weak_factory_.GetWeakPtr())); + base::BindPostTask( + task_runner_, base::BindOnce(&PlaybackCommandForwardingRenderer:: + OnRealRendererInitializationComplete, + weak_factory_.GetWeakPtr()))); } void PlaybackCommandForwardingRenderer::SetCdm(media::CdmContext* cdm_context, @@ -141,7 +145,7 @@ DCHECK(!playback_controller_); playback_controller_ = std::make_unique<RendererCommandForwarder>( - this, std::move(pending_renderer_controls_)); + this, std::move(pending_renderer_controls_), task_runner_); std::move(init_cb_).Run(status); } @@ -352,4 +356,29 @@ base::TimeTicks::Now()); } +void PlaybackCommandForwardingRenderer::InitializeSendTimestampUpdateCaller() { + if (!task_runner_->BelongsToCurrentThread()) { + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&PlaybackCommandForwardingRenderer:: + InitializeSendTimestampUpdateCaller, + weak_factory_.GetWeakPtr())); + return; + } + + send_timestamp_update_caller_.Start( + FROM_HERE, kTimeUpdateInterval, + base::BindPostTask( + task_runner_, + base::BindRepeating( + &PlaybackCommandForwardingRenderer::SendTimestampUpdate, + weak_factory_.GetWeakPtr()))); +} + +void PlaybackCommandForwardingRenderer::OnMojoDisconnect() { + DCHECK(task_runner_->BelongsToCurrentThread()); + + OnError(media::PIPELINE_ERROR_DISCONNECTED); + real_renderer_.reset(); +} + } // namespace cast_streaming
diff --git a/components/cast_streaming/renderer/playback_command_forwarding_renderer.h b/components/cast_streaming/renderer/playback_command_forwarding_renderer.h index 96ef1b3..f1614b1 100644 --- a/components/cast_streaming/renderer/playback_command_forwarding_renderer.h +++ b/components/cast_streaming/renderer/playback_command_forwarding_renderer.h
@@ -107,6 +107,11 @@ // Sends an OnTimeUpdate() call to |remote_renderer_client_|. void SendTimestampUpdate(); + // Helper to create |send_timestamp_update_caller_| on |task_runner_|. + void InitializeSendTimestampUpdateCaller(); + + void OnMojoDisconnect(); + // Renderer to which playback calls should be forwarded. std::unique_ptr<media::Renderer> real_renderer_;
diff --git a/components/enterprise/browser/reporting/cloud_reporting_frequency_policy_handler.cc b/components/enterprise/browser/reporting/cloud_reporting_frequency_policy_handler.cc index 2a35812..6a349cb 100644 --- a/components/enterprise/browser/reporting/cloud_reporting_frequency_policy_handler.cc +++ b/components/enterprise/browser/reporting/cloud_reporting_frequency_policy_handler.cc
@@ -16,7 +16,7 @@ namespace enterprise_reporting { namespace { constexpr int kMinimumReportFrequencyInHour = 3; -constexpr int kMaximumReportFrequencyInour = 24 * 7; +constexpr int kMaximumReportFrequencyInour = 24; } // namespace
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc index 72b7313..30dba51a 100644 --- a/components/exo/shell_surface.cc +++ b/components/exo/shell_surface.cc
@@ -41,11 +41,14 @@ constexpr int kMaximizedOrFullscreenOrPinnedLockTimeoutMs = 100; gfx::Rect GetClientBoundsInScreen(views::Widget* widget) { - ash::NonClientFrameViewAsh* frame_view = - static_cast<ash::NonClientFrameViewAsh*>( - widget->non_client_view()->frame_view()); gfx::Rect window_bounds = widget->GetWindowBoundsInScreen(); - return frame_view->GetClientBoundsForWindowBounds(window_bounds); + // Account for popup windows not having a non-client view. + if (widget->non_client_view()) { + return static_cast<ash::NonClientFrameViewAsh*>( + widget->non_client_view()->frame_view()) + ->GetClientBoundsForWindowBounds(window_bounds); + } + return window_bounds; } } // namespace
diff --git a/components/exo/shell_surface_unittest.cc b/components/exo/shell_surface_unittest.cc index 44f3988a..3a169e9 100644 --- a/components/exo/shell_surface_unittest.cc +++ b/components/exo/shell_surface_unittest.cc
@@ -2268,4 +2268,20 @@ EXPECT_EQ(expected, shell_surface->GetWidget()->GetWindowBoundsInScreen()); } +// Surfaces without non-client view should not crash. +TEST_F(ShellSurfaceTest, NoNonClientViewWithConfigure) { + // Popup windows don't have a non-client view. + auto shell_surface = + test::ShellSurfaceBuilder({20, 20}).SetAsPopup().BuildShellSurface(); + ShellSurfaceCallbacks callbacks; + + // Having a configure callback leads to a call to GetClientBoundsInScreen(). + shell_surface->set_configure_callback(base::BindRepeating( + &ShellSurfaceCallbacks::OnConfigure, base::Unretained(&callbacks))); + + shell_surface->SetWindowBounds(gfx::Rect(10, 10, 300, 300)); + EXPECT_TRUE(callbacks.configure_state); + EXPECT_EQ(callbacks.configure_state->bounds, gfx::Rect(10, 10, 300, 300)); +} + } // namespace exo
diff --git a/components/image_fetcher/core/DEPS b/components/image_fetcher/core/DEPS index 030417a3..5acac75 100644 --- a/components/image_fetcher/core/DEPS +++ b/components/image_fetcher/core/DEPS
@@ -5,4 +5,5 @@ "+ui/gfx/codec", "+ui/gfx/geomtery", "+ui/gfx/image", + "+third_party/skia/include", ]
diff --git a/components/image_fetcher/core/cached_image_fetcher.cc b/components/image_fetcher/core/cached_image_fetcher.cc index 7f4e524..79782c82 100644 --- a/components/image_fetcher/core/cached_image_fetcher.cc +++ b/components/image_fetcher/core/cached_image_fetcher.cc
@@ -17,6 +17,7 @@ #include "components/image_fetcher/core/image_decoder.h" #include "components/image_fetcher/core/image_fetcher_metrics_reporter.h" #include "components/image_fetcher/core/request_metadata.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h"
diff --git a/components/media_message_center/media_notification_background_ash_impl.h b/components/media_message_center/media_notification_background_ash_impl.h index 5d612f9..1c06226 100644 --- a/components/media_message_center/media_notification_background_ash_impl.h +++ b/components/media_message_center/media_notification_background_ash_impl.h
@@ -8,8 +8,11 @@ #include "components/media_message_center/media_notification_background.h" #include "base/component_export.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image_skia.h" +class SkPath; + namespace gfx { class Rect; }
diff --git a/components/media_message_center/media_notification_background_ash_impl_unittest.cc b/components/media_message_center/media_notification_background_ash_impl_unittest.cc index bfc22ba5..600999a2 100644 --- a/components/media_message_center/media_notification_background_ash_impl_unittest.cc +++ b/components/media_message_center/media_notification_background_ash_impl_unittest.cc
@@ -6,6 +6,7 @@ #include "base/i18n/rtl.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/rect.h" namespace media_message_center {
diff --git a/components/media_message_center/media_notification_background_impl.cc b/components/media_message_center/media_notification_background_impl.cc index 308f3b4..4b378a6 100644 --- a/components/media_message_center/media_notification_background_impl.cc +++ b/components/media_message_center/media_notification_background_impl.cc
@@ -10,6 +10,13 @@ #include "base/i18n/rtl.h" #include "cc/paint/paint_shader.h" #include "skia/ext/image_operations.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/skia/include/core/SkColor.h" +#include "third_party/skia/include/core/SkPath.h" +#include "third_party/skia/include/core/SkPathTypes.h" +#include "third_party/skia/include/core/SkPoint.h" +#include "third_party/skia/include/core/SkScalar.h" +#include "third_party/skia/include/core/SkTileMode.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" #include "ui/gfx/canvas.h"
diff --git a/components/media_message_center/media_notification_background_impl.h b/components/media_message_center/media_notification_background_impl.h index fc76a3e5..2f29ef70 100644 --- a/components/media_message_center/media_notification_background_impl.h +++ b/components/media_message_center/media_notification_background_impl.h
@@ -9,8 +9,11 @@ #include "base/gtest_prod_util.h" #include "components/media_message_center/media_notification_background.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/image/image_skia.h" +struct SkPoint; + namespace gfx { class Rect; class Size;
diff --git a/components/media_message_center/media_notification_background_impl_unittest.cc b/components/media_message_center/media_notification_background_impl_unittest.cc index afa8cb13..d7220f24 100644 --- a/components/media_message_center/media_notification_background_impl_unittest.cc +++ b/components/media_message_center/media_notification_background_impl_unittest.cc
@@ -11,6 +11,7 @@ #include "base/test/icu_test_util.h" #include "base/test/scoped_command_line.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/color_analysis.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/skia_conversions.h"
diff --git a/components/nacl/browser/BUILD.gn b/components/nacl/browser/BUILD.gn index 43e5e9b8..ba7c839 100644 --- a/components/nacl/browser/BUILD.gn +++ b/components/nacl/browser/BUILD.gn
@@ -70,10 +70,17 @@ ] deps += [ - "//components/nacl/loader:nacl_helper_integration", "//sandbox/linux:sandbox_services", "//sandbox/linux:suid_sandbox_client", ] + # TODO(https://crbug.com/1299021): Implement building the dependencies of + # this NaCl target as ARM32 when Chrome is built for ARM64 (for + # Linux/Chrome OS). + if (target_cpu != "arm64") { + deps += [ + "//components/nacl/loader:nacl_helper_integration", + ] + } } if (is_win && current_cpu == "x86") {
diff --git a/components/omnibox/browser/omnibox_edit_model.cc b/components/omnibox/browser/omnibox_edit_model.cc index 6735f7b6..ca64b66 100644 --- a/components/omnibox/browser/omnibox_edit_model.cc +++ b/components/omnibox/browser/omnibox_edit_model.cc
@@ -58,6 +58,7 @@ #include "net/cookies/cookie_util.h" #include "third_party/icu/source/common/unicode/ubidi.h" #include "third_party/metrics_proto/omnibox_event.pb.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/image/image.h"
diff --git a/components/omnibox/browser/omnibox_edit_model.h b/components/omnibox/browser/omnibox_edit_model.h index c3db7dda..4a1e5db 100644 --- a/components/omnibox/browser/omnibox_edit_model.h +++ b/components/omnibox/browser/omnibox_edit_model.h
@@ -25,6 +25,7 @@ #include "components/omnibox/browser/omnibox_view.h" #include "components/omnibox/common/omnibox_focus_state.h" #include "third_party/metrics_proto/omnibox_event.pb.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/base/window_open_disposition.h" #include "ui/gfx/native_widget_types.h" #include "url/gurl.h"
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc index 78476e7..06fb3e0 100644 --- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
@@ -285,7 +285,9 @@ navigation_handle, std::make_unique<PageLoadTracker>( in_foreground, embedder_interface_.get(), currently_committed_url, - !has_navigated_, navigation_handle, user_initiated_info))); + !has_navigated_, navigation_handle, user_initiated_info, + ukm::ConvertToSourceId(navigation_handle->GetNavigationId(), + ukm::SourceIdType::NAVIGATION_ID)))); DCHECK(insertion_result.second) << "provisional_loads_ already contains NavigationHandle."; for (auto& observer : lifecycle_observers_)
diff --git a/components/page_load_metrics/browser/observers/early_hints_page_load_metrics_observer_unittest.cc b/components/page_load_metrics/browser/observers/early_hints_page_load_metrics_observer_unittest.cc index d05cf12..3780d77 100644 --- a/components/page_load_metrics/browser/observers/early_hints_page_load_metrics_observer_unittest.cc +++ b/components/page_load_metrics/browser/observers/early_hints_page_load_metrics_observer_unittest.cc
@@ -55,6 +55,17 @@ } }; +// TODO(https://crbug.com/1301880): Add tests for other PageTypes. +TEST_F(EarlyHintsPageLoadMetricsObserverTest, PageType) { + NavigateAndCommit(GURL(kTestUrl)); + PopulateTimingForHistograms(); + tester()->NavigateToUntrackedUrl(); + + tester()->histogram_tester().ExpectUniqueSample( + page_load_metrics::internal::kPageLoadTrackerPageType, + page_load_metrics::internal::PageLoadTrackerPageType::kPrimaryPage, 1); +} + TEST_F(EarlyHintsPageLoadMetricsObserverTest, WithoutPreload) { NavigateAndCommit(GURL(kTestUrl)); PopulateTimingForHistograms();
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.cc b/components/page_load_metrics/browser/page_load_metrics_observer.cc index bdc2110..4164d16a 100644 --- a/components/page_load_metrics/browser/page_load_metrics_observer.cc +++ b/components/page_load_metrics/browser/page_load_metrics_observer.cc
@@ -90,6 +90,13 @@ } PageLoadMetricsObserver::ObservePolicy +PageLoadMetricsObserver::OnFencedFramesStart( + content::NavigationHandle* navigation_handle, + const GURL& currently_committed_url) { + return STOP_OBSERVING; +} + +PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnPrerenderStart( content::NavigationHandle* navigation_handle, const GURL& currently_committed_url) {
diff --git a/components/page_load_metrics/browser/page_load_metrics_observer.h b/components/page_load_metrics/browser/page_load_metrics_observer.h index 3b1946d..3530ca23 100644 --- a/components/page_load_metrics/browser/page_load_metrics_observer.h +++ b/components/page_load_metrics/browser/page_load_metrics_observer.h
@@ -250,6 +250,16 @@ const GURL& currently_committed_url, bool started_in_foreground); + // For FencedFrames pages, OnFencedFramesStart is called instead of OnStart. + // The default implementation returns STOP_OBSERVING, so that observers that + // are not aware of FencedFrames will not mix FencedFrames metrics into the + // existing reports. FencedFrames will show different characteristics as it's + // content is likely a subframe rather than a main frame. + // TODO(crbug.com/1301880): FencedFrames support is still in progress. + virtual ObservePolicy OnFencedFramesStart( + content::NavigationHandle* navigation_handle, + const GURL& currently_committed_url); + // For prerendered pages, OnPrerenderStart is called instead of OnStart. The // default implementation returns STOP_OBSERVING, so that observers that are // not aware of prerender will not see prerendered page loads.
diff --git a/components/page_load_metrics/browser/page_load_tracker.cc b/components/page_load_metrics/browser/page_load_tracker.cc index 99593e6..91305305 100644 --- a/components/page_load_metrics/browser/page_load_tracker.cc +++ b/components/page_load_metrics/browser/page_load_tracker.cc
@@ -12,7 +12,6 @@ #include "base/check_op.h" #include "base/metrics/histogram_functions.h" -#include "base/metrics/histogram_macros.h" #include "base/notreached.h" #include "base/strings/stringprintf.h" #include "base/time/default_tick_clock.h" @@ -54,14 +53,19 @@ const char kErrorEvents[] = "PageLoad.Internal.ErrorCode"; const char kPageLoadCompletedAfterAppBackground[] = "PageLoad.Internal.PageLoadCompleted.AfterAppBackground"; +const char kPageLoadPrerender2Event[] = "PageLoad.Internal.Prerender2.Event"; const char kPageLoadStartedInForeground[] = "PageLoad.Internal.NavigationStartedInForeground"; -const char kPageLoadPrerender2Event[] = "PageLoad.Internal.Prerender2.Event"; +const char kPageLoadTrackerPageType[] = "PageLoad.Internal.PageType"; } // namespace internal void RecordInternalError(InternalErrorLoadEvent event) { - UMA_HISTOGRAM_ENUMERATION(internal::kErrorEvents, event, ERR_LAST_ENTRY); + base::UmaHistogramEnumeration(internal::kErrorEvents, event, ERR_LAST_ENTRY); +} + +void RecordPageType(internal::PageLoadTrackerPageType type) { + base::UmaHistogramEnumeration(internal::kPageLoadTrackerPageType, type); } // TODO(csharrison): Add a case for client side redirects, which is what JS @@ -100,8 +104,8 @@ namespace { void RecordAppBackgroundPageLoadCompleted(bool completed_after_background) { - UMA_HISTOGRAM_BOOLEAN(internal::kPageLoadCompletedAfterAppBackground, - completed_after_background); + base::UmaHistogramBoolean(internal::kPageLoadCompletedAfterAppBackground, + completed_after_background); } void DispatchEventsAfterBackForwardCacheRestore( @@ -208,7 +212,8 @@ const GURL& currently_committed_url, bool is_first_navigation_in_web_contents, content::NavigationHandle* navigation_handle, - UserInitiatedInfo user_initiated_info) + UserInitiatedInfo user_initiated_info, + ukm::SourceId source_id) : did_stop_tracking_(false), app_entered_background_(false), navigation_start_(navigation_handle->NavigationStart()), @@ -223,6 +228,7 @@ user_initiated_info_(user_initiated_info), embedder_interface_(embedder_interface), metrics_update_dispatcher_(this, navigation_handle, embedder_interface), + source_id_(source_id), web_contents_(navigation_handle->GetWebContents()), is_first_navigation_in_web_contents_( is_first_navigation_in_web_contents) { @@ -235,15 +241,20 @@ base::UmaHistogramEnumeration( internal::kPageLoadPrerender2Event, internal::PageLoadPrerenderEvent::kNavigationInPrerenderedMainFrame); + RecordPageType(internal::PageLoadTrackerPageType::kPrerenderPage); + } else if (navigation_handle->GetNavigatingFrameType() == + content::FrameType::kFencedFrameRoot) { + INVOKE_AND_PRUNE_OBSERVERS(observers_, OnFencedFramesStart, + navigation_handle, currently_committed_url); + RecordPageType(internal::PageLoadTrackerPageType::kFencedFramesPage); } else { - source_id_ = ukm::ConvertToSourceId(navigation_handle->GetNavigationId(), - ukm::SourceIdType::NAVIGATION_ID); INVOKE_AND_PRUNE_OBSERVERS(observers_, OnStart, navigation_handle, currently_committed_url, started_in_foreground_); + RecordPageType(internal::PageLoadTrackerPageType::kPrimaryPage); } - UMA_HISTOGRAM_BOOLEAN(internal::kPageLoadStartedInForeground, - started_in_foreground_); + base::UmaHistogramBoolean(internal::kPageLoadStartedInForeground, + started_in_foreground_); } PageLoadTracker::~PageLoadTracker() {
diff --git a/components/page_load_metrics/browser/page_load_tracker.h b/components/page_load_metrics/browser/page_load_tracker.h index 18c363e..39384ca 100644 --- a/components/page_load_metrics/browser/page_load_tracker.h +++ b/components/page_load_metrics/browser/page_load_tracker.h
@@ -51,10 +51,20 @@ kMaxValue = kPrerenderActivationNavigation, }; +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. +enum class PageLoadTrackerPageType { + kPrimaryPage = 0, + kPrerenderPage = 1, + kFencedFramesPage = 2, + kMaxValue = kFencedFramesPage, +}; + extern const char kErrorEvents[]; extern const char kPageLoadCompletedAfterAppBackground[]; -extern const char kPageLoadStartedInForeground[]; extern const char kPageLoadPrerender2Event[]; +extern const char kPageLoadStartedInForeground[]; +extern const char kPageLoadTrackerPageType[]; } // namespace internal @@ -179,7 +189,8 @@ const GURL& currently_committed_url, bool is_first_navigation_in_web_contents, content::NavigationHandle* navigation_handle, - UserInitiatedInfo user_initiated_info); + UserInitiatedInfo user_initiated_info, + ukm::SourceId source_id); PageLoadTracker(const PageLoadTracker&) = delete; PageLoadTracker& operator=(const PageLoadTracker&) = delete; @@ -469,7 +480,7 @@ PageLoadMetricsUpdateDispatcher metrics_update_dispatcher_; - ukm::SourceId source_id_ = ukm::kInvalidSourceId; + ukm::SourceId source_id_; const raw_ptr<content::WebContents> web_contents_;
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 735c423..0ca85666 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -22582,7 +22582,7 @@ 'name': 'CloudReportingUploadFrequency', 'owners': ['zmin@chromium.org', 'file://components/enterprise/browser/reporting/OWNERS'], 'type': 'int', - 'schema': { 'type': 'integer', 'minimum': 3 , 'maximum': 168}, + 'schema': { 'type': 'integer', 'minimum': 3 , 'maximum': 24}, 'future_on': ['chrome.*', 'chrome_os', 'android', 'ios'], 'tags': ['admin-sharing', 'google-sharing'], 'features': {
diff --git a/components/power_scheduler/BUILD.gn b/components/power_scheduler/BUILD.gn index de699ec..0b30c732a 100644 --- a/components/power_scheduler/BUILD.gn +++ b/components/power_scheduler/BUILD.gn
@@ -18,15 +18,6 @@ "traced_power_mode.h", ] - if (is_android) { - sources += [ - "power_scheduler.cc", - "power_scheduler.h", - "power_scheduler_features.cc", - "power_scheduler_features.h", - ] - } - defines = [ "IS_POWER_SCHEDULER_IMPL" ] deps = [ @@ -39,10 +30,6 @@ testonly = true sources = [ "power_mode_arbiter_unittest.cc" ] - if (is_android) { - sources += [ "power_scheduler_unittest.cc" ] - } - deps = [ ":power_scheduler", "//base/test:test_support", @@ -50,18 +37,3 @@ "//testing/gtest", ] } - -if (is_android) { - java_cpp_features("java_features_srcjar") { - # External code should depend on ":power_scheduler_java" instead. - visibility = [ ":*" ] - sources = [ "power_scheduler_features.cc" ] - template = "java/src/org/chromium/components/power_scheduler/PowerSchedulerFeatures.java.tmpl" - } - - android_library("power_scheduler_java") { - # Right now, this only includes the Java features. But if we need more Java - # files, they should be added here as necessary. - srcjar_deps = [ ":java_features_srcjar" ] - } -}
diff --git a/components/power_scheduler/java/src/org/chromium/components/power_scheduler/PowerSchedulerFeatures.java.tmpl b/components/power_scheduler/java/src/org/chromium/components/power_scheduler/PowerSchedulerFeatures.java.tmpl deleted file mode 100644 index 20cd98d..0000000 --- a/components/power_scheduler/java/src/org/chromium/components/power_scheduler/PowerSchedulerFeatures.java.tmpl +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.components.power_scheduler; - -/** - * Constants for the names of PowerScheduler Features. - */ -public final class PowerSchedulerFeatures {{ - -{NATIVE_FEATURES} - - // Prevent instantiation. - private PowerSchedulerFeatures() {{}} -}}
diff --git a/components/power_scheduler/power_scheduler.cc b/components/power_scheduler/power_scheduler.cc deleted file mode 100644 index 8b5c8d9..0000000 --- a/components/power_scheduler/power_scheduler.cc +++ /dev/null
@@ -1,493 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/power_scheduler/power_scheduler.h" - -#include "base/command_line.h" -#include "base/containers/contains.h" -#include "base/cpu.h" -#include "base/cpu_affinity_posix.h" -#include "base/feature_list.h" -#include "base/lazy_instance.h" -#include "base/metrics/field_trial_params.h" -#include "base/metrics/histogram_functions.h" -#include "base/metrics/histogram_macros.h" -#include "base/no_destructor.h" -#include "base/process/process_handle.h" -#include "base/process/process_metrics.h" -#include "base/strings/string_number_conversions.h" -#include "base/strings/string_split.h" -#include "base/task/current_thread.h" -#include "base/task/thread_pool.h" -#include "base/threading/thread_task_runner_handle.h" -#include "base/trace_event/trace_event.h" -#include "base/trace_event/typed_macros.h" -#include "components/power_scheduler/power_scheduler_features.h" - -namespace power_scheduler { -namespace { - -// These values are persisted to logs. Entries should not be renumbered and -// numeric values should never be reused. -// Keep in sync with base::CpuAffinityMode and CpuAffinityMode in enums.xml. -enum class CpuAffinityModeForUma { - kDefault = 0, - kLittleCoresOnly = 1, - kBigCoresOnly = 2, - kBiggerCoresOnly = 3, - kMaxValue = kBiggerCoresOnly, -}; - -CpuAffinityModeForUma GetCpuAffinityModeForUma(base::CpuAffinityMode affinity) { - switch (affinity) { - case base::CpuAffinityMode::kDefault: - return CpuAffinityModeForUma::kDefault; - case base::CpuAffinityMode::kLittleCoresOnly: - return CpuAffinityModeForUma::kLittleCoresOnly; - case base::CpuAffinityMode::kBigCoresOnly: - return CpuAffinityModeForUma::kBigCoresOnly; - case base::CpuAffinityMode::kBiggerCoresOnly: - return CpuAffinityModeForUma::kBiggerCoresOnly; - } -} - -perfetto::StaticString TraceEventNameForAffinityMode( - base::CpuAffinityMode affinity) { - switch (affinity) { - case base::CpuAffinityMode::kDefault: - return "ApplyCpuAffinityModeDefault"; - case base::CpuAffinityMode::kLittleCoresOnly: - return "ApplyCpuAffinityModeLittleCoresOnly"; - case base::CpuAffinityMode::kBigCoresOnly: - return "ApplyCpuAffinityModeBigCoresOnly"; - case base::CpuAffinityMode::kBiggerCoresOnly: - return "ApplyCpuAffinityModeBiggerCoresOnly"; - } -} - -void ApplyProcessCpuAffinityMode(base::CpuAffinityMode affinity) { - TRACE_EVENT("power", TraceEventNameForAffinityMode(affinity)); - - // Restrict affinity of all existing threads of the current process. The - // affinity is inherited by any subsequently created thread. Other threads may - // already exist even during early startup (e.g. Java threads like - // RenderThread), so setting the affinity only for the current thread is not - // enough here. - bool success = base::SetProcessCpuAffinityMode( - base::GetCurrentProcessHandle(), affinity); - - base::UmaHistogramBoolean( - "Power.CpuAffinityExperiments.ProcessAffinityUpdateSuccess", success); - if (success) { - base::UmaHistogramEnumeration( - "Power.CpuAffinityExperiments.ProcessAffinityMode", - GetCpuAffinityModeForUma(affinity)); - } -} - -bool CpuAffinityApplicable() { - // For now, affinity modes only have an effect on big.LITTLE architectures. - return base::HasBigCpuCores(); -} - -// Default policy params for the PowerScheduler feature. Please update the -// comment in power_scheduler_features.cc when changing these defaults. -static constexpr SchedulingPolicyParams kDefaultParams{ - SchedulingPolicy::kThrottleIdleAndNopAnimation, base::Milliseconds(500), - 0.5f}; - -// Keys/values for the field trial params. -static const char kPolicyKey[] = "policy"; -static const char kPolicyLittleCoresOnly[] = "kLittleCoresOnly"; -static const char kPolicyThrottleIdle[] = "kThrottleIdle"; -static const char kPolicyThrottleIdleAndNopAnimation[] = - "kThrottleIdleAndNopAnimation"; -static const char kMinTimeInModeMsKey[] = "min_time_in_mode_ms"; -static const char kMinCputimeRatioKey[] = "min_cputime_ratio"; -static const char kProcessTypesKey[] = "process_types"; -static const char kIncludeChargingKey[] = "include_charging"; - -} // anonymous namespace - -PowerScheduler::PowerScheduler(PowerModeArbiter* arbiter) - : arbiter_(arbiter), - process_metrics_(base::ProcessMetrics::CreateCurrentProcessMetrics()) { - DETACH_FROM_SEQUENCE(thread_pool_checker_); -} - -PowerScheduler::~PowerScheduler() = default; - -// static -PowerScheduler* PowerScheduler::GetInstance() { - static base::NoDestructor<PowerScheduler> instance( - PowerModeArbiter::GetInstance()); - return instance.get(); -} - -void PowerScheduler::WillProcessTask(const base::PendingTask& pending_task, - bool was_blocked_or_low_priority) {} - -void PowerScheduler::DidProcessTask(const base::PendingTask& pending_task) { - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - ++task_counter_; - if (task_counter_ == kUpdateAfterEveryNTasks) { - thread_pool_task_runner_->PostTask( - FROM_HERE, base::BindOnce(&PowerScheduler::EnforceCpuAffinityOnSequence, - base::Unretained(this) // never destroyed. - )); - task_counter_ = 0; - } -} - -void PowerScheduler::OnPowerModeChanged(PowerMode old_mode, - PowerMode new_mode) { - TRACE_EVENT2("power", "PowerScheduler::OnPowerModeChanged", "old_mode", - PowerModeToString(old_mode), "new_mode", - PowerModeToString(new_mode)); - - OnPowerModeChangedOnSequence(old_mode, new_mode); -} - -void PowerScheduler::Setup() { - // The setup should be called once from the main thread. In single-process - // mode, it may later be called on other threads (which should be ignored). - if (did_call_setup_) - return; - - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - did_call_setup_ = true; - SetupTaskRunners(base::ThreadPool::CreateSequencedTaskRunner( - {base::TaskPriority::USER_BLOCKING, - base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})); -} - -void PowerScheduler::SetupTaskRunners( - scoped_refptr<base::TaskRunner> thread_pool_task_runner) { - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - main_thread_task_runner_ = base::SequencedTaskRunnerHandle::Get(); - thread_pool_task_runner_ = thread_pool_task_runner; - - if (pending_policy_.policy == SchedulingPolicy::kNone) - return; - - thread_pool_task_runner_->PostTask( - FROM_HERE, base::BindOnce(&PowerScheduler::SetupPolicyOnSequence, - base::Unretained(this), // never destroyed. - pending_policy_)); - pending_policy_ = SchedulingPolicyParams(); -} - -base::TimeDelta PowerScheduler::GetProcessCpuTime() { - return process_metrics_->GetCumulativeCPUUsage(); -} - -void PowerScheduler::InitializePolicyFromFeatureList() { - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - // To preserve earlier behavior of the field trials, check for the legacy - // features before checking if throttling is supported. - if (base::FeatureList::IsEnabled( - features::kCpuAffinityRestrictToLittleCores)) { - SetPolicy(SchedulingPolicy::kLittleCoresOnly); - return; - } - if (base::FeatureList::IsEnabled( - features::kPowerSchedulerThrottleIdleAndNopAnimation)) { - SetPolicy(SchedulingPolicy::kThrottleIdleAndNopAnimation); - return; - } - if (base::FeatureList::IsEnabled(features::kPowerSchedulerThrottleIdle)) { - SetPolicy(SchedulingPolicy::kThrottleIdle); - return; - } - if (base::FeatureList::IsEnabled( - features::kWebViewCpuAffinityRestrictToLittleCores)) { - SetPolicy(SchedulingPolicy::kLittleCoresOnly); - return; - } - if (base::FeatureList::IsEnabled( - features::kWebViewPowerSchedulerThrottleIdle)) { - SetPolicy(SchedulingPolicy::kThrottleIdle); - return; - } - - // Only check for the new feature after checking that throttling is supported. - if (!CpuAffinityApplicable()) - return; - - if (!base::FeatureList::IsEnabled(features::kPowerScheduler)) - return; - - SchedulingPolicyParams params = kDefaultParams; - - std::map<std::string, std::string> field_trial_params; - if (base::GetFieldTrialParamsByFeature(features::kPowerScheduler, - &field_trial_params)) { - auto policy_it = field_trial_params.find(kPolicyKey); - if (policy_it != field_trial_params.end()) { - if (policy_it->second == kPolicyLittleCoresOnly) { - params.policy = SchedulingPolicy::kLittleCoresOnly; - } else if (policy_it->second == kPolicyThrottleIdle) { - params.policy = SchedulingPolicy::kThrottleIdle; - } else if (policy_it->second == kPolicyThrottleIdleAndNopAnimation) { - params.policy = SchedulingPolicy::kThrottleIdleAndNopAnimation; - } - } - - int min_time_ms = 0; - if (base::StringToInt(field_trial_params[kMinTimeInModeMsKey], - &min_time_ms)) { - params.min_time_in_mode = base::Milliseconds(min_time_ms); - } - - double min_cputime_ratio = 0; - if (base::StringToDouble(field_trial_params[kMinCputimeRatioKey], - &min_cputime_ratio)) { - params.min_cputime_ratio = min_cputime_ratio; - } - - // If there is a process type allowlist, check if the current process's type - // is in it. Otherwise don't enable power scheduling. - const std::string& process_types = field_trial_params[kProcessTypesKey]; - if (!process_types.empty()) { - std::vector<std::string> split = base::SplitString( - process_types, ",", base::WhitespaceHandling::TRIM_WHITESPACE, - base::SplitResult::SPLIT_WANT_NONEMPTY); - - std::string process_type = - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("type"); - - if (process_type.empty()) { - if (!base::Contains(split, "browser")) - return; - } else if (!base::Contains(split, process_type)) { - return; - } - } - - bool include_charging = field_trial_params[kIncludeChargingKey] == "true"; - if (include_charging) - arbiter_->SetChargingModeEnabled(false); - } - - SetPolicy(params); -} - -void PowerScheduler::SetPolicy(SchedulingPolicy policy) { - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - SchedulingPolicyParams params; - params.policy = policy; - SetPolicy(params); -} - -void PowerScheduler::SetPolicy(SchedulingPolicyParams policy) { - DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_checker_); - - if (!CpuAffinityApplicable()) - return; - - // Little-only policy only makes sense without minimum times. - if (policy.policy == SchedulingPolicy::kLittleCoresOnly) { - policy.min_time_in_mode = base::TimeDelta(); - policy.min_cputime_ratio = 0; - } - - // Set up the power affinity observer and apply the policy if it's already - // possible. Otherwise it will be set up after thread initialization via - // Setup() (see app/content_main_runner_impl.cc and child/child_process.cc). - if (thread_pool_task_runner_) { - thread_pool_task_runner_->PostTask( - FROM_HERE, base::BindOnce(&PowerScheduler::SetupPolicyOnSequence, - base::Unretained(this), // never destroyed. - policy)); - } else { - pending_policy_ = policy; - } -} - -void PowerScheduler::SetupPolicyOnSequence(SchedulingPolicyParams policy) { - DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_checker_); - - // Reset the power mode in case it contains an obsolete value. - current_power_mode_ = PowerMode::kMaxValue; - current_policy_ = policy; - - bool needs_power_observer = - current_policy_.policy == SchedulingPolicy::kThrottleIdle || - current_policy_.policy == SchedulingPolicy::kThrottleIdleAndNopAnimation; - - if (needs_power_observer && !power_observer_registered_) { - arbiter_->AddObserver(this); - power_observer_registered_ = true; - } else if (!needs_power_observer && power_observer_registered_) { - arbiter_->RemoveObserver(this); - power_observer_registered_ = false; - } - - ApplyPolicyOnSequence(); -} - -void PowerScheduler::OnPowerModeChangedOnSequence(PowerMode old_mode, - PowerMode new_mode) { - DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_checker_); - - current_power_mode_ = new_mode; - ApplyPolicyOnSequence(); -} - -base::CpuAffinityMode PowerScheduler::GetTargetCpuAffinity() { - DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_checker_); - - bool is_throttleable_mode = false; - switch (current_policy_.policy) { - case SchedulingPolicy::kNone: - break; - case SchedulingPolicy::kLittleCoresOnly: - is_throttleable_mode = true; - break; - case SchedulingPolicy::kThrottleIdle: - is_throttleable_mode = current_power_mode_ == PowerMode::kIdle || - current_power_mode_ == PowerMode::kBackground; - break; - case SchedulingPolicy::kThrottleIdleAndNopAnimation: - is_throttleable_mode = current_power_mode_ == PowerMode::kIdle || - current_power_mode_ == PowerMode::kBackground || - current_power_mode_ == PowerMode::kNopAnimation; - break; - } - - bool currently_throttling = - enforced_affinity_ == base::CpuAffinityMode::kLittleCoresOnly; - - if (is_throttleable_mode == currently_throttling) { - time_entered_throttleable_mode_ = base::TimeTicks(); - cputime_entered_throttleable_mode_ = base::TimeDelta(); - return enforced_affinity_; - } - - // If we are in a throttleable mode, check if we've been in a throttleable - // mode for long enough and consumed enough CPU. Otherwise, don't change - // anything (yet) and schedule a follow-up check if needed. - if (is_throttleable_mode && current_policy_.min_time_in_mode.is_positive()) { - base::TimeTicks now = base::TimeTicks::Now(); - base::TimeDelta cumulative_cpu = GetProcessCpuTime(); - - if (time_entered_throttleable_mode_.is_null()) { - time_entered_throttleable_mode_ = now; - cputime_entered_throttleable_mode_ = cumulative_cpu; - thread_pool_task_runner_->PostDelayedTask( - FROM_HERE, - base::BindOnce(&PowerScheduler::ApplyPolicyOnSequence, - base::Unretained(this)), // never destroyed. - current_policy_.min_time_in_mode); - return enforced_affinity_; - } else { - bool minimums_exceeded = false; - base::TimeDelta time_elapsed = now - time_entered_throttleable_mode_; - base::TimeDelta cputime_elapsed = - cumulative_cpu - cputime_entered_throttleable_mode_; - minimums_exceeded = - time_elapsed >= current_policy_.min_time_in_mode && - cputime_elapsed >= time_elapsed * current_policy_.min_cputime_ratio; - - if (!minimums_exceeded) { - TRACE_EVENT_INSTANT2("power", "PowerScheduler.MinimumsNotExceeded", - TRACE_EVENT_SCOPE_THREAD, "time_elapsed_ms", - time_elapsed.InMilliseconds(), - "cputime_elapsed_ms", - cputime_elapsed.InMilliseconds()); - return enforced_affinity_; - } else { - TRACE_EVENT_INSTANT2("power", "PowerScheduler.MinimumsExceeded", - TRACE_EVENT_SCOPE_THREAD, "time_elapsed_ms", - time_elapsed.InMilliseconds(), - "cputime_elapsed_ms", - cputime_elapsed.InMilliseconds()); - } - } - } else { - time_entered_throttleable_mode_ = base::TimeTicks(); - cputime_entered_throttleable_mode_ = base::TimeDelta(); - } - - return is_throttleable_mode ? base::CpuAffinityMode::kLittleCoresOnly - : base::CpuAffinityMode::kDefault; -} - -void PowerScheduler::ApplyPolicyOnSequence() { - DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_checker_); - TRACE_EVENT0("power", "PowerScheduler::ApplyPolicyOnSequence"); - - base::CpuAffinityMode target_affinity = GetTargetCpuAffinity(); - if (target_affinity == enforced_affinity_) - return; - - base::TimeTicks now = base::TimeTicks::Now(); - if (target_affinity == base::CpuAffinityMode::kDefault && - !enforced_affinity_setup_time_.is_null()) { - auto throttling_duration = now - enforced_affinity_setup_time_; - UMA_HISTOGRAM_CUSTOM_TIMES("Power.PowerScheduler.ThrottlingDuration", - throttling_duration, base::Milliseconds(1), - base::Minutes(10), 100); - - UMA_HISTOGRAM_SCALED_ENUMERATION( - "Power.PowerScheduler.ThrottlingDurationPerCpuAffinityMode", - GetCpuAffinityModeForUma(enforced_affinity_), - throttling_duration.InMicroseconds(), - base::Time::kMicrosecondsPerMillisecond); - } - - if (target_affinity == base::CpuAffinityMode::kLittleCoresOnly) { - TRACE_EVENT_NESTABLE_ASYNC_BEGIN0("power", "PowerScheduler.LittleCoresOnly", - this); - } else { - TRACE_EVENT_NESTABLE_ASYNC_END0("power", "PowerScheduler.LittleCoresOnly", - this); - } - - enforced_affinity_setup_time_ = now; - enforced_affinity_ = target_affinity; - TRACE_EVENT_INSTANT1("power", "PowerScheduler.NewAffinity", - TRACE_EVENT_SCOPE_THREAD, "enforced_affinity", - enforced_affinity_); - EnforceCpuAffinityOnSequence(); -} - -void PowerScheduler::EnforceCpuAffinityOnSequence() { - DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_checker_); - - if (enforced_affinity_ != base::CurrentThreadCpuAffinityMode()) - ApplyProcessCpuAffinityMode(enforced_affinity_); - - // Android system may reset a non-default affinity setting, so we need to - // check periodically if we need to re-apply it. - bool mode_needs_periodic_enforcement = - enforced_affinity_ != base::CpuAffinityMode::kDefault; - - if (mode_needs_periodic_enforcement && !task_observer_registered_) { - main_thread_task_runner_->PostTask( - FROM_HERE, base::BindOnce( - [](PowerScheduler* scheduler) { - base::CurrentThread::Get()->AddTaskObserver(scheduler); - }, - base::Unretained(this))); // never deleted. - task_observer_registered_ = true; - } else if (!mode_needs_periodic_enforcement && task_observer_registered_) { - main_thread_task_runner_->PostTask( - FROM_HERE, - base::BindOnce( - [](PowerScheduler* scheduler) { - base::CurrentThread::Get()->RemoveTaskObserver(scheduler); - scheduler->task_counter_ = 0; - }, - base::Unretained(this))); // never deleted. - task_observer_registered_ = false; - } -} - -} // namespace power_scheduler
diff --git a/components/power_scheduler/power_scheduler.h b/components/power_scheduler/power_scheduler.h deleted file mode 100644 index a1dfdb50..0000000 --- a/components/power_scheduler/power_scheduler.h +++ /dev/null
@@ -1,142 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_H_ -#define COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_H_ - -#include "base/component_export.h" -#include "base/cpu_affinity_posix.h" -#include "base/memory/raw_ptr.h" -#include "base/no_destructor.h" -#include "base/process/process_metrics.h" -#include "base/task/task_observer.h" -#include "components/power_scheduler/power_mode_arbiter.h" - -namespace power_scheduler { - -enum class SchedulingPolicy { - kNone, - kLittleCoresOnly, - kThrottleIdle, - kThrottleIdleAndNopAnimation, -}; - -struct COMPONENT_EXPORT(POWER_SCHEDULER) SchedulingPolicyParams { - SchedulingPolicy policy = SchedulingPolicy::kNone; - - // If specified, the policy's throttling only takes effect after at least - // |min_time_in_mode| has elapsed since entering a throttleable PowerMode. - base::TimeDelta min_time_in_mode; - - // If specified, the policy's throttling only takes effect if the process has - // spent at least (min_cputime_ratio * elapsed time) CPU time since entering - // the throttleable mode. - double min_cputime_ratio = 0; -}; - -class COMPONENT_EXPORT(POWER_SCHEDULER) PowerScheduler - : public base::TaskObserver, - public power_scheduler::PowerModeArbiter::Observer { - public: - static PowerScheduler* GetInstance(); - - PowerScheduler(const PowerScheduler&) = delete; - PowerScheduler& operator=(const PowerScheduler&) = delete; - - // base::TaskObserver implementation. - void WillProcessTask(const base::PendingTask&, - bool was_blocked_or_low_priority) override; - void DidProcessTask(const base::PendingTask&) override; - - // power_scheduler::PowerModeArbiter::Observer implementation. - void OnPowerModeChanged(power_scheduler::PowerMode old_mode, - power_scheduler::PowerMode new_mode) override; - - // Set up the power observer if required by current policy. - // This function should be called from the main thread during the - // initialization of the process. Subsequent calls from other threads will - // have no effect. - void Setup(); - - // Set the scheduling policy based on the feature list and field trial - // parameters. Does not have any effect if the PowerScheduler features are - // disabled. Should be called on the process's main thread during process - // startup after feature list initialization. - void InitializePolicyFromFeatureList(); - - // Set the scheduling policy for the current process. Should be called on the - // process's main thread during process startup after feature list - // initialization. The affinity might change at runtime (e.g. after Chrome - // goes back from background), so the power scheduler will set up a polling - // mechanism to enforce the given mode. - void SetPolicy(SchedulingPolicy); - void SetPolicy(SchedulingPolicyParams); - - // Protected methods for testing. - protected: - PowerScheduler(PowerModeArbiter*); - ~PowerScheduler() override; - - void SetupTaskRunners( - scoped_refptr<base::TaskRunner> thread_pool_task_runner); - - base::CpuAffinityMode GetEnforcedCpuAffinityForTesting() { - return enforced_affinity_; - } - - // Virtual for testing. - virtual base::TimeDelta GetProcessCpuTime(); - - base::CpuAffinityMode GetTargetCpuAffinity(); - - // Set the CPU affinity of the current process and set up the polling - // mechanism to enforce the affinity mode. The check is implemented as a - // TaskObserver that runs every 100th main thread task. - // - // Virtual for testing. - virtual void EnforceCpuAffinityOnSequence(); - - SchedulingPolicyParams GetPolicyForTesting() { return current_policy_; } - - private: - friend class base::NoDestructor<PowerScheduler>; - - // Register the power mode observer and apply the current policy if necessary. - void SetupPolicyOnSequence(SchedulingPolicyParams); - - void OnPowerModeChangedOnSequence(power_scheduler::PowerMode old_mode, - power_scheduler::PowerMode new_mode); - - // Apply CPU affinity settings according to current policy and power mode. - void ApplyPolicyOnSequence(); - - SEQUENCE_CHECKER(main_thread_checker_); - SEQUENCE_CHECKER(thread_pool_checker_); - - scoped_refptr<base::TaskRunner> main_thread_task_runner_; - scoped_refptr<base::TaskRunner> thread_pool_task_runner_; - - // Accessed only on the main thread. - static constexpr int kUpdateAfterEveryNTasks = 100; - int task_counter_ = 0; - bool did_call_setup_ = false; - SchedulingPolicyParams pending_policy_; - - // Accessed only on the |thread_pool_task_runner_| sequence. - raw_ptr<PowerModeArbiter> arbiter_; - bool power_observer_registered_ = false; - bool task_observer_registered_ = false; - base::CpuAffinityMode enforced_affinity_ = base::CpuAffinityMode::kDefault; - base::TimeTicks enforced_affinity_setup_time_; - power_scheduler::PowerMode current_power_mode_ = - power_scheduler::PowerMode::kMaxValue; - SchedulingPolicyParams current_policy_; - base::TimeTicks time_entered_throttleable_mode_; - base::TimeDelta cputime_entered_throttleable_mode_; - std::unique_ptr<base::ProcessMetrics> process_metrics_; -}; - -} // namespace power_scheduler - -#endif // COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_H_
diff --git a/components/power_scheduler/power_scheduler_features.cc b/components/power_scheduler/power_scheduler_features.cc deleted file mode 100644 index 9c1b3283..0000000 --- a/components/power_scheduler/power_scheduler_features.cc +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/power_scheduler/power_scheduler_features.h" - -namespace power_scheduler { -namespace features { - -// Enables the power scheduler. Defaults to throttling when idle or in no-op -// animations, if at least 250ms of CPU time were spent in the first 500ms after -// entering idle/no-op animation mode. Can be further configured via field trial -// parameters, see power_scheduler.h/cc for details. -const base::Feature kPowerScheduler{"PowerScheduler", - base::FEATURE_DISABLED_BY_DEFAULT}; - -// Restricts all of Chrome's threads to use only LITTLE cores on big.LITTLE -// architectures. -const base::Feature kCpuAffinityRestrictToLittleCores{ - "CpuAffinityRestrictToLittleCores", base::FEATURE_DISABLED_BY_DEFAULT}; - -// Restricts all of Chrome's threads to use only LITTLE cores on big.LITTLE -// architectures when the detected PowerMode is kIdle or kBackground. -const base::Feature kPowerSchedulerThrottleIdle{ - "PowerSchedulerThrottleIdle", base::FEATURE_DISABLED_BY_DEFAULT}; - -// Restricts all of Chrome's threads to use only LITTLE cores on big.LITTLE -// architectures when the detected PowerMode is kIdle, kBackground, or -// kNopAnimation. -const base::Feature kPowerSchedulerThrottleIdleAndNopAnimation{ - "PowerSchedulerThrottleIdleAndNopAnimation", - base::FEATURE_DISABLED_BY_DEFAULT}; - -// Restricts WebView child processes to use only LITTLE cores on big.LITTLE -// architectures. -const base::Feature kWebViewCpuAffinityRestrictToLittleCores{ - "WebViewCpuAffinityRestrictToLittleCores", - base::FEATURE_DISABLED_BY_DEFAULT}; - -// Restricts all of WebView's out-of-process renderer threads to use only LITTLE -// cores on big.LITTLE architectures when the power mode is idle. -const base::Feature kWebViewPowerSchedulerThrottleIdle{ - "WebViewPowerSchedulerThrottleIdle", base::FEATURE_DISABLED_BY_DEFAULT}; - -} // namespace features -} // namespace power_scheduler
diff --git a/components/power_scheduler/power_scheduler_features.h b/components/power_scheduler/power_scheduler_features.h deleted file mode 100644 index bb0ffcd6..0000000 --- a/components/power_scheduler/power_scheduler_features.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_FEATURES_H_ -#define COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_FEATURES_H_ - -#include "base/component_export.h" -#include "base/feature_list.h" - -namespace power_scheduler { -namespace features { - -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kPowerScheduler; - -// Features supported for legacy reasons. -// TODO(eseckler): Remove once use cases for these have been migrated. -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kCpuAffinityRestrictToLittleCores; -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kPowerSchedulerThrottleIdle; -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kPowerSchedulerThrottleIdleAndNopAnimation; -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kWebViewCpuAffinityRestrictToLittleCores; -COMPONENT_EXPORT(POWER_SCHEDULER) -extern const base::Feature kWebViewPowerSchedulerThrottleIdle; - -} // namespace features -} // namespace power_scheduler - -#endif // COMPONENTS_POWER_SCHEDULER_POWER_SCHEDULER_FEATURES_H_
diff --git a/components/power_scheduler/power_scheduler_unittest.cc b/components/power_scheduler/power_scheduler_unittest.cc deleted file mode 100644 index 52324127..0000000 --- a/components/power_scheduler/power_scheduler_unittest.cc +++ /dev/null
@@ -1,318 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "components/power_scheduler/power_scheduler.h" - -#include "base/test/scoped_command_line.h" -#include "base/test/scoped_feature_list.h" -#include "base/test/task_environment.h" -#include "components/power_scheduler/power_scheduler_features.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace power_scheduler { - -class TestPowerScheduler : public PowerScheduler { - public: - TestPowerScheduler(PowerModeArbiter* arbiter) : PowerScheduler(arbiter) {} - - base::CpuAffinityMode GetTargetCpuAffinity() { - return PowerScheduler::GetTargetCpuAffinity(); - } - - SchedulingPolicyParams GetPolicy() { return GetPolicyForTesting(); } - - base::CpuAffinityMode last_enforced_affinity_mode() { - return last_enforced_affinity_mode_; - } - - void SetTaskRunner(scoped_refptr<base::TaskRunner> thread_pool_task_runner) { - SetupTaskRunners(thread_pool_task_runner); - } - - base::CpuAffinityMode last_enforced_affinity_mode_ = - base::CpuAffinityMode::kDefault; - - void AdvanceCpuTime(base::TimeDelta cpu_time) { cpu_time_ += cpu_time; } - - protected: - void EnforceCpuAffinityOnSequence() override { - last_enforced_affinity_mode_ = GetEnforcedCpuAffinityForTesting(); - } - - base::TimeDelta GetProcessCpuTime() override { return cpu_time_; } - - base::TimeDelta cpu_time_; -}; - -class PowerSchedulerTest : public testing::Test { - public: - PowerSchedulerTest() - : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME), - scheduler_(&arbiter_) { - scheduler_.SetTaskRunner(base::SequencedTaskRunnerHandle::Get()); - } - ~PowerSchedulerTest() override = default; - - void SetPolicyAndExpect(SchedulingPolicy policy, - base::CpuAffinityMode affinity) { - SchedulingPolicyParams params; - params.policy = policy; - SetPolicyAndExpect(params, affinity); - } - - void SetPolicyAndExpect(SchedulingPolicyParams policy, - base::CpuAffinityMode affinity) { - scheduler_.SetPolicy(policy); - Expect(affinity); - } - - void SetPowerModeAndExpect(PowerMode mode, base::CpuAffinityMode affinity) { - SCOPED_TRACE(std::string(PowerModeToString(mode)) + ", " + - (affinity == base::CpuAffinityMode::kLittleCoresOnly - ? "kLittleCoresOnly" - : "kDefault")); - scheduler_.OnPowerModeChanged(last_power_mode_, mode); - last_power_mode_ = mode; - Expect(affinity); - } - - void Expect(base::CpuAffinityMode affinity) { - task_environment_.RunUntilIdle(); - if (!base::HasBigCpuCores()) - affinity = base::CpuAffinityMode::kDefault; - EXPECT_EQ(scheduler_.GetTargetCpuAffinity(), affinity); - EXPECT_EQ(scheduler_.last_enforced_affinity_mode(), affinity); - } - - void ExpectPolicy(SchedulingPolicy policy, - int min_time_in_mode_ms, - double min_cputime_ratio) { - task_environment_.RunUntilIdle(); - if (!base::HasBigCpuCores()) { - policy = SchedulingPolicy::kNone; - min_time_in_mode_ms = 0; - min_cputime_ratio = 0; - } - EXPECT_EQ(scheduler_.GetPolicy().policy, policy); - EXPECT_EQ(scheduler_.GetPolicy().min_time_in_mode, - base::Milliseconds(min_time_in_mode_ms)); - EXPECT_NEAR(scheduler_.GetPolicy().min_cputime_ratio, min_cputime_ratio, - 0.01); - } - - protected: - base::test::TaskEnvironment task_environment_; - PowerModeArbiter arbiter_; - TestPowerScheduler scheduler_; - PowerMode last_power_mode_ = PowerMode::kMaxValue; -}; - -TEST_F(PowerSchedulerTest, NoPolicy) { - EXPECT_EQ(scheduler_.GetTargetCpuAffinity(), base::CpuAffinityMode::kDefault); - EXPECT_EQ(scheduler_.last_enforced_affinity_mode(), - base::CpuAffinityMode::kDefault); - - SetPolicyAndExpect(SchedulingPolicy::kNone, base::CpuAffinityMode::kDefault); -} - -TEST_F(PowerSchedulerTest, LittleCoresOnly) { - SetPolicyAndExpect(SchedulingPolicy::kLittleCoresOnly, - base::CpuAffinityMode::kLittleCoresOnly); -} - -TEST_F(PowerSchedulerTest, ThrottleIdle) { - SetPolicyAndExpect(SchedulingPolicy::kThrottleIdle, - base::CpuAffinityMode::kDefault); - - SetPowerModeAndExpect(PowerMode::kAnimation, base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, - base::CpuAffinityMode::kLittleCoresOnly); - SetPowerModeAndExpect(PowerMode::kAnimation, base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kNopAnimation, - base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, - base::CpuAffinityMode::kLittleCoresOnly); -} - -TEST_F(PowerSchedulerTest, ThrottleIdleAndNopAnimation) { - SetPolicyAndExpect(SchedulingPolicy::kThrottleIdleAndNopAnimation, - base::CpuAffinityMode::kDefault); - - SetPowerModeAndExpect(PowerMode::kAnimation, base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, - base::CpuAffinityMode::kLittleCoresOnly); - SetPowerModeAndExpect(PowerMode::kAnimation, base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kNopAnimation, - base::CpuAffinityMode::kLittleCoresOnly); - SetPowerModeAndExpect(PowerMode::kIdle, - base::CpuAffinityMode::kLittleCoresOnly); -} - -TEST_F(PowerSchedulerTest, ThrottleIdleWithMinimums) { - SchedulingPolicyParams params{SchedulingPolicy::kThrottleIdle, - base::Milliseconds(500), 0.5}; - SetPolicyAndExpect(params, base::CpuAffinityMode::kDefault); - - SetPowerModeAndExpect(PowerMode::kIdle, base::CpuAffinityMode::kDefault); - // Advancing time without incrementing CPU - stay unthrottled. - task_environment_.FastForwardBy(params.min_time_in_mode); - Expect(base::CpuAffinityMode::kDefault); - - for (int i = 0; i < 3; i++) { - SetPowerModeAndExpect(PowerMode::kAnimation, - base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, base::CpuAffinityMode::kDefault); - // Advancing time with incrementing CPU above min - throttle. - scheduler_.AdvanceCpuTime(base::Milliseconds(300)); - task_environment_.FastForwardBy(params.min_time_in_mode); - Expect(base::CpuAffinityMode::kLittleCoresOnly); - - // Reset to default occurs immediately. - SetPowerModeAndExpect(PowerMode::kAnimation, - base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, base::CpuAffinityMode::kDefault); - // Advancing time with incrementing CPU below min - stay unthrottled. - scheduler_.AdvanceCpuTime(base::Milliseconds(100)); - task_environment_.FastForwardBy(params.min_time_in_mode); - Expect(base::CpuAffinityMode::kDefault); - } - - // Timer resets after each change of modes. - for (int i = 0; i < 3; i++) { - SetPowerModeAndExpect(PowerMode::kAnimation, - base::CpuAffinityMode::kDefault); - SetPowerModeAndExpect(PowerMode::kIdle, base::CpuAffinityMode::kDefault); - scheduler_.AdvanceCpuTime(base::Milliseconds(300)); - task_environment_.FastForwardBy(params.min_time_in_mode / 2); - Expect(base::CpuAffinityMode::kDefault); - } -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListEmpty) { - scheduler_.InitializePolicyFromFeatureList(); - EXPECT_EQ(scheduler_.GetPolicy().policy, SchedulingPolicy::kNone); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListLittleOnly) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature(features::kCpuAffinityRestrictToLittleCores); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kLittleCoresOnly, 0, 0); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListIdle) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature(features::kPowerSchedulerThrottleIdle); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 0, 0); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListIdleAndNopAnimation) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature( - features::kPowerSchedulerThrottleIdleAndNopAnimation); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdleAndNopAnimation, 0, 0); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListWebViewLittleOnly) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature(features::kWebViewCpuAffinityRestrictToLittleCores); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kLittleCoresOnly, 0, 0); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListWebViewIdle) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature(features::kWebViewPowerSchedulerThrottleIdle); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 0, 0); -} - -TEST_F(PowerSchedulerTest, InitializePolicyFromFeatureListPowerScheduler) { - base::test::ScopedFeatureList list; - list.InitAndEnableFeature(features::kPowerScheduler); - scheduler_.InitializePolicyFromFeatureList(); - // No field trial params, use built-in defaults. - ExpectPolicy(SchedulingPolicy::kThrottleIdleAndNopAnimation, 500, 0.5); -} - -TEST_F(PowerSchedulerTest, - InitializePolicyFromFeatureListPowerSchedulerWithParams) { - base::test::ScopedFeatureList list; - base::FieldTrialParams params; - params["policy"] = "kThrottleIdle"; - params["min_time_in_mode_ms"] = "1000"; - params["min_cputime_ratio"] = "1.0"; - params["include_charging"] = "false"; - list.InitAndEnableFeatureWithParameters(features::kPowerScheduler, params); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 1000, 1.0); -} - -TEST_F(PowerSchedulerTest, - InitializePolicyFromFeatureListPowerSchedulerWithParamsIncludeCharging) { - base::test::ScopedFeatureList list; - base::FieldTrialParams params; - params["policy"] = "kThrottleIdle"; - params["min_time_in_mode_ms"] = "1000"; - params["min_cputime_ratio"] = "1.0"; - params["include_charging"] = "true"; - list.InitAndEnableFeatureWithParameters(features::kPowerScheduler, params); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 1000, 1.0); - - if (base::HasBigCpuCores()) { - // |include_charging| disables kCharging modes in the arbiter. - std::unique_ptr<PowerModeVoter> voter = arbiter_.NewVoter("test"); - voter->VoteFor(PowerMode::kCharging); - EXPECT_EQ(arbiter_.GetActiveModeForTesting(), PowerMode::kIdle); - } -} - -TEST_F(PowerSchedulerTest, - InitializePolicyFromFeatureListPowerSchedulerWithParamsAllowedRenderer) { - base::test::ScopedCommandLine original_command_line; - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII("type", "renderer"); - base::test::ScopedFeatureList list; - base::FieldTrialParams params; - params["policy"] = "kThrottleIdle"; - params["min_time_in_mode_ms"] = "1000"; - params["min_cputime_ratio"] = "1.0"; - params["process_types"] = "browser,renderer"; - list.InitAndEnableFeatureWithParameters(features::kPowerScheduler, params); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 1000, 1.0); -} - -TEST_F(PowerSchedulerTest, - InitializePolicyFromFeatureListPowerSchedulerWithParamsAllowedBrowser) { - base::test::ScopedFeatureList list; - base::FieldTrialParams params; - params["policy"] = "kThrottleIdle"; - params["min_time_in_mode_ms"] = "1000"; - params["min_cputime_ratio"] = "1.0"; - params["process_types"] = "browser,renderer"; - list.InitAndEnableFeatureWithParameters(features::kPowerScheduler, params); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kThrottleIdle, 1000, 1.0); -} - -TEST_F(PowerSchedulerTest, - InitializePolicyFromFeatureListPowerSchedulerWithParamsBlockedRenderer) { - base::test::ScopedCommandLine original_command_line; - base::CommandLine::ForCurrentProcess()->AppendSwitchASCII("type", "renderer"); - base::test::ScopedFeatureList list; - base::FieldTrialParams params; - params["policy"] = "kThrottleIdle"; - params["min_time_in_mode_ms"] = "1000"; - params["min_cputime_ratio"] = "1.0"; - params["process_types"] = "browser"; - list.InitAndEnableFeatureWithParameters(features::kPowerScheduler, params); - scheduler_.InitializePolicyFromFeatureList(); - ExpectPolicy(SchedulingPolicy::kNone, 0, 0); -} - -} // namespace power_scheduler \ No newline at end of file
diff --git a/components/query_tiles/internal/tile_config.cc b/components/query_tiles/internal/tile_config.cc index cce11da..f09ed0d 100644 --- a/components/query_tiles/internal/tile_config.cc +++ b/components/query_tiles/internal/tile_config.cc
@@ -117,10 +117,14 @@ // Json Experiment tag for ranking tiles on server based on client context. const char kQueryTilesRankTilesExperimentTag[] = "\"rankTiles\": \"true\""; -// Default Json experiment tag for trending query enabled countries. -constexpr char kDefaultExperimentTagForTrendingEnabledCountries[] = +// Default Json experiment tag for IN and NG. +constexpr char kDefaultExperimentTagForINAndNG[] = "{maxLevels : 1, enableTrending : true, maxTrendingQueries : 8}"; +// Default Json experiment tag for JP. +constexpr char kDefaultExperimentTagForJP[] = + "{maxLevels : 1, rankTiles : true}"; + const GURL BuildGetQueryTileURL(const GURL& base_url, const char* path) { GURL::Replacements replacements; replacements.SetPathStr(path); @@ -186,7 +190,12 @@ !base::FeatureList::IsEnabled( query_tiles::features::kQueryTilesDisableCountryOverride) && features::IsQueryTilesEnabledForCountry(country_code)) { - return kDefaultExperimentTagForTrendingEnabledCountries; + if (base::EqualsCaseInsensitiveASCII(country_code, "IN") || + base::EqualsCaseInsensitiveASCII(country_code, "NG")) { + return kDefaultExperimentTagForINAndNG; + } else if (base::EqualsCaseInsensitiveASCII(country_code, "JP")) { + return kDefaultExperimentTagForJP; + } } return tag; }
diff --git a/components/query_tiles/internal/tile_config_unittest.cc b/components/query_tiles/internal/tile_config_unittest.cc index d14a7e3e..5f156ee 100644 --- a/components/query_tiles/internal/tile_config_unittest.cc +++ b/components/query_tiles/internal/tile_config_unittest.cc
@@ -89,11 +89,25 @@ // Test to verify the default params for enabled countries. TEST(TileConfigTest, ExperimentTagForEnabledCountries) { base::test::ScopedFeatureList feature_list; - EXPECT_FALSE(TileConfig::GetIsUnMeteredNetworkRequired()); EXPECT_EQ(TileConfig::GetExperimentTag("in"), "{maxLevels : 1, enableTrending : true, maxTrendingQueries : 8}"); EXPECT_EQ(TileConfig::GetExperimentTag("in"), TileConfig::GetExperimentTag("ng")); + EXPECT_EQ(TileConfig::GetExperimentTag("jp"), + "{maxLevels : 1, rankTiles : true}"); + + // Finch params should override default values. + std::map<std::string, std::string> params = { + {kExperimentTagKey, + "{maxLevels : 1, enableTrending : true, rankTiles : true}"}}; + feature_list.InitAndEnableFeatureWithParameters(features::kQueryTiles, + params); + EXPECT_EQ(TileConfig::GetExperimentTag("in"), + "{maxLevels : 1, enableTrending : true, rankTiles : true}"); + EXPECT_EQ(TileConfig::GetExperimentTag("in"), + TileConfig::GetExperimentTag("ng")); + EXPECT_EQ(TileConfig::GetExperimentTag("in"), + TileConfig::GetExperimentTag("JP")); } } // namespace query_tiles
diff --git a/components/query_tiles/switches.cc b/components/query_tiles/switches.cc index ba0f30d..3a073a3e 100644 --- a/components/query_tiles/switches.cc +++ b/components/query_tiles/switches.cc
@@ -29,7 +29,7 @@ "QueryTilesDisableCountryOverride", base::FEATURE_DISABLED_BY_DEFAULT}; bool IsQueryTilesEnabledForCountry(const std::string& country_code) { - std::string enabled_countries[] = {"IN", "NG"}; + std::string enabled_countries[] = {"IN", "NG", "JP"}; for (const auto& country : enabled_countries) { if (base::EqualsCaseInsensitiveASCII(country_code, country)) return true;
diff --git a/components/safe_browsing/content/browser/password_protection/password_protection_service_unittest.cc b/components/safe_browsing/content/browser/password_protection/password_protection_service_unittest.cc index 80367052..275095e 100644 --- a/components/safe_browsing/content/browser/password_protection/password_protection_service_unittest.cc +++ b/components/safe_browsing/content/browser/password_protection/password_protection_service_unittest.cc
@@ -1381,24 +1381,6 @@ LoginReputationClientResponse::LOW_REPUTATION)); { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndDisableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - - // Don't show modal warning if non-sync gaia account experiment is not - // on. - reused_password_account_type.set_account_type( - ReusedPasswordAccountType::GMAIL); - reused_password_account_type.set_is_account_syncing(false); - EXPECT_FALSE(password_protection_service_->ShouldShowModalWarning( - LoginReputationClientRequest::PASSWORD_REUSE_EVENT, - reused_password_account_type, LoginReputationClientResponse::PHISHING)); - } - { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndEnableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - // Show modal warning if non-sync gaia account experiment is on. reused_password_account_type.set_account_type( ReusedPasswordAccountType::GMAIL); reused_password_account_type.set_is_account_syncing(false); @@ -1421,41 +1403,14 @@ reused_password_account_type, LoginReputationClientResponse::PHISHING)); { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndEnableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - reused_password_account_type.set_account_type( ReusedPasswordAccountType::GMAIL); reused_password_account_type.set_is_account_syncing(true); - // If kPasswordProtectionForSignedInUsers is enabled, then password reuse - // warnings are supported for both saved passwords and GMAIL passwords on - // both desktop and Android platforms. EXPECT_TRUE(password_protection_service_->ShouldShowModalWarning( LoginReputationClientRequest::PASSWORD_REUSE_EVENT, reused_password_account_type, LoginReputationClientResponse::PHISHING)); } - { - // TODO(crbug.com/1237388): Remove it once the flag is completed removed. - base::test::ScopedFeatureList feature_list; - feature_list.InitAndDisableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - - reused_password_account_type.set_account_type( - ReusedPasswordAccountType::GMAIL); - reused_password_account_type.set_is_account_syncing(true); -// If kPasswordProtectionForSignedInUsers is disabled, then GMAIL password -// reuse warnings are only supported on desktop platforms. -#if BUILDFLAG(IS_ANDROID) - EXPECT_FALSE(password_protection_service_->ShouldShowModalWarning( -#else - EXPECT_TRUE(password_protection_service_->ShouldShowModalWarning( -#endif - LoginReputationClientRequest::PASSWORD_REUSE_EVENT, - reused_password_account_type, LoginReputationClientResponse::PHISHING)); - } - // For a GSUITE account, don't show warning if password protection is set to // off by enterprise policy. reused_password_account_type.set_account_type( @@ -1567,14 +1522,6 @@ PasswordType::ENTERPRISE_PASSWORD)); EXPECT_TRUE(password_protection_service_->IsSupportedPasswordTypeForPinging( PasswordType::SAVED_PASSWORD)); - { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndDisableFeature( - safe_browsing::kPasswordProtectionForSignedInUsers); - EXPECT_FALSE( - password_protection_service_->IsSupportedPasswordTypeForPinging( - PasswordType::OTHER_GAIA_PASSWORD)); - } } TEST_P(PasswordProtectionServiceBaseTest, TestPingsForAboutBlank) {
diff --git a/components/safe_browsing/core/browser/db/v4_database.cc b/components/safe_browsing/core/browser/db/v4_database.cc index f2f7d33..21efbfc2 100644 --- a/components/safe_browsing/core/browser/db/v4_database.cc +++ b/components/safe_browsing/core/browser/db/v4_database.cc
@@ -29,6 +29,7 @@ namespace { const char kV4DatabaseSizeMetric[] = "SafeBrowsing.V4Database.Size"; +const char kV4DatabaseSizeLinearMetric[] = "SafeBrowsing.V4Database.SizeLinear"; // The factory that controls the creation of the V4Database object. base::LazyInstance<std::unique_ptr<V4DatabaseFactory>>::Leaky g_db_factory = @@ -335,6 +336,11 @@ } const int64_t db_size_kilobytes = static_cast<int64_t>(db_size / 1024); UMA_HISTOGRAM_COUNTS_1M(kV4DatabaseSizeMetric, db_size_kilobytes); + + const int64_t db_size_megabytes = + static_cast<int64_t>(db_size_kilobytes / 1024); + UMA_HISTOGRAM_EXACT_LINEAR(kV4DatabaseSizeLinearMetric, db_size_megabytes, + 50); } void V4Database::CollectDatabaseInfo(
diff --git a/components/safe_browsing/core/browser/password_protection/password_protection_request.cc b/components/safe_browsing/core/browser/password_protection/password_protection_request.cc index 3ceedd3cb..5a491a4 100644 --- a/components/safe_browsing/core/browser/password_protection/password_protection_request.cc +++ b/components/safe_browsing/core/browser/password_protection/password_protection_request.cc
@@ -283,15 +283,12 @@ break; } } - if (base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers)) { - ReusedPasswordAccountType password_account_type_to_add = - password_protection_service_ - ->GetPasswordProtectionReusedPasswordAccountType(password_type_, - username_); - *reuse_event->mutable_reused_password_account_type() = - password_account_type_to_add; - } + ReusedPasswordAccountType password_account_type_to_add = + password_protection_service_ + ->GetPasswordProtectionReusedPasswordAccountType(password_type_, + username_); + *reuse_event->mutable_reused_password_account_type() = + password_account_type_to_add; break; } default:
diff --git a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.cc b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.cc index ff009fd..0f73eeea8 100644 --- a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.cc +++ b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.cc
@@ -153,9 +153,7 @@ bool PasswordProtectionServiceBase:: IsSyncingGMAILPasswordWithSignedInProtectionEnabled( ReusedPasswordAccountType password_type) const { - return base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers) && - password_type.account_type() == ReusedPasswordAccountType::GMAIL && + return password_type.account_type() == ReusedPasswordAccountType::GMAIL && password_type.is_account_syncing(); } @@ -177,12 +175,6 @@ CacheVerdict(request->main_frame_url(), request->trigger_type(), password_type, *response, base::Time::Now()); } - bool enable_warning_for_non_sync_users = base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers); - if (!enable_warning_for_non_sync_users && - request->password_type() == PasswordType::OTHER_GAIA_PASSWORD) { - return; - } // If it's password alert mode and a Gsuite/enterprise account, we do not // show a modal warning. @@ -410,8 +402,7 @@ case PasswordType::ENTERPRISE_PASSWORD: return true; case PasswordType::OTHER_GAIA_PASSWORD: - return base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers); + return true; case PasswordType::PASSWORD_TYPE_UNKNOWN: case PasswordType::PASSWORD_TYPE_COUNT: return false; @@ -438,9 +429,7 @@ password_type.account_type() != ReusedPasswordAccountType::GSUITE) return false; - return password_type.is_account_syncing() || - base::FeatureList::IsEnabled( - safe_browsing::kPasswordProtectionForSignedInUsers); + return true; #endif }
diff --git a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h index b3527803..13d254e 100644 --- a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h +++ b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h
@@ -267,8 +267,7 @@ const GURL& main_frame_url, ReusedPasswordAccountType password_type); - // If ReusedPasswordAccountType is GMAIL and syncing and - // kPasswordProtectionForSignedInUsers is enabled. + // If ReusedPasswordAccountType is GMAIL and syncing. bool IsSyncingGMAILPasswordWithSignedInProtectionEnabled( ReusedPasswordAccountType password_type) const;
diff --git a/components/safe_browsing/core/common/features.cc b/components/safe_browsing/core/common/features.cc index 648859a..eb2e421 100644 --- a/components/safe_browsing/core/common/features.cc +++ b/components/safe_browsing/core/common/features.cc
@@ -116,10 +116,6 @@ "SafeBrowsingOmitNonUserGesturesFromReferrerChain", base::FEATURE_ENABLED_BY_DEFAULT}; -const base::Feature kPasswordProtectionForSignedInUsers{ - "SafeBrowsingPasswordProtectionForSignedInUsers", - base::FEATURE_ENABLED_BY_DEFAULT}; - const base::Feature kPromptEsbForDeepScanning{ "SafeBrowsingPromptEsbForDeepScanning", base::FEATURE_ENABLED_BY_DEFAULT}; @@ -139,11 +135,6 @@ const base::Feature kSafeBrowsingPageLoadToken{ "SafeBrowsingPageLoadToken", base::FEATURE_ENABLED_BY_DEFAULT}; -const base::Feature - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid{ - "SafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid", - base::FEATURE_ENABLED_BY_DEFAULT}; - const base::Feature kSafeBrowsingRemoveCookiesInAuthRequests{ "SafeBrowsingRemoveCookiesInAuthRequests", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -152,9 +143,6 @@ "SafeBrowsingSendSampledPingsForProtegoAllowlistDomains", base::FEATURE_DISABLED_BY_DEFAULT}; -constexpr base::FeatureParam<bool> kShouldFillOldPhishGuardProto{ - &kPasswordProtectionForSignedInUsers, "DeprecateOldProto", false}; - const base::Feature kSuspiciousSiteTriggerQuotaFeature{ "SafeBrowsingSuspiciousSiteTriggerQuota", base::FEATURE_ENABLED_BY_DEFAULT}; @@ -198,10 +186,8 @@ {&kExtensionTelemetryReportContactedHosts, true}, {&kFileTypePoliciesTag, true}, {&kOmitNonUserGesturesFromReferrerChain, true}, - {&kPasswordProtectionForSignedInUsers, true}, {&kSafeBrowsingCsbrrWithToken, true}, {&kSafeBrowsingPageLoadToken, true}, - {&kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid, true}, {&kSafeBrowsingRemoveCookiesInAuthRequests, true}, {&kSendSampledPingsForProtegoAllowlistDomains, true}, {&kSuspiciousSiteTriggerQuotaFeature, true}, @@ -246,10 +232,6 @@ return param_list; } -bool GetShouldFillOldPhishGuardProto() { - return kShouldFillOldPhishGuardProto.Get(); -} - std::string GetClientSideDetectionTag() { constexpr char kMemoryThresholdParamName[] = "memory_threshold_mb"; const int kDefaultMemoryThresholdMB = 4096;
diff --git a/components/safe_browsing/core/common/features.h b/components/safe_browsing/core/common/features.h index 93b8638..6f6a742 100644 --- a/components/safe_browsing/core/common/features.h +++ b/components/safe_browsing/core/common/features.h
@@ -98,9 +98,6 @@ // Enable omitting non-user gesture from referrer chain. extern const base::Feature kOmitNonUserGesturesFromReferrerChain; -// Enable GAIA password protection for signed-in users. -extern const base::Feature kPasswordProtectionForSignedInUsers; - // Controls whether Chrome prompts Enhanced Safe Browsing users for deep // scanning. extern const base::Feature kPromptEsbForDeepScanning; @@ -124,11 +121,6 @@ // Controls whether page load tokens are added to Safe Browsing requests. extern const base::Feature kSafeBrowsingPageLoadToken; -// Controls whether Safe Browsing password reuse warnings are updated with -// a "Check passwords" button integrated with the CheckPasswords page. -extern const base::Feature - kSafeBrowsingPasswordCheckIntegrationForSavedPasswordsAndroid; - // Controls whether cookies are removed when the access token is present. extern const base::Feature kSafeBrowsingRemoveCookiesInAuthRequests; @@ -180,11 +172,6 @@ base::ListValue GetFeatureStatusList(); -// Returns whether or not to stop filling in the SyncAccountType and -// ReusedPasswordType enums. This is used in the -// |kPasswordProtectionForSignedInUsers| experiment. -bool GetShouldFillOldPhishGuardProto(); - // Returns the tag used for Client Side Phishing Detection models, as // computed from the current feature flags. std::string GetClientSideDetectionTag();
diff --git a/components/services/app_service/app_service_mojom_impl.cc b/components/services/app_service/app_service_mojom_impl.cc index 23623e84..434209d 100644 --- a/components/services/app_service/app_service_mojom_impl.cc +++ b/components/services/app_service/app_service_mojom_impl.cc
@@ -316,207 +316,48 @@ apps::mojom::IntentFilterPtr intent_filter, apps::mojom::IntentPtr intent, bool from_publisher) { - // TODO(crbug.com/853604): Make sure the ARC preference init happens after - // this. Might need to change the interface to call that after read completed. - // Might also need to record the change before data read and make the update - // after initialization in the future. - if (!preferred_apps_.IsInitialized()) { - DVLOG(0) << "Preferred apps not initialised when try to add."; - return; - } - - // TODO(https://crbug.com/853604): Remove this and convert to a DCHECK - // after finding out the root cause. - if (app_id.empty()) { - base::debug::DumpWithoutCrashing(); - return; - } - - apps::mojom::ReplacedAppPreferencesPtr replaced_apps = - preferred_apps_.AddPreferredApp(app_id, intent_filter); - - WriteToJSON(profile_dir_, preferred_apps_); - - auto changes = apps::mojom::PreferredAppChanges::New(); - - changes->added_filters[app_id].push_back(intent_filter->Clone()); - changes->removed_filters = Clone(replaced_apps->replaced_preference); - - for (auto& subscriber : subscribers_) { - subscriber->OnPreferredAppsChanged(changes->Clone()); - } - - if (from_publisher || !intent) { - return; - } - - // Sync the change to publishers. Because |replaced_app_preference| can - // be any app type, we should run this for all publishers. Currently - // only implemented in ARC publisher. - // TODO(crbug.com/853604): The |replaced_app_preference| can be really big, - // update this logic to only call the relevant publisher for each app after - // updating the storage structure. - for (const auto& iter : publishers_) { - iter.second->OnPreferredAppSet(app_id, intent_filter->Clone(), - intent->Clone(), replaced_apps->Clone()); - } + // Unretained is safe as the callback is owned by |this|. + RunAfterPreferredAppsReady(base::BindOnce( + &AppServiceMojomImpl::AddPreferredAppImpl, base::Unretained(this), + app_type, app_id, std::move(intent_filter), std::move(intent), + from_publisher)); } void AppServiceMojomImpl::RemovePreferredApp(apps::mojom::AppType app_type, const std::string& app_id) { - // TODO(crbug.com/853604): Make sure the ARC preference init happens after - // this. Might need to change the interface to call that after read completed. - // Might also need to record the change before data read and make the update - // after initialization in the future. - if (!preferred_apps_.IsInitialized()) { - DVLOG(0) << "Preferred apps not initialised when try to remove an app id."; - return; - } - - std::vector<apps::mojom::IntentFilterPtr> removed_filters = - preferred_apps_.DeleteAppId(app_id); - if (!removed_filters.empty()) { - WriteToJSON(profile_dir_, preferred_apps_); - - auto changes = apps::mojom::PreferredAppChanges::New(); - changes->removed_filters.emplace(app_id, std::move(removed_filters)); - for (auto& subscriber : subscribers_) { - subscriber->OnPreferredAppsChanged(changes->Clone()); - } - } + // Unretained is safe as the callback is owned by |this|. + RunAfterPreferredAppsReady( + base::BindOnce(&AppServiceMojomImpl::RemovePreferredAppImpl, + base::Unretained(this), app_type, app_id)); } void AppServiceMojomImpl::RemovePreferredAppForFilter( apps::mojom::AppType app_type, const std::string& app_id, apps::mojom::IntentFilterPtr intent_filter) { - // TODO(crbug.com/853604): Make sure the ARC preference init happens after - // this. Might need to change the interface to call that after read completed. - // Might also need to record the change before data read and make the update - // after initialization in the future. - if (!preferred_apps_.IsInitialized()) { - DVLOG(0) << "Preferred apps not initialised when try to remove a filter."; - return; - } - - std::vector<apps::mojom::IntentFilterPtr> removed_filters = - preferred_apps_.DeletePreferredApp(app_id, intent_filter); - - if (!removed_filters.empty()) { - WriteToJSON(profile_dir_, preferred_apps_); - - auto changes = apps::mojom::PreferredAppChanges::New(); - changes->removed_filters.emplace(app_id, std::move(removed_filters)); - for (auto& subscriber : subscribers_) { - subscriber->OnPreferredAppsChanged(changes->Clone()); - } - } + // Unretained is safe as the callback is owned by |this|. + RunAfterPreferredAppsReady(base::BindOnce( + &AppServiceMojomImpl::RemovePreferredAppForFilterImpl, + base::Unretained(this), app_type, app_id, std::move(intent_filter))); } void AppServiceMojomImpl::SetSupportedLinksPreference( apps::mojom::AppType app_type, const std::string& app_id, std::vector<apps::mojom::IntentFilterPtr> all_link_filters) { - if (!preferred_apps_.IsInitialized()) { - DVLOG(0) << "Preferred apps not initialised when trying to add."; - return; - } - - auto changes = apps::mojom::PreferredAppChanges::New(); - auto& added = changes->added_filters; - auto& removed = changes->removed_filters; - - for (auto& filter : all_link_filters) { - apps::mojom::ReplacedAppPreferencesPtr replaced_apps = - preferred_apps_.AddPreferredApp(app_id, filter); - added[app_id].push_back(std::move(filter)); - - // If we removed overlapping supported links when adding the new app, those - // affected apps no longer handle all their Supported Links filters and so - // need to have all their other Supported Links filters removed. - // Additionally, track all removals in the |removed| map so that subscribers - // can be notified correctly. - for (auto& replaced_app_and_filters : replaced_apps->replaced_preference) { - const std::string& removed_app_id = replaced_app_and_filters.first; - bool first_removal_for_app = !base::Contains(removed, app_id); - bool did_replace_supported_link = base::ranges::any_of( - replaced_app_and_filters.second, - [&removed_app_id](const auto& filter) { - return apps_util::IsSupportedLinkForApp(removed_app_id, filter); - }); - - std::vector<apps::mojom::IntentFilterPtr>& removed_filters_for_app = - removed[removed_app_id]; - removed_filters_for_app.insert( - removed_filters_for_app.end(), - std::make_move_iterator(replaced_app_and_filters.second.begin()), - std::make_move_iterator(replaced_app_and_filters.second.end())); - - // We only need to remove other supported links once per app. - if (first_removal_for_app && did_replace_supported_link) { - std::vector<apps::mojom::IntentFilterPtr> removed_filters = - preferred_apps_.DeleteSupportedLinks(removed_app_id); - removed_filters_for_app.insert( - removed_filters_for_app.end(), - std::make_move_iterator(removed_filters.begin()), - std::make_move_iterator(removed_filters.end())); - } - } - } - - WriteToJSON(profile_dir_, preferred_apps_); - - for (auto& subscriber : subscribers_) { - subscriber->OnPreferredAppsChanged(changes->Clone()); - } - - // Notify publishers: The new app has been set to open links, and all removed - // apps no longer handle links. - const auto publisher_iter = publishers_.find(app_type); - if (publisher_iter != publishers_.end()) { - publisher_iter->second->OnSupportedLinksPreferenceChanged( - app_id, /*open_in_app=*/true); - } - for (const auto& removed_app_and_filters : removed) { - // We don't know what app type the app is, so we have to notify all - // publishers. - for (const auto& iter : publishers_) { - iter.second->OnSupportedLinksPreferenceChanged( - removed_app_and_filters.first, - /*open_in_app=*/false); - } - } + // Unretained is safe as the callback is owned by |this|. + RunAfterPreferredAppsReady(base::BindOnce( + &AppServiceMojomImpl::SetSupportedLinksPreferenceImpl, + base::Unretained(this), app_type, app_id, std::move(all_link_filters))); } void AppServiceMojomImpl::RemoveSupportedLinksPreference( apps::mojom::AppType app_type, const std::string& app_id) { - if (!preferred_apps_.IsInitialized()) { - DVLOG(0) << "Preferred apps not initialised when try to remove."; - return; - } - - auto iter = publishers_.find(app_type); - if (iter == publishers_.end()) { - return; - } - - std::vector<apps::mojom::IntentFilterPtr> removed_filters = - preferred_apps_.DeleteSupportedLinks(app_id); - - if (!removed_filters.empty()) { - WriteToJSON(profile_dir_, preferred_apps_); - - auto changes = apps::mojom::PreferredAppChanges::New(); - changes->removed_filters.emplace(app_id, std::move(removed_filters)); - - for (auto& subscriber : subscribers_) { - subscriber->OnPreferredAppsChanged(changes->Clone()); - } - } - - iter->second->OnSupportedLinksPreferenceChanged(app_id, - /*open_in_app=*/false); + // Unretained is safe as the callback is owned by |this|. + RunAfterPreferredAppsReady( + base::BindOnce(&AppServiceMojomImpl::RemoveSupportedLinksPreferenceImpl, + base::Unretained(this), app_type, app_id)); } void AppServiceMojomImpl::SetResizeLocked(apps::mojom::AppType app_type, @@ -651,11 +492,196 @@ for (auto& subscriber : subscribers_) { subscriber->InitializePreferredApps(preferred_apps_.GetValue()); } + + LogPreferredAppEntryCount(preferred_apps_.GetEntrySize()); + + while (!pending_preferred_apps_tasks_.empty()) { + std::move(pending_preferred_apps_tasks_.front()).Run(); + pending_preferred_apps_tasks_.pop(); + } + if (read_completed_for_testing_) { std::move(read_completed_for_testing_).Run(); } +} - LogPreferredAppEntryCount(preferred_apps_.GetEntrySize()); +void AppServiceMojomImpl::RunAfterPreferredAppsReady(base::OnceClosure task) { + if (preferred_apps_.IsInitialized()) { + std::move(task).Run(); + } else { + pending_preferred_apps_tasks_.push(std::move(task)); + } +} + +void AppServiceMojomImpl::AddPreferredAppImpl( + apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::IntentFilterPtr intent_filter, + apps::mojom::IntentPtr intent, + bool from_publisher) { + // TODO(https://crbug.com/853604): Remove this and convert to a DCHECK + // after finding out the root cause. + if (app_id.empty()) { + base::debug::DumpWithoutCrashing(); + return; + } + + apps::mojom::ReplacedAppPreferencesPtr replaced_apps = + preferred_apps_.AddPreferredApp(app_id, intent_filter); + + WriteToJSON(profile_dir_, preferred_apps_); + + auto changes = apps::mojom::PreferredAppChanges::New(); + + changes->added_filters[app_id].push_back(intent_filter->Clone()); + changes->removed_filters = Clone(replaced_apps->replaced_preference); + + for (auto& subscriber : subscribers_) { + subscriber->OnPreferredAppsChanged(changes->Clone()); + } + + if (from_publisher || !intent) { + return; + } + + // Sync the change to publishers. Because |replaced_app_preference| can + // be any app type, we should run this for all publishers. Currently + // only implemented in ARC publisher. + // TODO(crbug.com/853604): The |replaced_app_preference| can be really big, + // update this logic to only call the relevant publisher for each app after + // updating the storage structure. + for (const auto& iter : publishers_) { + iter.second->OnPreferredAppSet(app_id, intent_filter->Clone(), + intent->Clone(), replaced_apps->Clone()); + } +} + +void AppServiceMojomImpl::RemovePreferredAppImpl(apps::mojom::AppType app_type, + const std::string& app_id) { + std::vector<apps::mojom::IntentFilterPtr> removed_filters = + preferred_apps_.DeleteAppId(app_id); + if (!removed_filters.empty()) { + WriteToJSON(profile_dir_, preferred_apps_); + + auto changes = apps::mojom::PreferredAppChanges::New(); + changes->removed_filters.emplace(app_id, std::move(removed_filters)); + for (auto& subscriber : subscribers_) { + subscriber->OnPreferredAppsChanged(changes->Clone()); + } + } +} + +void AppServiceMojomImpl::RemovePreferredAppForFilterImpl( + apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::IntentFilterPtr intent_filter) { + std::vector<apps::mojom::IntentFilterPtr> removed_filters = + preferred_apps_.DeletePreferredApp(app_id, intent_filter); + + if (!removed_filters.empty()) { + WriteToJSON(profile_dir_, preferred_apps_); + + auto changes = apps::mojom::PreferredAppChanges::New(); + changes->removed_filters.emplace(app_id, std::move(removed_filters)); + for (auto& subscriber : subscribers_) { + subscriber->OnPreferredAppsChanged(changes->Clone()); + } + } +} + +void AppServiceMojomImpl::SetSupportedLinksPreferenceImpl( + apps::mojom::AppType app_type, + const std::string& app_id, + std::vector<apps::mojom::IntentFilterPtr> all_link_filters) { + auto changes = apps::mojom::PreferredAppChanges::New(); + auto& added = changes->added_filters; + auto& removed = changes->removed_filters; + + for (auto& filter : all_link_filters) { + apps::mojom::ReplacedAppPreferencesPtr replaced_apps = + preferred_apps_.AddPreferredApp(app_id, filter); + added[app_id].push_back(std::move(filter)); + + // If we removed overlapping supported links when adding the new app, those + // affected apps no longer handle all their Supported Links filters and so + // need to have all their other Supported Links filters removed. + // Additionally, track all removals in the |removed| map so that subscribers + // can be notified correctly. + for (auto& replaced_app_and_filters : replaced_apps->replaced_preference) { + const std::string& removed_app_id = replaced_app_and_filters.first; + bool first_removal_for_app = !base::Contains(removed, app_id); + bool did_replace_supported_link = base::ranges::any_of( + replaced_app_and_filters.second, + [&removed_app_id](const auto& filter) { + return apps_util::IsSupportedLinkForApp(removed_app_id, filter); + }); + + std::vector<apps::mojom::IntentFilterPtr>& removed_filters_for_app = + removed[removed_app_id]; + removed_filters_for_app.insert( + removed_filters_for_app.end(), + std::make_move_iterator(replaced_app_and_filters.second.begin()), + std::make_move_iterator(replaced_app_and_filters.second.end())); + + // We only need to remove other supported links once per app. + if (first_removal_for_app && did_replace_supported_link) { + std::vector<apps::mojom::IntentFilterPtr> removed_filters = + preferred_apps_.DeleteSupportedLinks(removed_app_id); + removed_filters_for_app.insert( + removed_filters_for_app.end(), + std::make_move_iterator(removed_filters.begin()), + std::make_move_iterator(removed_filters.end())); + } + } + } + + WriteToJSON(profile_dir_, preferred_apps_); + + for (auto& subscriber : subscribers_) { + subscriber->OnPreferredAppsChanged(changes->Clone()); + } + + // Notify publishers: The new app has been set to open links, and all removed + // apps no longer handle links. + const auto publisher_iter = publishers_.find(app_type); + if (publisher_iter != publishers_.end()) { + publisher_iter->second->OnSupportedLinksPreferenceChanged( + app_id, /*open_in_app=*/true); + } + for (const auto& removed_app_and_filters : removed) { + // We don't know what app type the app is, so we have to notify all + // publishers. + for (const auto& iter : publishers_) { + iter.second->OnSupportedLinksPreferenceChanged( + removed_app_and_filters.first, + /*open_in_app=*/false); + } + } +} +void AppServiceMojomImpl::RemoveSupportedLinksPreferenceImpl( + apps::mojom::AppType app_type, + const std::string& app_id) { + auto iter = publishers_.find(app_type); + if (iter == publishers_.end()) { + return; + } + + std::vector<apps::mojom::IntentFilterPtr> removed_filters = + preferred_apps_.DeleteSupportedLinks(app_id); + + if (!removed_filters.empty()) { + WriteToJSON(profile_dir_, preferred_apps_); + + auto changes = apps::mojom::PreferredAppChanges::New(); + changes->removed_filters.emplace(app_id, std::move(removed_filters)); + + for (auto& subscriber : subscribers_) { + subscriber->OnPreferredAppsChanged(changes->Clone()); + } + } + + iter->second->OnSupportedLinksPreferenceChanged(app_id, + /*open_in_app=*/false); } } // namespace apps
diff --git a/components/services/app_service/app_service_mojom_impl.h b/components/services/app_service/app_service_mojom_impl.h index c58a2ea5..d5ca5c72 100644 --- a/components/services/app_service/app_service_mojom_impl.h +++ b/components/services/app_service/app_service_mojom_impl.h
@@ -8,6 +8,7 @@ #include <map> #include "base/callback.h" +#include "base/containers/queue.h" #include "base/files/file_path.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" @@ -147,6 +148,28 @@ void ReadCompleted(std::string preferred_apps_string); + // Runs |task| after the PreferredAppsList is fully initialized. |task| will + // be run immediately if preferred apps are already initialized. + void RunAfterPreferredAppsReady(base::OnceClosure task); + + void AddPreferredAppImpl(apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::IntentFilterPtr intent_filter, + apps::mojom::IntentPtr intent, + bool from_publisher); + void RemovePreferredAppImpl(apps::mojom::AppType app_type, + const std::string& app_id); + void RemovePreferredAppForFilterImpl( + apps::mojom::AppType app_type, + const std::string& app_id, + apps::mojom::IntentFilterPtr intent_filter); + void SetSupportedLinksPreferenceImpl( + apps::mojom::AppType app_type, + const std::string& app_id, + std::vector<apps::mojom::IntentFilterPtr> all_link_filters); + void RemoveSupportedLinksPreferenceImpl(apps::mojom::AppType app_type, + const std::string& app_id); + // publishers_ is a std::map, not a mojo::RemoteSet, since we want to // be able to find *the* publisher for a given apps::mojom::AppType. std::map<apps::mojom::AppType, mojo::Remote<apps::mojom::Publisher>> @@ -176,6 +199,8 @@ base::OnceClosure write_completed_for_testing_; + base::queue<base::OnceClosure> pending_preferred_apps_tasks_; + base::WeakPtrFactory<AppServiceMojomImpl> weak_ptr_factory_{this}; };
diff --git a/components/services/app_service/app_service_mojom_impl_unittest.cc b/components/services/app_service/app_service_mojom_impl_unittest.cc index 4492161..1c3e8c5 100644 --- a/components/services/app_service/app_service_mojom_impl_unittest.cc +++ b/components/services/app_service/app_service_mojom_impl_unittest.cc
@@ -481,6 +481,41 @@ sub1.PreferredApps().FindPreferredAppForUrl(another_filter_url)); } +// Tests that writing a preferred app value before the PreferredAppsList is +// initialized queues the write for after initialization. +TEST_F(AppServiceMojomImplTest, PreferredAppsWriteBeforeInit) { + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); + + base::RunLoop run_loop_read; + AppServiceMojomImpl impl(temp_dir_.GetPath(), run_loop_read.QuitClosure()); + GURL filter_url("https://www.abc.com/"); + + std::string kAppId1 = "aaa"; + std::string kAppId2 = "bbb"; + + impl.AddPreferredApp(apps::mojom::AppType::kArc, kAppId1, + apps_util::CreateIntentFilterForMimeType("image/png"), + nullptr, + /*from_publisher=*/false); + + std::vector<apps::mojom::IntentFilterPtr> filters; + filters.push_back(apps_util::CreateIntentFilterForUrlScope(filter_url)); + impl.SetSupportedLinksPreference(apps::mojom::AppType::kArc, kAppId2, + std::move(filters)); + + // Wait for the preferred apps list initialization to read from disk. + run_loop_read.Run(); + + // Both changes to the PreferredAppsList should have been applied. + ASSERT_EQ( + kAppId1, + impl.GetPreferredAppsForTesting().FindPreferredAppForIntent( + apps_util::CreateShareIntentFromFiles( + {GURL("filesystem:chrome://foo/image.png")}, {"image/png"}))); + ASSERT_EQ(kAppId2, impl.GetPreferredAppsForTesting().FindPreferredAppForUrl( + filter_url)); +} + TEST_F(AppServiceMojomImplTest, PreferredAppsPersistency) { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
diff --git a/components/services/heap_profiling/OWNERS b/components/services/heap_profiling/OWNERS index 9cc3a5e..b78685f3 100644 --- a/components/services/heap_profiling/OWNERS +++ b/components/services/heap_profiling/OWNERS
@@ -1,2 +1 @@ -alph@chromium.org -erikchen@chromium.org +file://components/heap_profiling/OWNERS
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc index a7f4f600..7074141f 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc
@@ -172,7 +172,6 @@ #if BUILDFLAG(IS_ANDROID) #include "base/system/sys_info.h" -#include "components/power_scheduler/power_scheduler.h" #include "content/browser/android/battery_metrics.h" #include "content/browser/android/browser_startup_controller.h" #endif @@ -1105,11 +1104,6 @@ // Requires base::PowerMonitor to be initialized first. AndroidBatteryMetrics::GetInstance(); - - // For child processes, this requires allowing of the - // sched_setaffinity() syscall in the sandbox (baseline_policy_android.cc). - // When this call is removed, the sandbox allowlist should be updated too. - power_scheduler::PowerScheduler::GetInstance()->Setup(); #endif if (should_start_minimal_browser)
diff --git a/content/browser/attribution_reporting/attribution_manager_impl.cc b/content/browser/attribution_reporting/attribution_manager_impl.cc index 98a87b3c..9a1c5a3 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl.cc
@@ -103,8 +103,12 @@ return false; } -void RecordCreateReportStatus(AttributionTrigger::EventLevelResult status) { - base::UmaHistogramEnumeration("Conversions.CreateReportStatus", status); +void RecordCreateReportStatus(CreateReportResult result) { + base::UmaHistogramEnumeration("Conversions.CreateReportStatus", + result.event_level_status()); + base::UmaHistogramEnumeration( + "Conversions.AggregatableReport.CreateReportStatus", + result.aggregatable_status()); } ConversionReportSendOutcome ConvertToConversionReportSendOutcome( @@ -487,9 +491,7 @@ } void AttributionManagerImpl::OnReportStored(CreateReportResult result) { - RecordCreateReportStatus(result.event_level_status()); - - // TODO(crbug.com/1285319): Log metrics for aggregatable reports. + RecordCreateReportStatus(result); if (std::vector<AttributionReport>& new_reports = result.new_reports(); !new_reports.empty()) {
diff --git a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc index d7f5ffc..462e716 100644 --- a/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc +++ b/content/browser/attribution_reporting/attribution_manager_impl_unittest.cc
@@ -1029,6 +1029,9 @@ histograms.ExpectUniqueSample( "Conversions.CreateReportStatus", AttributionTrigger::EventLevelResult::kNoMatchingImpressions, 1); + histograms.ExpectUniqueSample( + "Conversions.AggregatableReport.CreateReportStatus", + AttributionTrigger::AggregatableResult::kNoMatchingImpressions, 1); } TEST_F(AttributionManagerImplTest, OnReportSent_NotifiesObservers) {
diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/client_hints/client_hints.cc index 0c5fe1b..e3d06bd 100644 --- a/content/browser/client_hints/client_hints.cc +++ b/content/browser/client_hints/client_hints.cc
@@ -32,7 +32,6 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -#include "net/base/features.h" #include "net/base/url_util.h" #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" @@ -1062,12 +1061,9 @@ const std::vector<WebClientHintsType> persisted_hints = enabled_hints.GetEnabledHints(); PersistAcceptCH(origin, delegate, persisted_hints); - if (base::FeatureList::IsEnabled(net::features::kPartitionedCookies) && - !base::FeatureList::IsEnabled( - net::features::kPartitionedCookiesBypassOriginTrial) && - std::find(persisted_hints.begin(), persisted_hints.end(), + if (std::find(persisted_hints.begin(), persisted_hints.end(), WebClientHintsType::kPartitionedCookies) == - persisted_hints.end()) { + persisted_hints.end()) { if (auto* cookie_manager = frame_tree_node->current_frame_host() ->GetStoragePartition() ->GetCookieManagerForBrowserProcess()) {
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc index d3d310d..8ae18e3 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -105,7 +105,6 @@ #include "content/public/common/url_constants.h" #include "content/public/common/url_utils.h" #include "mojo/public/cpp/system/data_pipe.h" -#include "net/base/features.h" #include "net/base/filename_util.h" #include "net/base/ip_endpoint.h" #include "net/base/load_flags.h" @@ -961,14 +960,10 @@ PersistAcceptCH(url::Origin::Create(url), delegate, client_hints); } - if (base::FeatureList::IsEnabled(net::features::kPartitionedCookies) && - !base::FeatureList::IsEnabled( - net::features::kPartitionedCookiesBypassOriginTrial)) { - if (auto* cookie_manager = frame_tree_node->current_frame_host() - ->GetStoragePartition() - ->GetCookieManagerForBrowserProcess()) { - cookie_manager->ConvertPartitionedCookiesToUnpartitioned(url); - } + if (auto* cookie_manager = frame_tree_node->current_frame_host() + ->GetStoragePartition() + ->GetCookieManagerForBrowserProcess()) { + cookie_manager->ConvertPartitionedCookiesToUnpartitioned(url); } }
diff --git a/content/browser/utility_process_sandbox_browsertest.cc b/content/browser/utility_process_sandbox_browsertest.cc index 6107192..6415844 100644 --- a/content/browser/utility_process_sandbox_browsertest.cc +++ b/content/browser/utility_process_sandbox_browsertest.cc
@@ -122,8 +122,10 @@ } case Sandbox::kAudio: -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kIme: case Sandbox::kTts: #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) @@ -168,6 +170,15 @@ }; IN_PROC_BROWSER_TEST_P(UtilityProcessSandboxBrowserTest, VerifySandboxType) { +#if BUILDFLAG(IS_LINUX) + if (GetParam() == Sandbox::kHardwareVideoDecoding) { + // TODO(b/195769334): On Linux, this test fails with + // Sandbox::kHardwareVideoDecoding because the pre-sandbox hook needs Ozone + // which is not available in the utility process that this test starts. We + // need to remove the Ozone dependency and re-enable this test. + GTEST_SKIP(); + } +#endif // BUILDFLAG(IS_LINUX) RunUtilityProcess(); }
diff --git a/content/browser/utility_sandbox_delegate.cc b/content/browser/utility_sandbox_delegate.cc index d5703cf..4705e67 100644 --- a/content/browser/utility_sandbox_delegate.cc +++ b/content/browser/utility_sandbox_delegate.cc
@@ -65,8 +65,10 @@ #if BUILDFLAG(IS_FUCHSIA) sandbox_type_ == sandbox::mojom::Sandbox::kVideoCapture || #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type_ == sandbox::mojom::Sandbox::kIme || sandbox_type_ == sandbox::mojom::Sandbox::kTts || #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) @@ -106,8 +108,10 @@ // unsandboxed zygote and then apply their actual sandboxes in the forked // process upon startup. if (sandbox_type_ == sandbox::mojom::Sandbox::kNetwork || -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type_ == sandbox::mojom::Sandbox::kHardwareVideoDecoding || +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) sandbox_type_ == sandbox::mojom::Sandbox::kIme || sandbox_type_ == sandbox::mojom::Sandbox::kTts || #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
diff --git a/content/browser/webui/web_ui_browsertest.cc b/content/browser/webui/web_ui_browsertest.cc index 706e068..88fe066 100644 --- a/content/browser/webui/web_ui_browsertest.cc +++ b/content/browser/webui/web_ui_browsertest.cc
@@ -20,7 +20,9 @@ #include "base/test/simple_test_tick_clock.h" #include "base/time/time.h" #include "build/build_config.h" +#include "content/browser/fenced_frame/fenced_frame.h" #include "content/browser/renderer_host/render_frame_host_impl.h" +#include "content/browser/web_contents/web_contents_impl.h" #include "content/browser/webui/content_web_ui_controller_factory.h" #include "content/browser/webui/web_ui_impl.h" #include "content/public/browser/child_process_security_policy.h" @@ -34,7 +36,9 @@ #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" +#include "content/public/test/fenced_frame_test_util.h" #include "content/public/test/scoped_web_ui_controller_factory_registration.h" +#include "content/public/test/test_frame_navigation_observer.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" #include "content/public/test/web_ui_browsertest_util.h" @@ -919,4 +923,58 @@ EXPECT_THAT(result.error, ::testing::StartsWith(expected_failure)); } +class WebUIFencedFrameBrowserTest : public WebUIImplBrowserTest { + public: + void SetUpOnMainThread() override { + WebUIImplBrowserTest::SetUpOnMainThread(); + https_server_ = std::make_unique<net::EmbeddedTestServer>( + net::EmbeddedTestServer::TYPE_HTTPS); + https_server_->AddDefaultHandlers(GetTestDataFilePath()); + } + + net::EmbeddedTestServer* https_server() { return https_server_.get(); } + + content::test::FencedFrameTestHelper& fenced_frame_test_helper() { + return fenced_frame_test_helper_; + } + + private: + std::unique_ptr<net::EmbeddedTestServer> https_server_; + content::test::FencedFrameTestHelper fenced_frame_test_helper_; +}; + +// Test that creates a fenced frame and navigates to a WebUI URL. +// Ensures that it is blocked. +IN_PROC_BROWSER_TEST_F(WebUIFencedFrameBrowserTest, RequestBlocked) { + ASSERT_TRUE(https_server()->Start()); + auto* web_contents = static_cast<WebContentsImpl*>(shell()->web_contents()); + + GURL secure_url = https_server()->GetURL("/title1.html"); + EXPECT_TRUE(NavigateToURL(web_contents, secure_url)); + + // Load a fenced frame. + const GURL fenced_frame_url( + https_server()->GetURL("/fenced_frames/title1.html")); + content::RenderFrameHost* fenced_frame_rfh = + fenced_frame_test_helper().CreateFencedFrame(web_contents->GetMainFrame(), + fenced_frame_url); + ASSERT_TRUE(fenced_frame_rfh); + + std::vector<FencedFrame*> fenced_frames = + web_contents->GetMainFrame()->GetFencedFrames(); + ASSERT_EQ(1u, fenced_frames.size()); + + // Now navigate the fenced frame to a WebUI URL. + const GURL web_ui_url(GetWebUIURL(kChromeUIHistogramHost)); + FencedFrame* fenced_frame = fenced_frames.back(); + TestFrameNavigationObserver fenced_frame_observer(fenced_frame_rfh); + fenced_frame->Navigate(web_ui_url, base::TimeTicks::Now()); + fenced_frame_observer.WaitForCommit(); + + // The navigation fails because WebUI doesn't have 'Supports-Loading-Mode' + EXPECT_FALSE(fenced_frame_observer.last_navigation_succeeded()); + EXPECT_EQ(net::Error::ERR_BLOCKED_BY_RESPONSE, + fenced_frame_observer.last_net_error_code()); +} + } // namespace content
diff --git a/content/child/child_process.cc b/content/child/child_process.cc index 45aaa1c..8efd7a6 100644 --- a/content/child/child_process.cc +++ b/content/child/child_process.cc
@@ -32,10 +32,6 @@ #include "base/test/clang_profiling.h" #endif -#if BUILDFLAG(IS_ANDROID) -#include "components/power_scheduler/power_scheduler.h" -#endif - namespace content { namespace { @@ -112,10 +108,6 @@ #if BUILDFLAG(IS_ANDROID) SetupCpuTimeMetrics(); - // For child processes, this requires allowing of the sched_setaffinity() - // syscall in the sandbox (baseline_policy_android.cc). When this call is - // removed, the sandbox allowlist should be updated too. - power_scheduler::PowerScheduler::GetInstance()->Setup(); #endif // We can't recover from failing to start the IO thread.
diff --git a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java index 7548beb..d7d82785 100644 --- a/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/BrowserStartupControllerImpl.java
@@ -105,6 +105,9 @@ // of enqueued callbacks have been executed. private boolean mStartupSuccess; + // Whether library loading is disabled. + private boolean mLibraryLoadDisabled; + // Tests may inject a method to be run instead of calling ContentMain() in order for them to // initialize the C++ system via another means. private Runnable mContentMainCallbackForTests; @@ -344,6 +347,11 @@ mFullBrowserStartupDone, mMinimalBrowserStarted, startMinimalBrowser); } + @Override + public void setDisableLibraryLoadForCast(boolean disabled) { + mLibraryLoadDisabled = disabled; + } + /** * Asserts that library process type is one of the supported types. * @param libraryProcessType the type of process the shared library is loaded. It must be @@ -435,19 +443,21 @@ Log.d(TAG, "Initializing chromium process, singleProcess=%b", singleProcess); mPrepareToStartCompleted = true; try (ScopedSysTraceEvent e = ScopedSysTraceEvent.scoped("prepareToStartBrowserProcess")) { - // This strictmode exception is to cover the case where the browser process is being - // started asynchronously but not in the main browser flow. The main browser flow will - // trigger library loading earlier and this will be a no-op, but in the other cases this - // will need to block on loading libraries. This applies to tests and - // ManageSpaceActivity, which can be launched from Settings. - StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); - try { - // Normally Main.java will have already loaded the library asynchronously, we only - // need to load it here if we arrived via another flow, e.g. bookmark access & sync - // setup. - LibraryLoader.getInstance().ensureInitialized(); - } finally { - StrictMode.setThreadPolicy(oldPolicy); + if (!mLibraryLoadDisabled) { + // This strictmode exception is to cover the case where the browser process is being + // started asynchronously but not in the main browser flow. The main browser flow + // will trigger library loading earlier and this will be a no-op, but in the other + // cases this will need to block on loading libraries. This applies to tests and + // ManageSpaceActivity, which can be launched from Settings. + StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); + try { + // Normally Main.java will have already loaded the library asynchronously, we + // only need to load it here if we arrived via another flow, e.g. bookmark + // access & sync setup. + LibraryLoader.getInstance().ensureInitialized(); + } finally { + StrictMode.setThreadPolicy(oldPolicy); + } } // TODO(yfriedman): Remove dependency on a command line flag for this.
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/BrowserStartupController.java b/content/public/android/java/src/org/chromium/content_public/browser/BrowserStartupController.java index e3c1523..d70c234 100644 --- a/content/public/android/java/src/org/chromium/content_public/browser/BrowserStartupController.java +++ b/content/public/android/java/src/org/chromium/content_public/browser/BrowserStartupController.java
@@ -110,4 +110,11 @@ * See {@link org.chromium.content.browser.ServicificationStartupUma} for more details. */ int getStartupMode(boolean startMinimalBrowser); + + /** + * Used by Cast to skip library loading when starting the browser process. + * Note the expected behavior is maintained by //chromecast owners. + * @param disabled whether library loading should be disabled. + */ + void setDisableLibraryLoadForCast(boolean disabled); }
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index c8e7841..8ce64f9 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -1170,7 +1170,7 @@ base::FEATURE_DISABLED_BY_DEFAULT}; // Takes advantage of specifying which big.LITTLE cores to schedule different -// threads on. Note this conflicts with PowerScheduler feature. +// threads on. const base::Feature kBigLittleScheduling{"BigLittleScheduling", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/content/renderer/renderer_main_platform_delegate_android.cc b/content/renderer/renderer_main_platform_delegate_android.cc index 8a8e147d..ff012dd 100644 --- a/content/renderer/renderer_main_platform_delegate_android.cc +++ b/content/renderer/renderer_main_platform_delegate_android.cc
@@ -8,7 +8,6 @@ #include "base/cpu_affinity_posix.h" #include "base/metrics/histogram_macros.h" #include "base/trace_event/trace_event.h" -#include "components/power_scheduler/power_scheduler_features.h" #include "content/public/common/content_features.h" #include "content/renderer/seccomp_sandbox_status_android.h" #include "sandbox/linux/seccomp-bpf-helpers/seccomp_starter_android.h" @@ -39,22 +38,7 @@ // The policy compiler is only available if USE_SECCOMP_BPF is enabled. #if BUILDFLAG(USE_SECCOMP_BPF) bool allow_sched_affinity = - base::FeatureList::IsEnabled(features::kBigLittleScheduling) || - (base::HasBigCpuCores() && - (base::FeatureList::IsEnabled( - power_scheduler::features::kPowerScheduler) || - base::FeatureList::IsEnabled( - power_scheduler::features::kCpuAffinityRestrictToLittleCores) || - base::FeatureList::IsEnabled( - power_scheduler::features::kPowerSchedulerThrottleIdle) || - base::FeatureList::IsEnabled( - power_scheduler::features:: - kPowerSchedulerThrottleIdleAndNopAnimation) || - base::FeatureList::IsEnabled( - power_scheduler::features:: - kWebViewCpuAffinityRestrictToLittleCores) || - base::FeatureList::IsEnabled( - power_scheduler::features::kWebViewPowerSchedulerThrottleIdle))); + base::FeatureList::IsEnabled(features::kBigLittleScheduling); starter.set_policy( std::make_unique<sandbox::BaselinePolicyAndroid>(allow_sched_affinity)); #endif
diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn index 3182033..ada7e77 100644 --- a/content/utility/BUILD.gn +++ b/content/utility/BUILD.gn
@@ -85,15 +85,20 @@ "//ash/services/ime:sandbox_hook", "//chromeos/assistant:buildflags", "//chromeos/services/tts:sandbox_hook", - "//gpu/config", - "//media/gpu/sandbox", - "//third_party/angle:angle_gpu_info_util", ] if (use_vaapi || use_v4l2_codec) { deps += [ "//ash/components/arc/video_accelerator" ] } } + if (is_linux || is_chromeos_ash) { + deps += [ + "//gpu/config", + "//media/gpu/sandbox", + "//third_party/angle:angle_gpu_info_util", + ] + } + if (is_chromeos_ash && is_chrome_branded) { deps += [ "//services/shape_detection:lib",
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc index 7be3b10..7686292 100644 --- a/content/utility/utility_main.cc +++ b/content/utility/utility_main.cc
@@ -43,16 +43,19 @@ #include "services/network/network_sandbox_hook_linux.h" #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) -#include "ash/services/ime/ime_sandbox_hook.h" -#include "chromeos/assistant/buildflags.h" -#include "chromeos/services/tts/tts_sandbox_hook.h" +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) #include "gpu/config/gpu_info_collector.h" #include "media/gpu/sandbox/hardware_video_decoding_sandbox_hook_linux.h" // gn check is not smart enough to realize that this include only applies to -// ash-chrome and the BUILD.gn dependencies correctly account for that. +// Linux/ash-chrome and the BUILD.gn dependencies correctly account for that. #include "third_party/angle/src/gpu_info_util/SystemInfo.h" // nogncheck +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) + +#if BUILDFLAG(IS_CHROMEOS_ASH) +#include "ash/services/ime/ime_sandbox_hook.h" +#include "chromeos/assistant/buildflags.h" +#include "chromeos/services/tts/tts_sandbox_hook.h" #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #include "chromeos/services/libassistant/libassistant_sandbox_hook.h" // nogncheck @@ -162,11 +165,13 @@ case sandbox::mojom::Sandbox::kScreenAI: pre_sandbox_hook = base::BindOnce(&screen_ai::ScreenAIPreSandboxHook); break; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: pre_sandbox_hook = base::BindOnce(&media::HardwareVideoDecodingPreSandboxHook); break; +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kIme: pre_sandbox_hook = base::BindOnce(&ash::ime::ImePreSandboxHook); break; @@ -185,7 +190,7 @@ } if (parameters.zygote_child || !pre_sandbox_hook.is_null()) { sandbox::policy::SandboxLinux::Options sandbox_options; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) if (sandbox_type == sandbox::mojom::Sandbox::kHardwareVideoDecoding) { // The kHardwareVideoDecoding sandbox needs to know the GPU type in order // to select the right policy. @@ -194,7 +199,7 @@ sandbox_options.use_amd_specific_policies = angle::IsAMD(gpu_info.active_gpu().vendor_id); } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) sandbox::policy::Sandbox::Initialize( sandbox_type, std::move(pre_sandbox_hook), sandbox_options); }
diff --git a/docs/speed/perf_lab_platforms.md b/docs/speed/perf_lab_platforms.md index b26f5574..999fcbfb 100644 --- a/docs/speed/perf_lab_platforms.md +++ b/docs/speed/perf_lab_platforms.md
@@ -36,7 +36,6 @@ ## Win * [win-10-perf](https://ci.chromium.org/p/chrome/builders/ci/win-10-perf): Windows Intel HD 630 towers, Core i7-7700 3.6 GHz, 16GB RAM, Intel Kaby Lake HD Graphics 630. - * [win-10_amd-perf](https://ci.chromium.org/p/chrome/builders/ci/win-10_amd-perf): Windows AMD chipset. * [win-10_amd_laptop-perf](https://ci.chromium.org/p/chrome/builders/ci/win-10_amd_laptop-perf): Windows 10 Laptop with AMD chipset.. * [win-10_laptop_low_end-perf](https://ci.chromium.org/p/chrome/builders/ci/win-10_laptop_low_end-perf): Low end windows 10 HP laptops. HD Graphics 5500, x86-64-i3-5005U, SSD, 4GB RAM..
diff --git a/docs/testing/web_tests.md b/docs/testing/web_tests.md index 1a702bcb..010e27f 100644 --- a/docs/testing/web_tests.md +++ b/docs/testing/web_tests.md
@@ -278,6 +278,7 @@ ```json { "prefix": "blocking_repaint", + "platforms": ["Linux", "Mac", "Win"], "bases": ["compositing", "fast/repaint"], "args": ["--blocking-repaint"] } @@ -310,6 +311,10 @@ This will also let any real tests under `web_tests/virtual/blocking_repaint` directory run with the `--blocking-repaint` flag. +The "platforms" configuration can be used to skip tests on some platforms. If +a virtual test suites uses more than 5% of total test time, we should consider +to skip the test suites on some platforms. + The "prefix" value should be unique. Multiple directories with the same flags should be listed in the same "bases" list. The "bases" list can be empty, in case that we just want to run the real tests under `virtual/<prefix>`
diff --git a/extensions/browser/service_worker_task_queue.cc b/extensions/browser/service_worker_task_queue.cc index a10db76..43508e85 100644 --- a/extensions/browser/service_worker_task_queue.cc +++ b/extensions/browser/service_worker_task_queue.cc
@@ -637,8 +637,7 @@ void ServiceWorkerTaskQueue::OnDestruct( content::ServiceWorkerContext* context) { - context->RemoveObserver(this); - observing_worker_contexts_.erase(context); + StopObserving(context); } size_t ServiceWorkerTaskQueue::GetNumPendingTasksForTest( @@ -673,12 +672,12 @@ void ServiceWorkerTaskQueue::StopObserving( content::ServiceWorkerContext* service_worker_context) { - // TODO(crbug.com/1222759): Investigate when the DCHECK's condition can be - // false. - DCHECK(observing_worker_contexts_.count(service_worker_context) > 0u); - observing_worker_contexts_.erase(service_worker_context); - if (!observing_worker_contexts_.count(service_worker_context)) + auto iter_pair = + observing_worker_contexts_.equal_range(service_worker_context); + DCHECK(iter_pair.first != observing_worker_contexts_.end()); + if (std::distance(iter_pair.first, iter_pair.second) == 1) service_worker_context->RemoveObserver(this); + observing_worker_contexts_.erase(iter_pair.first); } void ServiceWorkerTaskQueue::ActivateIncognitoSplitModeExtensions(
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn index d5aa3477..583dfdc8 100644 --- a/extensions/shell/BUILD.gn +++ b/extensions/shell/BUILD.gn
@@ -254,14 +254,20 @@ deps += [ "//components/nacl/browser", "//components/nacl/common", - "//components/nacl/loader", "//components/nacl/renderer", "//components/nacl/renderer/plugin:nacl_trusted_plugin", "//ppapi/shared_impl:shared_impl", ] - if (is_linux || is_chromeos) { - deps += [ "//components/nacl/loader:nacl_helper" ] + # TODO(https://crbug.com/1299021): Implement building these NaCl targets + # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu != "arm64") { + deps += [ + "//components/nacl/loader", + ] + if (is_linux || is_chromeos) { + deps += [ "//components/nacl/loader:nacl_helper" ] + } } } }
diff --git a/infra/archive_config/test-ash-chrome.yaml b/infra/archive_config/test-ash-chrome.yaml index b64ad38..75e57902 100644 --- a/infra/archive_config/test-ash-chrome.yaml +++ b/infra/archive_config/test-ash-chrome.yaml
@@ -9,7 +9,6 @@ - file: chrome_crashpad_handler - file: icudtl.dat - file: keyboard_resources.pak - - file: libclearkeycdm.so - file: libminigbm.so - file: MEIPreload/manifest.json - file: MEIPreload/preloaded_data.pb @@ -22,5 +21,6 @@ - file: test_ash_chrome - file: xdg-mime - file: xdg-settings + - dir: ClearKeyCdm/ - dir: locales/ - dir: resources/
diff --git a/infra/config/generated/builders/ci/ios-m1-simulator/properties.json b/infra/config/generated/builders/ci/ios-m1-simulator/properties.json new file mode 100644 index 0000000..c18caf9e --- /dev/null +++ b/infra/config/generated/builders/ci/ios-m1-simulator/properties.json
@@ -0,0 +1,17 @@ +{ + "$build/goma": { + "rpc_extra_params": "?prod", + "server_host": "goma.chromium.org", + "use_luci_auth": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "chromium.fyi", + "recipe": "chromium", + "xcode_build_version": "13c100" +} \ No newline at end of file
diff --git a/infra/config/generated/builders/try/ios-m1-simulator/properties.json b/infra/config/generated/builders/try/ios-m1-simulator/properties.json new file mode 100644 index 0000000..b9041d6 --- /dev/null +++ b/infra/config/generated/builders/try/ios-m1-simulator/properties.json
@@ -0,0 +1,17 @@ +{ + "$build/goma": { + "rpc_extra_params": "?prod", + "server_host": "goma.chromium.org", + "use_luci_auth": true + }, + "$recipe_engine/resultdb/test_presentation": { + "column_keys": [], + "grouping_keys": [ + "status", + "v.test_suite" + ] + }, + "builder_group": "tryserver.chromium.mac", + "recipe": "chromium_trybot", + "xcode_build_version": "13c100" +} \ No newline at end of file
diff --git a/infra/config/generated/luci/commit-queue.cfg b/infra/config/generated/luci/commit-queue.cfg index 39d30f97..6b8bfd31 100644 --- a/infra/config/generated/luci/commit-queue.cfg +++ b/infra/config/generated/luci/commit-queue.cfg
@@ -1108,6 +1108,10 @@ includable_only: true } builders { + name: "chromium/try/ios-m1-simulator" + includable_only: true + } + builders { name: "chromium/try/ios-simulator" location_regexp: ".*" location_regexp_exclude: ".+/[+]/docs/.+"
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 4ddc8cddf..cc8c0dbbe 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -31156,6 +31156,87 @@ } } builders { + name: "ios-m1-simulator" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builder:ios-m1-simulator" + dimensions: "cpu:arm64" + dimensions: "os:Mac-11" + 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/ios-m1-simulator/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"' + '}' + execution_timeout_secs: 36000 + caches { + name: "xcode_ios_13c100" + path: "xcode_ios_13c100.app" + } + build_numbers: YES + service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" + 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/.+" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + } + builders { name: "ios-reclient" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:ios-reclient" @@ -31902,7 +31983,7 @@ name: "ios14-sdk-simulator" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:ios14-sdk-simulator" - dimensions: "cpu:arm64" + dimensions: "cpu:x86-64" dimensions: "os:Mac-11" dimensions: "pool:luci.chromium.ci" exe { @@ -63158,6 +63239,98 @@ } } builders { + name: "ios-m1-simulator" + swarming_host: "chromium-swarm.appspot.com" + dimensions: "builder:ios-m1-simulator" + dimensions: "cpu:arm64" + dimensions: "os:Mac-11" + dimensions: "pool:luci.chromium.try" + exe { + cipd_package: "infra/chromium/bootstrapper/${platform}" + cipd_version: "latest" + cmd: "bootstrapper" + } + properties: + '{' + ' "$bootstrap/exe": {' + ' "exe": {' + ' "cipd_package": "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",' + ' "cipd_version": "refs/heads/main",' + ' "cmd": [' + ' "luciexe"' + ' ]' + ' }' + ' },' + ' "$bootstrap/properties": {' + ' "properties_file": "infra/config/generated/builders/try/ios-m1-simulator/properties.json",' + ' "top_level_project": {' + ' "ref": "refs/heads/main",' + ' "repo": {' + ' "host": "chromium.googlesource.com",' + ' "project": "chromium/src"' + ' }' + ' }' + ' },' + ' "builder_group": "tryserver.chromium.mac",' + ' "led_builder_is_bootstrapped": true,' + ' "recipe": "chromium_trybot"' + '}' + execution_timeout_secs: 14400 + expiration_secs: 7200 + grace_period { + seconds: 120 + } + caches { + name: "win_toolchain" + path: "win_toolchain" + } + caches { + name: "xcode_ios_13c100" + path: "xcode_ios_13c100.app" + } + build_numbers: YES + service_account: "chromium-try-builder@chops-service-accounts.iam.gserviceaccount.com" + task_template_canary_percentage { + value: 5 + } + experiments { + key: "luci.recipes.use_python3" + value: 100 + } + resultdb { + enable: true + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "try_test_results" + test_results {} + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "gpu_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://chrome/test:telemetry_gpu_integration_test[^/]*/.+" + } + } + } + bq_exports { + project: "chrome-luci-data" + dataset: "chromium" + table: "blink_web_tests_try_test_results" + test_results { + predicate { + test_id_regexp: "ninja://[^/]*blink_web_tests/.+" + } + } + } + history_options { + use_invocation_timestamp: true + } + } + } + builders { name: "ios-simulator" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:ios-simulator" @@ -63897,7 +64070,7 @@ name: "ios14-sdk-simulator" swarming_host: "chromium-swarm.appspot.com" dimensions: "builder:ios14-sdk-simulator" - dimensions: "cpu:arm64" + dimensions: "cpu:x86-64" dimensions: "os:Mac-11" dimensions: "pool:luci.chromium.try" exe {
diff --git a/infra/config/generated/luci/luci-milo.cfg b/infra/config/generated/luci/luci-milo.cfg index b24d33e..6505792 100644 --- a/infra/config/generated/luci/luci-milo.cfg +++ b/infra/config/generated/luci/luci-milo.cfg
@@ -6619,6 +6619,11 @@ short_name: "sdk15" } builders { + name: "buildbucket/luci.chromium.ci/ios-m1-simulator" + category: "iOS|iOSM1" + short_name: "iosM1" + } + builders { name: "buildbucket/luci.chromium.ci/VR Linux" category: "linux" } @@ -15176,6 +15181,9 @@ name: "buildbucket/luci.chromium.try/ios-fieldtrial-fyi-rel" } builders { + name: "buildbucket/luci.chromium.try/ios-m1-simulator" + } + builders { name: "buildbucket/luci.chromium.try/ios-simulator" } builders { @@ -16578,6 +16586,9 @@ name: "buildbucket/luci.chromium.try/ios-fieldtrial-fyi-rel" } builders { + name: "buildbucket/luci.chromium.try/ios-m1-simulator" + } + builders { name: "buildbucket/luci.chromium.try/ios-simulator" } builders {
diff --git a/infra/config/generated/luci/luci-scheduler.cfg b/infra/config/generated/luci/luci-scheduler.cfg index e16e2c1..e8a67b8 100644 --- a/infra/config/generated/luci/luci-scheduler.cfg +++ b/infra/config/generated/luci/luci-scheduler.cfg
@@ -5253,6 +5253,17 @@ } } job { + id: "ios-m1-simulator" + realm: "ci" + schedule: "0 1,5,9,13,17,21 * * *" + acl_sets: "ci" + buildbucket { + server: "cr-buildbucket.appspot.com" + bucket: "ci" + builder: "ios-m1-simulator" + } +} +job { id: "ios-reclient" realm: "ci" acl_sets: "ci"
diff --git a/infra/config/subprojects/chromium/ci/chromium.fyi.star b/infra/config/subprojects/chromium/ci/chromium.fyi.star index aaeecc6d..0011e12 100644 --- a/infra/config/subprojects/chromium/ci/chromium.fyi.star +++ b/infra/config/subprojects/chromium/ci/chromium.fyi.star
@@ -1347,6 +1347,19 @@ }, }, ) + +fyi_ios_builder( + name = "ios-m1-simulator", + console_view_entry = consoles.console_view_entry( + category = "iOS|iOSM1", + short_name = "iosM1", + ), + os = os.MAC_11, + cpu = cpu.ARM64, + schedule = "0 1,5,9,13,17,21 * * *", + triggered_by = [], +) + fyi_ios_builder( name = "ios-reclient", console_view_entry = consoles.console_view_entry( @@ -1409,7 +1422,6 @@ short_name = "sdk14", ), os = os.MAC_11, - cpu = cpu.ARM64, schedule = "0 2,6,10,14,18,22 * * *", triggered_by = [], )
diff --git a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star index 3f319498..ca7fff7 100644 --- a/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star +++ b/infra/config/subprojects/chromium/try/tryserver.chromium.mac.star
@@ -251,6 +251,12 @@ ) ios_builder( + name = "ios-m1-simulator", + os = os.MAC_11, + cpu = cpu.ARM64, +) + +ios_builder( name = "ios-simulator", branch_selector = branches.STANDARD_MILESTONE, check_for_flakiness = True, @@ -319,7 +325,6 @@ ios_builder( name = "ios14-sdk-simulator", os = os.MAC_11, - cpu = cpu.ARM64, ) ios_builder(
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_egtest.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_egtest.mm index 15947e4..298e2bd 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_egtest.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_egtest.mm
@@ -233,6 +233,12 @@ grey_descendant(SearchHistorySuggestedActionWithMatches(matches_count)), grey_sufficientlyVisible(), nil); } +// Matcher for the select tabs button in the context menu. +id<GREYMatcher> SelectTabsContextMenuItem() { + return chrome_test_util::ButtonWithAccessibilityLabelId( + IDS_IOS_CONTENT_CONTEXT_SELECTTABS); +} + } // namespace @interface TabGridTestCase : WebHttpServerChromeTestCase { @@ -259,6 +265,7 @@ @selector(testSearchOpenTabsContextMenuAddToReadingList), @selector(testSearchOpenTabsContextMenuAddToBookmarks), @selector(testSearchOpenTabsContextMenuCloseTab), + @selector(testSearchOpenTabsContextMenuSelectTabsUnavailable), @selector(testOpenTabsHeaderVisibleInSearchModeWhenSearchBarIsNotEmpty), @selector(testSuggestedActionsVisibleInSearchModeWhenSearchBarIsNotEmpty), @selector(testSearchSuggestedActionsDisplaysCorrectHistoryMatchesCount), @@ -299,7 +306,6 @@ } - (void)tearDown { - [super tearDown]; // Ensure that pref set in testTabGridItemContextMenuAddToBookmarkGreyed is // reset even if the test failed. if ([self isRunningTest:@selector @@ -309,6 +315,7 @@ forUserPref:base::SysUTF8ToNSString( bookmarks::prefs::kEditBookmarksEnabled)]; } + [super tearDown]; } // Tests entering and leaving the tab grid. @@ -586,6 +593,34 @@ assertWithMatcher:grey_sufficientlyVisible()]; } +- (void)testTabGridItemContextSelectTabs { + [ChromeEarlGrey loadURL:_URL1]; + [ChromeEarlGrey waitForWebStateContainingText:kResponse1]; + + [[EarlGrey selectElementWithMatcher:chrome_test_util::ShowTabsButton()] + performAction:grey_tap()]; + + [self longPressTabWithTitle:[NSString stringWithUTF8String:kTitle1]]; + + [[EarlGrey selectElementWithMatcher:SelectTabsContextMenuItem()] + performAction:grey_tap()]; + WaitForTabGridFullscreen(); + + // Wait for the select all button to appear to confirm that edit mode was + // entered. + ConditionBlock condition = ^{ + NSError* error = nil; + [[EarlGrey + selectElementWithMatcher:chrome_test_util::TabGridEditSelectAllButton()] + assertWithMatcher:grey_sufficientlyVisible() + error:&error]; + return (error == nil); + }; + GREYAssert(base::test::ios::WaitUntilConditionOrTimeout( + kWaitForUIElementTimeout, condition), + @"Wait for select all button to appear in tab grid mode."); +} + #pragma mark - Drag and drop in Multiwindow // Tests that dragging a tab grid item to the edge opens a new window and that @@ -1874,6 +1909,28 @@ assertWithMatcher:grey_nil()]; } +- (void)testSearchOpenTabsContextMenuSelectTabsUnavailable { + [self loadTestURLsInNewTabs]; + [ChromeEarlGrey showTabSwitcher]; + + // Enter search mode. + [[EarlGrey selectElementWithMatcher:TabGridSearchTabsButton()] + performAction:grey_tap()]; + + NSString* title2 = base::SysUTF8ToNSString(kTitle2); + [[EarlGrey selectElementWithMatcher:TabGridSearchBar()] + performAction:grey_typeText(title2)]; + + [self longPressTabWithTitle:title2]; + + [[EarlGrey selectElementWithMatcher:SelectTabsContextMenuItem()] + assertWithMatcher:grey_nil()]; + + // Dismiss the context menu. + [[EarlGrey selectElementWithMatcher:RegularTabGrid()] + performAction:grey_tapAtPoint(CGPointMake(0, 0))]; +} + // Tests "search recent tabs" and "search open tabs" suggested actions switch // the tab grid page correctly while staying in the search mode. - (void)testSearchSuggestedActionsPageSwitch {
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_view_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_view_controller.mm index 5c7c44e..2cdbabc 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_view_controller.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/tab_grid_view_controller.mm
@@ -513,6 +513,8 @@ } - (void)setCurrentPageAndPageControl:(TabGridPage)page animated:(BOOL)animated { + [self updatePageWithCurrentSearchTerms:page]; + if (self.topToolbar.pageControl.selectedPage != page) [self.topToolbar.pageControl setSelectedPage:page animated:animated]; if (self.currentPage != page) { @@ -520,6 +522,35 @@ } } +// Sets the current search terms on |page|. This allows the content to update +// while the page is still hidden before the page change animation begins. +- (void)updatePageWithCurrentSearchTerms:(TabGridPage)page { + if (self.tabGridMode != TabGridModeSearch || + self.currentPage == TabGridPageIncognitoTabs) { + // No need to update search term if not in search mode or currently on the + // incognito page. + return; + } + + NSString* searchTerms = nil; + if (self.currentPage == TabGridPageRegularTabs) { + searchTerms = self.regularTabsViewController.searchText; + } else { + searchTerms = self.remoteTabsViewController.searchTerms; + } + + if (page == TabGridPageRegularTabs) { + // Search terms will be non-empty when switching pages. This is important + // because |searchItemsWithText:| will show items from all windows. When no + // search terms exist, |resetToAllItems| is used instead. + DCHECK(searchTerms.length); + self.regularTabsViewController.searchText = searchTerms; + [self.regularTabsDelegate searchItemsWithText:searchTerms]; + } else { + self.remoteTabsViewController.searchTerms = searchTerms; + } +} + #pragma mark - Public Properties - (id<GridConsumer>)regularTabsConsumer { @@ -1903,30 +1934,30 @@ switch (self.currentPage) { case TabGridPageIncognitoTabs: self.incognitoTabsViewController.searchText = searchText; - if (searchText.length) { - [self.incognitoTabsDelegate searchItemsWithText:searchText]; - } else { - // The expectation from searchItemsWithText is to search tabs from all - // the available windows to the app. However in the case of empy string - // the grid should revert back to its original state so it doesn't - // display all the tabs from all the available windows. - [self.incognitoTabsDelegate resetToAllItems]; - } + [self updateSearchGrid:self.incognitoTabsDelegate + withSearchText:searchText]; break; case TabGridPageRegularTabs: - case TabGridPageRemoteTabs: self.regularTabsViewController.searchText = searchText; - self.remoteTabsViewController.searchTerms = searchText; - if (searchText.length) { - [self.regularTabsDelegate searchItemsWithText:searchText]; - } else { - // The expectation from searchItemsWithText is to search tabs from all - // the available windows to the app. However in the case of empy string - // the grid should revert back to its original state so it doesn't - // display all the tabs from all the available windows. - [self.regularTabsDelegate resetToAllItems]; - } + [self updateSearchGrid:self.regularTabsDelegate + withSearchText:searchText]; break; + case TabGridPageRemoteTabs: + self.remoteTabsViewController.searchTerms = searchText; + break; + } +} + +- (void)updateSearchGrid:(id<GridCommands>)tabsDelegate + withSearchText:(NSString*)searchText { + if (searchText.length) { + [tabsDelegate searchItemsWithText:searchText]; + } else { + // The expectation from searchItemsWithText is to search tabs from all + // the available windows to the app. However in the case of empy string + // the grid should revert back to its original state so it doesn't + // display all the tabs from all the available windows. + [tabsDelegate resetToAllItems]; } }
diff --git a/ios/third_party/earl_grey2/BUILD.gn b/ios/third_party/earl_grey2/BUILD.gn index af592d5..a8dab6a 100644 --- a/ios/third_party/earl_grey2/BUILD.gn +++ b/ios/third_party/earl_grey2/BUILD.gn
@@ -122,6 +122,8 @@ "src/CommonLib/GREYLogger.m", "src/CommonLib/GREYObjcRuntime.h", "src/CommonLib/GREYObjcRuntime.m", + "src/CommonLib/GREYSetup.h", + "src/CommonLib/GREYSetup.m", "src/CommonLib/GREYStopwatch.h", "src/CommonLib/GREYStopwatch.m", "src/CommonLib/GREYSwizzler.h",
diff --git a/media/gpu/h265_decoder.cc b/media/gpu/h265_decoder.cc index 2861579..eb7f6dc 100644 --- a/media/gpu/h265_decoder.cc +++ b/media/gpu/h265_decoder.cc
@@ -234,7 +234,7 @@ } state_ = kTryPreprocessCurrentSlice; - if (curr_slice_hdr_->slice_pic_parameter_set_id != curr_pps_id_) { + if (curr_slice_hdr_->irap_pic) { bool need_new_buffers = false; if (!ProcessPPS(curr_slice_hdr_->slice_pic_parameter_set_id, &need_new_buffers)) {
diff --git a/media/gpu/sandbox/BUILD.gn b/media/gpu/sandbox/BUILD.gn index 6dd29f38e..d9a745c 100644 --- a/media/gpu/sandbox/BUILD.gn +++ b/media/gpu/sandbox/BUILD.gn
@@ -5,7 +5,7 @@ import("//build/config/chromeos/ui_mode.gni") import("//media/gpu/args.gni") -assert(is_chromeos_ash) +assert(is_linux || is_chromeos_ash) source_set("sandbox") { sources = [
diff --git a/media/mojo/mojom/stable/BUILD.gn b/media/mojo/mojom/stable/BUILD.gn index d8fce05..6ea5af91 100644 --- a/media/mojo/mojom/stable/BUILD.gn +++ b/media/mojo/mojom/stable/BUILD.gn
@@ -11,10 +11,16 @@ "stable_video_decoder_types.mojom", ] + enabled_features = [] + if (is_linux || is_chromeos_ash) { + enabled_features += [ "is_linux_or_chromeos_ash" ] + } + public_deps = [ ":native_pixmap_handle", "//media/mojo/mojom:encryption_pattern", "//mojo/public/mojom/base", + "//sandbox/policy/mojom", "//ui/gfx/geometry/mojom", "//ui/gfx/mojom", ]
diff --git a/media/mojo/mojom/stable/stable_video_decoder.mojom b/media/mojo/mojom/stable/stable_video_decoder.mojom index dbd33e27..8b2f898 100644 --- a/media/mojo/mojom/stable/stable_video_decoder.mojom +++ b/media/mojo/mojom/stable/stable_video_decoder.mojom
@@ -6,6 +6,7 @@ import "media/mojo/mojom/stable/stable_video_decoder_types.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; +import "sandbox/policy/mojom/sandbox.mojom"; // This API is a stable version of VideoDecoder. This is used both by LaCrOS and // by out-of-process video decoding to allow the GPU process to forward video @@ -105,9 +106,23 @@ Reset@4() => (); }; +// Only Chrome-for-Linux and ash-chrome should host the implementation of a +// StableVideoDecoderFactory. +[EnableIf=is_linux_or_chromeos_ash] +const sandbox.mojom.Sandbox kStableVideoDecoderFactoryServiceSandbox + = sandbox.mojom.Sandbox.kHardwareVideoDecoding; +[EnableIfNot=is_linux_or_chromeos_ash] +const sandbox.mojom.Sandbox kStableVideoDecoderFactoryServiceSandbox + = sandbox.mojom.Sandbox.kNoSandbox; + +// A StableVideoDecoderFactory service is intended to be hosted in a utility +// process in either ash-chrome or Chrome-for-Linux. It allows the browser +// process to bind a StableVideoDecoder on behalf of some client which can be, +// e.g., the lacros-chrome browser process or a renderer process in ash-chrome. // Next min method ID: 1 -[Stable, Uuid="d6047fd9-fffb-4e37-ad9b-383a1c9e1d2d"] +[ServiceSandbox=kStableVideoDecoderFactoryServiceSandbox, Stable, +Uuid="d6047fd9-fffb-4e37-ad9b-383a1c9e1d2d"] interface StableVideoDecoderFactory { - // Used to create StableVideoDecoder interfaces. + // Creates a StableVideoDecoder and should be called by the browser process. CreateStableVideoDecoder@0(pending_receiver<StableVideoDecoder> receiver); };
diff --git a/net/base/registry_controlled_domains/effective_tld_names.dat b/net/base/registry_controlled_domains/effective_tld_names.dat index 4972019..6365ade3 100644 --- a/net/base/registry_controlled_domains/effective_tld_names.dat +++ b/net/base/registry_controlled_domains/effective_tld_names.dat
@@ -13,7 +13,7 @@ // ===BEGIN ICANN DOMAINS=== -// ac : https://en.wikipedia.org/wiki/.ac +// ac : http://nic.ac/rules.htm ac com.ac edu.ac @@ -869,6 +869,7 @@ // cy : http://www.nic.cy/ // Submitted by registry Panayiotou Fotia <cydns@ucy.ac.cy> +// namespace policies URL https://www.nic.cy/portal//sites/default/files/symfonia_gia_eggrafi.pdf cy ac.cy biz.cy @@ -876,10 +877,9 @@ ekloges.cy gov.cy ltd.cy -name.cy +mil.cy net.cy org.cy -parliament.cy press.cy pro.cy tm.cy @@ -1370,7 +1370,7 @@ int eu.int -// io : http://www.nic.io/rules.html +// io : http://www.nic.io/rules.htm // list of other 2nd level tlds ? io com.io @@ -3769,11 +3769,10 @@ // ky : http://www.icta.ky/da_ky_reg_dom.php // Confirmed by registry <kysupport@perimeterusa.com> 2008-06-17 ky -edu.ky -gov.ky com.ky -org.ky +edu.ky net.ky +org.ky // kz : https://en.wikipedia.org/wiki/.kz // see also: http://www.nic.kz/rules/index.jsp @@ -6041,7 +6040,7 @@ edu.sg per.sg -// sh : http://www.nic.sh/registrar.html +// sh : http://nic.sh/rules.htm sh com.sh net.sh @@ -7136,7 +7135,7 @@ // newGTLDs -// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2021-10-08T15:12:46Z +// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2022-03-22T15:14:59Z // This list is auto-generated, don't edit it manually. // aaa : 2015-02-26 American Automobile Association, Inc. aaa @@ -7201,9 +7200,6 @@ // aetna : 2015-05-21 Aetna Life Insurance Company aetna -// afamilycompany : 2015-07-23 Johnson Shareholdings, Inc. -afamilycompany - // afl : 2014-10-02 Australian Football League afl @@ -7342,7 +7338,7 @@ // audible : 2015-06-25 Amazon Registry Services, Inc. audible -// audio : 2014-03-20 UNR Corp. +// audio : 2014-03-20 XYZ.COM LLC audio // auspost : 2015-08-13 Australian Postal Corporation @@ -7534,7 +7530,7 @@ // bostik : 2015-05-28 Bostik SA bostik -// boston : 2015-12-10 Boston TLD Management, LLC +// boston : 2015-12-10 Registry Services, LLC boston // bot : 2014-12-18 Amazon Registry Services, Inc. @@ -7564,9 +7560,6 @@ // brussels : 2014-02-06 DNS.be vzw brussels -// budapest : 2013-11-21 Minds + Machines Group Limited -budapest - // bugatti : 2015-07-23 Bugatti International SA bugatti @@ -7603,7 +7596,7 @@ // calvinklein : 2015-07-30 PVH gTLD Holdings LLC calvinklein -// cam : 2016-04-21 AC Webconnecting Holding B.V. +// cam : 2016-04-21 Cam Connecting SARL cam // camera : 2013-08-27 Binky Moon, LLC @@ -7651,7 +7644,7 @@ // casa : 2013-11-21 Registry Services, LLC casa -// case : 2015-09-03 CNH Industrial N.V. +// case : 2015-09-03 Helium TLDs Ltd case // cash : 2014-03-06 Binky Moon, LLC @@ -7714,7 +7707,7 @@ // chintai : 2015-06-11 CHINTAI Corporation chintai -// christmas : 2013-11-21 UNR Corp. +// christmas : 2013-11-21 XYZ.COM LLC christmas // chrome : 2014-07-24 Charleston Road Registry Inc. @@ -7876,9 +7869,6 @@ // cruises : 2013-12-05 Binky Moon, LLC cruises -// csc : 2014-09-25 Alliance-One Services, Inc. -csc - // cuisinella : 2014-04-03 SCHMIDT GROUPE S.A.S. cuisinella @@ -7966,7 +7956,7 @@ // diamonds : 2013-09-22 Binky Moon, LLC diamonds -// diet : 2014-06-26 UNR Corp. +// diet : 2014-06-26 XYZ.COM LLC diet // digital : 2014-03-06 Binky Moon, LLC @@ -8020,9 +8010,6 @@ // dubai : 2015-01-01 Dubai Smart Government Department dubai -// duck : 2015-07-23 Johnson Shareholdings, Inc. -duck - // dunlop : 2015-07-02 The Goodyear Tire & Rubber Company dunlop @@ -8215,7 +8202,7 @@ // florist : 2013-11-07 Binky Moon, LLC florist -// flowers : 2014-10-09 UNR Corp. +// flowers : 2014-10-09 XYZ.COM LLC flowers // fly : 2014-05-08 Charleston Road Registry Inc. @@ -8302,7 +8289,7 @@ // gallup : 2015-02-19 Gallup, Inc. gallup -// game : 2015-05-28 UNR Corp. +// game : 2015-05-28 XYZ.COM LLC game // games : 2015-05-28 Dog Beach, LLC @@ -8350,9 +8337,6 @@ // giving : 2014-11-13 Giving Limited giving -// glade : 2015-07-23 Johnson Shareholdings, Inc. -glade - // glass : 2013-11-07 Binky Moon, LLC glass @@ -8440,7 +8424,7 @@ // guide : 2013-09-13 Binky Moon, LLC guide -// guitars : 2013-11-14 UNR Corp. +// guitars : 2013-11-14 XYZ.COM LLC guitars // guru : 2013-08-27 Binky Moon, LLC @@ -8488,7 +8472,7 @@ // hgtv : 2015-07-02 Lifestyle Domain Holdings, Inc. hgtv -// hiphop : 2014-03-06 UNR Corp. +// hiphop : 2014-03-06 Dot Hip Hop LLC hiphop // hisamitsu : 2015-07-16 Hisamitsu Pharmaceutical Co.,Inc. @@ -8536,7 +8520,7 @@ // host : 2014-04-17 Radix FZC host -// hosting : 2014-05-29 UNR Corp. +// hosting : 2014-05-29 XYZ.COM LLC hosting // hot : 2015-08-27 Amazon Registry Services, Inc. @@ -8884,9 +8868,6 @@ // living : 2015-07-30 Lifestyle Domain Holdings, Inc. living -// lixil : 2015-03-19 LIXIL Group Corporation -lixil - // llc : 2017-12-14 Afilias Limited llc @@ -8908,7 +8889,7 @@ // loft : 2015-07-30 Annco, Inc. loft -// lol : 2015-01-30 UNR Corp. +// lol : 2015-01-30 XYZ.COM LLC lol // london : 2013-11-14 Dot London Domains Limited @@ -9025,7 +9006,7 @@ // merckmsd : 2016-07-14 MSD Registry Holdings, Inc. merckmsd -// miami : 2013-12-19 Minds + Machines Group Limited +// miami : 2013-12-19 Registry Services, LLC miami // microsoft : 2014-12-18 Microsoft Corporation @@ -9064,7 +9045,7 @@ // moi : 2014-12-18 Amazon Registry Services, Inc. moi -// mom : 2015-04-16 UNR Corp. +// mom : 2015-04-16 XYZ.COM LLC mom // monash : 2013-09-30 Monash University @@ -9220,9 +9201,6 @@ // observer : 2015-04-30 Dog Beach, LLC observer -// off : 2015-07-23 Johnson Shareholdings, Inc. -off - // office : 2015-03-12 Microsoft Corporation office @@ -9346,7 +9324,7 @@ // physio : 2014-05-01 PhysBiz Pty Ltd physio -// pics : 2013-11-14 UNR Corp. +// pics : 2013-11-14 XYZ.COM LLC pics // pictet : 2014-06-26 Pictet Europe S.A. @@ -9466,9 +9444,6 @@ // radio : 2016-07-21 European Broadcasting Union (EBU) radio -// raid : 2015-07-23 Johnson Shareholdings, Inc. -raid - // read : 2014-12-18 Amazon Registry Services, Inc. read @@ -9673,9 +9648,6 @@ // science : 2014-09-11 dot Science Limited science -// scjohnson : 2015-07-23 Johnson Shareholdings, Inc. -scjohnson - // scot : 2014-01-23 Dot Scot Registry Limited scot @@ -10321,9 +10293,6 @@ // xn--3ds443g : 2013-09-08 TLD REGISTRY LIMITED OY 在线 -// xn--3oq18vl8pn36a : 2015-07-02 Volkswagen (China) Investment Co., Ltd. -大众汽车 - // xn--3pxu8k : 2015-01-15 VeriSign Sarl 点看 @@ -10668,6 +10637,10 @@ // Submitted by Przemyslaw Plewa <it-admin@domena.pl> beep.pl +// Aiven: https://aiven.io/ +// Submitted by Etienne Stalmans <security@aiven.io> +aivencloud.com + // alboto.ca : http://alboto.ca // Submitted by Anton Avramov <avramov@alboto.ca> barsy.ca @@ -10789,10 +10762,6 @@ s3-website.eu-west-3.amazonaws.com s3-website.us-east-2.amazonaws.com -// Amsterdam Wireless: https://www.amsterdamwireless.nl/ -// Submitted by Imre Jonk <hostmaster@amsterdamwireless.nl> -amsw.nl - // Amune : https://amune.org/ // Submitted by Team Amune <cert@amune.org> t3l3p0rt.net @@ -10844,6 +10813,10 @@ // Submitted by Sam Smyth <devloop@atlassian.com> cdn.prod.atlassian-dev.net +// Authentick UG (haftungsbeschränkt) : https://authentick.net +// Submitted by Lukas Reschke <lukas@authentick.net> +translated.page + // AVM : https://avm.de // Submitted by Andreas Weise <a.weise@avm.de> myfritz.net @@ -10858,7 +10831,7 @@ *.advisor.ws // AZ.pl sp. z.o.o: https://az.pl -// Submited by Krzysztof Wolski <krzysztof.wolski@home.eu> +// Submitted by Krzysztof Wolski <krzysztof.wolski@home.eu> ecommerce-shop.pl // b-data GmbH : https://www.b-data.io @@ -10884,6 +10857,22 @@ app.banzaicloud.io *.backyards.banzaicloud.io +// BASE, Inc. : https://binc.jp +// Submitted by Yuya NAGASAWA <public-suffix-list@binc.jp> +base.ec +official.ec +buyshop.jp +fashionstore.jp +handcrafted.jp +kawaiishop.jp +supersale.jp +theshop.jp +shopselect.net +base.shop + +// Beget Ltd +// Submitted by Lev Nekrasov <lnekrasov@beget.com> +*.beget.app // BetaInABox // Submitted by Adrian <adrian@betainabox.com> @@ -10986,7 +10975,6 @@ // No longer operated by CentralNic, these entries should be adopted and/or removed by current operators // Submitted by Gavin Brown <gavin.brown@centralnic.com> ar.com -gb.com hu.com kr.com no.com @@ -11040,10 +11028,6 @@ discourse.group discourse.team -// ClearVox : http://www.clearvox.nl/ -// Submitted by Leon Rowland <leon@clearvox.nl> -virtueeldomein.nl - // Clever Cloud : https://www.clever-cloud.com/ // Submitted by Quentin Adam <noc@clever-cloud.com> cleverapps.io @@ -11131,6 +11115,10 @@ // Submitted by Angelo Gladding <angelo@lahacker.net> cnpy.gdn +// Codeberg e. V. : https://codeberg.org +// Submitted by Moritz Marquardt <git@momar.de> +codeberg.page + // CoDNS B.V. co.nl co.no @@ -11257,11 +11245,21 @@ // Submitted by Peter Thomassen <peter@desec.io> dedyn.io +// Deta: https://www.deta.sh/ +// Submitted by Aavash Shrestha <aavash@deta.sh> +deta.app +deta.dev + // Diher Solutions : https://diher.solutions // Submitted by Didi Hermawan <mail@diher.solutions> *.rss.my.id *.diher.solutions +// Discord Inc : https://discord.com +// Submitted by Sahn Lam <slam@discordapp.com> +discordsays.com +discordsez.com + // DNS Africa Ltd https://dns.business // Submitted by Calvin Browne <calvin@dns.business> jozi.biz @@ -11674,6 +11672,10 @@ onred.one staging.onred.one +// encoway GmbH : https://www.encoway.de +// Submitted by Marcel Daus <cloudops@encoway.de> +eu.encoway.cloud + // EU.org https://eu.org/ // Submitted by Pierre Beyssac <hostmaster@eu.org> eu.org @@ -11877,8 +11879,6 @@ // FearWorks Media Ltd. : https://fearworksmedia.co.uk // submitted by Keith Fairley <domains@fearworksmedia.co.uk> -couk.me -ukco.me conn.uk copro.uk hosp.uk @@ -11913,6 +11913,11 @@ // Submitted by Louis Chemineau <louis@chmn.me> flap.id +// FlashDrive : https://flashdrive.io +// Submitted by Eric Chan <support@flashdrive.io> +onflashdrive.app +fldrv.com + // fly.io: https://fly.io // Submitted by Kurt Mackey <kurt@fly.io> fly.dev @@ -11923,7 +11928,7 @@ // Submitted by Jonathan Rudenberg <jonathan@flynn.io> flynnhosting.net -// Forgerock : https://www.forgerock.com +// Forgerock : https://www.forgerock.com // Submitted by Roderick Parr <roderick.parr@forgerock.com> forgeblocks.com id.forgerock.io @@ -11977,10 +11982,22 @@ *.kunden.ortsinfo.at *.statics.cloud -// GDS : https://www.gov.uk/service-manual/operations/operating-servicegovuk-subdomains -// Submitted by David Illsley <david.illsley@digital.cabinet-office.gov.uk> +// GDS : https://www.gov.uk/service-manual/technology/managing-domain-names +// Submitted by Stephen Ford <hostmaster@digital.cabinet-office.gov.uk> +independent-commission.uk +independent-inquest.uk +independent-inquiry.uk +independent-panel.uk +independent-review.uk +public-inquiry.uk +royal-commission.uk +campaign.gov.uk service.gov.uk +// CDDO : https://www.gov.uk/guidance/get-an-api-domain-on-govuk +// Submitted by Jamie Tanna <jamie.tanna@digital.cabinet-office.gov.uk> +api.gov.uk + // Gehirn Inc. : https://www.gehirn.co.jp/ // Submitted by Kohei YOSHIDA <tech@gehirn.co.jp> gehirn.ne.jp @@ -12030,8 +12047,113 @@ shop.ro // GMO Pepabo, Inc. : https://pepabo.com/ -// Submitted by dojineko <admin@pepabo.com> +// Submitted by Hosting Div <admin@pepabo.com> lolipop.io +angry.jp +babyblue.jp +babymilk.jp +backdrop.jp +bambina.jp +bitter.jp +blush.jp +boo.jp +boy.jp +boyfriend.jp +but.jp +candypop.jp +capoo.jp +catfood.jp +cheap.jp +chicappa.jp +chillout.jp +chips.jp +chowder.jp +chu.jp +ciao.jp +cocotte.jp +coolblog.jp +cranky.jp +cutegirl.jp +daa.jp +deca.jp +deci.jp +digick.jp +egoism.jp +fakefur.jp +fem.jp +flier.jp +floppy.jp +fool.jp +frenchkiss.jp +girlfriend.jp +girly.jp +gloomy.jp +gonna.jp +greater.jp +hacca.jp +heavy.jp +her.jp +hiho.jp +hippy.jp +holy.jp +hungry.jp +icurus.jp +itigo.jp +jellybean.jp +kikirara.jp +kill.jp +kilo.jp +kuron.jp +littlestar.jp +lolitapunk.jp +lomo.jp +lovepop.jp +lovesick.jp +main.jp +mods.jp +mond.jp +mongolian.jp +moo.jp +namaste.jp +nikita.jp +nobushi.jp +noor.jp +oops.jp +parallel.jp +parasite.jp +pecori.jp +peewee.jp +penne.jp +pepper.jp +perma.jp +pigboat.jp +pinoko.jp +punyu.jp +pupu.jp +pussycat.jp +pya.jp +raindrop.jp +readymade.jp +sadist.jp +schoolbus.jp +secret.jp +staba.jp +stripper.jp +sub.jp +sunnyday.jp +thick.jp +tonkotsu.jp +under.jp +upper.jp +velvet.jp +verse.jp +versus.jp +vivian.jp +watson.jp +weblike.jp +whitesnow.jp +zombie.jp +heteml.net // GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/ // Submitted by Tom Whitwell <gov-uk-paas-support@digital.cabinet-office.gov.uk> @@ -12163,7 +12285,7 @@ günstigliefern.de // Hakaran group: http://hakaran.cz -// Submited by Arseniy Sokolov <security@hakaran.cz> +// Submitted by Arseniy Sokolov <security@hakaran.cz> fin.ci free.hr caa.li @@ -12198,6 +12320,7 @@ // Hibernating Rhinos // Submitted by Oren Eini <oren@ravendb.net> +ravendb.cloud myravendb.com ravendb.community ravendb.me @@ -12205,13 +12328,18 @@ ravendb.run // home.pl S.A.: https://home.pl -// Submited by Krzysztof Wolski <krzysztof.wolski@home.eu> +// Submitted by Krzysztof Wolski <krzysztof.wolski@home.eu> homesklep.pl // Hong Kong Productivity Council: https://www.hkpc.org/ // Submitted by SECaaS Team <summchan@hkpc.org> secaas.hk +// Hoplix : https://www.hoplix.com +// Submitted by Danilo De Franco<info@hoplix.shop> +hoplix.shop + + // HOSTBIP REGISTRY : https://www.hostbip.com/ // Submitted by Atanunu Igbunuroghene <publicsuffixlist@hostbip.com> orx.biz @@ -12310,7 +12438,7 @@ pixolino.com // Internet-Pro, LLP: https://netangels.ru/ -// Submited by Vasiliy Sheredeko <piphon@gmail.com> +// Submitted by Vasiliy Sheredeko <piphon@gmail.com> na4u.ru // iopsys software solutions AB : https://iopsys.eu/ @@ -12333,7 +12461,7 @@ iobb.net // Jelastic, Inc. : https://jelastic.com/ -// Submited by Ihor Kolodyuk <ik@jelastic.com> +// Submitted by Ihor Kolodyuk <ik@jelastic.com> mel.cloudlets.com.au cloud.interhostsolutions.be users.scale.virtualcloud.com.br @@ -12444,6 +12572,14 @@ kaas.gg khplay.nl +// Kakao : https://www.kakaocorp.com/ +// Submitted by JaeYoong Lee <cec@kakaocorp.com> +ktistory.com + +// Kapsi : https://kapsi.fi +// Submitted by Tomi Juntunen <erani@kapsi.fi> +kapsi.fi + // Keyweb AG : https://www.keyweb.de // Submitted by Martin Dannehl <postmaster@keymachine.de> keymachine.de @@ -12457,6 +12593,10 @@ // Submitted by Roy Keene <rkeene@knightpoint.com> knightpoint.systems +// KoobinEvent, SL: https://www.koobin.com +// Submitted by Iván Oliva <ivan.oliva@koobin.com> +koobin.events + // KUROKU LTD : https://kuroku.ltd/ // Submitted by DisposaBoy <security@oya.to> oya.to @@ -12725,6 +12865,10 @@ from.work to.work +// Net at Work Gmbh : https://www.netatwork.de +// Submitted by Jan Jaeschke <jan.jaeschke@netatwork.de> +cloud.nospamproxy.com + // Netlify : https://www.netlify.com // Submitted by Jessica Parsons <jessica@netlify.com> netlify.app @@ -12753,7 +12897,10 @@ // Northflank Ltd. : https://northflank.com/ // Submitted by Marco Suter <marco@northflank.com> *.northflank.app +*.build.run *.code.run +*.database.run +*.migration.run // Noticeable : https://noticeable.io // Submitted by Laurent Pellegrino <security@noticeable.io> @@ -12884,11 +13031,6 @@ // Submitted by Konstantin Nosov <Nosov@nodeart.io> stage.nodeart.io -// Nodum B.V. : https://nodum.io/ -// Submitted by Wietse Wind <hello+publicsuffixlist@nodum.io> -nodum.co -nodum.io - // Nucleos Inc. : https://nucleos.com // Submitted by Piotr Zduniak <piotr@nucleos.com> pcloud.host @@ -12941,8 +13083,12 @@ // Submitted by Yngve Pettersen <yngve@opera.com> operaunite.com +// Orange : https://www.orange.com +// Submitted by Alexandre Linte <alexandre.linte@orange.com> +tech.orange + // Oursky Limited : https://authgear.com/, https://skygear.io/ -// Submited by Authgear Team <hello@authgear.com>, Skygear Developer <hello@skygear.io> +// Submitted by Authgear Team <hello@authgear.com>, Skygear Developer <hello@skygear.io> authgear-staging.com authgearapps.com skygearapp.com @@ -13050,6 +13196,10 @@ // Submitted by Maximilian Schieder <maxi@zeug.co> dyn53.io +// Porter : https://porter.run/ +// Submitted by Rudraksh MK <rudi@porter.run> +onporter.run + // Positive Codes Technology Company : http://co.bn/faq.html // Submitted by Zulfais <pc@co.bn> co.bn @@ -13211,6 +13361,10 @@ // Submitted by Jennifer Herting <jchits@rit.edu> git-pages.rit.edu +// Rocky Enterprise Software Foundation : https://resf.org +// Submitted by Neil Hanlon <neil@resf.org> +rocky.page + // Rusnames Limited: http://rusnames.ru/ // Submitted by Sergey Zotov <admin@rusnames.ru> биз.рус @@ -13353,6 +13507,8 @@ stackhero-network.com // Staclar : https://staclar.com +// Submitted by Q Misell <q@staclar.com> +musician.io // Submitted by Matthias Merkel <matthias.merkel@staclar.com> novecore.site @@ -13487,9 +13643,14 @@ med.pl sopot.pl +// team.blue https://team.blue +// Submitted by Cedric Dubois <cedric.dubois@team.blue> +site.tb-hosting.com + // Teckids e.V. : https://www.teckids.org // Submitted by Dominik George <dominik.george@teckids.org> -edugit.org +edugit.io +s3.teckids.org // Telebit : https://telebit.cloud // Submitted by AJ ONeal <aj@telebit.cloud> @@ -13567,6 +13728,10 @@ *.transurl.eu *.transurl.nl +// TransIP: https://www.transip.nl +// Submitted by Cedric Dubois <cedric.dubois@team.blue> +site.transip.me + // TuxFamily : http://tuxfamily.org // Submitted by TuxFamily administrators <adm@staff.tuxfamily.org> tuxfamily.org @@ -13587,6 +13752,14 @@ synology-diskstation.de synology-ds.de +// Typedream : https://typedream.com +// Submitted by Putri Karunia <putri@typedream.com> +typedream.app + +// Typeform : https://www.typeform.com +// Submitted by Sergi Ferriz <sergi.ferriz@typeform.com> +pro.typeform.com + // Uberspace : https://uberspace.de // Submitted by Moritz Werner <mwerner@jonaspasche.com> uber.space @@ -13685,19 +13858,14 @@ // Submitted by Serhii Rostilo <sergey@rostilo.kiev.ua> v.ua +// Vultr Objects : https://www.vultr.com/products/object-storage/ +// Submitted by Niels Maumenee <storage@vultr.com> +*.vultrobjects.com + // Waffle Computer Inc., Ltd. : https://docs.waffleinfo.com // Submitted by Masayuki Note <masa@blade.wafflecell.com> wafflecell.com -// WapBlog.ID : https://www.wapblog.id -// Submitted by Fajar Sodik <official@wapblog.id> -idnblogger.com -indowapblog.com -bloger.id -wblog.id -wbq.me -fastblog.net - // WebHare bv: https://www.webhare.com/ // Submitted by Arnold Hendriks <info@webhare.com> *.webhare.dev @@ -13734,6 +13902,10 @@ panel.gg daemon.panel.gg +// Wizard Zines : https://wizardzines.com +// Submitted by Julia Evans <julia@wizardzines.com> +messwithdns.com + // WoltLab GmbH : https://www.woltlab.com // Submitted by Tim Düsterhus <security@woltlab.cloud> woltlab-demo.com
diff --git a/net/base/registry_controlled_domains/effective_tld_names.gperf b/net/base/registry_controlled_domains/effective_tld_names.gperf index 14fe527..e2fa64f 100644 --- a/net/base/registry_controlled_domains/effective_tld_names.gperf +++ b/net/base/registry_controlled_domains/effective_tld_names.gperf
@@ -163,7 +163,6 @@ aeroport.fr, 0 aetna, 0 af, 0 -afamilycompany, 0 affinitylottery.org.uk, 4 afjord.no, 0 afl, 0 @@ -210,6 +209,7 @@ airtraffic.aero, 0 aisai.aichi.jp, 0 aisho.shiga.jp, 0 +aivencloud.com, 4 aizubange.fukushima.jp, 0 aizumi.tokushima.jp, 0 aizumisato.fukushima.jp, 0 @@ -294,7 +294,6 @@ amscompute.com, 4 amsterdam, 0 amsterdam.museum, 0 -amsw.nl, 4 amusement.aero, 0 an.it, 0 analytics, 0 @@ -314,6 +313,7 @@ andriabarlettatrani.it, 0 andriatranibarletta.it, 0 android, 0 +angry.jp, 4 anjo.aichi.jp, 0 ann-arbor.mi.us, 0 annaka.gunma.jp, 0 @@ -348,6 +348,7 @@ ap.leg.br, 4 aparecida.br, 0 apartments, 0 +api.gov.uk, 4 api.stdlib.com, 4 apigee.io, 4 app, 0 @@ -565,6 +566,9 @@ ba.leg.br, 4 babia-gora.pl, 0 baby, 0 +babyblue.jp, 4 +babymilk.jp, 4 +backdrop.jp, 4 backplaneapp.io, 4 backyards.banzaicloud.io, 6 badaddja.no, 0 @@ -588,6 +592,7 @@ balsan.it, 0 balsfjord.no, 0 baltimore.museum, 0 +bambina.jp, 4 bamble.no, 0 banamex, 0 bananarepublic, 0 @@ -642,6 +647,8 @@ barueri.br, 0 barum.no, 0 bas.it, 0 +base.ec, 4 +base.shop, 4 baseball, 0 baseball.museum, 0 basel.museum, 0 @@ -681,6 +688,7 @@ beeldengeluid.museum, 0 beep.pl, 4 beer, 0 +beget.app, 6 beiarn.no, 0 bel.tr, 0 belau.pw, 0 @@ -748,6 +756,7 @@ birthplace.museum, 0 bitbridge.net, 4 bitbucket.io, 4 +bitter.jp, 4 biz, 0 biz.at, 4 biz.az, 0 @@ -795,7 +804,6 @@ blogdns.com, 4 blogdns.net, 4 blogdns.org, 4 -bloger.id, 4 blogsite.org, 4 blogsite.xyz, 4 blogspot.ae, 4 @@ -877,6 +885,7 @@ bloxcms.com, 4 blue, 0 bluebite.io, 4 +blush.jp, 4 bm, 0 bmd.br, 0 bmoattachments.org, 4 @@ -908,6 +917,7 @@ bond, 0 bonn.museum, 0 boo, 0 +boo.jp, 4 book, 0 booking, 0 bookonline.app, 4 @@ -927,6 +937,8 @@ boutir.com, 4 box, 0 boxfuse.io, 4 +boy.jp, 4 +boyfriend.jp, 4 bozen-sudtirol.it, 0 bozen-suedtirol.it, 0 bozen.it, 0 @@ -972,10 +984,10 @@ bt, 0 bt.it, 0 bu.no, 0 -budapest, 0 budejju.no, 0 bugatti, 0 build, 0 +build.run, 6 builders, 0 building.museum, 0 builtwithdark.com, 4 @@ -991,7 +1003,9 @@ busan.kr, 0 bushey.museum, 0 business, 0 +but.jp, 4 buy, 0 +buyshop.jp, 4 buyshouses.net, 4 buzen.fukuoka.jp, 0 buzz, 0 @@ -1041,6 +1055,7 @@ camdvr.org, 4 camera, 0 camp, 0 +campaign.gov.uk, 4 campania.it, 0 campidano-medio.it, 0 campidanomedio.it, 0 @@ -1050,11 +1065,13 @@ can.museum, 0 canada.museum, 0 cancerresearch, 0 +candypop.jp, 4 canon, 0 capebreton.museum, 0 capetown, 0 capital, 0 capitalone, 0 +capoo.jp, 4 car, 0 caracal.mythic-beasts.com, 4 caravan, 0 @@ -1087,6 +1104,7 @@ catanzaro.it, 0 catering, 0 catering.aero, 0 +catfood.jp, 4 catholic, 0 catholic.edu.au, 0 caxias.br, 0 @@ -1195,6 +1213,7 @@ chat, 0 chattanooga.museum, 0 cheap, 0 +cheap.jp, 4 cheltenham.museum, 0 cherkassy.ua, 0 cherkasy.ua, 0 @@ -1205,6 +1224,7 @@ chesapeakebay.museum, 0 chiba.jp, 0 chicago.museum, 0 +chicappa.jp, 4 chichibu.saitama.jp, 0 chieti.it, 0 chigasaki.kanagawa.jp, 0 @@ -1221,10 +1241,12 @@ children.museum, 0 childrens.museum, 0 childrensgarden.museum, 0 +chillout.jp, 4 chimkent.su, 4 chino.nagano.jp, 0 chintai, 0 chippubetsu.hokkaido.jp, 0 +chips.jp, 4 chiropractic.museum, 0 chirurgiens-dentistes-en-france.fr, 4 chirurgiens-dentistes.fr, 0 @@ -1239,11 +1261,13 @@ chonan.chiba.jp, 0 chosei.chiba.jp, 0 choshi.chiba.jp, 0 +chowder.jp, 4 choyo.kumamoto.jp, 0 christiansburg.museum, 0 christmas, 0 chrome, 0 chtr.k12.ma.us, 0 +chu.jp, 4 chungbuk.kr, 0 chungnam.kr, 0 chuo.chiba.jp, 0 @@ -1254,6 +1278,7 @@ church, 0 ci, 0 ci.it, 0 +ciao.jp, 4 ciencia.bo, 0 cieszyn.pl, 0 cim.br, 0 @@ -1307,6 +1332,7 @@ cloud.interhostsolutions.be, 4 cloud.jelastic.open.tim.it, 4 cloud.metacentrum.cz, 6 +cloud.nospamproxy.com, 4 cloud66.ws, 4 cloud66.zone, 4 cloudaccess.host, 4 @@ -1429,7 +1455,9 @@ coach, 0 coal.museum, 0 coastaldefence.museum, 0 +cocotte.jp, 4 code.run, 6 +codeberg.page, 4 codes, 0 codespot.com, 4 cody.museum, 0 @@ -1626,6 +1654,7 @@ cooking, 0 cookingchannel, 0 cool, 0 +coolblog.jp, 4 coop, 0 coop.ar, 0 coop.br, 0 @@ -1645,7 +1674,6 @@ cosenza.it, 0 costume.museum, 0 couchpotatofries.org, 4 -couk.me, 4 council.aero, 0 country, 0 countryestate.museum, 0 @@ -1663,6 +1691,7 @@ crafting.xyz, 4 crafts.museum, 0 cranbrook.museum, 0 +cranky.jp, 4 crd.co, 4 creation.museum, 0 credit, 0 @@ -1682,7 +1711,6 @@ cryptonomic.net, 6 cs.it, 0 cs.keliweb.cloud, 4 -csc, 0 csx.cc, 4 ct.it, 0 ct.us, 0 @@ -1705,6 +1733,7 @@ customer-oci.com, 6 customer.mythic-beasts.com, 4 customer.speedpartner.de, 4 +cutegirl.jp, 4 cv, 0 cv.ua, 0 cw, 0 @@ -1727,6 +1756,7 @@ d.bg, 0 d.gv.vc, 4 d.se, 0 +daa.jp, 4 dabur, 0 dad, 0 daegu.kr, 0 @@ -1746,6 +1776,7 @@ dapps.earth, 6 data, 0 database.museum, 0 +database.run, 6 date, 0 date.fukushima.jp, 0 date.hokkaido.jp, 0 @@ -1787,6 +1818,8 @@ deals, 0 deatnu.no, 0 debian.net, 4 +deca.jp, 4 +deci.jp, 4 decorativearts.museum, 0 dedyn.io, 4 def.br, 0 @@ -1822,6 +1855,8 @@ design.aero, 0 design.museum, 0 det.br, 0 +deta.app, 4 +deta.dev, 4 detroit.museum, 0 dev, 0 dev-myqnapcloud.com, 4 @@ -1842,6 +1877,7 @@ diamonds, 0 dielddanuorri.no, 0 diet, 0 +digick.jp, 4 digital, 0 digitaloceanspaces.com, 6 diher.solutions, 6 @@ -1849,6 +1885,8 @@ direct, 0 direct.quickconnect.to, 4 directory, 0 +discordsays.com, 4 +discordsez.com, 4 discount, 0 discourse.group, 4 discourse.team, 4 @@ -1931,7 +1969,6 @@ dst.mi.us, 0 dtv, 0 dubai, 0 -duck, 0 duckdns.org, 4 dunlop, 0 dupont, 0 @@ -2157,13 +2194,14 @@ education.museum, 0 educational.museum, 0 educator.aero, 0 -edugit.org, 4 +edugit.io, 4 ee, 0 ee.eu.org, 4 eero-stage.online, 4 eero.online, 4 eg, 0 egersund.no, 0 +egoism.jp, 4 egyptian.museum, 0 ehime.jp, 0 eid.no, 0 @@ -2274,6 +2312,7 @@ eu-west-3.elasticbeanstalk.com, 4 eu.ax, 4 eu.com, 4 +eu.encoway.cloud, 4 eu.int, 0 eu.meteorapp.com, 4 eu.org, 4 @@ -2307,6 +2346,7 @@ fail, 0 fairwinds, 0 faith, 0 +fakefur.jp, 4 fam.pk, 0 family, 0 family.museum, 0 @@ -2325,8 +2365,8 @@ farmstead.museum, 0 farsund.no, 0 fashion, 0 +fashionstore.jp, 4 fast, 0 -fastblog.net, 4 fastly-terrarium.com, 4 fastlylb.net, 4 faststacks.net, 4 @@ -2346,6 +2386,7 @@ fedorapeople.org, 4 feedback, 0 feira.br, 0 +fem.jp, 4 fentiger.mythic-beasts.com, 4 fermo.it, 0 ferrara.it, 0 @@ -2426,13 +2467,16 @@ flanders.museum, 0 flap.id, 4 flatanger.no, 0 +fldrv.com, 4 flekkefjord.no, 0 flesberg.no, 0 flickr, 0 +flier.jp, 4 flight.aero, 0 flights, 0 flir, 0 flog.br, 0 +floppy.jp, 4 flora.no, 0 florence.it, 0 florida.museum, 0 @@ -2458,6 +2502,7 @@ foo, 0 food, 0 foodnetwork, 0 +fool.jp, 4 football, 0 for-better.biz, 4 for-more.biz, 4 @@ -2519,6 +2564,7 @@ freetls.fastly.net, 4 frei.no, 0 freiburg.museum, 0 +frenchkiss.jp, 4 fresenius, 0 fribourg.museum, 0 friuli-v-giulia.it, 0 @@ -2702,7 +2748,6 @@ gausdal.no, 0 gay, 0 gb, 0 -gb.com, 4 gb.net, 4 gbiz, 0 gc.ca, 0 @@ -2760,6 +2805,8 @@ ginan.gifu.jp, 0 ginowan.okinawa.jp, 0 ginoza.okinawa.jp, 0 +girlfriend.jp, 4 +girly.jp, 4 giske.no, 0 git-pages.rit.edu, 4 git-repos.de, 4 @@ -2777,7 +2824,6 @@ gjesdal.no, 0 gjovik.no, 0 gl, 0 -glade, 0 glas.museum, 0 glass, 0 glass.museum, 0 @@ -2791,6 +2837,7 @@ global.ssl.fastly.net, 4 globo, 0 glogow.pl, 0 +gloomy.jp, 4 gloppen.no, 0 glug.org.uk, 4 gm, 0 @@ -2845,6 +2892,7 @@ golf, 0 golffan.us, 4 gon.pk, 0 +gonna.jp, 4 gonohe.aomori.jp, 0 goo, 0 goodyear, 0 @@ -2936,7 +2984,6 @@ gov.kn, 0 gov.kp, 0 gov.kw, 0 -gov.ky, 0 gov.kz, 0 gov.la, 0 gov.lb, 0 @@ -3027,6 +3074,7 @@ gratangen.no, 0 gratis, 0 graz.museum, 0 +greater.jp, 4 green, 0 greta.fr, 0 grimstad.no, 0 @@ -3108,6 +3156,7 @@ habikino.osaka.jp, 0 habmer.no, 0 haboro.hokkaido.jp, 0 +hacca.jp, 4 hachijo.tokyo.jp, 0 hachinohe.aomori.jp, 0 hachioji.tokyo.jp, 0 @@ -3146,6 +3195,7 @@ hanamigawa.chiba.jp, 0 hanawa.fukushima.jp, 0 handa.aichi.jp, 0 +handcrafted.jp, 4 handson.museum, 0 hanggliding.aero, 0 hangout, 0 @@ -3192,6 +3242,7 @@ health.nz, 0 health.vn, 0 healthcare, 0 +heavy.jp, 4 heguri.nara.jp, 0 heimatunduhren.museum, 0 hekinan.aichi.jp, 0 @@ -3204,6 +3255,7 @@ hemnes.no, 0 hemsedal.no, 0 hepforge.org, 4 +her.jp, 4 herad.no, 0 here, 0 here-for-more.info, 4 @@ -3213,6 +3265,7 @@ herokussl.com, 4 heroy.more-og-romsdal.no, 0 heroy.nordland.no, 0 +heteml.net, 4 hgtv, 0 hi.cn, 0 hi.us, 0 @@ -3251,6 +3304,7 @@ higashiyamato.tokyo.jp, 0 higashiyodogawa.osaka.jp, 0 higashiyoshino.nara.jp, 0 +hiho.jp, 4 hiji.oita.jp, 0 hikari.yamaguchi.jp, 0 hikawa.shimane.jp, 0 @@ -3265,6 +3319,7 @@ hinohara.tokyo.jp, 0 hioki.kagoshima.jp, 0 hiphop, 0 +hippy.jp, 4 hirado.nagasaki.jp, 0 hiraizumi.iwate.jp, 0 hirakata.osaka.jp, 0 @@ -3332,6 +3387,7 @@ holiday, 0 holmestrand.no, 0 holtalen.no, 0 +holy.jp, 4 home-webserver.de, 4 home.dyndns.org, 4 homebuilt.aero, 0 @@ -3362,6 +3418,7 @@ honjo.akita.jp, 0 honjo.saitama.jp, 0 honjyo.akita.jp, 0 +hoplix.shop, 4 hopto.me, 4 hopto.org, 4 hornindal.no, 0 @@ -3408,6 +3465,7 @@ hughes, 0 huissier-justice.fr, 0 humanities.museum, 0 +hungry.jp, 4 hurdal.no, 0 hurum.no, 0 hvaler.no, 0 @@ -3445,6 +3503,7 @@ ichinomiya.chiba.jp, 0 ichinoseki.iwate.jp, 0 icu, 0 +icurus.jp, 4 id, 0 id.au, 0 id.forgerock.io, 4 @@ -3455,7 +3514,6 @@ id.us, 0 ide.kyoto.jp, 0 idf.il, 0 -idnblogger.com, 4 idrett.no, 0 idv.hk, 0 idv.tw, 0 @@ -3550,6 +3608,11 @@ ind.in, 0 ind.kw, 0 ind.tn, 0 +independent-commission.uk, 4 +independent-inquest.uk, 4 +independent-inquiry.uk, 4 +independent-panel.uk, 4 +independent-review.uk, 4 inderoy.no, 0 indian.museum, 0 indiana.museum, 0 @@ -3557,7 +3620,6 @@ indianmarket.museum, 0 indie.porn, 4 indigena.bo, 0 -indowapblog.com, 4 industria.bo, 0 industries, 0 ine.kyoto.jp, 0 @@ -3778,6 +3840,7 @@ itau, 0 itayanagi.aomori.jp, 0 itcouldbewor.se, 4 +itigo.jp, 4 ito.shizuoka.jp, 0 itoigawa.niigata.jp, 0 itoman.okinawa.jp, 0 @@ -3849,6 +3912,7 @@ jele.io, 4 jele.site, 4 jelenia-gora.pl, 0 +jellybean.jp, 4 jeonbuk.kr, 0 jeonnam.kr, 0 jerusalem.museum, 0 @@ -4048,6 +4112,7 @@ kanra.gunma.jp, 0 kanuma.tochigi.jp, 0 kanzaki.saga.jp, 0 +kapsi.fi, 4 karacol.su, 4 karaganda.su, 4 karasjohka.no, 0 @@ -4105,6 +4170,7 @@ kawahara.tottori.jp, 0 kawai.iwate.jp, 0 kawai.nara.jp, 0 +kawaiishop.jp, 4 kawajima.saitama.jp, 0 kawakami.nagano.jp, 0 kawakami.nara.jp, 0 @@ -4162,10 +4228,13 @@ kiho.mie.jp, 0 kihoku.ehime.jp, 0 kijo.miyazaki.jp, 0 +kikirara.jp, 4 kikonai.hokkaido.jp, 0 kikuchi.kumamoto.jp, 0 kikugawa.shizuoka.jp, 0 kilatiron.com, 4 +kill.jp, 4 +kilo.jp, 4 kim, 0 kimino.wakayama.jp, 0 kimitsu.chiba.jp, 0 @@ -4265,6 +4334,7 @@ konskowola.pl, 0 konsulat.gov.pl, 0 konyvelo.hu, 0 +koobin.events, 4 koori.fukushima.jp, 0 kopervik.no, 0 koriyama.fukushima.jp, 0 @@ -4315,6 +4385,7 @@ krym.ua, 0 ks.ua, 0 ks.us, 0 +ktistory.com, 4 kuchinotsu.nagasaki.jp, 0 kudamatsu.yamaguchi.jp, 0 kudoyama.wakayama.jp, 0 @@ -4356,6 +4427,7 @@ kuroishi.aomori.jp, 0 kuroiso.tochigi.jp, 0 kuromatsunai.hokkaido.jp, 0 +kuron.jp, 4 kurotaki.nara.jp, 0 kurume.fukuoka.jp, 0 kusatsu.gunma.jp, 0 @@ -4576,12 +4648,12 @@ linodeobjects.com, 6 linz.museum, 0 lipsy, 0 +littlestar.jp, 4 live, 0 living, 0 living.museum, 0 livinghistory.museum, 0 livorno.it, 0 -lixil, 0 lk, 0 lk3.ru, 4 llc, 0 @@ -4612,10 +4684,12 @@ lohmus.me, 4 lol, 0 lolipop.io, 4 +lolitapunk.jp, 4 lom.it, 0 lom.no, 0 lombardia.it, 0 lombardy.it, 0 +lomo.jp, 4 lomza.pl, 0 lon-1.paas.massivegrid.net, 4 lon-2.paas.massivegrid.net, 4 @@ -4633,6 +4707,8 @@ lotto, 0 louvre.museum, 0 love, 0 +lovepop.jp, 4 +lovesick.jp, 4 lowicz.pl, 0 loyalist.museum, 0 lpages.co, 4 @@ -4707,6 +4783,7 @@ maibara.shiga.jp, 0 maif, 0 mail.pl, 0 +main.jp, 4 maintenance.aero, 0 maison, 0 maizuru.kyoto.jp, 0 @@ -4868,6 +4945,7 @@ merseine.nu, 4 mesaverde.museum, 0 messina.it, 0 +messwithdns.com, 4 meteorapp.com, 4 mex.com, 4 mg, 0 @@ -4893,6 +4971,7 @@ mielec.pl, 0 mielno.pl, 0 mifune.kumamoto.jp, 0 +migration.run, 6 mihama.aichi.jp, 0 mihama.chiba.jp, 0 mihama.fukui.jp, 0 @@ -4918,6 +4997,7 @@ mil.cl, 0 mil.cn, 0 mil.co, 0 +mil.cy, 0 mil.do, 0 mil.ec, 0 mil.eg, 0 @@ -5101,6 +5181,7 @@ modelling.aero, 0 modena.it, 0 modern.museum, 0 +mods.jp, 4 modum.no, 0 moe, 0 moi, 0 @@ -5112,8 +5193,10 @@ moma.museum, 0 mombetsu.hokkaido.jp, 0 monash, 0 +mond.jp, 4 money, 0 money.museum, 0 +mongolian.jp, 4 monmouth.museum, 0 monster, 0 monticello.museum, 0 @@ -5124,6 +5207,7 @@ monzabrianza.it, 0 monzaebrianza.it, 0 monzaedellabrianza.it, 0 +moo.jp, 4 moonscale.io, 6 moonscale.net, 4 mordovia.ru, 4 @@ -5216,6 +5300,7 @@ music.museum, 0 musica.ar, 0 musica.bo, 0 +musician.io, 4 mutsu.aomori.jp, 0 mutsuzawa.chiba.jp, 0 mutual, 0 @@ -5355,10 +5440,10 @@ naklo.pl, 0 nalchik.ru, 4 nalchik.su, 4 +namaste.jp, 4 namdalseid.no, 0 name, 0 name.az, 0 -name.cy, 0 name.eg, 0 name.et, 0 name.fj, 0 @@ -5655,6 +5740,7 @@ nikaho.akita.jp, 0 nike, 0 niki.hokkaido.jp, 0 +nikita.jp, 4 nikko.tochigi.jp, 0 nikolaev.ua, 0 nikon, 0 @@ -5712,11 +5798,10 @@ no.it, 0 nobeoka.miyazaki.jp, 0 noboribetsu.hokkaido.jp, 0 +nobushi.jp, 4 noda.chiba.jp, 0 noda.iwate.jp, 0 nodebalancer.linode.com, 6 -nodum.co, 4 -nodum.io, 4 nog.community, 4 nogata.fukuoka.jp, 0 nogi.tochigi.jp, 0 @@ -5750,6 +5835,7 @@ nomi.ishikawa.jp, 0 nonoichi.ishikawa.jp, 0 noop.app, 4 +noor.jp, 4 nord-aurdal.no, 0 nord-fron.no, 0 nord-odal.no, 0 @@ -5865,11 +5951,11 @@ of.je, 4 of.london, 4 of.no, 0 -off, 0 off.ai, 0 office, 0 office-on-the.net, 4 official.academy, 4 +official.ec, 4 ofunato.iwate.jp, 0 og.ao, 0 og.it, 0 @@ -5971,6 +6057,7 @@ ondigitalocean.app, 4 one, 0 onfabrica.com, 4 +onflashdrive.app, 4 ong, 0 ong.br, 0 onga.fukuoka.jp, 0 @@ -5986,6 +6073,7 @@ ono.hyogo.jp, 0 onojo.fukuoka.jp, 0 onomichi.hiroshima.jp, 0 +onporter.run, 4 onred.one, 4 onrender.com, 4 ontario.museum, 0 @@ -5994,6 +6082,7 @@ ooguy.com, 4 ookuwa.nagano.jp, 0 ooo, 0 +oops.jp, 4 ooshika.nagano.jp, 0 open, 0 openair.museum, 0 @@ -6301,10 +6390,11 @@ pantheonsite.io, 4 parachuting.aero, 0 paragliding.aero, 0 +parallel.jp, 4 +parasite.jp, 4 paris, 0 paris.eu.org, 4 paris.museum, 0 -parliament.cy, 0 parliament.nz, 0 parma.it, 0 paroch.k12.ma.us, 0 @@ -6335,10 +6425,15 @@ pe.it, 0 pe.kr, 0 pe.leg.br, 4 +pecori.jp, 4 +peewee.jp, 4 +penne.jp, 4 penza.su, 4 +pepper.jp, 4 per.la, 0 per.nf, 0 per.sg, 0 +perma.jp, 4 perso.ht, 0 perso.sn, 0 perso.tn, 0 @@ -6382,6 +6477,7 @@ pid, 0 piedmont.it, 0 piemonte.it, 0 +pigboat.jp, 4 pila.pl, 0 pilot.aero, 0 pilots.museum, 0 @@ -6390,6 +6486,7 @@ pinb.gov.pl, 0 ping, 0 pink, 0 +pinoko.jp, 4 pioneer, 0 pippu.hokkaido.jp, 0 pisa.it, 0 @@ -6522,6 +6619,7 @@ pro.om, 0 pro.pr, 0 pro.tt, 0 +pro.typeform.com, 4 pro.vn, 0 prochowice.pl, 0 prod, 0 @@ -6555,6 +6653,7 @@ pub, 0 pub.sa, 0 publ.pt, 0 +public-inquiry.uk, 4 public.museum, 0 publishproxy.com, 4 pubol.museum, 0 @@ -6563,7 +6662,10 @@ pug.it, 0 puglia.it, 0 pulawy.pl, 0 +punyu.jp, 4 pup.gov.pl, 0 +pupu.jp, 4 +pussycat.jp, 4 pv.it, 0 pvh.br, 0 pvt.ge, 0 @@ -6571,6 +6673,7 @@ pw, 0 pwc, 0 py, 0 +pya.jp, 4 pyatigorsk.ru, 4 pymnt.uk, 4 pythonanywhere.com, 4 @@ -6617,9 +6720,9 @@ ragusa.it, 0 rahkkeravju.no, 0 raholt.no, 0 -raid, 0 railroad.museum, 0 railway.museum, 0 +raindrop.jp, 4 raisa.no, 0 rakkestad.no, 0 ralingen.no, 0 @@ -6630,6 +6733,7 @@ rar.ve, 0 ras.ru, 4 rauma.no, 0 +ravendb.cloud, 4 ravendb.community, 4 ravendb.me, 4 ravendb.run, 4 @@ -6645,6 +6749,7 @@ read-books.org, 4 readmyblog.org, 4 readthedocs.io, 4 +readymade.jp, 4 realestate, 0 realestate.pl, 0 realm.cz, 4 @@ -6762,6 +6867,7 @@ rochester.museum, 0 rockart.museum, 0 rocks, 0 +rocky.page, 4 rodeo, 0 rodoy.no, 0 rogers, 0 @@ -6779,6 +6885,7 @@ router.management, 4 rovigo.it, 0 rovno.ua, 0 +royal-commission.uk, 4 royken.no, 0 royrvik.no, 0 rr.gov.br, 0 @@ -6867,6 +6974,7 @@ s3.eu-central-1.amazonaws.com, 4 s3.eu-west-2.amazonaws.com, 4 s3.eu-west-3.amazonaws.com, 4 +s3.teckids.org, 4 s3.us-east-2.amazonaws.com, 4 s5y.io, 6 sa, 0 @@ -6880,6 +6988,7 @@ sa.it, 0 saarland, 0 sabae.fukui.jp, 0 +sadist.jp, 4 sado.niigata.jp, 0 safe, 0 safety, 0 @@ -7034,6 +7143,7 @@ school.na, 0 school.nz, 0 school.za, 0 +schoolbus.jp, 4 schools.nsw.edu.au, 0 schule, 0 schulserver.de, 4 @@ -7051,7 +7161,6 @@ sciences.museum, 0 sciencesnaturelles.museum, 0 scientist.aero, 0 -scjohnson, 0 scot, 0 scotland.museum, 0 scrapper-site.net, 4 @@ -7073,6 +7182,7 @@ sebastopol.ua, 0 sec.ps, 0 secaas.hk, 4 +secret.jp, 4 secure, 0 security, 0 securitytactics.com, 4 @@ -7275,6 +7385,7 @@ shoparena.pl, 4 shopitsite.com, 4 shopping, 0 +shopselect.net, 4 shopware.store, 4 shouji, 0 show, 0 @@ -7306,6 +7417,8 @@ siracusa.it, 0 sirdal.no, 0 site, 0 +site.tb-hosting.com, 4 +site.transip.me, 4 siteleaf.net, 4 sites.static.land, 4 sj, 0 @@ -7450,6 +7563,7 @@ ssl.origin.cdn77-secure.org, 4 st, 0 st.no, 0 +staba.jp, 4 stackhero-network.com, 4 stada, 0 stadt.museum, 0 @@ -7512,6 +7626,7 @@ strand.no, 0 stranda.no, 0 stream, 0 +stripper.jp, 4 stryn.no, 0 student.aero, 0 studio, 0 @@ -7523,6 +7638,7 @@ style, 0 su, 0 su.paba.se, 4 +sub.jp, 4 sucks, 0 sue.fukuoka.jp, 0 suedtirol.it, 0 @@ -7544,9 +7660,11 @@ sunagawa.hokkaido.jp, 0 sund.no, 0 sunndal.no, 0 +sunnyday.jp, 4 supabase.co, 4 supabase.in, 4 supabase.net, 4 +supersale.jp, 4 supplies, 0 supply, 0 support, 0 @@ -7726,6 +7844,7 @@ tec.mi.us, 0 tec.ve, 0 tech, 0 +tech.orange, 4 technology, 0 technology.museum, 0 tecnologia.bo, 0 @@ -7769,7 +7888,9 @@ theater, 0 theater.museum, 0 theatre, 0 +theshop.jp, 4 theworkpc.com, 4 +thick.jp, 4 thingdustdata.com, 4 thruhere.net, 4 tiaa, 0 @@ -7871,6 +7992,7 @@ tonami.toyama.jp, 0 tondabayashi.osaka.jp, 0 tone.ibaraki.jp, 0 +tonkotsu.jp, 4 tono.iwate.jp, 0 tonosho.kagawa.jp, 0 tonsberg.no, 0 @@ -7948,6 +8070,7 @@ tranibarlettaandria.it, 0 tranoy.no, 0 translate.goog, 4 +translated.page, 4 transport.museum, 0 transporte.bo, 0 transurl.be, 6 @@ -8080,6 +8203,7 @@ tychy.pl, 0 tydal.no, 0 tynset.no, 0 +typedream.app, 4 tysfjord.no, 0 tysnes.no, 0 tysvar.no, 0 @@ -8126,7 +8250,6 @@ uk.primetel.cloud, 4 uk.reclaim.cloud, 4 uk0.bigv.io, 4 -ukco.me, 4 uki.kumamoto.jp, 0 ukiha.fukuoka.jp, 0 ullensaker.no, 0 @@ -8141,6 +8264,7 @@ umi.fukuoka.jp, 0 umig.gov.pl, 0 unazuki.toyama.jp, 0 +under.jp, 4 under.one, 4 undersea.museum, 0 uni5.net, 4 @@ -8161,6 +8285,7 @@ upaas.kazteleport.kz, 4 upli.io, 4 upow.gov.pl, 0 +upper.jp, 4 uppo.gov.pl, 0 ups, 0 urakawa.hokkaido.jp, 0 @@ -8292,6 +8417,7 @@ vega.no, 0 vegarshei.no, 0 vegas, 0 +velvet.jp, 4 ven.it, 0 veneto.it, 0 venezia.it, 0 @@ -8307,7 +8433,9 @@ verona.it, 0 verran.no, 0 versailles.museum, 0 +verse.jp, 4 versicherung, 0 +versus.jp, 4 vestby.no, 0 vestnes.no, 0 vestre-slidre.no, 0 @@ -8353,12 +8481,12 @@ virtual.museum, 0 virtualserver.io, 4 virtualuser.de, 4 -virtueeldomein.nl, 4 virtuel.museum, 0 visa, 0 vision, 0 viterbo.it, 0 viva, 0 +vivian.jp, 4 vivo, 0 vix.br, 0 vlaanderen, 0 @@ -8399,6 +8527,7 @@ vt.us, 0 vu, 0 vuelos, 0 +vultrobjects.com, 6 vv.it, 0 vxl.sh, 4 w.bg, 0 @@ -8440,10 +8569,9 @@ watch-and-clock.museum, 0 watchandclock.museum, 0 watches, 0 +watson.jp, 4 waw.pl, 0 wazuka.kyoto.jp, 0 -wblog.id, 4 -wbq.me, 4 we.bs, 4 we.tc, 4 weather, 0 @@ -8472,6 +8600,7 @@ webhop.net, 4 webhop.org, 4 webhosting.be, 4 +weblike.jp, 4 webpaas.ovh.net, 6 webredirect.org, 4 website, 0 @@ -8495,6 +8624,7 @@ westus2.azurestaticapps.net, 4 wf, 0 whaling.museum, 0 +whitesnow.jp, 4 whoswho, 0 wi.us, 0 wielun.pl, 0 @@ -8591,7 +8721,6 @@ xn--3ds443g, 0 xn--3e0b707e, 0 xn--3hcrj9c, 0 -xn--3oq18vl8pn36a, 0 xn--3pxu8k, 0 xn--41a.xn--p1acf, 4 xn--42c2d9a, 0 @@ -9200,6 +9329,7 @@ zj.cn, 0 zlg.br, 0 zm, 0 +zombie.jp, 4 zone, 0 zoological.museum, 0 zoology.museum, 0
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc index 065c41e..340b2e4 100644 --- a/net/http/transport_security_state.cc +++ b/net/http/transport_security_state.cc
@@ -431,9 +431,7 @@ bool TransportSecurityState::ShouldSSLErrorsBeFatal(const std::string& host) { STSState unused_sts; PKPState unused_pkp; - return GetDynamicSTSState(host, &unused_sts) || - GetDynamicPKPState(host, &unused_pkp) || - GetStaticDomainState(host, &unused_sts, &unused_pkp); + return GetSTSState(host, &unused_sts) || GetPKPState(host, &unused_pkp); } base::Value TransportSecurityState::NetLogUpgradeToSSLParam( @@ -637,6 +635,29 @@ ct_log_list_last_update_time_ = update_time; } +void TransportSecurityState::UpdatePinList( + const std::vector<PinSet>& pinsets, + const std::vector<PinSetInfo>& host_pins, + base::Time update_time) { + pinsets_ = pinsets; + key_pins_list_last_update_time_ = update_time; + host_pins_ = absl::make_optional( + std::map<std::string, std::pair<PinSet const*, bool>>()); + std::map<std::string, PinSet const*> pinset_names_map; + for (const auto& pinset : pinsets_) { + pinset_names_map[pinset.name()] = &pinset; + } + for (const auto& pin : host_pins) { + if (!base::Contains(pinset_names_map, pin.pinset_name_)) { + // This should never happen, but if the component is bad and missing an + // entry, we will ignore that particular pin. + continue; + } + host_pins_.value()[pin.hostname_] = std::make_pair( + pinset_names_map[pin.pinset_name_], pin.include_subdomains_); + } +} + void TransportSecurityState::AddHSTSInternal( const std::string& host, TransportSecurityState::STSState::UpgradeMode upgrade_mode, @@ -1133,27 +1154,64 @@ network_isolation_key, failure_log); } -bool TransportSecurityState::GetStaticDomainState(const std::string& host, - STSState* sts_result, - PKPState* pkp_result) const { +bool TransportSecurityState::GetStaticSTSState(const std::string& host, + STSState* sts_result) const { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!IsBuildTimely()) return false; PreloadResult result; - if (!DecodeHSTSPreload(host, &result)) - return false; - - if (hsts_host_bypass_list_.find(host) == hsts_host_bypass_list_.end() && + if (DecodeHSTSPreload(host, &result) && + hsts_host_bypass_list_.find(host) == hsts_host_bypass_list_.end() && result.force_https) { sts_result->domain = host.substr(result.hostname_offset); sts_result->include_subdomains = result.sts_include_subdomains; sts_result->last_observed = base::GetBuildTime(); sts_result->upgrade_mode = STSState::MODE_FORCE_HTTPS; + return true; } - if (enable_static_pins_ && result.has_pins) { + return false; +} + +bool TransportSecurityState::GetStaticPKPState(const std::string& host, + PKPState* pkp_result) const { + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + if (!enable_static_pins_ || !IsStaticPKPListTimely()) + return false; + + PreloadResult result; + if (host_pins_.has_value()) { + auto iter = host_pins_->find(host); + if (iter != host_pins_->end()) { + pkp_result->domain = host; + pkp_result->last_observed = key_pins_list_last_update_time_; + pkp_result->include_subdomains = iter->second.second; + const PinSet* pinset = iter->second.first; + if (!pinset->report_uri().empty()) { + pkp_result->report_uri = GURL(pinset->report_uri()); + } + for (auto hash : pinset->static_spki_hashes()) { + // If the update is malformed, it's preferable to skip the hash than + // crash. + if (hash.size() == 32) { + AddHash(reinterpret_cast<const char*>(hash.data()), + &pkp_result->spki_hashes); + } + } + for (auto hash : pinset->bad_static_spki_hashes()) { + // If the update is malformed, it's preferable to skip the hash than + // crash. + if (hash.size() == 32) { + AddHash(reinterpret_cast<const char*>(hash.data()), + &pkp_result->bad_spki_hashes); + } + } + return true; + } + } else if (DecodeHSTSPreload(host, &result) && result.has_pins) { if (result.pinset_id >= g_hsts_source->pinsets_count) return false; @@ -1180,23 +1238,20 @@ sha256_hash++; } } + return true; } - return true; + return false; } bool TransportSecurityState::GetSTSState(const std::string& host, STSState* result) { - PKPState unused; - return GetDynamicSTSState(host, result) || - GetStaticDomainState(host, result, &unused); + return GetDynamicSTSState(host, result) || GetStaticSTSState(host, result); } bool TransportSecurityState::GetPKPState(const std::string& host, PKPState* result) { - STSState unused; - return GetDynamicPKPState(host, result) || - GetStaticDomainState(host, &unused, result); + return GetDynamicPKPState(host, result) || GetStaticPKPState(host, result); } bool TransportSecurityState::GetDynamicSTSState(const std::string& host, @@ -1585,4 +1640,16 @@ 70 /* 10 weeks */; } +bool TransportSecurityState::IsStaticPKPListTimely() const { + // If the list has not been updated via component updater, freshness depends + // on build freshness. + if (!host_pins_.has_value()) { + return IsBuildTimely(); + } + DCHECK(!key_pins_list_last_update_time_.is_null()); + // Else, we use the last update time. + return (base::Time::Now() - key_pins_list_last_update_time_).InDays() < + 70 /* 10 weeks */; +} + } // namespace net
diff --git a/net/http/transport_security_state.h b/net/http/transport_security_state.h index 0d33d056..e2d9b82 100644 --- a/net/http/transport_security_state.h +++ b/net/http/transport_security_state.h
@@ -25,6 +25,7 @@ #include "net/cert/signed_certificate_timestamp_and_status.h" #include "net/http/transport_security_state_source.h" #include "net/log/net_log_with_source.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" namespace net { @@ -343,6 +344,15 @@ PinSet(const PinSet& other); ~PinSet(); + const std::string& name() const { return name_; } + const std::vector<std::vector<uint8_t>>& static_spki_hashes() const { + return static_spki_hashes_; + } + const std::vector<std::vector<uint8_t>>& bad_static_spki_hashes() const { + return bad_static_spki_hashes_; + } + const std::string& report_uri() const { return report_uri_; } + private: std::string name_; std::vector<std::vector<uint8_t>> static_spki_hashes_; @@ -479,14 +489,12 @@ void SetCTLogListUpdateTime(base::Time update_time); - // TODO(crbug.com/1286121): This method is currently not implemented, it - // should update the key pins list used for enforcement. // |pinsets| should include all known pinsets, |host_pins| the information // related to each hostname's pin, and |update_time| the time at which this // list was known to be up to date. void UpdatePinList(const std::vector<PinSet>& pinsets, const std::vector<PinSetInfo>& host_pins, - base::Time update_time) {} + base::Time update_time); // Clears all dynamic data (e.g. HSTS and HPKP data). // @@ -538,15 +546,14 @@ // // Note that these methods are not const because they opportunistically remove // entries that have expired. - bool GetSTSState(const std::string& host, STSState* result); - bool GetPKPState(const std::string& host, PKPState* result); + bool GetSTSState(const std::string& host, STSState* sts_result); + bool GetPKPState(const std::string& host, PKPState* pkp_result); - // Returns true and updates |*sts_result| and/or |*pkp_result| if there is - // static (built-in) state for |host|. If multiple entries match |host|, - // the most specific match determines the return value. - bool GetStaticDomainState(const std::string& host, - STSState* sts_result, - PKPState* pkp_result) const; + // Returns true and updates |*result| iff |host| has static HSTS/HPKP + // (respectively) state. If multiple entries match |host|, the most specific + // match determines the return value. + bool GetStaticSTSState(const std::string& host, STSState* sts_result) const; + bool GetStaticPKPState(const std::string& host, PKPState* pkp_result) const; // Returns true and updates |*result| iff |host| has dynamic // HSTS/HPKP/Expect-CT (respectively) state. If multiple entries match |host|, @@ -744,6 +751,10 @@ // Returns true if the CT log list has been updated in the last 10 weeks. bool IsCTLogListTimely() const; + // Returns true if the static key pinning list has been updated in the last 10 + // weeks. + bool IsStaticPKPListTimely() const; + // The sets of hosts that have enabled TransportSecurity. |domain| will always // be empty for a STSState, PKPState, or ExpectCTState in these maps; the // domain comes from the map keys instead. In addition, |upgrade_mode| in the @@ -791,6 +802,13 @@ base::Time ct_log_list_last_update_time_; + // The values in host_pins_ maps are references to PinSet objects in the + // pinsets_ vector. + absl::optional<std::map<std::string, std::pair<const PinSet*, bool>>> + host_pins_; + base::Time key_pins_list_last_update_time_; + std::vector<PinSet> pinsets_; + THREAD_CHECKER(thread_checker_); };
diff --git a/net/http/transport_security_state_static_fuzzer.cc b/net/http/transport_security_state_static_fuzzer.cc index af5d1ef..6b3e7a02 100644 --- a/net/http/transport_security_state_static_fuzzer.cc +++ b/net/http/transport_security_state_static_fuzzer.cc
@@ -15,7 +15,8 @@ state->enable_static_pins_ = true; TransportSecurityState::STSState sts_result; TransportSecurityState::PKPState pkp_result; - return state->GetStaticDomainState(input, &sts_result, &pkp_result); + return state->GetStaticSTSState(input, &sts_result) || + state->GetStaticPKPState(input, &pkp_result); } bool FuzzStaticExpectCTState(TransportSecurityState* state,
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc index 93bf809a..3ec4716 100644 --- a/net/http/transport_security_state_unittest.cc +++ b/net/http/transport_security_state_unittest.cc
@@ -405,7 +405,10 @@ const std::string& host, TransportSecurityState::STSState* sts_result, TransportSecurityState::PKPState* pkp_result) { - return state->GetStaticDomainState(host, sts_result, pkp_result); + bool ret = state->GetStaticSTSState(host, sts_result); + if (state->GetStaticPKPState(host, pkp_result)) + ret = true; + return ret; } bool GetExpectCTState(TransportSecurityState* state, @@ -885,8 +888,9 @@ "WaveletIdDomainAndBlipBlipid"; TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - // Just checks that we don't hit a NOTREACHED. - EXPECT_FALSE(state.GetStaticDomainState(kLongName, &sts_state, &pkp_state)); + // Just checks that we don't hit a NOTREACHED + EXPECT_FALSE(state.GetStaticSTSState(kLongName, &sts_state)); + EXPECT_FALSE(state.GetStaticPKPState(kLongName, &pkp_state)); EXPECT_FALSE(state.GetDynamicSTSState(kLongName, &sts_state)); EXPECT_FALSE(state.GetDynamicPKPState(kLongName, &pkp_state)); } @@ -913,10 +917,9 @@ TransportSecurityState state; EnableStaticPins(&state); - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - EXPECT_TRUE(state.GetStaticDomainState("no-rejected-pins-pkp.preloaded.test", - &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("no-rejected-pins-pkp.preloaded.test", + &pkp_state)); EXPECT_TRUE(pkp_state.HasPublicKeyPins()); std::string failure_log; @@ -939,9 +942,7 @@ EnableStaticPins(&state); TransportSecurityState::PKPState pkp_state; - TransportSecurityState::STSState unused_sts_state; - ASSERT_TRUE(state.GetStaticDomainState(kPreloadedPinDomain, &unused_sts_state, - &pkp_state)); + ASSERT_TRUE(state.GetStaticPKPState(kPreloadedPinDomain, &pkp_state)); ASSERT_TRUE(pkp_state.HasPublicKeyPins()); GURL report_uri = pkp_state.report_uri; @@ -1435,8 +1436,8 @@ sts_state = TransportSecurityState::STSState(); pkp_state = TransportSecurityState::PKPState(); ct_state = TransportSecurityState::ExpectCTState(); - EXPECT_TRUE(GetStaticDomainState(&state, "expect-ct.example.com", &sts_state, - &pkp_state)); + EXPECT_FALSE(GetStaticDomainState(&state, "expect-ct.example.com", &sts_state, + &pkp_state)); EXPECT_TRUE(sts_state == TransportSecurityState::STSState()); EXPECT_TRUE(pkp_state == TransportSecurityState::PKPState()); EXPECT_TRUE(GetExpectCTState(&state, "expect-ct.example.com", &ct_state)); @@ -2668,8 +2669,7 @@ static bool StaticShouldRedirect(const char* hostname) { TransportSecurityState state; TransportSecurityState::STSState sts_state; - TransportSecurityState::PKPState pkp_state; - return state.GetStaticDomainState(hostname, &sts_state, &pkp_state) && + return state.GetStaticSTSState(hostname, &sts_state) && sts_state.ShouldUpgradeToSSL(); } @@ -2677,15 +2677,15 @@ TransportSecurityState state; TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - return state.GetStaticDomainState(hostname, &sts_state, &pkp_state); + return state.GetStaticSTSState(hostname, &sts_state) || + state.GetStaticPKPState(hostname, &pkp_state); } static bool HasStaticPublicKeyPins(const char* hostname) { TransportSecurityState state; TransportSecurityStateTest::EnableStaticPins(&state); - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - if (!state.GetStaticDomainState(hostname, &sts_state, &pkp_state)) + if (!state.GetStaticPKPState(hostname, &pkp_state)) return false; return pkp_state.HasPublicKeyPins(); @@ -2696,34 +2696,25 @@ TransportSecurityStateTest::EnableStaticPins(&state); TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - if (!state.GetStaticDomainState(hostname, &sts_state, &pkp_state)) - return false; - - return (pkp_state.spki_hashes.size() > 0 || - pkp_state.bad_spki_hashes.size() > 0) && - !sts_state.ShouldUpgradeToSSL(); + return HasStaticPublicKeyPins(hostname) && !StaticShouldRedirect(hostname); } TEST_F(TransportSecurityStateStaticTest, EnableStaticPins) { TransportSecurityState state; - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; EnableStaticPins(&state); - EXPECT_TRUE( - state.GetStaticDomainState("chrome.google.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("chrome.google.com", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); } TEST_F(TransportSecurityStateStaticTest, DisableStaticPins) { TransportSecurityState state; - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; DisableStaticPins(&state); - EXPECT_TRUE( - state.GetStaticDomainState("chrome.google.com", &sts_state, &pkp_state)); + EXPECT_FALSE(state.GetStaticPKPState("chrome.google.com", &pkp_state)); EXPECT_TRUE(pkp_state.spki_hashes.empty()); } @@ -2771,24 +2762,25 @@ // The domain wasn't being set, leading to a blank string in the // chrome://net-internals/#hsts UI. So test that. - EXPECT_TRUE( - state.GetStaticDomainState("market.android.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("market.android.com", &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("market.android.com", &sts_state)); EXPECT_EQ(sts_state.domain, "market.android.com"); EXPECT_EQ(pkp_state.domain, "market.android.com"); - EXPECT_TRUE(state.GetStaticDomainState("sub.market.android.com", &sts_state, - &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("sub.market.android.com", &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("sub.market.android.com", &sts_state)); EXPECT_EQ(sts_state.domain, "market.android.com"); EXPECT_EQ(pkp_state.domain, "market.android.com"); } TEST_F(TransportSecurityStateStaticTest, Preloaded) { TransportSecurityState state; + EnableStaticPins(&state); TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; // We do more extensive checks for the first domain. - EXPECT_TRUE( - state.GetStaticDomainState("www.paypal.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("www.paypal.com", &sts_state)); + EXPECT_FALSE(state.GetStaticPKPState("www.paypal.com", &pkp_state)); EXPECT_EQ(sts_state.upgrade_mode, TransportSecurityState::STSState::MODE_FORCE_HTTPS); EXPECT_FALSE(sts_state.include_subdomains); @@ -2837,13 +2829,14 @@ EXPECT_TRUE(StaticShouldRedirect("youtube.com")); // These domains used to be only HSTS when SNI was available. - EXPECT_TRUE(state.GetStaticDomainState("gmail.com", &sts_state, &pkp_state)); - EXPECT_TRUE( - state.GetStaticDomainState("www.gmail.com", &sts_state, &pkp_state)); - EXPECT_TRUE( - state.GetStaticDomainState("googlemail.com", &sts_state, &pkp_state)); - EXPECT_TRUE( - state.GetStaticDomainState("www.googlemail.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("gmail.com", &sts_state)); + EXPECT_TRUE(state.GetStaticPKPState("gmail.com", &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("www.gmail.com", &sts_state)); + EXPECT_TRUE(state.GetStaticPKPState("www.gmail.com", &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("googlemail.com", &sts_state)); + EXPECT_TRUE(state.GetStaticPKPState("googlemail.com", &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("www.googlemail.com", &sts_state)); + EXPECT_TRUE(state.GetStaticPKPState("www.googlemail.com", &pkp_state)); // fi.g.co should not force HTTPS because there are still HTTP-only services // on it. @@ -3002,8 +2995,8 @@ TransportSecurityState::PKPState pkp_state; // We do more extensive checks for the first domain. - EXPECT_TRUE( - state.GetStaticDomainState("www.paypal.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticSTSState("www.paypal.com", &sts_state)); + EXPECT_FALSE(state.GetStaticPKPState("www.paypal.com", &pkp_state)); EXPECT_EQ(sts_state.upgrade_mode, TransportSecurityState::STSState::MODE_FORCE_HTTPS); EXPECT_FALSE(sts_state.include_subdomains); @@ -3030,39 +3023,33 @@ EXPECT_TRUE(HasStaticPublicKeyPins("blog.torproject.org")); EXPECT_FALSE(HasStaticState("foo.torproject.org")); - EXPECT_TRUE( - state.GetStaticDomainState("torproject.org", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("torproject.org", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); - EXPECT_TRUE( - state.GetStaticDomainState("www.torproject.org", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("www.torproject.org", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); - EXPECT_TRUE(state.GetStaticDomainState("check.torproject.org", &sts_state, - &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("check.torproject.org", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); - EXPECT_TRUE(state.GetStaticDomainState("blog.torproject.org", &sts_state, - &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("blog.torproject.org", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); EXPECT_TRUE(HasStaticPublicKeyPins("www.twitter.com")); - // Check that Facebook subdomains have pinning but not HSTS. - EXPECT_TRUE( - state.GetStaticDomainState("facebook.com", &sts_state, &pkp_state)); + // Facebook has pinning and hsts on facebook.com, but only pinning on + // subdomains. + EXPECT_TRUE(state.GetStaticPKPState("facebook.com", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); EXPECT_TRUE(StaticShouldRedirect("facebook.com")); - EXPECT_TRUE( - state.GetStaticDomainState("foo.facebook.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("foo.facebook.com", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); EXPECT_FALSE(StaticShouldRedirect("foo.facebook.com")); - EXPECT_TRUE( - state.GetStaticDomainState("www.facebook.com", &sts_state, &pkp_state)); + // www.facebook.com and subdomains have both pinning and hsts. + EXPECT_TRUE(state.GetStaticPKPState("www.facebook.com", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); EXPECT_TRUE(StaticShouldRedirect("www.facebook.com")); - EXPECT_TRUE(state.GetStaticDomainState("foo.www.facebook.com", &sts_state, - &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("foo.www.facebook.com", &pkp_state)); EXPECT_FALSE(pkp_state.spki_hashes.empty()); EXPECT_TRUE(StaticShouldRedirect("foo.www.facebook.com")); } @@ -3070,11 +3057,9 @@ TEST_F(TransportSecurityStateStaticTest, BuiltinCertPins) { TransportSecurityState state; EnableStaticPins(&state); - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - EXPECT_TRUE( - state.GetStaticDomainState("chrome.google.com", &sts_state, &pkp_state)); + EXPECT_TRUE(state.GetStaticPKPState("chrome.google.com", &pkp_state)); EXPECT_TRUE(HasStaticPublicKeyPins("chrome.google.com")); HashValueVector hashes; @@ -3868,4 +3853,225 @@ } } +TEST_F(TransportSecurityStateTest, UpdateKeyPinsListValidPin) { + HostPortPair host_port_pair(kHost, kPort); + GURL report_uri(kReportUri); + NetworkIsolationKey network_isolation_key = + NetworkIsolationKey::CreateTransient(); + // Two dummy certs to use as the server-sent and validated chains. The + // contents don't matter. + scoped_refptr<X509Certificate> cert1 = + ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); + ASSERT_TRUE(cert1); + scoped_refptr<X509Certificate> cert2 = + ImportCertFromFile(GetTestCertsDirectory(), "expired_cert.pem"); + ASSERT_TRUE(cert2); + + HashValueVector bad_hashes; + + for (size_t i = 0; kBadPath[i]; i++) + EXPECT_TRUE(AddHash(kBadPath[i], &bad_hashes)); + + TransportSecurityState state; + EnableStaticPins(&state); + std::string unused_failure_log; + + // Prior to updating the list, bad_hashes should be rejected. + EXPECT_EQ(TransportSecurityState::PKPStatus::VIOLATED, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); + + // Update the pins list, adding bad_hashes to the accepted hashes for this + // host. + std::vector<std::vector<uint8_t>> accepted_hashes; + for (size_t i = 0; kBadPath[i]; i++) { + HashValue hash; + ASSERT_TRUE(hash.FromString(kBadPath[i])); + accepted_hashes.emplace_back(hash.data(), hash.data() + hash.size()); + } + TransportSecurityState::PinSet test_pinset( + /*name=*/"test", + /*static_spki_hashes=*/accepted_hashes, + /*bad_static_spki_hashes=*/{}, + /*report_uri=*/kReportUri); + TransportSecurityState::PinSetInfo test_pinsetinfo( + /*hostname=*/kHost, /*pinset_name=*/"test", + /*include_subdomains=*/false); + state.UpdatePinList({test_pinset}, {test_pinsetinfo}, base::Time::Now()); + + // Hashes should now be accepted. + EXPECT_EQ(TransportSecurityState::PKPStatus::OK, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); +} + +TEST_F(TransportSecurityStateTest, UpdateKeyPinsListNotValidPin) { + HostPortPair host_port_pair(kHost, kPort); + GURL report_uri(kReportUri); + NetworkIsolationKey network_isolation_key = + NetworkIsolationKey::CreateTransient(); + // Two dummy certs to use as the server-sent and validated chains. The + // contents don't matter. + scoped_refptr<X509Certificate> cert1 = + ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); + ASSERT_TRUE(cert1); + scoped_refptr<X509Certificate> cert2 = + ImportCertFromFile(GetTestCertsDirectory(), "expired_cert.pem"); + ASSERT_TRUE(cert2); + + HashValueVector good_hashes; + + for (size_t i = 0; kGoodPath[i]; i++) + EXPECT_TRUE(AddHash(kGoodPath[i], &good_hashes)); + + TransportSecurityState state; + EnableStaticPins(&state); + std::string unused_failure_log; + + // Prior to updating the list, good_hashes should be accepted + EXPECT_EQ(TransportSecurityState::PKPStatus::OK, + state.CheckPublicKeyPins( + host_port_pair, true, good_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); + + // Update the pins list, adding good_hashes to the rejected hashes for this + // host. + std::vector<std::vector<uint8_t>> rejected_hashes; + for (size_t i = 0; kGoodPath[i]; i++) { + HashValue hash; + ASSERT_TRUE(hash.FromString(kGoodPath[i])); + rejected_hashes.emplace_back(hash.data(), hash.data() + hash.size()); + } + TransportSecurityState::PinSet test_pinset( + /*name=*/"test", + /*static_spki_hashes=*/{}, + /*bad_static_spki_hashes=*/rejected_hashes, + /*report_uri=*/kReportUri); + TransportSecurityState::PinSetInfo test_pinsetinfo( + /*hostname=*/kHost, /* pinset_name=*/"test", + /*include_subdomains=*/false); + state.UpdatePinList({test_pinset}, {test_pinsetinfo}, base::Time::Now()); + + // Hashes should now be rejected. + EXPECT_EQ(TransportSecurityState::PKPStatus::VIOLATED, + state.CheckPublicKeyPins( + host_port_pair, true, good_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); +} + +TEST_F(TransportSecurityStateTest, UpdateKeyPinsEmptyList) { + HostPortPair host_port_pair(kHost, kPort); + GURL report_uri(kReportUri); + NetworkIsolationKey network_isolation_key = + NetworkIsolationKey::CreateTransient(); + // Two dummy certs to use as the server-sent and validated chains. The + // contents don't matter. + scoped_refptr<X509Certificate> cert1 = + ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); + ASSERT_TRUE(cert1); + scoped_refptr<X509Certificate> cert2 = + ImportCertFromFile(GetTestCertsDirectory(), "expired_cert.pem"); + ASSERT_TRUE(cert2); + + HashValueVector bad_hashes; + + for (size_t i = 0; kBadPath[i]; i++) + EXPECT_TRUE(AddHash(kBadPath[i], &bad_hashes)); + + TransportSecurityState state; + EnableStaticPins(&state); + std::string unused_failure_log; + + // Prior to updating the list, bad_hashes should be rejected. + EXPECT_EQ(TransportSecurityState::PKPStatus::VIOLATED, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); + + // Update the pins list with an empty list. + state.UpdatePinList({}, {}, base::Time::Now()); + + // Hashes should now be accepted. + EXPECT_EQ(TransportSecurityState::PKPStatus::OK, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); +} + +TEST_F(TransportSecurityStateTest, UpdateKeyPinsListTimestamp) { + HostPortPair host_port_pair(kHost, kPort); + GURL report_uri(kReportUri); + NetworkIsolationKey network_isolation_key = + NetworkIsolationKey::CreateTransient(); + // Two dummy certs to use as the server-sent and validated chains. The + // contents don't matter. + scoped_refptr<X509Certificate> cert1 = + ImportCertFromFile(GetTestCertsDirectory(), "ok_cert.pem"); + ASSERT_TRUE(cert1); + scoped_refptr<X509Certificate> cert2 = + ImportCertFromFile(GetTestCertsDirectory(), "expired_cert.pem"); + ASSERT_TRUE(cert2); + + HashValueVector bad_hashes; + + for (size_t i = 0; kBadPath[i]; i++) + EXPECT_TRUE(AddHash(kBadPath[i], &bad_hashes)); + + TransportSecurityState state; + EnableStaticPins(&state); + std::string unused_failure_log; + + // Prior to updating the list, bad_hashes should be rejected. + EXPECT_EQ(TransportSecurityState::PKPStatus::VIOLATED, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); + + // Update the pins list, with bad hashes as rejected, but a timestamp >70 days + // old. + std::vector<std::vector<uint8_t>> rejected_hashes; + for (size_t i = 0; kBadPath[i]; i++) { + HashValue hash; + ASSERT_TRUE(hash.FromString(kBadPath[i])); + rejected_hashes.emplace_back(hash.data(), hash.data() + hash.size()); + } + TransportSecurityState::PinSet test_pinset( + /*name=*/"test", + /*static_spki_hashes=*/{}, + /*bad_static_spki_hashes=*/rejected_hashes, + /*report_uri=*/kReportUri); + TransportSecurityState::PinSetInfo test_pinsetinfo( + /*hostname=*/kHost, /* pinset_name=*/"test", + /*include_subdomains=*/false); + state.UpdatePinList({test_pinset}, {test_pinsetinfo}, + base::Time::Now() - base::Days(70)); + + // Hashes should now be accepted. + EXPECT_EQ(TransportSecurityState::PKPStatus::OK, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); + + // Update the pins list again, with a timestamp <70 days old. + state.UpdatePinList({test_pinset}, {test_pinsetinfo}, + base::Time::Now() - base::Days(69)); + + // Hashes should now be rejected. + EXPECT_EQ(TransportSecurityState::PKPStatus::VIOLATED, + state.CheckPublicKeyPins( + host_port_pair, true, bad_hashes, cert1.get(), cert2.get(), + TransportSecurityState::ENABLE_PIN_REPORTS, + network_isolation_key, &unused_failure_log)); +} + } // namespace net
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 9f7ec13..c3886023 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc
@@ -6289,10 +6289,9 @@ EXPECT_EQ(std::string(), mock_report_sender.latest_report()); EXPECT_EQ(NetworkIsolationKey(), mock_report_sender.latest_network_isolation_key()); - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - EXPECT_TRUE(context->transport_security_state()->GetStaticDomainState( - test_server_hostname, &sts_state, &pkp_state)); + EXPECT_TRUE(context->transport_security_state()->GetStaticPKPState( + test_server_hostname, &pkp_state)); EXPECT_TRUE(pkp_state.HasPublicKeyPins()); EXPECT_FALSE(request->ssl_info().pkp_bypassed); } @@ -6345,10 +6344,9 @@ EXPECT_EQ(std::string(), mock_report_sender.latest_report()); EXPECT_EQ(NetworkIsolationKey(), mock_report_sender.latest_network_isolation_key()); - TransportSecurityState::STSState sts_state; TransportSecurityState::PKPState pkp_state; - EXPECT_TRUE(context->transport_security_state()->GetStaticDomainState( - test_server_hostname, &sts_state, &pkp_state)); + EXPECT_TRUE(context->transport_security_state()->GetStaticPKPState( + test_server_hostname, &pkp_state)); EXPECT_TRUE(pkp_state.HasPublicKeyPins()); EXPECT_TRUE(request->ssl_info().pkp_bypassed); } @@ -9851,10 +9849,14 @@ TransportSecurityState& transport_security_state = *context->transport_security_state(); + transport_security_state.EnableStaticPinsForTesting(); + TransportSecurityState::STSState static_sts_state; TransportSecurityState::PKPState static_pkp_state; - EXPECT_TRUE(transport_security_state.GetStaticDomainState( - "hsts-hpkp-preloaded.test", &static_sts_state, &static_pkp_state)); + EXPECT_TRUE(transport_security_state.GetStaticSTSState( + "hsts-hpkp-preloaded.test", &static_sts_state)); + EXPECT_TRUE(transport_security_state.GetStaticPKPState( + "hsts-hpkp-preloaded.test", &static_pkp_state)); TransportSecurityState::STSState dynamic_sts_state; TransportSecurityState::PKPState dynamic_pkp_state; @@ -9882,9 +9884,10 @@ // Get a fresh copy of the states, and check that they haven't changed. TransportSecurityState::STSState new_static_sts_state; TransportSecurityState::PKPState new_static_pkp_state; - EXPECT_TRUE(transport_security_state.GetStaticDomainState( - "hsts-hpkp-preloaded.test", &new_static_sts_state, - &new_static_pkp_state)); + EXPECT_TRUE(transport_security_state.GetStaticSTSState( + "hsts-hpkp-preloaded.test", &new_static_sts_state)); + EXPECT_TRUE(transport_security_state.GetStaticPKPState( + "hsts-hpkp-preloaded.test", &new_static_pkp_state)); TransportSecurityState::STSState new_dynamic_sts_state; TransportSecurityState::PKPState new_dynamic_pkp_state; EXPECT_FALSE(transport_security_state.GetDynamicSTSState(
diff --git a/ppapi/BUILD.gn b/ppapi/BUILD.gn index bfa92ed7..54f7f7a2 100644 --- a/ppapi/BUILD.gn +++ b/ppapi/BUILD.gn
@@ -393,5 +393,10 @@ data_deps += [ ":ppapi_nacl_tests(//build/toolchain/nacl:glibc_${target_cpu})" ] } + # TODO(https://crbug.com/1299021): Implement building these NaCl targets + # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu == "arm64") { + data_deps = [] + } } }
diff --git a/ppapi/native_client/BUILD.gn b/ppapi/native_client/BUILD.gn index b41b872..040015739 100644 --- a/ppapi/native_client/BUILD.gn +++ b/ppapi/native_client/BUILD.gn
@@ -111,4 +111,10 @@ public_deps += irt_x64_deps data_deps += irt_x64_deps } + # TODO(https://crbug.com/1299021): Implement building these NaCl targets as + # ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu == "arm64") { + public_deps = [] + data_deps = [] + } }
diff --git a/ppapi/tests/extensions/BUILD.gn b/ppapi/tests/extensions/BUILD.gn index 712e918..b684496 100644 --- a/ppapi/tests/extensions/BUILD.gn +++ b/ppapi/tests/extensions/BUILD.gn
@@ -19,6 +19,11 @@ ":ppapi_tests_extensions_popup($newlib)", ":ppapi_tests_extensions_socket_permissions($newlib)", ] + # TODO(https://crbug.com/1299021): Implement building these NaCl targets as + # ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS). + if (target_cpu == "arm64") { + data_deps = [] + } } if (is_nacl) {
diff --git a/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc b/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc index 11819b5..afa034f 100644 --- a/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc +++ b/sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc
@@ -193,12 +193,14 @@ return std::make_unique<SpeechRecognitionProcessPolicy>(); case sandbox::mojom::Sandbox::kScreenAI: return std::make_unique<ScreenAIProcessPolicy>(); -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: // TODO(b/195769334): we're using the GPU process sandbox policy for now // as a transition step. However, we should create a policy that's tighter // just for hardware video decoding. return GetGpuProcessSandbox(options.use_amd_specific_policies); +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kIme: return std::make_unique<ImeProcessPolicy>(); case sandbox::mojom::Sandbox::kTts: @@ -254,8 +256,10 @@ CHECK_EQ(EPERM, errno); #endif // !defined(NDEBUG) } break; -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case sandbox::mojom::Sandbox::kIme: case sandbox::mojom::Sandbox::kTts: #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
diff --git a/sandbox/policy/mojom/BUILD.gn b/sandbox/policy/mojom/BUILD.gn index c914dba7..689fe68 100644 --- a/sandbox/policy/mojom/BUILD.gn +++ b/sandbox/policy/mojom/BUILD.gn
@@ -24,6 +24,9 @@ "is_linux_or_chromeos", ] } + if (is_linux || is_chromeos_ash) { + enabled_features += [ "is_linux_or_chromeos_ash" ] + } if (enable_cros_libassistant) { enabled_features += [ "enable_cros_libassistant" ] }
diff --git a/sandbox/policy/mojom/sandbox.mojom b/sandbox/policy/mojom/sandbox.mojom index b4079d9..e7bcb994 100644 --- a/sandbox/policy/mojom/sandbox.mojom +++ b/sandbox/policy/mojom/sandbox.mojom
@@ -114,7 +114,7 @@ // TODO(b/195769334): we're using the GPU process sandbox policy for now as a // transition step. However, we should create a policy that's tighter just for // hardware video decoding. - [EnableIf=is_chromeos_ash] + [EnableIf=is_linux_or_chromeos_ash] kHardwareVideoDecoding, // Hosts Input Method Editors.
diff --git a/sandbox/policy/sandbox_type.cc b/sandbox/policy/sandbox_type.cc index 7d457bf..31da9f0 100644 --- a/sandbox/policy/sandbox_type.cc +++ b/sandbox/policy/sandbox_type.cc
@@ -62,8 +62,10 @@ case Sandbox::kMirroring: case Sandbox::kNaClLoader: #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kIme: case Sandbox::kTts: #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) @@ -134,8 +136,10 @@ case Sandbox::kMediaFoundationCdm: case Sandbox::kWindowsSystemProxyResolver: #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kHardwareVideoDecoding: +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kIme: case Sandbox::kTts: #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) @@ -281,9 +285,11 @@ case Sandbox::kMirroring: return switches::kMirroringSandbox; #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kHardwareVideoDecoding: return switches::kHardwareVideoDecodingSandbox; +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) case Sandbox::kIme: return switches::kImeSandbox; case Sandbox::kTts: @@ -371,9 +377,11 @@ if (sandbox_string == switches::kVideoCaptureSandbox) return Sandbox::kVideoCapture; #endif -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) if (sandbox_string == switches::kHardwareVideoDecodingSandbox) return Sandbox::kHardwareVideoDecoding; +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_CHROMEOS_ASH) if (sandbox_string == switches::kImeSandbox) return Sandbox::kIme; if (sandbox_string == switches::kTtsSandbox)
diff --git a/sandbox/policy/switches.cc b/sandbox/policy/switches.cc index 6b20a9564..cc73bee 100644 --- a/sandbox/policy/switches.cc +++ b/sandbox/policy/switches.cc
@@ -52,8 +52,11 @@ const char kMirroringSandbox[] = "mirroring"; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) const char kHardwareVideoDecodingSandbox[] = "hardware_video_decoding"; +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) + +#if BUILDFLAG(IS_CHROMEOS_ASH) const char kImeSandbox[] = "ime"; const char kTtsSandbox[] = "tts"; #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
diff --git a/sandbox/policy/switches.h b/sandbox/policy/switches.h index 4586cb2..08376ed 100644 --- a/sandbox/policy/switches.h +++ b/sandbox/policy/switches.h
@@ -53,8 +53,11 @@ SANDBOX_POLICY_EXPORT extern const char kMirroringSandbox[]; #endif // BUILDFLAG(IS_MAC) -#if BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) SANDBOX_POLICY_EXPORT extern const char kHardwareVideoDecodingSandbox[]; +#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_ASH) + +#if BUILDFLAG(IS_CHROMEOS_ASH) SANDBOX_POLICY_EXPORT extern const char kImeSandbox[]; SANDBOX_POLICY_EXPORT extern const char kTtsSandbox[]; #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT)
diff --git a/services/device/public/cpp/device_features.h b/services/device/public/cpp/device_features.h index 04719255..0fda02d8 100644 --- a/services/device/public/cpp/device_features.h +++ b/services/device/public/cpp/device_features.h
@@ -19,8 +19,6 @@ DEVICE_FEATURES_EXPORT extern const base::Feature kGenericSensorExtraClasses; DEVICE_FEATURES_EXPORT extern const base::Feature kWinrtGeolocationImplementation; -DEVICE_FEATURES_EXPORT extern const base::Feature - kMacCoreLocationImplementation; DEVICE_FEATURES_EXPORT extern const base::Feature kMacCoreLocationBackend; } // namespace features
diff --git a/services/network/cookie_manager.cc b/services/network/cookie_manager.cc index 49c53dc..5780b29 100644 --- a/services/network/cookie_manager.cc +++ b/services/network/cookie_manager.cc
@@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" +#include "base/feature_list.h" #include "base/process/process.h" #include "build/build_config.h" #include "components/content_settings/core/common/content_settings_pattern.h" @@ -465,6 +466,11 @@ } void CookieManager::ConvertPartitionedCookiesToUnpartitioned(const GURL& url) { + if (!base::FeatureList::IsEnabled(net::features::kPartitionedCookies) || + base::FeatureList::IsEnabled( + net::features::kPartitionedCookiesBypassOriginTrial)) { + return; + } cookie_store_->ConvertPartitionedCookiesToUnpartitioned(url); }
diff --git a/services/network/cookie_manager.h b/services/network/cookie_manager.h index 874e7fbd..32dec69d 100644 --- a/services/network/cookie_manager.h +++ b/services/network/cookie_manager.h
@@ -126,6 +126,8 @@ // // 2. Choose the partitioned cookie with the most recent last_access_time. // + // This function is a no-op when PartitionedCookies are disabled or + // PartitionedCookiesBypassOriginTrial is enabled. // TODO(crbug.com/1296161): Delete this when the partitioned cookies Origin // Trial ends. void ConvertPartitionedCookiesToUnpartitioned(const GURL& url) override;
diff --git a/services/network/cookie_manager_unittest.cc b/services/network/cookie_manager_unittest.cc index 36467b3..ded3f9ee 100644 --- a/services/network/cookie_manager_unittest.cc +++ b/services/network/cookie_manager_unittest.cc
@@ -310,7 +310,8 @@ class CookieManagerTest : public testing::Test { public: CookieManagerTest() { - scoped_feature_list_.Init(); + scoped_feature_list_.InitWithFeatures({net::features::kPartitionedCookies}, + {}); InitializeCookieService(nullptr, nullptr); } @@ -3177,6 +3178,34 @@ EXPECT_EQ(4u, cookies.size()); EXPECT_EQ("__Host-D", cookies[3].Name()); EXPECT_TRUE(cookies[3].IsPartitioned()); + + base::test::ScopedFeatureList feature_list; + feature_list.InitWithFeatures( + {net::features::kPartitionedCookies, + net::features::kPartitionedCookiesBypassOriginTrial}, + {}); + + // Should not convert partitioned cookies to unpartitioned when + // PartitionedCookiesBypassOriginTrial is enabled. + ASSERT_TRUE(SetCanonicalCookie( + *net::CanonicalCookie::CreateUnsafeCookieForTesting( + "__Host-E", "0", kCookieDomain, "/", base::Time(), base::Time(), + base::Time(), + /*secure=*/true, /*httponly=*/false, + net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_MEDIUM, + /*same_party=*/false, + net::CookiePartitionKey::FromURLForTesting( + GURL("https://first.com"))), + "https", true)); + service()->ConvertPartitionedCookiesToUnpartitioned(GURL(kCookieHttpsURL)); + task_environment_.FastForwardBy(base::Milliseconds(50)); + + cookies = service_wrapper()->GetCookieList( + GURL(kCookieHttpsURL), net::CookieOptions::MakeAllInclusive(), + net::CookiePartitionKeyCollection::ContainsAll()); + EXPECT_EQ(5u, cookies.size()); + EXPECT_EQ("__Host-E", cookies[4].Name()); + EXPECT_TRUE(cookies[4].IsPartitioned()); } } // namespace
diff --git a/services/network/network_context.cc b/services/network/network_context.cc index 36e56f9..54b5a28 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc
@@ -1806,9 +1806,11 @@ if (transport_security_state) { net::TransportSecurityState::STSState static_sts_state; net::TransportSecurityState::PKPState static_pkp_state; - bool found_static = transport_security_state->GetStaticDomainState( - domain, &static_sts_state, &static_pkp_state); - if (found_static) { + bool found_sts_static = transport_security_state->GetStaticSTSState( + domain, &static_sts_state); + bool found_pkp_static = transport_security_state->GetStaticPKPState( + domain, &static_pkp_state); + if (found_sts_static || found_pkp_static) { result.SetIntKey("static_upgrade_mode", static_cast<int>(static_sts_state.upgrade_mode)); result.SetBoolKey("static_sts_include_subdomains", @@ -1861,8 +1863,8 @@ result.SetStringKey("dynamic_pkp_domain", dynamic_pkp_state.domain); } - result.SetBoolKey("result", - found_static || found_sts_dynamic || found_pkp_dynamic); + result.SetBoolKey("result", found_sts_static || found_pkp_static || + found_sts_dynamic || found_pkp_dynamic); } else { result.SetStringKey("error", "no TransportSecurityState active"); }
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 31c7eec..3999c4f 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -9581,7 +9581,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -10085,7 +10085,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index f5f8cc9..111ec0c 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -44881,7 +44881,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -45385,7 +45385,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -45893,7 +45893,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -46397,7 +46397,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -46972,7 +46972,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47476,7 +47476,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48051,7 +48051,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48555,7 +48555,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M100", - "revision": "version:100.0.4896.54" + "revision": "version:100.0.4896.55" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.dawn.json b/testing/buildbot/chromium.dawn.json index e65ba38f..a999ff6 100644 --- a/testing/buildbot/chromium.dawn.json +++ b/testing/buildbot/chromium.dawn.json
@@ -191,6 +191,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-19.0.2", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -531,6 +555,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-440.100", + "os": "Ubuntu-18.04.5|Ubuntu-18.04.6", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -871,6 +919,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-19.0.2", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -1211,6 +1283,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-440.100", + "os": "Ubuntu-18.04.5|Ubuntu-18.04.6", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -1568,6 +1664,33 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "display_attached": "1", + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-12.1", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -1917,6 +2040,31 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "display_attached": "1", + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -2281,6 +2429,34 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "display_attached": "1", + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-12.1", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -2686,6 +2862,33 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "display_attached": "1", + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-12.1", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -3035,6 +3238,31 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "display_attached": "1", + "gpu": "8086:3e9b", + "os": "Mac-11.5.2" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -3375,6 +3603,35 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-27.21.14.5638", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + }, + { + "gpu": "8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -3644,6 +3901,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -3976,6 +4257,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-27.21.14.5638", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -4308,6 +4613,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -4640,6 +4969,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-27.21.14.5638", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -4974,6 +5327,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -5304,6 +5681,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-27.21.14.5638", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -5634,6 +6035,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000", @@ -5964,6 +6389,30 @@ "test_id_prefix": "ninja://third_party/dawn/src/dawn/tests:dawn_perf_tests/" }, { + "isolate_name": "telemetry_gpu_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "telemetry_gpu_unittests", + "resultdb": { + "enable": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "10de:2184-27.21.14.5638", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "idempotent": false, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://chrome/test:telemetry_gpu_unittests/" + }, + { "args": [ "--flag-specific=webgpu", "--initialize-webgpu-adapter-at-startup-timeout-ms=60000",
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index c50d13f..65914ab 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -28604,6 +28604,4181 @@ } ] }, + "ios-m1-simulator": { + "additional_compile_targets": [ + "all" + ], + "isolated_scripts": [ + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "absl_hardening_tests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "absl_hardening_tests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://third_party/abseil-cpp:absl_hardening_tests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "base_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://base:base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "base_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://base:base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "base_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://base:base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "base_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://base:base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "boringssl_crypto_tests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "boringssl_crypto_tests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://third_party/boringssl:boringssl_crypto_tests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "boringssl_ssl_tests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "boringssl_ssl_tests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://third_party/boringssl:boringssl_ssl_tests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "components_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "components_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://components:components_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "components_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "components_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://components:components_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "components_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "components_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://components:components_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "components_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "components_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://components:components_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "crashpad_tests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "crashpad_tests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://third_party/crashpad/crashpad:crashpad_tests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "crypto_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "crypto_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://crypto:crypto_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "gfx_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "gfx_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "gfx_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "gfx_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "gfx_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "gfx_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "gfx_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "gfx_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "google_apis_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "google_apis_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://google_apis:google_apis_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_bookmarks_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_bookmarks_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 7", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_bookmarks_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_bookmarks_eg2tests_module_iPhone 7 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_bookmarks_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_bookmarks_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_integration_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_integration_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 8 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Pro (12.9-inch) (2nd generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_integration_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_integration_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 8 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_integration_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_integration_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 8 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_settings_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_settings_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 7", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_settings_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_settings_eg2tests_module_iPhone 7 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_settings_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_settings_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_signin_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_signin_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Pro (12.9-inch) (2nd generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_signin_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_signin_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_signin_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_signin_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_smoke_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_smoke_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 7", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_smoke_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_smoke_eg2tests_module_iPhone 7 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_smoke_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_smoke_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_ui_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_ui_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 12 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Pro (12.9-inch) (2nd generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_ui_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_ui_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 12 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_ui_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_ui_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 12 + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_chrome_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_chrome_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_chrome_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_chrome_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_web_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_web_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 7", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_web_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_web_eg2tests_module_iPhone 7 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_chrome_web_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_chrome_web_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_components_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_components_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/components:ios_components_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_net_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_net_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 3 + }, + "test_id_prefix": "ninja://ios/net:ios_net_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_remoting_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_remoting_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://remoting/ios:ios_remoting_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_showcase_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_showcase_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 7", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_showcase_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_showcase_eg2tests_module_iPhone 7 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_showcase_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_showcase_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_testing_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_testing_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/testing:ios_testing_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_inttests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_inttests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_inttests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_inttests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_inttests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_inttests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_inttests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_inttests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_web_shell_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_shell_eg2tests_module_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Pro (12.9-inch) (2nd generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_web_shell_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_shell_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPhone X", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest", + "--xcode-parallelization" + ], + "isolate_name": "ios_web_shell_eg2tests_module", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_shell_eg2tests_module_iPhone X 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web:ios_web_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_inttests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_inttests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_inttests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_inttests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_inttests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ios_web_view_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ios_web_view_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "net_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "net_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://net:net_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "services_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "services_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://services:services_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "skia_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "skia_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://skia:skia_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "skia_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "skia_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://skia:skia_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "skia_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "skia_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://skia:skia_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "skia_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "skia_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://skia:skia_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "sql_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "sql_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://sql:sql_unittests/" + }, + { + "args": [ + "--platform", + "iPad Air 2", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ui_base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ui_base_unittests_iPad Air 2 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/base:ui_base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ui_base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ui_base_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/base:ui_base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s Plus", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ui_base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ui_base_unittests_iPhone 6s Plus 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/base:ui_base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone SE (1st generation)", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "ui_base_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "ui_base_unittests_iPhone SE (1st generation) 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://ui/base:ui_base_unittests/" + }, + { + "args": [ + "--platform", + "iPhone 6s", + "--version", + "14.5", + "--out-dir", + "${ISOLATED_OUTDIR}", + "--xcode-build-version", + "13c100", + "--xctest" + ], + "isolate_name": "url_unittests", + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "name": "url_unittests_iPhone 6s 14.5", + "resultdb": { + "enable": true, + "has_native_resultdb_integration": true + }, + "swarming": { + "can_use_on_swarming_builders": true, + "cipd_packages": [ + { + "cipd_package": "infra/tools/mac_toolchain/${platform}", + "location": ".", + "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" + } + ], + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11" + } + ], + "named_caches": [ + { + "name": "xcode_ios_13c100", + "path": "Xcode.app" + }, + { + "name": "runtime_ios_14_5", + "path": "Runtime-ios-14.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test_id_prefix": "ninja://url:url_unittests/" + } + ] + }, "ios-reclient": { "additional_compile_targets": [ "all" @@ -54828,4176 +59003,6 @@ "ios14-sdk-simulator": { "additional_compile_targets": [ "all" - ], - "isolated_scripts": [ - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "absl_hardening_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "absl_hardening_tests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/abseil-cpp:absl_hardening_tests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "base_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "base_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "base_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "base_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://base:base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "boringssl_crypto_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "boringssl_crypto_tests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/boringssl:boringssl_crypto_tests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "boringssl_ssl_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "boringssl_ssl_tests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/boringssl:boringssl_ssl_tests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "components_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "components_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "components_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "components_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "components_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "components_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "components_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "components_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://components:components_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "crashpad_tests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "crashpad_tests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/crashpad/crashpad:crashpad_tests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "crypto_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "crypto_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://crypto:crypto_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "gfx_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "gfx_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "gfx_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "gfx_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "gfx_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "gfx_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "gfx_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "gfx_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/gfx:gfx_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "google_apis_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "google_apis_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://google_apis:google_apis_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_bookmarks_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_bookmarks_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 7", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_bookmarks_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_bookmarks_eg2tests_module_iPhone 7 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_bookmarks_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_bookmarks_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_bookmarks_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_integration_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_integration_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Pro (12.9-inch) (2nd generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_integration_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_integration_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_integration_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_integration_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 8 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_integration_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_settings_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_settings_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 7", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_settings_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_settings_eg2tests_module_iPhone 7 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_settings_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_settings_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_settings_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_signin_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_signin_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Pro (12.9-inch) (2nd generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_signin_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_signin_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_signin_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_signin_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_signin_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_smoke_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_smoke_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 7", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_smoke_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_smoke_eg2tests_module_iPhone 7 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_smoke_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_smoke_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_smoke_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_ui_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_ui_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 12 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Pro (12.9-inch) (2nd generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_ui_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_ui_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 12 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_ui_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_ui_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 12 - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_ui_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_chrome_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_chrome_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_chrome_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_chrome_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test:ios_chrome_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_web_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_web_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 7", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_web_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_web_eg2tests_module_iPhone 7 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_chrome_web_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_chrome_web_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/chrome/test/earl_grey2:ios_chrome_web_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_components_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_components_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/components:ios_components_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_net_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_net_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 3 - }, - "test_id_prefix": "ninja://ios/net:ios_net_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_remoting_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_remoting_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://remoting/ios:ios_remoting_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_showcase_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_showcase_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 7", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_showcase_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_showcase_eg2tests_module_iPhone 7 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_showcase_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_showcase_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/showcase:ios_showcase_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_testing_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_testing_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/testing:ios_testing_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_inttests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_inttests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_inttests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_inttests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_inttests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_inttests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_inttests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_inttests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_web_shell_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_shell_eg2tests_module_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Pro (12.9-inch) (2nd generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_web_shell_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_shell_eg2tests_module_iPad Pro (12.9-inch) (2nd generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPhone X", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest", - "--xcode-parallelization" - ], - "isolate_name": "ios_web_shell_eg2tests_module", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_shell_eg2tests_module_iPhone X 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web/shell/test:ios_web_shell_eg2tests_module/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web:ios_web_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_inttests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_inttests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_inttests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_inttests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_inttests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_inttests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ios_web_view_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ios_web_view_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ios/web_view:ios_web_view_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "net_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "net_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://net:net_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "services_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "services_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://services:services_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "skia_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "skia_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://skia:skia_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "skia_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "skia_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://skia:skia_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "skia_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "skia_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://skia:skia_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "skia_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "skia_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://skia:skia_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "sql_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "sql_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://sql:sql_unittests/" - }, - { - "args": [ - "--platform", - "iPad Air 2", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ui_base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ui_base_unittests_iPad Air 2 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/base:ui_base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ui_base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ui_base_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/base:ui_base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s Plus", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ui_base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ui_base_unittests_iPhone 6s Plus 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/base:ui_base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone SE (1st generation)", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "ui_base_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "ui_base_unittests_iPhone SE (1st generation) 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://ui/base:ui_base_unittests/" - }, - { - "args": [ - "--platform", - "iPhone 6s", - "--version", - "14.5", - "--out-dir", - "${ISOLATED_OUTDIR}", - "--xcode-build-version", - "13c100", - "--xctest" - ], - "isolate_name": "url_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "url_unittests_iPhone 6s 14.5", - "resultdb": { - "enable": true, - "has_native_resultdb_integration": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/mac_toolchain/${platform}", - "location": ".", - "revision": "git_revision:723fc1a6c8cdf2631a57851f5610e598db0c1de1" - } - ], - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11" - } - ], - "named_caches": [ - { - "name": "xcode_ios_13c100", - "path": "Xcode.app" - }, - { - "name": "runtime_ios_14_5", - "path": "Runtime-ios-14.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://url:url_unittests/" - } ] }, "ios15-beta-simulator": {
diff --git a/testing/buildbot/chromium.perf.json b/testing/buildbot/chromium.perf.json index 222247e..8e3e24c 100644 --- a/testing/buildbot/chromium.perf.json +++ b/testing/buildbot/chromium.perf.json
@@ -1532,55 +1532,6 @@ "script": "//tools/perf/process_perf_results.py" } }, - "win-10_amd-perf": { - "isolated_scripts": [ - { - "args": [ - "-v", - "--browser=release_x64", - "--upload-results", - "--test-shard-map-filename=win-10_amd-perf_map.json", - "--assert-gpu-compositing" - ], - "isolate_name": "performance_test_suite", - "merge": { - "script": "//tools/perf/process_perf_results.py" - }, - "name": "performance_test_suite", - "override_compile_targets": [ - "performance_test_suite" - ], - "resultdb": { - "enable": true - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "1002:15d8-27.20.1034.6", - "os": "Windows-10-18363.476", - "pool": "chrome.tests.perf", - "synthetic_product_name": "11A5S4L300 [ThinkCentre M75q-1] (LENOVO)" - } - ], - "expiration": 7200, - "hard_timeout": 21600, - "ignore_task_failure": false, - "io_timeout": 21600, - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 1 - }, - "trigger_script": { - "args": [ - "--multiple-dimension-script-verbose", - "True" - ], - "requires_simultaneous_shard_dispatch": true, - "script": "//testing/trigger_scripts/perf_device_trigger.py" - } - } - ] - }, "win-10_amd_laptop-perf": { "isolated_scripts": [ {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index cf8646b..084a7e1 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -3804,6 +3804,15 @@ }, 'gpu_webgpu_integration_isolated_scripts': { + # Test that expectations files are well-formed. + 'telemetry_gpu_unittests': { + 'swarming': { + 'idempotent': False, # https://crbug.com/549140 + }, + 'resultdb': { + 'enable': True, + }, + }, 'webgpu_blink_web_tests': { 'name': 'webgpu_blink_web_tests', 'isolate_name': 'webgpu_blink_web_tests', @@ -6983,48 +6992,6 @@ }, }, - 'ios14_sdk_simulator_tests': { - 'ios_common_tests': { - 'variants': [ - # Latest beta iOS version Sims - 'SIM_IPHONE_6S_14_5', - ], - }, - 'ios_crash_unittests': { - 'variants': [ - # Latest beta iOS version Sims - 'SIM_IPHONE_6S_14_5', - ], - }, - 'ios_eg2_tests': { - 'mixins': ['xcode_parallelization'], - 'variants': [ - # Latest beta iOS version Sims - 'SIM_IPHONE_7_14_5', - 'SIM_IPAD_AIR_2_14_5', - 'SIM_IPHONE_X_14_5', - ] - }, - 'ios_eg2_cq_tests': { - 'mixins': ['xcode_parallelization'], - 'variants': [ - # Latest beta iOS version Sims - 'SIM_IPHONE_X_14_5', - 'SIM_IPAD_AIR_2_14_5', - 'SIM_IPAD_PRO_2ND_GEN_14_5', - ] - }, - 'ios_screen_size_dependent_tests': { - 'variants': [ - # Latest beta iOS version Sims - 'SIM_IPHONE_6S_PLUS_14_5', - 'SIM_IPHONE_6S_14_5', - 'SIM_IPHONE_SE_1ST_GEN_14_5', - 'SIM_IPAD_AIR_2_14_5', - ], - }, - }, - 'ios15_beta_simulator_tests': { 'ios_common_tests': { 'variants': [ @@ -7212,6 +7179,48 @@ }, }, + 'ios_m1_simulator_tests': { + 'ios_common_tests': { + 'variants': [ + # Latest beta iOS version Sims + 'SIM_IPHONE_6S_14_5', + ], + }, + 'ios_crash_unittests': { + 'variants': [ + # Latest beta iOS version Sims + 'SIM_IPHONE_6S_14_5', + ], + }, + 'ios_eg2_tests': { + 'mixins': ['xcode_parallelization'], + 'variants': [ + # Latest beta iOS version Sims + 'SIM_IPHONE_7_14_5', + 'SIM_IPAD_AIR_2_14_5', + 'SIM_IPHONE_X_14_5', + ] + }, + 'ios_eg2_cq_tests': { + 'mixins': ['xcode_parallelization'], + 'variants': [ + # Latest beta iOS version Sims + 'SIM_IPHONE_X_14_5', + 'SIM_IPAD_AIR_2_14_5', + 'SIM_IPAD_PRO_2ND_GEN_14_5', + ] + }, + 'ios_screen_size_dependent_tests': { + 'variants': [ + # Latest beta iOS version Sims + 'SIM_IPHONE_6S_PLUS_14_5', + 'SIM_IPHONE_6S_14_5', + 'SIM_IPHONE_SE_1ST_GEN_14_5', + 'SIM_IPAD_AIR_2_14_5', + ], + }, + }, + 'ios_simulator_cronet_tests': { 'ios_cronet_tests': { 'variants': [
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 9ec3888..3f9d44d1 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -483,7 +483,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M100', - 'revision': 'version:100.0.4896.54', + 'revision': 'version:100.0.4896.55', } ], }, @@ -627,7 +627,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M100', - 'revision': 'version:100.0.4896.54', + 'revision': 'version:100.0.4896.55', } ], }, @@ -771,7 +771,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M100', - 'revision': 'version:100.0.4896.54', + 'revision': 'version:100.0.4896.55', } ], },
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 3df1119c..d706f83 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -3124,6 +3124,24 @@ 'isolated_scripts': 'ios_asan_tests', } }, + # ios-m1-sim compiles with xcode version n on M1 mac, and runs + # testers with xcode n during an xcode roll. + 'ios-m1-simulator': { + 'additional_compile_targets': [ + 'all', + ], + 'mixins': [ + 'has_native_resultdb_integration', + 'mac_11_arm64', + 'mac_toolchain', + 'out_dir_arg', + 'xcode_13_main', + 'xctest', + ], + 'test_suites': { + 'isolated_scripts': 'ios_m1_simulator_tests' + }, + }, # TODO(crbug.com/1254986): remove this after the migration. 'ios-reclient': { 'additional_compile_targets': [ @@ -3222,15 +3240,12 @@ ], 'mixins': [ 'has_native_resultdb_integration', - 'mac_11_arm64', + 'mac_11_x64', 'mac_toolchain', 'out_dir_arg', 'xcode_13_main', 'xctest', ], - 'test_suites': { - 'isolated_scripts': 'ios14_sdk_simulator_tests' - }, }, 'ios15-beta-simulator': { 'additional_compile_targets': [
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 05d6e2d..4911604f 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -3830,6 +3830,21 @@ ] } ], + "IOSMediaPermissionsControl": [ + { + "platforms": [ + "ios" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "MediaPermissionsControl" + ] + } + ] + } + ], "IOSMetrickitCrashReport": [ { "platforms": [ @@ -7503,6 +7518,21 @@ ] } ], + "VaapiVideoDecoder": [ + { + "platforms": [ + "linux" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "VaapiVideoDecoder" + ] + } + ] + } + ], "VaapiVp9kSVCEncoding": [ { "platforms": [
diff --git a/third_party/.gitignore b/third_party/.gitignore index 9b15a5c..cceb53d 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore
@@ -32,6 +32,10 @@ /apache-mac/bin/* /apache-mac/lib/* /apache-mac/libexec/* +/apache-mac-arm64/LICENSE +/apache-mac-arm64/bin/* +/apache-mac-arm64/lib/* +/apache-mac-arm64/libexec/* /apache-portable-runtime/src /apache-win32/bin/*.exe /apache-win32/bin/*.dll
diff --git a/third_party/blink/public/mojom/web_feature/web_feature.mojom b/third_party/blink/public/mojom/web_feature/web_feature.mojom index c3d6897d..bad6236 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -3209,7 +3209,7 @@ kSanitizerAPIGetDefaultConfig = 3898, kComputePressureObserver_Constructor = 3899, kComputePressureObserver_Observe = 3900, - kComputePressureObserver_Stop = 3901, + kOBSOLETE_ComputePressureObserver_Stop = 3901, kWebAppWindowControlsOverlay = 3902, kPaymentRequestShowWithoutGestureOrToken = 3903, kV8Navigator_UpdateAdInterestGroups_Method = 3904, @@ -3502,6 +3502,9 @@ kBluetoothDeviceForget = 4181, kTopicsAPI_BrowsingTopics_Method = 4182, kBlockingAttributeRenderToken = 4183, + kComputePressureObserver_Unobserve = 4184, + kComputePressureObserver_Disconnect = 4185, + kComputePressureObserver_TakeRecords = 4186, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni index 539283b..0098b88 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni
@@ -247,8 +247,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_color_selection_result.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_options.h", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_update.cc", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_update.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_record.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_record.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_source.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_source.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_constant_source_options.cc",
diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index 910f2d0..ee21e59 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni
@@ -114,7 +114,7 @@ "//third_party/blink/renderer/modules/compression/decompression_stream.idl", "//third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.idl", "//third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer_options.idl", - "//third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer_update.idl", + "//third_party/blink/renderer/modules/compute_pressure/compute_pressure_record.idl", "//third_party/blink/renderer/modules/compute_pressure/compute_pressure_update_callback.idl", "//third_party/blink/renderer/modules/contacts_picker/contact_address.idl", "//third_party/blink/renderer/modules/contacts_picker/contact_info.idl",
diff --git a/third_party/blink/renderer/core/frame/fullscreen_controller.cc b/third_party/blink/renderer/core/frame/fullscreen_controller.cc index 0a372d0..0561299 100644 --- a/third_party/blink/renderer/core/frame/fullscreen_controller.cc +++ b/third_party/blink/renderer/core/frame/fullscreen_controller.cc
@@ -153,12 +153,6 @@ options->screen()->DisplayId() != screen_info.display_id; bool requesting_fullscreen_screen_change = state_ == State::kFullscreen && requesting_other_screen; -#if BUILDFLAG(IS_MAC) - // Moving a fullscreen window from one screen to another is gated by the - // Window Placement V2 feature state on Mac. See crbug.com/1303048 - requesting_fullscreen_screen_change &= - RuntimeEnabledFeatures::WindowPlacementV2Enabled(frame.DomWindow()); -#endif // BUILDFLAG(IS_MAC) // TODO(dtapuska): If we are already in fullscreen. If the options are // different than the currently requested one we may wish to request
diff --git a/third_party/blink/renderer/core/html/media/video_wake_lock.cc b/third_party/blink/renderer/core/html/media/video_wake_lock.cc index 4d7b744..1acb0dd 100644 --- a/third_party/blink/renderer/core/html/media/video_wake_lock.cc +++ b/third_party/blink/renderer/core/html/media/video_wake_lock.cc
@@ -14,6 +14,7 @@ #include "third_party/blink/renderer/core/html/media/remote_playback_controller.h" #include "third_party/blink/renderer/core/intersection_observer/intersection_observer_entry.h" #include "third_party/blink/renderer/core/page/page.h" +#include "third_party/blink/renderer/platform/runtime_enabled_features.h" namespace blink { @@ -130,12 +131,15 @@ (page_visible && (is_visible_ || VideoElement().EffectiveMediaVolume()))); - // The video wake lock should be active iif: + bool has_video = VideoElement().HasVideo(); + + // The video wake lock should be active iff: // - it's playing; + // - it has video frames; // - the visibility requirements are met (see above); // - it's *not* playing in Remote Playback; // - the document is not paused nor destroyed. - return playing_ && visibility_requirements_met && + return playing_ && has_video && visibility_requirements_met && remote_playback_state_ != mojom::blink::PresentationConnectionState::CONNECTED && context_is_running;
diff --git a/third_party/blink/renderer/core/html/media/video_wake_lock_test.cc b/third_party/blink/renderer/core/html/media/video_wake_lock_test.cc index abe8d6a..8713443 100644 --- a/third_party/blink/renderer/core/html/media/video_wake_lock_test.cc +++ b/third_party/blink/renderer/core/html/media/video_wake_lock_test.cc
@@ -90,7 +90,6 @@ class VideoWakeLockMediaPlayer final : public EmptyWebMediaPlayer { public: ReadyState GetReadyState() const override { return kReadyStateHaveMetadata; } - bool HasVideo() const override { return true; } void OnRequestPictureInPicture() override { // Use a fake but valid viz::SurfaceId. surface_id_ = viz::SurfaceId( @@ -100,7 +99,11 @@ } absl::optional<viz::SurfaceId> GetSurfaceId() override { return surface_id_; } + bool HasVideo() const override { return has_video_; } + void SetHasVideo(bool has_video) { has_video_ = has_video; } + private: + bool has_video_ = true; absl::optional<viz::SurfaceId> surface_id_; }; @@ -137,8 +140,10 @@ class VideoWakeLockTest : public testing::Test { public: void SetUp() override { + auto media_player = std::make_unique<VideoWakeLockMediaPlayer>(); + media_player_ = media_player.get(); client_ = std::make_unique<VideoWakeLockTestWebFrameClient>( - std::make_unique<VideoWakeLockMediaPlayer>()); + std::move(media_player)); helper_.Initialize(client_.get()); helper_.Resize(gfx::Size(800, 600)); @@ -148,10 +153,15 @@ WTF::BindRepeating(&VideoWakeLockPictureInPictureService::Bind, WTF::Unretained(&pip_service_))); + fake_layer_ = cc::Layer::Create(); + GetDocument().body()->setInnerHTML("<body><video></video></body>"); video_ = To<HTMLVideoElement>(GetDocument().QuerySelector("video")); + SetFakeCcLayer(fake_layer_.get()); video_->SetReadyState(HTMLMediaElement::ReadyState::kHaveMetadata); video_wake_lock_ = MakeGarbageCollected<VideoWakeLock>(*video_.Get()); + video_->SetSrc("http://example.com/foo.mp4"); + test::RunPendingTasks(); GetPage().SetVisibilityState(mojom::blink::PageVisibilityState::kVisible, true); @@ -164,6 +174,7 @@ HTMLVideoElement* Video() const { return video_.Get(); } VideoWakeLock* GetVideoWakeLock() const { return video_wake_lock_.Get(); } + VideoWakeLockMediaPlayer* GetMediaPlayer() const { return media_player_; } LocalFrame& GetFrame() const { return *helper_.LocalMainFrame()->GetFrame(); } Page& GetPage() const { return *GetDocument().GetPage(); } @@ -236,6 +247,9 @@ Persistent<HTMLVideoElement> video_; Persistent<VideoWakeLock> video_wake_lock_; + VideoWakeLockMediaPlayer* media_player_; + scoped_refptr<cc::Layer> fake_layer_; + VideoWakeLockPictureInPictureService pip_service_; frame_test_helpers::WebViewHelper helper_; }; @@ -333,13 +347,6 @@ } TEST_F(VideoWakeLockTest, PictureInPictureLocksWhenPageNotVisible) { - // This initialeses the video element in order to not crash when the - // interstitial tries to show itself and so that the WebMediaPlayer is set up. - scoped_refptr<cc::Layer> layer = cc::Layer::Create(); - SetFakeCcLayer(layer.get()); - Video()->SetSrc("http://example.com/foo.mp4"); - test::RunPendingTasks(); - SimulatePlaying(); GetPage().SetVisibilityState(mojom::blink::PageVisibilityState::kHidden, false); @@ -350,13 +357,6 @@ } TEST_F(VideoWakeLockTest, PictureInPictureDoesNoLockWhenPaused) { - // This initialeses the video element in order to not crash when the - // interstitial tries to show itself and so that the WebMediaPlayer is set up. - scoped_refptr<cc::Layer> layer = cc::Layer::Create(); - SetFakeCcLayer(layer.get()); - Video()->SetSrc("http://example.com/foo.mp4"); - test::RunPendingTasks(); - SimulatePlaying(); GetPage().SetVisibilityState(mojom::blink::PageVisibilityState::kHidden, false); @@ -368,13 +368,6 @@ } TEST_F(VideoWakeLockTest, LeavingPictureInPictureCancelsLock) { - // This initialeses the video element in order to not crash when the - // interstitial tries to show itself and so that the WebMediaPlayer is set up. - scoped_refptr<cc::Layer> layer = cc::Layer::Create(); - SetFakeCcLayer(layer.get()); - Video()->SetSrc("http://example.com/foo.mp4"); - test::RunPendingTasks(); - SimulatePlaying(); GetPage().SetVisibilityState(mojom::blink::PageVisibilityState::kHidden, false); @@ -386,13 +379,6 @@ } TEST_F(VideoWakeLockTest, RemotingVideoInPictureInPictureDoesNotRequestLock) { - // This initialeses the video element in order to not crash when the - // interstitial tries to show itself and so that the WebMediaPlayer is set up. - scoped_refptr<cc::Layer> layer = cc::Layer::Create(); - SetFakeCcLayer(layer.get()); - Video()->SetSrc("http://example.com/foo.mp4"); - test::RunPendingTasks(); - SimulatePlaying(); SimulateEnterPictureInPicture(); GetVideoWakeLock()->OnRemotePlaybackStateChanged( @@ -510,11 +496,6 @@ } TEST_F(VideoWakeLockTest, HiddenMutedVideoAlwaysVisibleInPictureInPicture) { - // This initialeses the video element in order to not crash when the - // interstitial tries to show itself and so that the WebMediaPlayer is set up. - scoped_refptr<cc::Layer> layer = cc::Layer::Create(); - SetFakeCcLayer(layer.get()); - Video()->SetSrc("http://example.com/foo.mp4"); Video()->setMuted(true); HideVideo(); UpdateVisibilityObserver(); @@ -528,4 +509,18 @@ EXPECT_FALSE(GetVideoWakeLock()->active_for_tests()); } +TEST_F(VideoWakeLockTest, VideoWithNoFramesReleasesLock) { + GetMediaPlayer()->SetHasVideo(false); + SimulatePlaying(); + + EXPECT_FALSE(GetVideoWakeLock()->active_for_tests()); +} + +TEST_F(VideoWakeLockTest, VideoWithFramesTakesLock) { + GetMediaPlayer()->SetHasVideo(true); + SimulatePlaying(); + + EXPECT_TRUE(GetVideoWakeLock()->active_for_tests()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/deferred_shaping_test.cc b/third_party/blink/renderer/core/layout/deferred_shaping_test.cc index 1ee925ae..bc43914 100644 --- a/third_party/blink/renderer/core/layout/deferred_shaping_test.cc +++ b/third_party/blink/renderer/core/layout/deferred_shaping_test.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "third_party/blink/renderer/core/layout/ng/inline/ng_inline_node_data.h" +#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/paint/first_meaningful_paint_detector.h" #include "third_party/blink/renderer/core/paint/paint_timing.h" #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h" @@ -168,6 +169,40 @@ // Pass if no crash. } +TEST_F(DeferredShapingTest, FragmentItemCache) { + SetBodyInnerHTML(R"HTML( +<div style="height:1800px"></div> +<p id="target" style="font-family:Times; width:100px"> +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +MMM MMMMM MMMMM MMM MMMMM MMMM MMM MMMM MMM. +</p>)HTML"); + UpdateAllLifecyclePhasesForTest(); + EXPECT_TRUE(IsDefer("target")); + EXPECT_TRUE(IsLocked("target")); + auto* target_box = GetLayoutBoxByElementId("target"); + const LayoutUnit deferred_item_width = + (*target_box->PhysicalFragments().begin()) + .Items() + ->Items()[0] + .Size() + .width; + + ScrollAndWaitForIntersectionCheck(1800); + EXPECT_FALSE(IsDefer("target")); + EXPECT_FALSE(IsLocked("target")); + EXPECT_NE(deferred_item_width, (*target_box->PhysicalFragments().begin()) + .Items() + ->Items()[0] + .Size() + .width); +} + TEST_F(DeferredShapingTest, UpdateTextInDeferred) { SetBodyInnerHTML(R"HTML( <div style="height:1800px"></div>
diff --git a/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm_test.cc b/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm_test.cc index 45d8969b..befa23e 100644 --- a/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm_test.cc +++ b/third_party/blink/renderer/core/layout/ng/flex/ng_flex_layout_algorithm_test.cc
@@ -209,22 +209,14 @@ } TEST_F(NGFlexLayoutAlgorithmTest, DevtoolsFragmentedItemDoesntCrash) { - const String& body_content = R"HTML( + const DevtoolsFlexInfo* devtools = LayoutForDevtools(R"HTML( <div style="columns: 2; height: 300px; width: 300px; background: orange;"> <div style="display: flex; background: blue;" id=flexbox> <div style="width: 100px; height: 300px; background: grey;"></div> </div> </div> - )HTML"; - // TODO(crbug.com/660611): Remove next 6 lines when flex fragmentation ships. - SetBodyInnerHTML(body_content); - UpdateAllLifecyclePhasesForTest(); - LayoutObject* flexbox = GetLayoutObjectByElementId("flexbox"); - EXPECT_NE(flexbox, nullptr); - if (!flexbox->IsLayoutNGFlexibleBox()) - return; + )HTML"); // We don't currently set DevtoolsFlexInfo when fragmenting. - const DevtoolsFlexInfo* devtools = LayoutForDevtools(body_content); DCHECK(!devtools); }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc index 5dfbdb4..37cc8c1 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.cc
@@ -530,11 +530,9 @@ void NGInlineNode::ShapeTextOrDefer(const NGConstraintSpace& space) const { if (Data().shaping_state_ != NGInlineNodeData::kShapingNone) { - if (auto* context = GetLayoutBox()->GetDisplayLockContext()) { - if (!context->IsLocked() && Data().IsShapingDeferred()) { - ShapeTextIncludingFirstLine(NGInlineNodeData::kShapingDone, - MutableData(), nullptr, nullptr); - } + if (ShouldBeReshaped()) { + ShapeTextIncludingFirstLine(NGInlineNodeData::kShapingDone, MutableData(), + nullptr, nullptr); } return; } @@ -2022,6 +2020,15 @@ GetLayoutBox()->GetDocument().GetStyleEngine().UsesFirstLineRules(); } +bool NGInlineNode::ShouldBeReshaped() const { + if (!Data().IsShapingDeferred()) + return false; + if (const auto* context = To<Element>(GetDOMNode())->GetDisplayLockContext()) + return !context->IsLocked(); + // This is deferred, but not locked yet. + return false; +} + void NGInlineNode::CheckConsistency() const { #if DCHECK_IS_ON() const HeapVector<NGInlineItem>& items = Data().items;
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h index ecb94c2..5b5cdf6a 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_node.h
@@ -97,6 +97,10 @@ bool IsBlockLevel() { return EnsureData().is_block_level_; } + // This returns true if Deferred Shaping was applied to this IFC, and + // it's unlocked and should be reshaped. + bool ShouldBeReshaped() const; + // @return if this node can contain the "first formatted line". // https://www.w3.org/TR/CSS22/selector.html#first-formatted-line bool CanContainFirstFormattedLine() const {
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc index 582470e..73b7db1 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
@@ -1016,6 +1016,9 @@ const NGInlineBreakToken** inline_break_token_out) { DCHECK(previous_result_); + if (inline_node.ShouldBeReshaped()) + return false; + const auto& previous_fragment = To<NGPhysicalBoxFragment>(previous_result_->PhysicalFragment()); const NGFragmentItems* previous_items = previous_fragment.Items();
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_constraint_space_data.h b/third_party/blink/renderer/core/layout/ng/table/ng_table_constraint_space_data.h index 2ebafdd2..ff405876 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_constraint_space_data.h +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_constraint_space_data.h
@@ -68,18 +68,23 @@ Cell(NGBoxStrut borders, LayoutUnit rowspan_block_size, wtf_size_t start_column, - bool is_initial_block_size_indefinite) + bool is_initial_block_size_indefinite, + bool has_descendant_that_depends_on_percentage_block_size) : borders(borders), rowspan_block_size(rowspan_block_size), start_column(start_column), - is_initial_block_size_indefinite(is_initial_block_size_indefinite) {} + is_initial_block_size_indefinite(is_initial_block_size_indefinite), + has_descendant_that_depends_on_percentage_block_size( + has_descendant_that_depends_on_percentage_block_size) {} bool operator==(const Cell& other) const { return borders == other.borders && rowspan_block_size == other.rowspan_block_size && start_column == other.start_column && is_initial_block_size_indefinite == - other.is_initial_block_size_indefinite; + other.is_initial_block_size_indefinite && + has_descendant_that_depends_on_percentage_block_size == + other.has_descendant_that_depends_on_percentage_block_size; } bool operator!=(const Cell& other) const { return !(*this == other); } @@ -89,6 +94,7 @@ const LayoutUnit rowspan_block_size; const wtf_size_t start_column; const bool is_initial_block_size_indefinite; + const bool has_descendant_that_depends_on_percentage_block_size; }; bool IsTableSpecificDataEqual(const NGTableConstraintSpaceData& other) const {
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm.cc index 55b2821..60ea2bc 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm.cc
@@ -315,10 +315,12 @@ cell_block_constraint.effective_rowspan > 1 ? cell_block_size : kIndefiniteSize; - data->cells.emplace_back(cell_block_constraint.borders, - rowspan_block_size, - cell_block_constraint.column_index, - is_initial_block_size_indefinite); + data->cells.emplace_back( + cell_block_constraint.borders, rowspan_block_size, + cell_block_constraint.column_index, + is_initial_block_size_indefinite, + cell_block_constraint + .has_descendant_that_depends_on_percentage_block_size); } } }
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_types.h b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_types.h index beceb2e..98edf1d 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_types.h +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_types.h
@@ -122,16 +122,21 @@ wtf_size_t column_index; wtf_size_t effective_rowspan; bool is_constrained; // True if this cell has a specified block-size. - CellBlockConstraint(LayoutUnit min_block_size, - NGBoxStrut borders, - wtf_size_t column_index, - wtf_size_t effective_rowspan, - bool is_constrained) + bool has_descendant_that_depends_on_percentage_block_size; + CellBlockConstraint( + LayoutUnit min_block_size, + NGBoxStrut borders, + wtf_size_t column_index, + wtf_size_t effective_rowspan, + bool is_constrained, + bool has_descendant_that_depends_on_percentage_block_size) : min_block_size(min_block_size), borders(borders), column_index(column_index), effective_rowspan(effective_rowspan), - is_constrained(is_constrained) {} + is_constrained(is_constrained), + has_descendant_that_depends_on_percentage_block_size( + has_descendant_that_depends_on_percentage_block_size) {} }; // RowspanCells span multiple rows.
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.cc b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.cc index b61b54e..52c4c72 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.cc +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_layout_algorithm_utils.cc
@@ -225,18 +225,22 @@ effective_rowspan = std::min(max_rows, effective_rowspan); } bool has_rowspan = effective_rowspan > 1; + bool has_descendant_that_depends_on_percentage_block_size = + layout_result->HasDescendantThatDependsOnPercentageBlockSize(); NGTableTypes::CellBlockConstraint cell_block_constraint = { - fragment.BlockSize(), cell_borders, - colspan_cell_tabulator->CurrentColumn(), effective_rowspan, - cell_specified_block_length.IsFixed()}; + fragment.BlockSize(), + cell_borders, + colspan_cell_tabulator->CurrentColumn(), + effective_rowspan, + cell_specified_block_length.IsFixed(), + has_descendant_that_depends_on_percentage_block_size}; colspan_cell_tabulator->ProcessCell(cell); cell_block_constraints->push_back(cell_block_constraint); is_constrained |= cell_block_constraint.is_constrained && !has_rowspan; row_baseline_tabulator.ProcessCell( fragment, NGTableAlgorithmUtils::IsBaseline(cell_style.VerticalAlign()), - has_rowspan, - layout_result->HasDescendantThatDependsOnPercentageBlockSize()); + has_rowspan, has_descendant_that_depends_on_percentage_block_size); // Compute cell's css block size. absl::optional<LayoutUnit> cell_css_block_size;
diff --git a/third_party/blink/renderer/core/layout/ng/table/ng_table_row_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/table/ng_table_row_layout_algorithm.cc index 7e21dd7..510d4810 100644 --- a/third_party/blink/renderer/core/layout/ng/table/ng_table_row_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/table/ng_table_row_layout_algorithm.cc
@@ -24,81 +24,132 @@ const NGTableConstraintSpaceData& table_data = *ConstraintSpace().TableData(); const auto& row = table_data.rows[ConstraintSpace().TableRowIndex()]; - auto CreateCellConstraintSpace = [this, &row, &table_data]( - NGBlockNode cell, - const NGTableConstraintSpaceData::Cell& - cell_data) { - const LayoutUnit cell_block_size = - cell_data.rowspan_block_size != kIndefiniteSize - ? cell_data.rowspan_block_size - : row.block_size; + auto CreateCellConstraintSpace = + [this, &row, &table_data]( + NGBlockNode cell, const NGTableConstraintSpaceData::Cell& cell_data, + LayoutUnit row_block_size, + bool min_block_size_should_encompass_intrinsic_size) { + const LayoutUnit cell_block_size = + cell_data.rowspan_block_size != kIndefiniteSize + ? cell_data.rowspan_block_size + : row_block_size; - NGConstraintSpaceBuilder builder = - NGTableAlgorithmUtils::CreateTableCellConstraintSpaceBuilder( - table_data.table_writing_direction, cell, cell_data.borders, - table_data.column_locations, cell_block_size, - container_builder_.InlineSize(), row.baseline, - cell_data.start_column, cell_data.is_initial_block_size_indefinite, - table_data.is_table_block_size_specified, - table_data.has_collapsed_borders, NGCacheSlot::kLayout); + NGConstraintSpaceBuilder builder = + NGTableAlgorithmUtils::CreateTableCellConstraintSpaceBuilder( + table_data.table_writing_direction, cell, cell_data.borders, + table_data.column_locations, cell_block_size, + container_builder_.InlineSize(), row.baseline, + cell_data.start_column, + cell_data.is_initial_block_size_indefinite, + table_data.is_table_block_size_specified, + table_data.has_collapsed_borders, NGCacheSlot::kLayout); - if (ConstraintSpace().HasBlockFragmentation()) { - SetupSpaceBuilderForFragmentation( - ConstraintSpace(), cell, - /* fragmentainer_offset_delta */ LayoutUnit(), &builder, - /* is_new_fc */ true, - container_builder_.RequiresContentBeforeBreaking()); - } + if (ConstraintSpace().HasBlockFragmentation()) { + SetupSpaceBuilderForFragmentation( + ConstraintSpace(), cell, + /* fragmentainer_offset_delta */ LayoutUnit(), &builder, + /* is_new_fc */ true, + container_builder_.RequiresContentBeforeBreaking()); - return builder.ToConstraintSpace(); - }; + if (min_block_size_should_encompass_intrinsic_size) + builder.SetMinBlockSizeShouldEncompassIntrinsicSize(); + } + return builder.ToConstraintSpace(); + }; + + bool has_block_fragmentation = ConstraintSpace().HasBlockFragmentation(); bool should_propagate_child_break_values = ConstraintSpace().ShouldPropagateChildBreakValues(); - EBreakBetween row_break_before = EBreakBetween::kAuto; - EBreakBetween row_break_after = EBreakBetween::kAuto; - // Generate cell fragments. - NGRowBaselineTabulator row_baseline_tabulator; - NGBlockChildIterator child_iterator(Node().FirstChild(), BreakToken(), - /* calculate_child_idx */ true); - for (auto entry = child_iterator.NextChild(); - NGBlockNode cell = To<NGBlockNode>(entry.node); - entry = child_iterator.NextChild()) { - const auto* cell_break_token = To<NGBlockBreakToken>(entry.token); - const auto& cell_style = cell.Style(); - wtf_size_t cell_index = row.start_cell_index + *entry.index; - const NGTableConstraintSpaceData::Cell& cell_data = - table_data.cells[cell_index]; - NGConstraintSpace cell_constraint_space = - CreateCellConstraintSpace(cell, cell_data); - const NGLayoutResult* cell_result = - cell.Layout(cell_constraint_space, cell_break_token); + auto MinBlockSizeShouldEncompassIntrinsicSize = + [&](const NGBlockNode& cell, + const NGTableConstraintSpaceData::Cell& cell_data, + LayoutUnit row_block_size) -> bool { + if (!has_block_fragmentation) + return false; - const LayoutUnit inline_offset = - table_data.column_locations[cell_data.start_column].offset - - table_data.table_border_spacing.inline_size; - container_builder_.AddResult(*cell_result, {inline_offset, LayoutUnit()}); + if (cell.IsMonolithic()) + return false; - if (should_propagate_child_break_values) { - auto cell_break_before = JoinFragmentainerBreakValues( - cell_style.BreakBefore(), cell_result->InitialBreakBefore()); - auto cell_break_after = JoinFragmentainerBreakValues( - cell_style.BreakAfter(), cell_result->FinalBreakAfter()); - row_break_before = - JoinFragmentainerBreakValues(row_break_before, cell_break_before); - row_break_after = - JoinFragmentainerBreakValues(row_break_after, cell_break_after); + // If this item has (any) descendant that is percentage based, we can end + // up in a situation where we'll constantly try and expand the row. E.g. + // <div style="display: table-cell; height: 100px;"> + // <div style="height: 200%;"></div> + // </div> + if (cell_data.has_descendant_that_depends_on_percentage_block_size) + return false; + + // If we have a cell which has rowspan - only disable encompassing if it + // (actually) spans more than one non-empty row. + bool has_rowspan = cell_data.rowspan_block_size != kIndefiniteSize; + if (has_rowspan) { + if (cell_data.rowspan_block_size != row_block_size) + return false; } - NGBoxFragment fragment( - table_data.table_writing_direction, - To<NGPhysicalBoxFragment>(cell_result->PhysicalFragment())); - row_baseline_tabulator.ProcessCell( - fragment, NGTableAlgorithmUtils::IsBaseline(cell_style.VerticalAlign()), - cell.TableCellRowspan() > 1, - cell_result->HasDescendantThatDependsOnPercentageBlockSize()); - } + return true; + }; + + EBreakBetween row_break_before; + EBreakBetween row_break_after; + NGRowBaselineTabulator row_baseline_tabulator; + auto PlaceCells = [&](LayoutUnit row_block_size) { + // Reset our state. + row_break_before = EBreakBetween::kAuto; + row_break_after = EBreakBetween::kAuto; + row_baseline_tabulator = NGRowBaselineTabulator(); + + NGBlockChildIterator child_iterator(Node().FirstChild(), BreakToken(), + /* calculate_child_idx */ true); + for (auto entry = child_iterator.NextChild(); + NGBlockNode cell = To<NGBlockNode>(entry.node); + entry = child_iterator.NextChild()) { + const auto* cell_break_token = To<NGBlockBreakToken>(entry.token); + const auto& cell_style = cell.Style(); + const wtf_size_t cell_index = row.start_cell_index + *entry.index; + const NGTableConstraintSpaceData::Cell& cell_data = + table_data.cells[cell_index]; + + bool min_block_size_should_encompass_intrinsic_size = + MinBlockSizeShouldEncompassIntrinsicSize(cell, cell_data, + row_block_size); + + const auto cell_space = CreateCellConstraintSpace( + cell, cell_data, row_block_size, + min_block_size_should_encompass_intrinsic_size); + const NGLayoutResult* cell_result = + cell.Layout(cell_space, cell_break_token); + + const LayoutUnit inline_offset = + table_data.column_locations[cell_data.start_column].offset - + table_data.table_border_spacing.inline_size; + container_builder_.AddResult(*cell_result, {inline_offset, LayoutUnit()}); + + if (should_propagate_child_break_values) { + auto cell_break_before = JoinFragmentainerBreakValues( + cell_style.BreakBefore(), cell_result->InitialBreakBefore()); + auto cell_break_after = JoinFragmentainerBreakValues( + cell_style.BreakAfter(), cell_result->FinalBreakAfter()); + row_break_before = + JoinFragmentainerBreakValues(row_break_before, cell_break_before); + row_break_after = + JoinFragmentainerBreakValues(row_break_after, cell_break_after); + } + + bool has_rowspan = cell_data.rowspan_block_size != kIndefiniteSize; + NGBoxFragment fragment( + table_data.table_writing_direction, + To<NGPhysicalBoxFragment>(cell_result->PhysicalFragment())); + row_baseline_tabulator.ProcessCell( + fragment, + NGTableAlgorithmUtils::IsBaseline(cell_style.VerticalAlign()), + has_rowspan, + cell_data.has_descendant_that_depends_on_percentage_block_size); + } + }; + + PlaceCells(row.block_size); // Since we always visit all cells in a row (cannot break halfway through; // each cell establishes a parallel flows that needs to be examined
diff --git a/third_party/blink/renderer/core/loader/resource_load_observer_for_frame.cc b/third_party/blink/renderer/core/loader/resource_load_observer_for_frame.cc index 6b50371..3fb68eaf 100644 --- a/third_party/blink/renderer/core/loader/resource_load_observer_for_frame.cc +++ b/third_party/blink/renderer/core/loader/resource_load_observer_for_frame.cc
@@ -4,6 +4,7 @@ #include "third_party/blink/renderer/core/loader/resource_load_observer_for_frame.h" +#include "base/metrics/histogram_macros.h" #include "base/stl_util.h" #include "components/power_scheduler/power_mode_arbiter.h" #include "services/network/public/cpp/cors/cors_error_status.h" @@ -12,6 +13,7 @@ #include "third_party/blink/public/common/security/address_space_feature.h" #include "third_party/blink/public/mojom/frame/frame.mojom-blink.h" #include "third_party/blink/renderer/core/core_probes_inl.h" +#include "third_party/blink/renderer/core/dom/events/event_target.h" #include "third_party/blink/renderer/core/frame/attribution_src_loader.h" #include "third_party/blink/renderer/core/frame/deprecation/deprecation.h" #include "third_party/blink/renderer/core/frame/frame_console.h" @@ -173,6 +175,50 @@ identifier, priority); } +namespace { + +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. +// +// Must remain in sync with LinkPrefetchMimeType in +// tools/metrics/histograms/enums.xml. +enum class LinkPrefetchMimeType { + kUnknown = 0, + kHtml = 1, + kScript = 2, + kStyle = 3, + kFont = 4, + kImage = 5, + kMedia = 6, + kMaxValue = kMedia, +}; + +void LogLinkPrefetchMimeTypeHistogram(const AtomicString& mime) { + // Loosely based on https://mimesniff.spec.whatwg.org/#mime-type-groups. + // This could be done properly if needed, but this is just to gather + // approximate data. + LinkPrefetchMimeType type = LinkPrefetchMimeType::kUnknown; + if (mime == "text/html" || mime == "application/xhtml+xml") { + type = LinkPrefetchMimeType::kHtml; + } else if (mime == "application/javascript" || mime == "text/javascript") { + type = LinkPrefetchMimeType::kScript; + } else if (mime == "text/css") { + type = LinkPrefetchMimeType::kStyle; + } else if (mime.StartsWith("font/") || mime.StartsWith("application/font-") || + mime == "application/vnd.ms-fontobject" || + mime == "application/vnd.ms-opentype") { + type = LinkPrefetchMimeType::kFont; + } else if (mime.StartsWith("image/")) { + type = LinkPrefetchMimeType::kImage; + } else if (mime.StartsWith("audio/") || mime.StartsWith("video/") || + mime == "application/ogg") { + type = LinkPrefetchMimeType::kMedia; + } + UMA_HISTOGRAM_ENUMERATION("Blink.Prefetch.LinkPrefetchMimeType", type); +} + +} // namespace + void ResourceLoadObserverForFrame::DidReceiveResponse( uint64_t identifier, const ResourceRequest& request, @@ -230,6 +276,9 @@ } } + if (resource->GetType() == ResourceType::kLinkPrefetch) + LogLinkPrefetchMimeTypeHistogram(response.MimeType()); + PreloadHelper::CanLoadResources resource_loading_policy = response_source == ResponseSource::kFromMemoryCache ? PreloadHelper::kDoNotLoadResources
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.cc b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.cc index 0f78d6f..706f329 100644 --- a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.cc +++ b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.cc
@@ -10,7 +10,7 @@ #include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_observer_update.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_record.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_source.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" @@ -112,6 +112,8 @@ V8ComputePressureUpdateCallback* callback, ComputePressureObserverOptions* options, ExceptionState& exception_state) { + // TODO(crbug.com/1306803): Remove this check whenever bucketing is not + // anymore in use. if (!NormalizeObserverOptions(*options, exception_state)) { DCHECK(exception_state.HadException()); return nullptr; @@ -128,8 +130,11 @@ {V8ComputePressureSource(V8ComputePressureSource::Enum::kCpu)}); } +// TODO(crbug.com/1308303): Remove ScriptPromise to match specs, whenever +// we redesign the interface with browser. ScriptPromise ComputePressureObserver::observe( ScriptState* script_state, + V8ComputePressureSource source, ExceptionState& exception_state) { if (!compute_pressure_host_.is_bound()) { exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, @@ -161,9 +166,30 @@ return resolver->Promise(); } -void ComputePressureObserver::stop(ScriptState* script_state) { +// TODO(crbug.com/1306819): Unobserve is supposed to only stop observing +// one source but should continue to observe other sources. +// For now, since "cpu" is the only source, unobserve() has the same +// functionality as disconnect(). +void ComputePressureObserver::unobserve(V8ComputePressureSource source) { + // TODO(crbug.com/1306819): + // 1. observer needs to be dequeued from active observer list of + // requested source. + // 2. observer records from the source need to be removed from `records_` + // 3. receiver_.reset is only necessary when no source is being observed. + + // For now 'cpu' is the only source. + + switch (source.AsEnum()) { + case V8ComputePressureSource::Enum::kCpu: + records_.clear(); + break; + } receiver_.reset(); - return; +} + +void ComputePressureObserver::disconnect() { + receiver_.reset(); + records_.clear(); } void ComputePressureObserver::Trace(blink::Visitor* visitor) const { @@ -171,24 +197,40 @@ visitor->Trace(normalized_options_); visitor->Trace(compute_pressure_host_); visitor->Trace(receiver_); + visitor->Trace(records_); ScriptWrappable::Trace(visitor); ExecutionContextLifecycleStateObserver::Trace(visitor); } void ComputePressureObserver::OnUpdate( mojom::blink::ComputePressureStatePtr state) { - auto* update = ComputePressureObserverUpdate::Create(); - update->setCpuUtilization(state->cpu_utilization); - update->setCpuSpeed(state->cpu_speed); - update->setOptions(normalized_options_); + auto* record = ComputePressureRecord::Create(); + record->setCpuUtilization(state->cpu_utilization); + record->setCpuSpeed(state->cpu_speed); - observer_callback_->InvokeAndReportException(this, update); + // This should happen infrequently since `records_` is supposed + // to be emptied at every callback invoking or takeRecords(). + if (records_.size() >= kMaxQueuedRecords) + records_.erase(records_.begin()); + + records_.push_back(record); + DCHECK_LE(records_.size(), kMaxQueuedRecords); + + observer_callback_->InvokeAndReportException(this, record, this); } void ComputePressureObserver::ContextDestroyed() { receiver_.reset(); } +HeapVector<Member<ComputePressureRecord>> +ComputePressureObserver::takeRecords() { + // This method clears records_. + HeapVector<Member<ComputePressureRecord>, kMaxQueuedRecords> records; + records.swap(records_); + return records; +} + void ComputePressureObserver::ContextLifecycleStateChanged( mojom::blink::FrameLifecycleState state) { // TODO(https://crbug.com/1186433): Disconnect and re-establish a connection
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.h b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.h index 2c54aa5..852a6ad 100644 --- a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.h +++ b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.h
@@ -8,6 +8,7 @@ #include "mojo/public/cpp/bindings/pending_receiver.h" #include "third_party/blink/public/mojom/compute_pressure/compute_pressure.mojom-blink.h" #include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_record.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_compute_pressure_update_callback.h" #include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_state_observer.h" @@ -18,6 +19,13 @@ namespace blink { +namespace { + +// https://wicg.github.io/compute-pressure/#ref-for-dfn-max-queued-records-1 +constexpr wtf_size_t kMaxQueuedRecords = 10; + +} // namespace + class ExceptionState; class ScriptState; class ScriptPromise; @@ -42,11 +50,12 @@ ComputePressureObserverOptions*, ExceptionState&); - static Vector<V8ComputePressureSource> supportedSources(); - // ComputePressureObserver IDL implementation. - ScriptPromise observe(ScriptState*, ExceptionState&); - void stop(ScriptState*); + ScriptPromise observe(ScriptState*, V8ComputePressureSource, ExceptionState&); + void unobserve(V8ComputePressureSource source); + void disconnect(); + HeapVector<Member<ComputePressureRecord>> takeRecords(); + static Vector<V8ComputePressureSource> supportedSources(); ComputePressureObserver(const ComputePressureObserver&) = delete; ComputePressureObserver operator=(const ComputePressureObserver&) = delete; @@ -77,6 +86,10 @@ // The quantization scheme sent to the browser-side implementation. Member<ComputePressureObserverOptions> normalized_options_; + // Last received records from the platform collector. + // The records are only collected when there is a change in the status. + HeapVector<Member<ComputePressureRecord>, kMaxQueuedRecords> records_; + // Connection to the browser-side implementation. HeapMojoRemote<mojom::blink::ComputePressureHost> compute_pressure_host_;
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.idl b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.idl index dc967abe..50129ef 100644 --- a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.idl +++ b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer.idl
@@ -23,13 +23,20 @@ CallWith=ScriptState, MeasureAs=ComputePressureObserver_Observe, RaisesException - ] Promise<void> observe(); + ] Promise<void> observe(ComputePressureSource source); - [CallWith=ScriptState, MeasureAs=ComputePressureObserver_Stop] void stop(); + [ + MeasureAs=ComputePressureObserver_Unobserve + ] void unobserve(ComputePressureSource source); + + [MeasureAs=ComputePressureObserver_Disconnect] void disconnect(); [ SameObject, SaveSameObject ] static readonly attribute FrozenArray<ComputePressureSource> supportedSources; + [ + MeasureAs=ComputePressureObserver_TakeRecords + ] sequence<ComputePressureRecord> takeRecords(); };
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer_update.idl b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer_update.idl deleted file mode 100644 index dfe95bfa3..0000000 --- a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_observer_update.idl +++ /dev/null
@@ -1,14 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// https://github.com/wicg/compute-pressure/ - -[ - Exposed=Window, - SecureContext -] dictionary ComputePressureObserverUpdate { - double cpuUtilization; - double cpuSpeed; - ComputePressureObserverOptions options; -};
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_record.idl b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_record.idl new file mode 100644 index 0000000..5e12c64 --- /dev/null +++ b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_record.idl
@@ -0,0 +1,14 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// https://wicg.github.io/compute-pressure/#dom-computepressurerecord +[ + Exposed=Window, + SecureContext +] dictionary ComputePressureRecord { + // TODO(crbug.com/1308316): Remove cpuSpeed and cpuUtilization. + // when switching to new API. + double cpuSpeed; + double cpuUtilization; +};
diff --git a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_update_callback.idl b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_update_callback.idl index 2cd27ccb..7edb615 100644 --- a/third_party/blink/renderer/modules/compute_pressure/compute_pressure_update_callback.idl +++ b/third_party/blink/renderer/modules/compute_pressure/compute_pressure_update_callback.idl
@@ -7,4 +7,7 @@ Exposed=Window, RuntimeEnabled=ComputePressure, SecureContext -] callback ComputePressureUpdateCallback = void (ComputePressureObserverUpdate update); +] callback ComputePressureUpdateCallback = void ( + ComputePressureRecord changes, + ComputePressureObserver observer + );
diff --git a/third_party/blink/renderer/platform/audio/dynamics_compressor.cc b/third_party/blink/renderer/platform/audio/dynamics_compressor.cc index 1342cfe..5f1ec1a1 100644 --- a/third_party/blink/renderer/platform/audio/dynamics_compressor.cc +++ b/third_party/blink/renderer/platform/audio/dynamics_compressor.cc
@@ -46,6 +46,14 @@ constexpr float kUninitializedValue = -1; +constexpr float kPreDelay = 0.006f; // seconds + +// Release zone values 0 -> 1. +constexpr float kReleaseZone1 = 0.09f; +constexpr float kReleaseZone2 = 0.16f; +constexpr float kReleaseZone3 = 0.42f; +constexpr float kReleaseZone4 = 0.98f; + // Returns x if x is finite (not NaN or infinite), otherwise returns // default_value float EnsureFinite(float x, float default_value) { @@ -69,11 +77,6 @@ knee_threshold_db_(kUninitializedValue), yknee_threshold_db_(kUninitializedValue), knee_(kUninitializedValue) { - // Uninitialized state - for parameter recalculation. - last_filter_stage_ratio_ = -1; - last_anchor_ = -1; - last_filter_stage_gain_ = -1; - SetNumberOfChannels(number_of_channels); // Initializes most member variables Reset(); @@ -122,39 +125,11 @@ destination_channels_[i] = destination_bus->Channel(i)->MutableData(); } - float filter_stage_gain = ParameterValue(kParamFilterStageGain); - float filter_stage_ratio = ParameterValue(kParamFilterStageRatio); - float anchor = ParameterValue(kParamFilterAnchor); - - if (filter_stage_gain != last_filter_stage_gain_ || - filter_stage_ratio != last_filter_stage_ratio_ || - anchor != last_anchor_) { - last_filter_stage_gain_ = filter_stage_gain; - last_filter_stage_ratio_ = filter_stage_ratio; - last_anchor_ = anchor; - } - const float db_threshold = ParameterValue(kParamThreshold); const float db_knee = ParameterValue(kParamKnee); const float ratio = ParameterValue(kParamRatio); float attack_time = ParameterValue(kParamAttack); const float release_time = ParameterValue(kParamRelease); - const float pre_delay_time = ParameterValue(kParamPreDelay); - - // This is effectively a make-up gain on the compressed signal - // (pre-blending). - const float db_post_gain = ParameterValue(kParamPostGain); - - // Linear blending value from dry to completely processed (0 -> 1) - // 0 means the signal is completely unprocessed. - // 1 mixes in only the compressed signal. - // equal power crossfade - const float effect_blend = ParameterValue(kParamEffectBlend); - - const float release_zone1 = ParameterValue(kParamReleaseZone1); - const float release_zone2 = ParameterValue(kParamReleaseZone2); - const float release_zone3 = ParameterValue(kParamReleaseZone3); - const float release_zone4 = ParameterValue(kParamReleaseZone4); // Apply compression to the source signal. const float** source_channels = source_channels_.get(); @@ -164,9 +139,6 @@ const float sample_rate = SampleRate(); - const float dry_mix = 1 - effect_blend; - const float wet_mix = effect_blend; - const float k = UpdateStaticCurveParameters(db_threshold, db_knee, ratio); // Makeup gain. @@ -176,8 +148,7 @@ // Empirical/perceptual tuning. full_range_makeup_gain = fdlibm::powf(full_range_makeup_gain, 0.6f); - const float linear_post_gain = - audio_utilities::DecibelsToLinear(db_post_gain) * full_range_makeup_gain; + const float linear_post_gain = full_range_makeup_gain; // Attack parameters. attack_time = std::max(0.001f, attack_time); @@ -195,10 +166,10 @@ // Polynomial of the form // y = a + b*x + c*x^2 + d*x^3 + e*x^4; - const float y1 = release_frames * release_zone1; - const float y2 = release_frames * release_zone2; - const float y3 = release_frames * release_zone3; - const float y4 = release_frames * release_zone4; + const float y1 = release_frames * kReleaseZone1; + const float y2 = release_frames * kReleaseZone2; + const float y3 = release_frames * kReleaseZone3; + const float y4 = release_frames * kReleaseZone4; // All of these coefficients were derived for 4th order polynomial curve // fitting where the y values match the evenly spaced x values as follows: @@ -220,7 +191,7 @@ // y calculates adaptive release frames depending on the amount of // compression. - SetPreDelayTime(pre_delay_time); + SetPreDelayTime(kPreDelay); constexpr int number_of_division_frames = 32; @@ -374,9 +345,8 @@ const float post_warp_compressor_gain = static_cast<float>( sin(static_cast<double>(kPiOverTwoFloat * compressor_gain))); - // Calculate total gain using the linear post-gain and effect blend. - const float total_gain = - dry_mix + wet_mix * linear_post_gain * post_warp_compressor_gain; + // Calculate total gain using the linear post-gain. + const float total_gain = linear_post_gain * post_warp_compressor_gain; // Calculate metering. const float db_real_gain = @@ -415,10 +385,6 @@ } void DynamicsCompressor::Reset() { - last_filter_stage_ratio_ = -1; // for recalc - last_anchor_ = -1; - last_filter_stage_gain_ = -1; - detector_average_ = 0; compressor_gain_ = 1; metering_gain_ = 1; @@ -492,29 +458,12 @@ void DynamicsCompressor::InitializeParameters() { // Initializes compressor to default values. - parameters_[kParamThreshold] = -24; // dB parameters_[kParamKnee] = 30; // dB parameters_[kParamRatio] = 12; // unit-less parameters_[kParamAttack] = 0.003f; // seconds parameters_[kParamRelease] = 0.250f; // seconds - parameters_[kParamPreDelay] = 0.006f; // seconds - - // Release zone values 0 -> 1. - parameters_[kParamReleaseZone1] = 0.09f; - parameters_[kParamReleaseZone2] = 0.16f; - parameters_[kParamReleaseZone3] = 0.42f; - parameters_[kParamReleaseZone4] = 0.98f; - - parameters_[kParamFilterStageGain] = 4.4f; // dB - parameters_[kParamFilterStageRatio] = 2; - parameters_[kParamFilterAnchor] = 15000 / Nyquist(); - - parameters_[kParamPostGain] = 0; // dB - parameters_[kParamReduction] = 0; // dB - - // Linear crossfade (0 -> 1). - parameters_[kParamEffectBlend] = 1; + parameters_[kParamReduction] = 0; // dB } void DynamicsCompressor::SetPreDelayTime(float pre_delay_time) {
diff --git a/third_party/blink/renderer/platform/audio/dynamics_compressor.h b/third_party/blink/renderer/platform/audio/dynamics_compressor.h index 30a09198..253761e 100644 --- a/third_party/blink/renderer/platform/audio/dynamics_compressor.h +++ b/third_party/blink/renderer/platform/audio/dynamics_compressor.h
@@ -54,16 +54,6 @@ kParamRatio, kParamAttack, kParamRelease, - kParamPreDelay, - kParamReleaseZone1, - kParamReleaseZone2, - kParamReleaseZone3, - kParamReleaseZone4, - kParamPostGain, - kParamFilterStageGain, - kParamFilterStageRatio, - kParamFilterAnchor, - kParamEffectBlend, kParamReduction, kParamLast }; @@ -112,11 +102,6 @@ float sample_rate_; - // Emphasis filter controls. - float last_filter_stage_ratio_; - float last_anchor_; - float last_filter_stage_gain_; - std::unique_ptr<const float*[]> source_channels_; std::unique_ptr<float*[]> destination_channels_;
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 006a5da7..c1dbd8f 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1347,6 +1347,7 @@ // https://drafts.csswg.org/css-flexbox-1/#pagination name: "LayoutNGFlexFragmentation", depends_on: ["LayoutNG"], + status: "test", }, { // Traverse the fragment tree when painting and hit-testing, instead of
diff --git a/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer_unittest.py b/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer_unittest.py index b0da230f..6e202e9 100644 --- a/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer_unittest.py +++ b/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer_unittest.py
@@ -106,7 +106,8 @@ baseline_name = 'mock-test-expected.' + suffix self.fs.write_text_file( self.fs.join(web_tests_dir, 'VirtualTestSuites'), - '[{"prefix": "gpu", "bases": ["fast/canvas"], "args": ["--foo"]}]') + '[{"prefix": "gpu", "platforms": ["Linux", "Mac", "Win"], ' + '"bases": ["fast/canvas"], "args": ["--foo"]}]') for dirname, contents in results_by_directory.items(): self.fs.write_text_file(
diff --git a/third_party/blink/tools/blinkpy/w3c/import_notifier_unittest.py b/third_party/blink/tools/blinkpy/w3c/import_notifier_unittest.py index bc3c1934..51aaf30 100644 --- a/third_party/blink/tools/blinkpy/w3c/import_notifier_unittest.py +++ b/third_party/blink/tools/blinkpy/w3c/import_notifier_unittest.py
@@ -25,7 +25,8 @@ # Mock a virtual test suite at virtual/gpu/external/wpt/foo. self.host.filesystem = MockFileSystem({ MOCK_WEB_TESTS + 'VirtualTestSuites': - b'[{"prefix": "gpu", "bases": ["external/wpt/foo"], "args": ["--foo"]}]' + b'[{"prefix": "gpu", "platforms": ["Linux", "Mac", "Win"], ' + b'"bases": ["external/wpt/foo"], "args": ["--foo"]}]' }) self.git = self.host.git() self.local_wpt = MockLocalWPT()
diff --git a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py index f23b91f..aa39847 100644 --- a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py +++ b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations.py
@@ -41,6 +41,9 @@ PRODUCTS_TO_EXPECTATION_FILE_PATHS, ANDROID_DISABLED_TESTS, ANDROID_WEBLAYER) from blinkpy.web_tests.port.factory import platform_options +from blinkpy.web_tests.port.linux import LinuxPort +from blinkpy.web_tests.port.mac import MacPort +from blinkpy.web_tests.port.win import WinPort from functools import reduce @@ -48,21 +51,24 @@ def lint(host, options): - port = host.port_factory.get(options.platform) + # lint against three major ports. This is a tradeoff between presubmit + # check speed and the completeness of the check. + full_port_names_to_lint = ["%s-%s" % (cls.port_name, cls.SUPPORTED_VERSIONS[-1]) + for cls in [LinuxPort, MacPort, WinPort]] + ports_to_lint = [ + host.port_factory.get(name) for name in full_port_names_to_lint + ] # Add all extra expectation files to be linted. options.additional_expectations.extend( list(PRODUCTS_TO_EXPECTATION_FILE_PATHS.values()) + [ANDROID_DISABLED_TESTS] + [ - host.filesystem.join(port.web_tests_dir(), + host.filesystem.join(ports_to_lint[0].web_tests_dir(), 'WPTOverrideExpectations'), - host.filesystem.join(port.web_tests_dir(), 'WebGPUExpectations'), + host.filesystem.join(ports_to_lint[0].web_tests_dir(), + 'WebGPUExpectations'), ]) - ports_to_lint = [ - host.port_factory.get(name, options=options) - for name in host.port_factory.all_port_names(options.platform) - ] # In general, the set of TestExpectation files should be the same for # all ports. However, the method used to list expectations files is @@ -72,76 +78,33 @@ failures = [] warnings = [] - expectations_dict = {} all_system_specifiers = set() all_build_specifiers = set(ports_to_lint[0].ALL_BUILD_TYPES) - # TODO(crbug.com/986447) Remove the checks below after migrating the expectations - # parsing to Typ. All the checks below can be handled by Typ. - for port in ports_to_lint: - expectations_dict.update(port.all_expectations_dict()) - config_macro_dict = port.configuration_specifier_macros() - if config_macro_dict: - all_system_specifiers.update( - {s.lower() - for s in config_macro_dict.keys()}) - all_system_specifiers.update({ - s.lower() - for s in reduce(lambda x, y: x + y, config_macro_dict.values()) - }) + expectations_dict = port.all_expectations_dict() for path in port.extra_expectations_files(): if host.filesystem.exists(path): expectations_dict[path] = host.filesystem.read_text_file(path) - for path, content in expectations_dict.items(): - # Check the expectations file content - failures.extend(_check_expectations_file_content(content)) - - # Create a TestExpectations instance and see if an exception is raised - try: - test_expectations = TestExpectations( - ports_to_lint[0], expectations_dict={path: content}) - # Check each expectation for issues - f, w = _check_expectations(host, ports_to_lint[0], path, - test_expectations, options) - failures += f - warnings += w - except ParseError as error: - _log.error(str(error)) - failures.append(str(error)) - _log.error('') + for path, content in expectations_dict.items(): + # Create a TestExpectations instance and see if an exception is raised + try: + test_expectations = TestExpectations( + port, expectations_dict={path: content}) + # Check each expectation for issues + f, w = _check_expectations(host, port, path, + test_expectations, options) + failures += f + warnings += w + except ParseError as error: + _log.error(str(error)) + failures.append(str(error)) + _log.error('') return failures, warnings -def _check_expectations_file_content(content): - failures = [] - for lineno, line in enumerate(content.splitlines(), 1): - if not line.strip() or line.strip().startswith('#'): - continue - # check for test expectations that start with leading spaces - if line.startswith(' '): - error = (('%s:%d Line %d has a test expectation' - ' that has leading spaces.') % - (host.filesystem.basename(path), lineno, lineno)) - _log.error(error) - failures.append(error) - _log.error('') - - # check for test expectations that have a Bug(...) as the reason - if line.startswith('Bug('): - error = ( - ("%s:%d Expectation '%s' has the Bug(...) token, " - "The token has been removed in the new expectations format") % - (host.filesystem.basename(path), lineno, line)) - _log.error(error) - failures.append(error) - _log.error('') - - return failures - - def _check_test_existence(host, port, path, expectations): failures = [] warnings = []
diff --git a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py index a9dc665..e59c327 100644 --- a/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py +++ b/third_party/blink/tools/blinkpy/web_tests/lint_test_expectations_unittest.py
@@ -102,23 +102,6 @@ class LintTest(LoggingTestCase): - def test_all_configurations(self): - host = MockHost() - host.ports_parsed = [] - host.port_factory = FakeFactory( - host, - (FakePort(host, 'a', 'path-to-a'), FakePort( - host, 'b', 'path-to-b'), FakePort(host, 'b-win', 'path-to-b'))) - - options = optparse.Values({ - 'platform': 'a', - 'additional_expectations': [] - }) - failures, warnings = lint_test_expectations.lint(host, options) - self.assertEqual(failures, []) - self.assertEqual(warnings, []) - self.assertEqual(host.ports_parsed, ['a', 'b', 'b-win']) - @unittest.skip( 'crbug.com/986447, re-enable after merging crrev.com/c/1918294') def test_lint_test_files(self): @@ -256,7 +239,7 @@ 'testexpectations': test_expectations } port.virtual_test_suites = lambda: [ - VirtualTestSuite(prefix='foo', bases=['test2'], args=['--foo']) + VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test2'], args=['--foo']) ] host.filesystem.write_text_file( host.filesystem.join(port.web_tests_dir(), 'test2', 'foo.html'), @@ -275,7 +258,7 @@ self.assertTrue(failures) self.assertEqual(warnings, []) - self.assertEquals(len(failures), 6) + self.assertEquals(len(failures), 18) expected_non_existence = [ 'test1/*', 'test2/bar.html', @@ -286,7 +269,7 @@ ] for i in range(len(failures)): self.assertIn('Test does not exist', failures[i]) - self.assertIn(expected_non_existence[i], failures[i]) + self.assertIn(expected_non_existence[i%6], failures[i]) def test_only_wpt_in_android_override_files(self): options = optparse.Values({ @@ -347,7 +330,10 @@ port = host.port_factory.get(options.platform, options=options) port.virtual_test_suites = lambda: [ VirtualTestSuite( - prefix='foo', bases=['test', 'external/wpt'], args=['--foo']) + prefix='foo', + platforms=['Linux', 'Mac', 'Win'], + bases=['test', 'external/wpt'], + args=['--foo']) ] test_expectations = ( '# tags: [ mac win ]\n' @@ -376,7 +362,7 @@ failures, warnings = lint_test_expectations.lint(host, options) self.assertEqual(failures, []) - self.assertEquals(len(warnings), 1) + self.assertEquals(len(warnings), 3) self.assertRegexpMatches(warnings[0], ':5 .*redundant with.* line 4$') def test_never_fix_tests(self): @@ -390,7 +376,10 @@ port = host.port_factory.get(options.platform, options=options) port.virtual_test_suites = lambda: [ VirtualTestSuite( - prefix='foo', bases=['test', 'test1'], args=['--foo']) + prefix='foo', + platforms=['Linux', 'Mac', 'Win'], + bases=['test', 'test1'], + args=['--foo']) ] test_expectations = ('# tags: [ mac win ]\n' '# results: [ Skip Pass ]\n' @@ -411,7 +400,7 @@ failures, warnings = lint_test_expectations.lint(host, options) self.assertEqual(warnings, []) - self.assertEquals(len(failures), 4) + self.assertEquals(len(failures), 12) self.assertRegexpMatches(failures[0], ':7 .*must override') self.assertRegexpMatches(failures[1], ':8 .*must override') self.assertRegexpMatches(failures[2], ':9 Only one of') @@ -430,8 +419,8 @@ def test_check_virtual_test_suites_readme(self): self.port.virtual_test_suites = lambda: [ - VirtualTestSuite(prefix='foo', bases=['test'], args=['--foo']), - VirtualTestSuite(prefix='bar', bases=['test'], args=['--bar']), ] + VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test'], args=['--foo']), + VirtualTestSuite(prefix='bar', platforms=['Linux', 'Mac', 'Win'], bases=['test'], args=['--bar']), ] fs = self.host.filesystem fs.maybe_make_directory(fs.join(WEB_TEST_DIR, 'test')) @@ -449,7 +438,7 @@ def test_check_virtual_test_suites_redundant(self): self.port.virtual_test_suites = lambda: [ - VirtualTestSuite(prefix='foo', bases=['test/sub', 'test'], args=['--foo']), + VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test/sub', 'test'], args=['--foo']), ] self.host.filesystem.exists = lambda _: True @@ -460,7 +449,7 @@ def test_check_virtual_test_suites_non_redundant(self): self.port.virtual_test_suites = lambda: [ - VirtualTestSuite(prefix='foo', bases=['test_a', 'test'], args=['--foo']), + VirtualTestSuite(prefix='foo', platforms=['Linux', 'Mac', 'Win'], bases=['test_a', 'test'], args=['--foo']), ] self.host.filesystem.exists = lambda _: True @@ -471,7 +460,10 @@ def test_check_virtual_test_suites_non_existent_base(self): self.port.virtual_test_suites = lambda: [ - VirtualTestSuite(prefix='foo', bases=['base1', 'base2', 'base3.html'], args=['-foo']), + VirtualTestSuite(prefix='foo', + platforms=['Linux', 'Mac', 'Win'], + bases=['base1', 'base2', 'base3.html'], + args=['-foo']), ] fs = self.host.filesystem
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/android.py b/third_party/blink/tools/blinkpy/web_tests/port/android.py index ca11515..72f7f63 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/android.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/android.py
@@ -572,6 +572,9 @@ super(AndroidPort, self).start_http_server(additional_dirs, number_of_drivers) + def operating_system(self): + return self._operating_system + def create_driver(self, worker_number, no_timeout=False): return ChromiumAndroidDriver( self,
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/base.py b/third_party/blink/tools/blinkpy/web_tests/port/base.py index 814be9f2..8f5ff1a 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/base.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/base.py
@@ -2040,7 +2040,8 @@ raise ValueError( '{} contains entries with the same prefix: {!r}. Please combine them' .format(path_to_virtual_test_suites, json_config)) - self._virtual_test_suites.append(vts) + if self.operating_system() in [x.lower() for x in vts.platforms]: + self._virtual_test_suites.append(vts) except ValueError as error: raise ValueError('{} is not a valid JSON file: {}'.format( path_to_virtual_test_suites, error)) @@ -2363,13 +2364,15 @@ class VirtualTestSuite(object): - def __init__(self, prefix=None, bases=None, args=None): + def __init__(self, prefix=None, platforms=None, bases=None, args=None): assert VALID_FILE_NAME_REGEX.match(prefix), \ "Virtual test suite prefix '{}' contains invalid characters".format(prefix) + assert isinstance(platforms, list) assert isinstance(bases, list) assert args assert isinstance(args, list) self.full_prefix = 'virtual/' + prefix + '/' + self.platforms = platforms self.bases = bases self.args = args
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/base_unittest.py b/third_party/blink/tools/blinkpy/web_tests/port/base_unittest.py index ef30586..86e2aee7 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/base_unittest.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/base_unittest.py
@@ -60,7 +60,9 @@ if with_tests: add_unit_tests_to_mock_filesystem(host.filesystem) return TestPort(host, **kwargs) - return Port(host, port_name or 'baseport', **kwargs) + port = Port(host, port_name or 'baseport', **kwargs) + port.operating_system = lambda: 'linux' + return port def test_validate_wpt_dirs(self): # Keys should not have trailing slashes. @@ -298,7 +300,8 @@ virtual_test = 'virtual/flag/fast/test.html' port.host.filesystem.write_text_file( MOCK_WEB_TESTS + 'VirtualTestSuites', - '[{ "prefix": "flag", "bases": ["fast"], "args": ["--flag"]}]') + '[{ "prefix": "flag", "platforms": ["Linux", "Mac", "Win"],' + ' "bases": ["fast"], "args": ["--flag"]}]') # The default baseline for base test self.assertEqual( @@ -1382,6 +1385,7 @@ def test_can_load_actual_virtual_test_suite_file(self): port = Port(SystemHost(), 'baseport') + port.operating_system = lambda: 'linux' # If this call returns successfully, we found and loaded the web_tests/VirtualTestSuites. _ = port.virtual_test_suites() @@ -1391,7 +1395,8 @@ port.host.filesystem.write_text_file( port.host.filesystem.join(port.web_tests_dir(), 'VirtualTestSuites'), - '[{"prefix": "bar", "bases": ["fast/bar"], "args": ["--bar"]}]') + '[{"prefix": "bar", "platforms": ["Linux", "Mac", "Win"], ' + '"bases": ["fast/bar"], "args": ["--bar"]}]') # If this call returns successfully, we found and loaded the web_tests/VirtualTestSuites. _ = port.virtual_test_suites() @@ -1401,8 +1406,8 @@ port.host.filesystem.write_text_file( port.host.filesystem.join(port.web_tests_dir(), 'VirtualTestSuites'), '[' - '{"prefix": "bar", "bases": ["fast/bar"], "args": ["--bar"]},' - '{"prefix": "bar", "bases": ["fast/foo"], "args": ["--bar"]}' + '{"prefix": "bar", "platforms": ["Linux"], "bases": ["fast/bar"], "args": ["--bar"]},' + '{"prefix": "bar", "platforms": ["Linux"], "bases": ["fast/foo"], "args": ["--bar"]}' ']') self.assertRaises(ValueError, port.virtual_test_suites) @@ -1759,15 +1764,22 @@ class VirtualTestSuiteTest(unittest.TestCase): def test_basic(self): - suite = VirtualTestSuite( - prefix='suite', bases=['base/foo', 'base/bar'], args=['--args']) + suite = VirtualTestSuite(prefix='suite', + platforms=['Linux', 'Mac', 'Win'], + bases=['base/foo', 'base/bar'], + args=['--args']) self.assertEqual(suite.full_prefix, 'virtual/suite/') + self.assertEqual(suite.platforms, ['Linux', 'Mac', 'Win']) self.assertEqual(suite.bases, ['base/foo', 'base/bar']) self.assertEqual(suite.args, ['--args']) def test_empty_bases(self): - suite = VirtualTestSuite(prefix='suite', bases=[], args=['--args']) + suite = VirtualTestSuite(prefix='suite', + platforms=['Linux', 'Mac', 'Win'], + bases=[], + args=['--args']) self.assertEqual(suite.full_prefix, 'virtual/suite/') + self.assertEqual(suite.platforms, ['Linux', 'Mac', 'Win']) self.assertEqual(suite.bases, []) self.assertEqual(suite.args, ['--args'])
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py b/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py index 1fd95d9..0bde4af 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/fuchsia.py
@@ -308,6 +308,9 @@ super(FuchsiaPort, self).start_http_server(additional_dirs, number_of_drivers) + def operating_system(self): + return self._operating_system + def path_to_apache(self): return self._host_port.path_to_apache()
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/mac.py b/third_party/blink/tools/blinkpy/web_tests/port/mac.py index 2d1ae70..624aaae 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/mac.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/mac.py
@@ -108,6 +108,11 @@ # def path_to_apache(self): + import platform + if platform.machine() == 'arm64': + return self._path_from_chromium_base('third_party', + 'apache-mac-arm64', 'bin', + 'httpd') return self._path_from_chromium_base( 'third_party', 'apache-mac', 'bin', 'httpd')
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/port_testcase.py b/third_party/blink/tools/blinkpy/web_tests/port/port_testcase.py index 0a49422..7b8cb1d 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/port_testcase.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/port_testcase.py
@@ -398,5 +398,6 @@ # use a real SystemHost(). We don't care what virtual_test_suites() returns as long # as it is iterable. port = self.make_port(host=SystemHost(), port_name=self.full_port_name) + port.operating_system = lambda: 'linux' self.assertTrue( isinstance(port.virtual_test_suites(), collections.Iterable))
diff --git a/third_party/blink/tools/blinkpy/web_tests/port/test.py b/third_party/blink/tools/blinkpy/web_tests/port/test.py index 92037ce..9bee2b2 100644 --- a/third_party/blink/tools/blinkpy/web_tests/port/test.py +++ b/third_party/blink/tools/blinkpy/web_tests/port/test.py
@@ -819,25 +819,32 @@ def virtual_test_suites(self): return [ VirtualTestSuite(prefix='virtual_passes', + platforms=['Linux', 'Mac', 'Win'], bases=['passes', 'passes_two'], args=['--virtual-arg']), VirtualTestSuite(prefix='skipped', + platforms=['Linux', 'Mac', 'Win'], bases=['failures/expected'], args=['--virtual-arg-skipped']), - VirtualTestSuite( - prefix='virtual_failures', - bases=['failures/expected', 'failures/unexpected'], - args=['--virtual-arg-failures']), + VirtualTestSuite(prefix='virtual_failures', + platforms=['Linux', 'Mac', 'Win'], + bases=['failures/expected', + 'failures/unexpected'], + args=['--virtual-arg-failures']), VirtualTestSuite(prefix='virtual_wpt', + platforms=['Linux', 'Mac', 'Win'], bases=['external/wpt'], args=['--virtual-arg-wpt']), VirtualTestSuite(prefix='virtual_wpt_dom', + platforms=['Linux', 'Mac', 'Win'], bases=['external/wpt/dom', 'wpt_internal/dom'], args=['--virtual-arg-wpt-dom']), VirtualTestSuite(prefix='virtual_empty_bases', + platforms=['Linux', 'Mac', 'Win'], bases=[], args=['--virtual-arg-empty-bases']), VirtualTestSuite(prefix='mixed_wpt', + platforms=['Linux', 'Mac', 'Win'], bases=['http', 'external/wpt/dom'], args=['--virtual-arg']), ]
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng index 6a25dfd9..bd5a66e 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng +++ b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng
@@ -132,6 +132,88 @@ crbug.com/829028 external/wpt/css/css-break/fieldset-004.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/fieldset-005.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/fieldset-006.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-003.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-004.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-007.tentative.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-015.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-016.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-017.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-018.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-019.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-020.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-021.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-022.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-023.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-024.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-025.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-026.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-031.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-032.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-033.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-034.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-035.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-036.tentative.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-037.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-039.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-040.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-007.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-008.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-010.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-012.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-014.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-015.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-016.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-018.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-019.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-020.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-021.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-022.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-023.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-024.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-025.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-026.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-027.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-028.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-029.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-030.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-031.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-032.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-033.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-034.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-035.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-037.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-038.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-039.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-040.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-041.tentative.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-042.tentative.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-044.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-045.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-012.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-014.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-015.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-016.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-017.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-018.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-019.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-020.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-022.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-023.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-030.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-031.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-032.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-034.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-035.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-039.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-008.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-014.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-015.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-016.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-017.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-018.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-019.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-020.html [ Failure ] +crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-024.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/float-005.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/float-006.html [ Failure ] crbug.com/829028 external/wpt/css/css-break/float-007.html [ Failure ] @@ -939,9 +1021,6 @@ crbug.com/591099 virtual/gpu-rasterization/images/color-profile-image-filter-all.html [ Failure Slow ] crbug.com/591099 virtual/gpu-rasterization/images/favicon-as-image.html [ Failure ] -### virtual/layout_ng_flex_frag/ -virtual/layout_ng_flex_frag/* [ Skip ] - ### virtual/layout_ng_table_frag/ virtual/layout_ng_table_frag/* [ Skip ]
diff --git a/third_party/blink/web_tests/FlagSpecificConfig b/third_party/blink/web_tests/FlagSpecificConfig index e86e2e7..cbeaf35 100644 --- a/third_party/blink/web_tests/FlagSpecificConfig +++ b/third_party/blink/web_tests/FlagSpecificConfig
@@ -61,14 +61,17 @@ "args": [ "--enable-unsafe-webgpu", "--disable-dawn-features=disallow_unsafe_apis", - "--use-gpu-in-tests" + "--use-gpu-in-tests", + "--enable-accelerated-2d-canvas" ], "comments": [ "--disable-dawn-features=disallow_unsafe_apis is added so 'unsafe'", "APIs can be tested with WebGPU CTS", "--use-gpu-in-tests is needed to initialize ANGLE, which in turn is", "needed to tell Dawn which ANGLE adapter Chromium is using. This", - "helps match the test behavior with the browser" + "helps match the test behavior with the browser.", + "--enable-accelerated-2d-canvas ensures that the canvas reference", + "tests are using GPU rather than CPU" ] }, { @@ -77,14 +80,17 @@ "--enable-unsafe-webgpu", "--enable-dawn-backend-validation", "--disable-dawn-features=disallow_unsafe_apis", - "--use-gpu-in-tests" + "--use-gpu-in-tests", + "--enable-accelerated-2d-canvas" ], "comments": [ "--disable-dawn-features=disallow_unsafe_apis is added so 'unsafe'", "APIs can be tested with WebGPU CTS", "--use-gpu-in-tests is needed to initialize ANGLE, which in turn is", "needed to tell Dawn which ANGLE adapter Chromium is using. This", - "helps match the test behavior with the browser" + "helps match the test behavior with the browser.", + "--enable-accelerated-2d-canvas ensures that the canvas reference", + "tests are using GPU rather than CPU" ] }, { @@ -93,14 +99,17 @@ "--enable-unsafe-webgpu", "--enable-dawn-backend-validation=partial", "--disable-dawn-features=disallow_unsafe_apis", - "--use-gpu-in-tests" + "--use-gpu-in-tests", + "--enable-accelerated-2d-canvas" ], "comments": [ "--disable-dawn-features=disallow_unsafe_apis is added so 'unsafe'", "APIs can be tested with WebGPU CTS", "--use-gpu-in-tests is needed to initialize ANGLE, which in turn is", "needed to tell Dawn which ANGLE adapter Chromium is using. This", - "helps match the test behavior with the browser" + "helps match the test behavior with the browser.", + "--enable-accelerated-2d-canvas ensures that the canvas reference", + "tests are using GPU rather than CPU" ] } ]
diff --git a/third_party/blink/web_tests/NeverFixTests b/third_party/blink/web_tests/NeverFixTests index 4aaad54..ab0bb1f 100644 --- a/third_party/blink/web_tests/NeverFixTests +++ b/third_party/blink/web_tests/NeverFixTests
@@ -1868,30 +1868,34 @@ # Remove from virtual tests when ComputePressure is turned on by default. crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.html [ Skip ] -crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_detached_iframe.tenative.https.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_detached_iframe.tentative.https.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_disconnect.tentative.https.window.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_disconnect_idempotent.tentative.https.window.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_disconnect_immediately.tentative.https.window.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.html [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.html [ Skip ] -crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_stop.tentative.https.window.html [ Skip ] -crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_stop_idempotent.tentative.https.window.html [ Skip ] -crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_stop_immediately.tentative.https.window.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_observe_unobserve_failure.tentative.https.window.js [ Skip ] crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_supported_sources.tentative.https.window.js [ Skip ] -crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_values.tenative.https.window.html [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window.js [ Skip ] +crbug.com/1196419 external/wpt/compute-pressure/compute_pressure_values.tentative.https.window.html [ Skip ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.html [ Pass ] -crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_detached_iframe.tenative.https.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_detached_iframe.tentative.https.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_disconnect.tentative.https.window.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_disconnect_idempotent.tentative.https.window.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_disconnect_immediately.tentative.https.window.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.html [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.html [ Pass ] -crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_stop.tentative.https.window.html [ Pass ] -crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_stop_idempotent.tentative.https.window.html [ Pass ] -crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_stop_immediately.tentative.https.window.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_observe_unobserve_failure.tentative.https.window.js [ Pass ] crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_supported_sources.tentative.https.window.js [ Pass ] -crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_values.tenative.https.window.html [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window.js [ Pass ] +crbug.com/1196419 virtual/compute-pressure/external/wpt/compute-pressure/compute_pressure_values.tentative.https.window.html [ Pass ] # text-orientation:upright crbug.com/1005518 external/wpt/css/css-writing-modes/table-progression-vlr-003.html [ Skip ]
diff --git a/third_party/blink/web_tests/PRESUBMIT.py b/third_party/blink/web_tests/PRESUBMIT.py index f14e8c4..9ca8f8fd 100644 --- a/third_party/blink/web_tests/PRESUBMIT.py +++ b/third_party/blink/web_tests/PRESUBMIT.py
@@ -226,10 +226,13 @@ from blinkpy.common.host import Host port_factory = Host().port_factory - known_virtual_suites = [ - suite.full_prefix[8:-1] for suite in port_factory.get( - port_factory.all_port_names()[0]).virtual_test_suites() - ] + known_virtual_suites = set() + for port_name in port_factory.all_port_names(): + known_virtual_suites.update([ + suite.full_prefix[8:-1] for suite in port_factory.get( + port_name).virtual_test_suites() + ]) + known_virtual_suites = list(known_virtual_suites) results = [] if check_all:
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 141b207..75957fc 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -1642,98 +1642,15 @@ crbug.com/982194 [ Win7 ] external/wpt/css/css-text/white-space/seg-break-transformation-018.tentative.html [ Failure ] crbug.com/982194 [ Win10.20h2 ] fast/writing-mode/border-image-vertical-lr.html [ Failure Pass ] -### Tests passing with LayoutNGFlexFragmentation enabled: -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/flex-container-fragmentation-003.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/flex-container-fragmentation-004.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/flex-container-fragmentation-007.tentative.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-015.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-016.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-017.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-018.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-019.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-020.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-021.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-022.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-023.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-024.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-025.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-026.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-031.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-032.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-033.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-034.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-035.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-036.tentative.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-037.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-039.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-040.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-007.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-008.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-010.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-012.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-014.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-015.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-016.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-018.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-019.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-020.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-021.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-022.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-023.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-024.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-025.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-026.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-027.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-028.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-029.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-030.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-031.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-032.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-033.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-034.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-035.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-037.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-038.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-039.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-040.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-041.tentative.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-042.tentative.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-044.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-045.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-012.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-014.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-015.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-016.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-017.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-018.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-019.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-020.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-022.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-023.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-030.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-031.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-032.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-034.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-035.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-039.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-008.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-014.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-015.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-016.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-017.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-018.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-019.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-020.html [ Pass ] -virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-024.html [ Pass ] - ### Tests failing with LayoutNGFlexFragmentation enabled: -crbug.com/660611 virtual/layout_ng_flex_frag/fast/multicol/flexbox/doubly-nested-with-zero-width-flexbox-and-forced-break-crash.html [ Skip ] +crbug.com/660611 fast/multicol/flexbox/doubly-nested-with-zero-width-flexbox-and-forced-break-crash.html [ Skip ] ### Tests passing with LayoutNGTableFragmentation enabled: virtual/layout_ng_table_frag/external/wpt/css/css-break/table/break-after-table-cell.html [ Pass ] virtual/layout_ng_table_frag/external/wpt/css/css-break/table/break-after-table-cell-child.html [ Pass ] virtual/layout_ng_table_frag/external/wpt/css/css-break/table/break-before-table-cell.html [ Pass ] virtual/layout_ng_table_frag/external/wpt/css/css-break/table/break-before-table-cell-child.html [ Pass ] +virtual/layout_ng_table_frag/external/wpt/css/css-break/table/table-cell-expansion-003.html [ Pass ] ### Tests failing with LayoutNGTableFragmentation enabled: crbug.com/1295905 [ Mac11-arm64 ] virtual/layout_ng_table_frag/external/wpt/css/css-break/table/break-inside-cell-000.html [ Failure ] @@ -4400,93 +4317,12 @@ crbug.com/481431 external/wpt/css/css-break/box-decoration-break-clone-001.html [ Failure ] crbug.com/481431 external/wpt/css/css-break/box-decoration-break-clone-002.html [ Failure ] crbug.com/481431 external/wpt/css/css-break/box-decoration-break-clone-004.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-003.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-004.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/flex-container-fragmentation-007.tentative.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-015.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-016.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-017.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-018.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-019.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-020.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-021.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-022.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-023.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-024.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-025.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-026.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-031.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-032.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-033.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-034.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-035.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-036.tentative.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-037.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-039.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-column-flex-fragmentation-040.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-007.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-008.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-010.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-012.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-014.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-015.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-016.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-018.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-019.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-020.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-021.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-022.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-023.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-024.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-025.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-026.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-027.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-028.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-029.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-030.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-031.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-032.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-033.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-034.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-035.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-037.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-038.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-039.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-040.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-041.tentative.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-042.tentative.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-044.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/multi-line-row-flex-fragmentation-045.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-012.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-014.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-015.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-016.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-017.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-018.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-019.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-020.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-022.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-023.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-030.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-031.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-032.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-034.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-035.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-column-flex-fragmentation-039.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-008.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-014.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-015.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-016.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-017.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-018.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-019.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-020.html [ Failure ] -crbug.com/660611 external/wpt/css/css-break/flexbox/single-line-row-flex-fragmentation-024.html [ Failure ] crbug.com/614667 external/wpt/css/css-break/grid/grid-item-fragmentation-039.html [ Failure ] crbug.com/1078927 external/wpt/css/css-break/table/break-after-table-cell.html [ Failure ] crbug.com/1078927 external/wpt/css/css-break/table/break-after-table-cell-child.html [ Failure ] crbug.com/1078927 external/wpt/css/css-break/table/break-before-table-cell.html [ Failure ] crbug.com/1078927 external/wpt/css/css-break/table/break-before-table-cell-child.html [ Failure ] +crbug.com/1078927 external/wpt/css/css-break/table/table-cell-expansion-003.html [ Failure ] crbug.com/1058792 external/wpt/css/css-break/transform-007.html [ Failure ] crbug.com/1224888 external/wpt/css/css-break/transform-009.html [ Failure ] crbug.com/1156312 external/wpt/css/css-break/widows-orphans-017.html [ Failure ] @@ -7778,3 +7614,7 @@ # Sheriff 2022-03-23: More flaky tests. crbug.com/1309483 [ Win7 ] virtual/gpu-rasterization/images/directly-composited-image-orientation.html [ Failure Pass ] +crbug.com/1309633 [ Mac10.12 ] external/wpt/FileAPI/url/url-lifetime.html [ Failure ] +crbug.com/1309633 [ Mac10.13 ] external/wpt/FileAPI/url/url-lifetime.html [ Failure ] +crbug.com/1309633 [ Mac10.14 ] external/wpt/FileAPI/url/url-lifetime.html [ Failure ] +crbug.com/1309633 [ Mac10.15 ] external/wpt/FileAPI/url/url-lifetime.html [ Failure ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index ea04a23..aa6877c 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -1,26 +1,31 @@ [ { "prefix": "disable-accept-language-header", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/navigation/language"], "args": ["--disable-features=AcceptLanguageHeader"] }, { "prefix": "gpu", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["fast/canvas"], "args": ["--enable-accelerated-2d-canvas"] }, { "prefix": "unsafe_webgpu", + "platforms": ["Linux", "Mac", "Win"], "bases": ["regress/regress-1104580.html"], "args": ["--enable-unsafe-webgpu"] }, { "prefix": "isolated_world_csp", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/security/isolatedWorld"], "args": ["--enable-blink-features=IsolatedWorldCSP"] }, { "prefix": "threaded", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["compositing/visibility", "compositing/webgl", "animations/stability", @@ -48,12 +53,14 @@ }, { "prefix": "composite-relative-keyframes", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-transforms/animation"], "args": ["--enable-threaded-compositing", "--enable-blink-features=CompositeRelativeKeyframes"] }, { "prefix": "off-main-thread-css-paint", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-paint-api", "http/tests/csspaint"], "args": ["--enable-threaded-compositing", @@ -64,6 +71,7 @@ }, { "prefix": "prefer_compositing_to_lcd_text", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["compositing/overflow", "compositing/squashing/keep-lcd-text.html", "scrollbars"], @@ -71,12 +79,14 @@ }, { "prefix": "threaded-no-composited-antialiasing", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["animations"], "args": ["--enable-threaded-compositing", "--disable-composited-antialiasing"] }, { "prefix": "threaded-prefer-compositing", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scroll-behavior", "fast/scroll-snap", "fast/scrolling", @@ -86,11 +96,13 @@ }, { "prefix": "gpu-rasterization", + "platforms": ["Linux", "Mac", "Win"], "bases": ["images"], "args": ["--enable-gpu-rasterization"] }, { "prefix": "gpu-rasterization-disable-yuv", + "platforms": ["Linux", "Mac", "Win"], "bases": ["images/yuv-decode-eligible"], "args": ["--enable-gpu-rasterization", "--disable-blink-features=DecodeLossyWebPImagesToYUV", @@ -98,6 +110,7 @@ }, { "prefix": "v8-off-thread-finalization", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/html/semantics/scripting-1", "fast/dom" @@ -106,12 +119,14 @@ }, { "prefix": "exotic-color-space", + "platforms": ["Linux", "Mac", "Win"], "bases": ["images"], "args": ["--force-color-profile=srgb", "--force-raster-color-profile=color-spin-gamma24"] }, { "prefix": "stable", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["fast/css3-text/css3-text-decoration/stable", "fast/dom/Window", "http/tests/navigation", @@ -128,18 +143,21 @@ }, { "prefix": "feature-policy-permissions", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/mediacapture-streams"], "args": ["--use-fake-device-for-media-stream", "--use-fake-ui-for-media-stream"] }, { "prefix": "origin-trials-runtimeflags-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/origin_trials/webexposed"], "args": ["--disable-origin-trial-controlled-blink-features", "--stable-release-mode"] }, { "prefix": "android", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fullscreen"], "args": ["--enable-features=OverlayScrollbar", "--enable-threaded-compositing", @@ -152,12 +170,14 @@ }, { "prefix": "media-gpu-accelerated", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": ["external/wpt/media-source", "media"], "args": ["--use-gpu-in-tests"] }, { "prefix": "shared_array_buffer_on_desktop", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/browsers/origin/origin-keyed-agent-clusters", "external/wpt/wasm/jsapi/memory", "fast/workers/worker-atomics-wait.html", @@ -168,33 +188,39 @@ }, { "prefix": "mse-1mb-buffers", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/media/media-source/stream_memory_tests"], "args": ["--mse-audio-buffer-size-limit-mb=1", "--mse-video-buffer-size-limit-mb=1"] }, { "prefix": "composite-clip-path-animation", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-masking/clip-path/animations"], "args": ["--enable-blink-features=CompositeClipPathAnimation", "--enable-threaded-compositing"] }, { "prefix": "fractional-scroll-offsets", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-position/sticky/"], "args": ["--enable-blink-features=FractionalScrollOffsets"] }, { "prefix": "font-access", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/font-access"], "args": ["--enable-features=FontAccess"] }, { "prefix": "compute-pressure", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/compute-pressure"], "args": ["--enable-features=ComputePressure"] }, { "prefix": "highdpi-threaded", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-backgrounds/hidpi", "external/wpt/css/css-paint-api/hidpi"], "args": ["--force-device-scale-factor=2", @@ -203,6 +229,7 @@ }, { "prefix": "scalefactor200", + "platforms": ["Linux", "Mac", "Win"], "bases": ["css3/filters", "external/wpt/css/css-paint-api/hidpi", "external/wpt/element-timing", @@ -216,18 +243,21 @@ }, { "prefix": "jxl-enabled", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/inspector-protocol/emulation/emulation-set-disabled-image-types-jxl.js", "images/jxl"], "args": ["--enable-features=JXL"] }, { "prefix": "scalefactor150", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/events/synthetic-events", "fast/hidpi/static"], "args": ["--force-device-scale-factor=1.5"] }, { "prefix": "scalefactor200withzoom", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/hidpi/static", "inspector-protocol/page/get-layout-metrics-css.js"], "args": ["--force-device-scale-factor=2", @@ -235,62 +265,66 @@ }, { "prefix": "schemeful-same-site", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/cookies"], "args": ["--disable-features=SchemefulSameSite"] }, { - "prefix": "layout_ng_flex_frag", - "bases": ["external/wpt/css/css-break/flexbox", - "fast/multicol/flexbox"], - "args": ["--enable-blink-features=LayoutNGFlexFragmentation"] - }, - { "prefix": "layout_ng_table_frag", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-break/table", "external/wpt/css/css-multicol/table"], "args": ["--enable-blink-features=LayoutNGTableFragmentation"] }, { "prefix": "layout_ng_printing", + "platforms": ["Linux", "Mac", "Win"], "bases": ["printing"], "args": ["--enable-blink-features=LayoutNGPrinting"] }, { "prefix": "dark-mode-default", + "platforms": ["Linux", "Mac", "Win"], "bases": ["dark-mode/colors", "dark-mode/images"], "args": ["--blink-settings=preferredColorScheme=0,forceDarkModeEnabled=true"] }, { "prefix": "dark-mode-images-filter-all", + "platforms": ["Linux", "Mac", "Win"], "bases": ["dark-mode/images"], "args": ["--blink-settings=preferredColorScheme=0,forceDarkModeEnabled=true", "--dark-mode-settings=ImagePolicy=0"] }, { "prefix": "dark-mode-images-filter-none", + "platforms": ["Linux", "Mac", "Win"], "bases": ["dark-mode/images"], "args": ["--blink-settings=preferredColorScheme=0,forceDarkModeEnabled=true", "--dark-mode-settings=ImagePolicy=1"] }, { "prefix": "dark-mode-increase-text-contrast", + "platforms": ["Linux", "Mac", "Win"], "bases": ["dark-mode/colors"], "args": ["--blink-settings=preferredColorScheme=0,forceDarkModeEnabled=true", "--dark-mode-settings=IncreaseTextContrast=1"] }, { "prefix": "presentation", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--force-presentation-receiver-for-testing"] }, { "prefix": "single-renderer-process", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/longtask-timing/shared-renderer"], "args": ["--renderer-process-limit=1"] }, { "prefix": "compositor_threaded_scrollbar_scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars", "paint/invalidation/scroll/sticky"], "args": ["--enable-features=CompositorThreadedScrollbarScrolling", @@ -300,6 +334,7 @@ }, { "prefix": "percent-based-scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars"], "args": ["--enable-features=PercentBasedScrolling", "--enable-threaded-compositing", @@ -308,6 +343,7 @@ }, { "prefix": "main-threaded-percent-based-scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/events/wheel", "fast/scrolling", "virtual/percent-based-scrolling"], @@ -315,6 +351,7 @@ }, { "prefix": "compositor-threaded-percent-based-scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/events/wheel", "fast/scrolling", "virtual/percent-based-scrolling"], @@ -324,6 +361,7 @@ }, { "prefix": "compositor-threaded-percent-based-scrolling-dsf-2", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars/dsf-ready", "virtual/percent-based-scrolling"], "args": ["--enable-features=PercentBasedScrolling", @@ -333,6 +371,7 @@ }, { "prefix": "compositor-threaded-percent-based-scrolling-dsf-2-highdpi", + "platforms": ["Linux", "Mac", "Win"], "bases": ["virtual/percent-based-scrolling"], "args": ["--enable-features=PercentBasedScrolling", "--enable-threaded-compositing", @@ -342,6 +381,7 @@ }, { "prefix": "smooth_compositor_threaded_scrollbar_scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars/scroll-chaining-for-gesture-based-scrolling.html"], "args": ["--enable-features=CompositorThreadedScrollbarScrolling", "--enable-threaded-compositing", @@ -350,12 +390,14 @@ }, { "prefix": "hidpi", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars/dsf-ready"], "args": ["--disable-smooth-scrolling", "--force-device-scale-factor=2"] }, { "prefix": "compositor_threaded_scrollbar_scrolling_hidpi", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars/dsf-ready"], "args": ["--enable-features=CompositorThreadedScrollbarScrolling", "--enable-threaded-compositing", @@ -365,21 +407,25 @@ }, { "prefix": "speech-with-unified-autoplay", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/speech-api"], "args": ["--autoplay-policy=document-user-activation-required"] }, { "prefix": "unified-autoplay", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/feature-policy"], "args": ["--autoplay-policy=document-user-activation-required"] }, { "prefix": "wbn-from-network", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/web-bundle"], "args": ["--enable-features=WebBundlesFromNetwork"] }, { "prefix": "plz-dedicated-worker", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/content-security-policy/inside-worker", "external/wpt/content-security-policy/worker-src", "external/wpt/content-security-policy/gen", @@ -402,40 +448,47 @@ }, { "prefix": "direct-sockets", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/direct-sockets", "wpt_internal/direct-sockets"], "args": ["--restricted-api-origins=https://web-platform.test"] }, { "prefix": "webrtc-wpt-plan-b", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/webrtc"], "args": ["--disable-features=RTCUnifiedPlanByDefault"] }, { "prefix": "display-compositor-pixel-dump", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-display-compositor-pixel-dump", "--enable-accelerated-2d-canvas"] }, { "prefix": "lazyload-image", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/lazyload"], "args": ["--enable-blink-features=AutomaticLazyImageLoading", "--disable-blink-features=RestrictAutomaticLazyImageLoadingToDataSaver"] }, { "prefix": "webgl-extra-video-texture-metadata", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/webgl/video-metadata"], "args": ["--enable-blink-features=ExtraWebGLVideoTextureMetadata"] }, { "prefix": "wasm-site-isolated-code-cache", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/devtools/wasm-isolated-code-cache"], "args": ["--disable-features=WebAssemblyBaseline", "--site-per-process"] }, { "prefix": "wasm-csp", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "wasm", "external/wpt/content-security-policy/wasm-unsafe-eval"], @@ -443,6 +496,7 @@ }, { "prefix": "split-http-cache-not-site-per-process", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/devtools/isolated-code-cache"], "args": ["--enable-features=SplitCacheByNetworkIsolationKey", "--disable-site-isolation-trials", @@ -450,6 +504,7 @@ }, { "prefix": "not-split-http-cache-not-site-per-process", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/devtools/isolated-code-cache"], "args": ["--disable-features=SplitCacheByNetworkIsolationKey", "--disable-site-isolation-trials", @@ -457,6 +512,7 @@ }, { "prefix": "not-site-per-process", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/html/browsers/origin/relaxing-the-same-origin-restriction", "external/wpt/html/browsers/windows/nested-browsing-contexts/frameElement-siblings.sub.html", @@ -488,6 +544,7 @@ }, { "prefix": "no-auto-wpt-origin-isolation", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/html/browsers/origin/origin-keyed-agent-clusters", "external/wpt/navigation-api/navigate-event/cross-window" @@ -497,34 +554,40 @@ }, { "prefix": "focusless-spat-nav", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-blink-features=FocuslessSpatialNavigation", "--enable-spatial-navigation"] }, { "prefix": "passive-fingerprinting", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/navigation/frozen-useragent.html", "http/tests/navigation/useragent.php"], "args": ["--enable-features=ReduceUserAgent"] }, { "prefix": "fsa-incognito", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/file-system-access"], "args": ["--enable-features=IncognitoFileSystemContextForTesting"] }, { "prefix": "file-handling", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-features=NativeFileSystemAPI,FileHandlingAPI"] }, { "prefix": "controls-refresh-hc", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/forms/color-scheme"], "args": ["--enable-features=ForcedColors", "--force-high-contrast"] }, { "prefix": "eye-dropper", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "fast/forms/color-scheme/color", "http/tests/eye-dropper"], @@ -532,11 +595,13 @@ }, { "prefix": "use-common-select-popup", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/forms/color-scheme/select"], "args": ["--enable-features=UseCommonSelectPopup"] }, { "prefix": "forced-high-contrast-colors", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/forced-colors-mode", "html/details_summary/color-scheme-validation"], "args": ["--force-high-contrast", @@ -544,11 +609,13 @@ }, { "prefix": "system-color-compute", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-color"], "args": ["--enable-blink-features=CSSSystemColorComputeToSelf"] }, { "prefix": "dark-color-scheme", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-color/system-color-consistency.html", "external/wpt/css/css-color-adjust/rendering/dark-color-scheme", "fast/forms/color-scheme", @@ -561,31 +628,37 @@ }, { "prefix": "force-eager", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/measure-memory"], "args": ["--enable-blink-features=MeasureMemory,ForceEagerMeasureMemory"] }, { "prefix": "payment-request-mandatory-total", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/payments/payment-request-app-store-billing-mandatory-total.html"], "args": ["--disable-blink-features=PaymentRequestTotalOptional"] }, { "prefix": "basic-card-enabled", + "platforms": ["Linux", "Mac", "Win"], "bases": ["payments/payment-request-interface.html", "http/tests/payments/payment-instruments.html"], "args": ["--enable-blink-features=PaymentRequestBasicCard", "--enable-features=PaymentRequestBasicCard"] }, { "prefix": "json-modules", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/semantics/scripting-1/the-script-element/json-module"], "args": ["--enable-features=JSONModules", "--js-flags=--harmony-import-assertions"] }, { "prefix": "css-modules", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/semantics/scripting-1/the-script-element/css-module"], "args": ["--enable-blink-features=CSSModules", "--js-flags=--harmony-import-assertions"] }, { "prefix": "css-calc-infinity-and-nan-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/rendering/non-replaced-elements/the-page/crashtests/", "external/wpt/css/css-values/", "external/wpt/css/css-transforms/parsing/", @@ -596,57 +669,68 @@ }, { "prefix": "import-assertions", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/semantics/scripting-1/the-script-element/import-assertions"], "args": ["--js-flags=--harmony-import-assertions"] }, { "prefix": "import-maps-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/import-maps/not-as-classic-script.html"], "args": ["--disable-blink-features=ImportMaps"] }, { "prefix": "overlay-scrollbar", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-features=OverlayScrollbar"] }, { "prefix": "non-overlay-scrollbar", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--disable-features=OverlayScrollbar"] }, { "prefix": "text-antialias", + "platforms": ["Linux", "Mac", "Win", "Fuchsia"], "bases": [], "args": ["--enable-font-antialiasing"] }, { "prefix": "mathml-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--disable-blink-features=MathMLCore"] }, { "prefix": "hdr", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--force-color-profile=scrgb-linear"] }, { "prefix": "split-cache-by-include-credentials", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/fetch/http-cache"], "args": ["--enable-features=SplitCacheByIncludeCredentials"] }, { "prefix": "split-http-cache", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/fetch/http-cache", "external/wpt/signed-exchange"], "args": ["--enable-features=SplitCacheByNetworkIsolationKey"] }, { "prefix": "not-split-http-cache", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/fetch/http-cache"], "args": ["--disable-features=SplitCacheByNetworkIsolationKey"] }, { "prefix": "clipboard-custom-formats", + "platforms": ["Linux", "Mac", "Win"], "bases": ["clipboard/async-clipboard", "external/wpt/clipboard-apis/clipboard-item.https.html"], "args": ["--enable-blink-features=ClipboardCustomFormats", @@ -654,36 +738,43 @@ }, { "prefix": "legacy-client-hints", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/client-hints", "wpt_internal/client-hints"], "args": ["--enable-features=AllowClientHintsToThirdParty"] }, { "prefix": "disable-user-agent-client-hint-feature", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/client-hints", "wpt_internal/client-hints"], "args": ["--disable-features=UserAgentClientHint"] }, { "prefix": "storage-access-api", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/storage-access-api" ], "args": [ "--enable-features=StorageAccessAPI" ] }, { "prefix": "web-bluetooth-new-permissions-backend", + "platforms": ["Linux", "Mac", "Win"], "bases": ["wpt_internal/bluetooth", "external/wpt/bluetooth"], "args": ["--enable-features=WebBluetoothNewPermissionsBackend"] }, { "prefix": "trust-tokens", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/trust-tokens/end-to-end", "http/tests/loading/trust-tokens", "http/tests/inspector-protocol/trust-tokens" ], "args": [ "--enable-features=TrustTokens" ] }, { "prefix": "weakrefs", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "js/weakrefs" ], "args": [ "--js-flags=--harmony-weak-refs" ] }, { "prefix": "offsetparent-old-behavior", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/css/css-contain/content-visibility", "external/wpt/shadow-dom", @@ -693,6 +784,7 @@ }, { "prefix": "document-domain-disabled-by-default", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/document-policy/experimental-features/document-domain" ], @@ -700,11 +792,13 @@ }, { "prefix": "subresource-web-bundles-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "http/tests/loading/wbn/origin-trial/" ], "args": [ "--disable-blink-features=SubresourceWebBundles" ] }, { "prefix": "backface-visibility-interop", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/css/css-transforms", "transforms/", "compositing/geometry/", @@ -714,6 +808,7 @@ }, { "prefix": "portals", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/fetch/metadata/portal.https.sub.html", "external/wpt/portals", "http/tests/devtools/portals", @@ -724,16 +819,19 @@ }, { "prefix": "restrict-gamepad", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/gamepad" ], "args": [ "--enable-features=RestrictGamepadAccess" ] }, { "prefix": "bfcache-experiment-control", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "http/tests/origin_trials/webexposed/bfcache-experiment-http-header-origin-trial.php" ], "args": [ "--enable-features=BackForwardCacheABExperimentControl" ] }, { "prefix": "third-party-storage-partitioning", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/web-locks/partitioned-web-locks.tentative.https.html", "external/wpt/workers/shared-worker-partitioned.tentative.html", @@ -743,18 +841,21 @@ "external/wpt/service-workers/service-worker/partitioned-service-worker-claim.tentative.https.html", "external/wpt/webstorage/localstorage-basic-partitioned.tentative.sub.html", "external/wpt/webmessaging/broadcastchannel/cross-partition.https.tentative.html", - "external/wpt/IndexedDB/idb-partitioned-basic.tentative.sub.html" + "external/wpt/IndexedDB/idb-partitioned-basic.tentative.sub.html", + "external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html" ], "args": [ "--enable-features=ThirdPartyStoragePartitioning" ] }, { "prefix": "threaded-composited-iframes", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/is-input-pending"], "args": ["--enable-threaded-compositing", "--disable-auto-wpt-origin-isolation"] }, { "prefix": "oopr-canvas2d", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "fast/canvas" ], "args": [ "--enable-features=CanvasOopRasterization", "--enable-accelerated-2d-canvas", @@ -762,6 +863,7 @@ }, { "prefix": "scroll-unification", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/events", "fast/scrolling", "fast/scroll-snap", @@ -785,6 +887,7 @@ }, { "prefix": "scroll-unification-hidpi", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars/dsf-ready"], "args": ["--enable-features=ScrollUnification", "--enable-threaded-compositing", @@ -793,6 +896,7 @@ }, { "prefix": "scroll-unification-layout_ng_block_frag", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/forms/fieldset"], "args": ["--enable-features=ScrollUnification", "--enable-threaded-compositing", @@ -800,6 +904,7 @@ }, { "prefix": "scroll-unification-overlay-scrollbar", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-features=ScrollUnification", "--enable-threaded-compositing", @@ -807,6 +912,7 @@ }, { "prefix": "scroll-unification-percent-based-scrolling", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scrolling/scrollbars"], "args": ["--enable-features=ScrollUnification", "--enable-features=PercentBasedScrolling", @@ -816,6 +922,7 @@ }, { "prefix": "scroll-unification-prefer_compositing_to_lcd_text", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/scroll-behavior", "scrollbars"], "args": ["--enable-features=ScrollUnification", @@ -824,6 +931,7 @@ }, { "prefix": "scroll-unification-unified-autoplay", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/feature-policy"], "args": ["--enable-features=ScrollUnification", "--enable-threaded-compositing", @@ -831,21 +939,25 @@ }, { "prefix": "disable-frequency-capping-for-overlay-popup-detection", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/subresource_filter/overlay_popup_ad"], "args": ["--disable-features=FrequencyCappingForOverlayPopupDetection"] }, { "prefix": "web-app-window-controls-overlay", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-window-controls-overlay.html"], "args": [ "--enable-features=WebAppWindowControlsOverlay"] }, { "prefix": "first-party-sets", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/inspector-protocol/network"], "args": ["--use-first-party-set=https://firstparty.test,https://cookie.test"] }, { "prefix": "partitioned-cookies", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/cookies/partitioned-cookies/", "external/wpt/html/anonymous-iframe/", "http/tests/cookies/partitioned-cookies", @@ -854,12 +966,14 @@ }, { "prefix": "partitioned-cookies-first-party-sets", + "platforms": ["Linux", "Mac", "Win"], "bases": ["http/tests/inspector-protocol/network/"], "args": ["--enable-features=PartitionedCookies,PartitionedCookiesBypassOriginTrial", "--use-first-party-set=https://devtools.test,https://example.test"] }, { "prefix": "prerender", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/speculation-rules/prerender", "wpt_internal/prerender", "http/tests/inspector-protocol/prerender"], @@ -867,12 +981,14 @@ }, { "prefix": "no-different-origin-dialogs", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/webappapis/user-prompts/cannot-show-simple-dialogs/confirm-different-origin-frame.sub.html", "external/wpt/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html"], "args": [ "--enable-features=SuppressDifferentOriginSubframeJSDialogs"] }, { "prefix": "force-renderer-accessibility", + "platforms": ["Linux", "Mac", "Win"], "bases": ["accessibility/accessibility-beforematch-marker-crash.html", "accessibility/details-summary-crash.html", "accessibility/slot-poison.html", @@ -901,11 +1017,13 @@ }, { "prefix": "no-alloc-direct-call", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/canvas", "external/wpt/html/canvas"], "args": ["--enable-fake-no-alloc-direct-call-for-testing"] }, { "prefix": "document-transition", + "platforms": ["Linux", "Mac", "Win"], "bases": ["wpt_internal/document-transition", "document-transition"], "args": ["--enable-features=DocumentTransition", "--enable-threaded-compositing", @@ -913,11 +1031,13 @@ }, { "prefix": "popup-disabled", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--stable-release-mode"] }, { "prefix": "dialogfocus-old-behavior", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/html/semantics/interactive-elements/the-dialog-element" ], @@ -925,21 +1045,25 @@ }, { "prefix": "disable-ua-ch-platform-feature", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/client-hints", "wpt_internal/client-hints"], "args": ["--disable-features=UACHPlatformEnabledByDefault"] }, { "prefix": "virtual-keyboard", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/virtual-keyboard"], "args": ["--enable-blink-features=VirtualKeyboard"] }, { "prefix": "parakeet", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/parakeet"], "args": ["--enable-features=InterestGroupStorage,AdInterestGroupAPI,Parakeet"] }, { "prefix": "fledge", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "http/tests/inspector-protocol/target/auto-attach-auction-worklet.js", "http/tests/inspector-protocol/target/target-auction-worklet.js", @@ -951,6 +1075,7 @@ }, { "prefix": "automatic-lazy-frame-loading", + "platforms": ["Linux", "Mac", "Win"], "bases": ["wpt_internal/lazyembed"], "args": [ "--enable-features=AutomaticLazyFrameLoadingToEmbeds:allowed_websites/http%3A%2F%2Fbad3p.test%3A3001%7C%2Fembed", @@ -959,21 +1084,25 @@ }, { "prefix": "automatic-lazy-frame-loading-ads", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-features=AutomaticLazyFrameLoadingToAds"] }, { "prefix": "initially-invisible-images-lcp", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/largest-contentful-paint/initially-invisible-images.html"], "args": [ "--enable-features=IncludeInitiallyInvisibleImagesInLCP"] }, { "prefix": "background-svg-in-lcp", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/largest-contentful-paint/"], "args": [ "--enable-features=IncludeBackgroundSVGInLCP"] }, { "prefix": "css-highlight-inheritance", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/css/css-pseudo", "wpt_internal/css/css-pseudo", @@ -984,6 +1113,7 @@ }, { "prefix": "shared-storage-fenced-frame-mparch", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "wpt_internal/shared_storage" ], @@ -991,6 +1121,7 @@ }, { "prefix": "shared-storage-fenced-frame-shadow-dom", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "wpt_internal/shared_storage" ], @@ -998,6 +1129,7 @@ }, { "prefix": "task-tracking", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "wpt_internal/task-tracking" ], @@ -1005,6 +1137,7 @@ }, { "prefix": "fenced-frame-mparch", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "http/tests/fenced_frame", "wpt_internal/fenced_frame", @@ -1015,6 +1148,7 @@ }, { "prefix": "fenced-frame-shadow-dom", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "http/tests/fenced_frame", "wpt_internal/fenced_frame", @@ -1024,31 +1158,37 @@ }, { "prefix": "disable-custom-element-default-style", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/css/css-cascade/presentational-hints-cascade.html"], "args": ["--disable-blink-features=CustomElementDefaultStyle"] }, { "prefix": "cors-non-wildcard-request-headers", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/fetch/api/cors/cors-preflight.any.js"], "args": ["--enable-features=CorsNonWildcardRequestHeadersSupport"] }, { "prefix": "enable-experimental-async-stack-tagging-api", + "platforms": ["Linux", "Mac", "Win"], "bases": ["inspector-protocol/runtime"], "args": ["--js-flags=--experimental-async-stack-tagging-api"] }, { "prefix": "system-color-picker-appearance", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/forms/color-scheme/color/color-picker-appearance.html"], "args": ["--enable-features=SystemColorChooser"] }, { "prefix": "dark-system-color-picker-appearance", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/forms/color-scheme/color/color-picker-appearance.html"], "args": ["--blink-settings=preferredColorScheme=0", "--enable-features=SystemColorChooser"] }, { "prefix": "css-highlight-overlay-painting", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "external/wpt/css/css-pseudo", "wpt_internal/css/css-pseudo", @@ -1058,11 +1198,13 @@ }, { "prefix": "no-forced-frame-updates", + "platforms": ["Linux", "Mac", "Win"], "bases": ["external/wpt/html/dom/render-blocking"], "args": ["--enable-features=NoForcedFrameUpdatesForWebTests"] }, { "prefix": "enable-system-cursor-size-for-svg", + "platforms": ["Linux", "Mac", "Win"], "bases": ["fast/events/mouse-cursor-image-set-svg.html"], "args": [ "--enable-features=SystemCursorSizeSupported", @@ -1071,12 +1213,14 @@ }, { "prefix": "document-pip", + "platforms": ["Linux", "Mac", "Win"], "bases": [], "args": ["--enable-features=PictureInPictureV2", "--enable-blink-features=PictureInPictureV2"] }, { "prefix": "origin-agent-cluster-default", + "platforms": ["Linux", "Mac", "Win"], "bases": [ "wpt_internal/origin-agent-cluster-default" ], "args": [ "--enable-features=OriginAgentClusterDefaultWarning",
diff --git a/third_party/blink/web_tests/WebGPUExpectations b/third_party/blink/web_tests/WebGPUExpectations index 7cc7c4b..c653be8 100644 --- a/third_party/blink/web_tests/WebGPUExpectations +++ b/third_party/blink/web_tests/WebGPUExpectations
@@ -30,7 +30,8 @@ wpt_internal/webgpu/cts.https.html?q=webgpu:api,operation,rendering,basic:large_draw:* [ Slow ] wpt_internal/webgpu/cts.https.html?q=webgpu:api,operation,compute,basic:large_dispatch:* [ Slow ] wpt_internal/webgpu/cts.https.html?worker=1&q=webgpu:api,operation,compute,basic:large_dispatch:* [ Slow ] -wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_2d_context_canvas:* [ Slow ] +[ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_2d_context_canvas:* [ Slow ] +[ Win ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_2d_context_canvas:* [ Slow ] [ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gl_context_canvas:* [ Slow ] [ Win ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gl_context_canvas:* [ Slow ] [ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gpu_context_canvas:* [ Slow ] @@ -59,6 +60,11 @@ crbug.com/tint/1464 [ Linux ] wpt_internal/webgpu/cts.https.html?q=webgpu:shader,execution,memory_model,atomicity:atomicity:* [ Slow ] crbug.com/tint/1464 [ Linux ] wpt_internal/webgpu/cts.https.html?q=webgpu:shader,execution,memory_model,coherence:corr:* [ Slow ] +# Crashing on Linux +crbug.com/1309194 [ Linux ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:color_space_conversion:* [ Crash Timeout ] +crbug.com/1309194 [ Linux ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:copy_contents_from_2d_context_canvas:* [ Crash ] +crbug.com/1309194 [ Linux ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,ImageBitmap:from_canvas:* [ Crash ] + ### ### Untriaged failures. Please prefer to triage thoroughly and file a bug! ### @@ -72,7 +78,8 @@ ### # All cases take a while, and there are very many for splitting. Prefer to wait till the harness doesn't need manual splits. -wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:color_space_conversion:* [ Timeout ] +[ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:color_space_conversion:* [ Timeout ] +[ Win ] wpt_internal/webgpu/cts.https.html?q=webgpu:web_platform,copyToTexture,canvas:color_space_conversion:* [ Timeout ] [ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:api,validation,image_copy,layout_related:bound_on_bytes_per_row:* [ Timeout ] [ Mac ] wpt_internal/webgpu/cts.https.html?q=webgpu:api,validation,image_copy,buffer_related:bytes_per_row_alignment:* [ Timeout ]
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.js index 515c9d7..4b14fd0 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_arguments.tentative.https.window.js
@@ -29,35 +29,6 @@ }, `ComputePressureObserver constructor accepts ${property} value ` + `[${valid_value}]`); } - - promise_test(async t => { - const many_thresholds = [0.5]; - for (let i = 0.01; i < 0.5; i += 0.0001) { - many_thresholds.push(0.5 + i); - many_thresholds.push(0.5 - i); - } - - const options = { - cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5] }; - options[property] = many_thresholds; - - const update = await new Promise((resolve, reject) => { - const observer = new ComputePressureObserver(resolve, options); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); - }); - - const effective_thresholds = update.options[property]; - assert_less_than(effective_thresholds.length, many_thresholds.length, - 'only a small number of thresholds are selected'); - - const expected_thresholds = - many_thresholds.slice(0, effective_thresholds.length); - expected_thresholds.sort(); - assert_array_equals( - effective_thresholds, expected_thresholds, - 'thresholds are selected in the given order, before sorting'); - }, `ComputePressureObserver filters thresholds in ${property}`); } test(t => {
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.js index dac1dab..2cdd36e 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_basic.tentative.https.window.js
@@ -7,8 +7,8 @@ const update = await new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); assert_equals(typeof update.cpuUtilization, 'number');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tenative.https.html b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tentative.https.html similarity index 89% rename from third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tenative.https.html rename to third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tentative.https.html index be0b938..4ebb1ca 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tenative.https.html +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_detached_iframe.tentative.https.html
@@ -30,7 +30,7 @@ // Calling observe() from a detached iframe should fail but not crash. await promise_rejects_dom(t, 'InvalidStateError', iframe_DOMException, - observer.observe()); + observer.observe('cpu')); }, 'ComputePressureObserver.observe() on detached frame rejects'); promise_test(async t => { @@ -42,12 +42,12 @@ () => {}, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - await observer.observe(); + await observer.observe('cpu'); iframe.remove(); - // Calling stop() from a detached iframe should not crash. - observer.stop(); + // Calling disconnect() from a detached iframe should not crash. + observer.disconnect(); }, 'ComputePressureObserver.stop() on detached frame returns'); promise_test(async t => { @@ -62,7 +62,7 @@ // await is intentionally not used here. We want to remove the iframe while // the returned Promise settles. - const observe_promise = observer.observe(); + const observe_promise = observer.observe('cpu'); iframe.remove(); // Establish an observer and wait for an update in the main frame. This should @@ -71,8 +71,8 @@ const update = await new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); assert_in_array(update.cpuUtilization, [0.25, 0.75], 'cpuUtilization quantization');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.js index 6f1d6d8..923a4b6 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations.tentative.https.window.js
@@ -5,10 +5,10 @@ const observer1 = new ComputePressureObserver( update => { observer1_updates.push(update); }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer1.stop()); + t.add_cleanup(() => observer1.disconnect()); // Ensure that observer1's quantization scheme gets registered as the origin's // scheme before observer2 starts. - await observer1.observe(); + await observer1.observe('cpu'); const observer2_updates = []; await new Promise((resolve, reject) => { @@ -18,8 +18,8 @@ resolve(); }, {cpuUtilizationThresholds: [0.25], cpuSpeedThresholds: [0.75]}); - t.add_cleanup(() => observer2.stop()); - observer2.observe().catch(reject); + t.add_cleanup(() => observer2.disconnect()); + observer2.observe('cpu').catch(reject); }); // observer2 uses a different quantization scheme than observer1. After @@ -53,8 +53,8 @@ resolve(); }, {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); - t.add_cleanup(() => observer3.stop()); - observer3.observe().catch(reject); + t.add_cleanup(() => observer3.disconnect()); + observer3.observe('cpu').catch(reject); }); assert_equals(
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.js index e0429b2..b0bd879 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_different_quantizations_across_iframes.tentative.https.window.js
@@ -5,10 +5,10 @@ const observer1 = new ComputePressureObserver( update => { observer1_updates.push(update); }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer1.stop()); + t.add_cleanup(() => observer1.disconnect()); // Ensure that observer1's quantization scheme gets registered as the origin's // scheme before observer2 starts. - await observer1.observe(); + await observer1.observe('cpu'); // iframe numbers are aligned with observer numbers. The first observer is in // the main frame, so there is no iframe1. @@ -23,8 +23,8 @@ resolve(); }, {cpuUtilizationThresholds: [0.25], cpuSpeedThresholds: [0.75]}); - t.add_cleanup(() => observer2.stop()); - observer2.observe().catch(reject); + t.add_cleanup(() => observer2.disconnect()); + observer2.observe('cpu').catch(reject); }); // observer2 uses a different quantization scheme than observer1. After @@ -61,8 +61,8 @@ resolve(); }, {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); - t.add_cleanup(() => observer3.stop()); - observer3.observe().catch(reject); + t.add_cleanup(() => observer3.disconnect()); + observer3.observe('cpu').catch(reject); }); assert_equals(
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect.tentative.https.window.js new file mode 100644 index 0000000..1abecf31 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect.tentative.https.window.js
@@ -0,0 +1,57 @@ +'use strict'; + +promise_test(async t => { + const observer1_updates = []; + const observer1 = new ComputePressureObserver(update => { + observer1_updates.push(update); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer1.disconnect()); + // Ensure that observer1's schema gets registered before observer2 starts. + await observer1.observe('cpu'); + observer1.disconnect(); + + const observer2_updates = []; + await new Promise((resolve, reject) => { + const observer2 = new ComputePressureObserver(update => { + observer2_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer2.disconnect()); + observer2.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'disconnected observers should not receive callbacks'); + + assert_equals(observer2_updates.length, 1); + assert_in_array( + observer2_updates[0].cpuUtilization, [0.25, 0.75], + 'cpuUtilization quantization'); + assert_in_array( + observer2_updates[0].cpuSpeed, [0.25, 0.75], 'cpuSpeed quantization'); + + // Go through one more update cycle so any (incorrect) update for observer1 + // makes it through the IPC queues. + + const observer3_updates = []; + await new Promise((resolve, reject) => { + const observer3 = new ComputePressureObserver(update => { + observer3_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); + t.add_cleanup(() => observer3.disconnect()); + observer3.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'disconnected observers should not receive callbacks'); + + assert_equals(observer3_updates.length, 1); + assert_in_array( + observer3_updates[0].cpuUtilization, [0.375, 0.875], + 'cpuUtilization quantization'); + assert_in_array( + observer3_updates[0].cpuSpeed, [0.125, 0.625], 'cpuSpeed quantization'); +}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_idempotent.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_idempotent.tentative.https.window.js new file mode 100644 index 0000000..766f8a90 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_idempotent.tentative.https.window.js
@@ -0,0 +1,57 @@ +'use strict'; + +promise_test(async t => { + const observer1_updates = []; + const observer1 = new ComputePressureObserver(update => { + observer1_updates.push(update); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer1.disconnect()); + // Ensure that observer1's schema gets registered before observer2 starts. + observer1.observe('cpu'); + observer1.disconnect(); + + const observer2_updates = []; + await new Promise((resolve, reject) => { + const observer2 = new ComputePressureObserver(update => { + observer2_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer2.disconnect()); + observer2.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'stopped observers should not receive callbacks'); + + assert_equals(observer2_updates.length, 1); + assert_in_array( + observer2_updates[0].cpuUtilization, [0.25, 0.75], + 'cpuUtilization quantization'); + assert_in_array( + observer2_updates[0].cpuSpeed, [0.25, 0.75], 'cpuSpeed quantization'); + + // Go through one more update cycle so any (incorrect) update for observer1 + // makes it through the IPC queues. + + const observer3_updates = []; + await new Promise((resolve, reject) => { + const observer3 = new ComputePressureObserver(update => { + observer3_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); + t.add_cleanup(() => observer3.disconnect()); + observer3.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'stopped observers should not receive callbacks'); + + assert_equals(observer3_updates.length, 1); + assert_in_array( + observer3_updates[0].cpuUtilization, [0.375, 0.875], + 'cpuUtilization quantization'); + assert_in_array( + observer3_updates[0].cpuSpeed, [0.125, 0.625], 'cpuSpeed quantization'); +}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_immediately.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_immediately.tentative.https.window.js new file mode 100644 index 0000000..766f8a90 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_disconnect_immediately.tentative.https.window.js
@@ -0,0 +1,57 @@ +'use strict'; + +promise_test(async t => { + const observer1_updates = []; + const observer1 = new ComputePressureObserver(update => { + observer1_updates.push(update); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer1.disconnect()); + // Ensure that observer1's schema gets registered before observer2 starts. + observer1.observe('cpu'); + observer1.disconnect(); + + const observer2_updates = []; + await new Promise((resolve, reject) => { + const observer2 = new ComputePressureObserver(update => { + observer2_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer2.disconnect()); + observer2.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'stopped observers should not receive callbacks'); + + assert_equals(observer2_updates.length, 1); + assert_in_array( + observer2_updates[0].cpuUtilization, [0.25, 0.75], + 'cpuUtilization quantization'); + assert_in_array( + observer2_updates[0].cpuSpeed, [0.25, 0.75], 'cpuSpeed quantization'); + + // Go through one more update cycle so any (incorrect) update for observer1 + // makes it through the IPC queues. + + const observer3_updates = []; + await new Promise((resolve, reject) => { + const observer3 = new ComputePressureObserver(update => { + observer3_updates.push(update); + resolve(); + }, {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); + t.add_cleanup(() => observer3.disconnect()); + observer3.observe('cpu').catch(reject); + }); + + assert_equals( + observer1_updates.length, 0, + 'stopped observers should not receive callbacks'); + + assert_equals(observer3_updates.length, 1); + assert_in_array( + observer3_updates[0].cpuUtilization, [0.375, 0.875], + 'cpuUtilization quantization'); + assert_in_array( + observer3_updates[0].cpuSpeed, [0.125, 0.625], 'cpuSpeed quantization'); +}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.js index d1650cb..25961893 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple.tentative.https.window.js
@@ -4,22 +4,22 @@ const update1_promise = new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); const update2_promise = new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); const update3_promise = new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); const [update1, update2, update3] =
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.js index 5a020ad..1e00c9f7e 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_multiple_across_iframes.tentative.https.window.js
@@ -4,8 +4,8 @@ const update1_promise = new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); // iframe numbers are aligned with observer numbers. The first observer is in @@ -16,8 +16,8 @@ const update2_promise = new Promise((resolve, reject) => { const observer = new iframe2.contentWindow.ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); const iframe3 = document.createElement('iframe'); @@ -26,8 +26,8 @@ const update3_promise = new Promise((resolve, reject) => { const observer = new iframe3.contentWindow.ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); const [update1, update2, update3] =
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.js index 773512f..b4e87db 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_idempotent.tentative.https.window.js
@@ -7,10 +7,10 @@ const update = await new Promise((resolve, reject) => { const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); - observer.observe().catch(reject); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); + observer.observe('cpu').catch(reject); + observer.observe('cpu').catch(reject); }); assert_equals(typeof update.cpuUtilization, 'number');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_unobserve_failure.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_unobserve_failure.tentative.https.window.js new file mode 100644 index 0000000..26d8c962 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_observe_unobserve_failure.tentative.https.window.js
@@ -0,0 +1,19 @@ +'use strict'; + +promise_test(async t => { + const observer = new ComputePressureObserver( + t.unreached_func('oops should not end up here'), + {cpuUtilizationThresholds: [0.1, 0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer.disconnect()); + await promise_rejects_js(t, TypeError, observer.observe('random')); +}, 'ComputePressureObserver.observe() requires a valid source'); + +test(function(t) { + const observer = new ComputePressureObserver( + t.unreached_func('oops should not end up here'), + {cpuUtilizationThresholds: [0.1, 0.5], cpuSpeedThresholds: [0.5]}); + t.add_cleanup(() => observer.disconnect()); + assert_throws_js(TypeError, () => { + observer.unobserve('random'); + }); +}, 'ComputePressureObserver.unobserve() requires a valid source');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop.tentative.https.window.js deleted file mode 100644 index 5dbd505..0000000 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop.tentative.https.window.js +++ /dev/null
@@ -1,58 +0,0 @@ -'use strict'; - -promise_test(async t => { - const observer1_updates = []; - const observer1 = new ComputePressureObserver( - update => { observer1_updates.push(update); }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer1.stop()); - // Ensure that observer1's schema gets registered before observer2 starts. - await observer1.observe(); - observer1.stop(); - - const observer2_updates = []; - await new Promise((resolve, reject) => { - const observer2 = new ComputePressureObserver( - update => { - observer2_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer2.stop()); - observer2.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer2_updates.length, 1); - assert_in_array(observer2_updates[0].cpuUtilization, [0.25, 0.75], - 'cpuUtilization quantization'); - assert_in_array(observer2_updates[0].cpuSpeed, [0.25, 0.75], - 'cpuSpeed quantization'); - - // Go through one more update cycle so any (incorrect) update for observer1 - // makes it through the IPC queues. - - const observer3_updates = []; - await new Promise((resolve, reject) => { - const observer3 = new ComputePressureObserver( - update => { - observer3_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); - t.add_cleanup(() => observer3.stop()); - observer3.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer3_updates.length, 1); - assert_in_array(observer3_updates[0].cpuUtilization, [0.375, 0.875], - 'cpuUtilization quantization'); - assert_in_array(observer3_updates[0].cpuSpeed, [0.125, 0.625], - 'cpuSpeed quantization'); - -}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_idempotent.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_idempotent.tentative.https.window.js deleted file mode 100644 index 785c55b..0000000 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_idempotent.tentative.https.window.js +++ /dev/null
@@ -1,59 +0,0 @@ -'use strict'; - -promise_test(async t => { - const observer1_updates = []; - const observer1 = new ComputePressureObserver( - update => { observer1_updates.push(update); }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer1.stop()); - // Ensure that observer1's schema gets registered before observer2 starts. - observer1.observe(); - observer1.stop(); - observer1.stop(); - - const observer2_updates = []; - await new Promise((resolve, reject) => { - const observer2 = new ComputePressureObserver( - update => { - observer2_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer2.stop()); - observer2.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer2_updates.length, 1); - assert_in_array(observer2_updates[0].cpuUtilization, [0.25, 0.75], - 'cpuUtilization quantization'); - assert_in_array(observer2_updates[0].cpuSpeed, [0.25, 0.75], - 'cpuSpeed quantization'); - - // Go through one more update cycle so any (incorrect) update for observer1 - // makes it through the IPC queues. - - const observer3_updates = []; - await new Promise((resolve, reject) => { - const observer3 = new ComputePressureObserver( - update => { - observer3_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); - t.add_cleanup(() => observer3.stop()); - observer3.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer3_updates.length, 1); - assert_in_array(observer3_updates[0].cpuUtilization, [0.375, 0.875], - 'cpuUtilization quantization'); - assert_in_array(observer3_updates[0].cpuSpeed, [0.125, 0.625], - 'cpuSpeed quantization'); - -}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_immediately.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_immediately.tentative.https.window.js deleted file mode 100644 index 0d9929c4..0000000 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_stop_immediately.tentative.https.window.js +++ /dev/null
@@ -1,58 +0,0 @@ -'use strict'; - -promise_test(async t => { - const observer1_updates = []; - const observer1 = new ComputePressureObserver( - update => { observer1_updates.push(update); }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer1.stop()); - // Ensure that observer1's schema gets registered before observer2 starts. - observer1.observe(); - observer1.stop(); - - const observer2_updates = []; - await new Promise((resolve, reject) => { - const observer2 = new ComputePressureObserver( - update => { - observer2_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.5], cpuSpeedThresholds: [0.5]}); - t.add_cleanup(() => observer2.stop()); - observer2.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer2_updates.length, 1); - assert_in_array(observer2_updates[0].cpuUtilization, [0.25, 0.75], - 'cpuUtilization quantization'); - assert_in_array(observer2_updates[0].cpuSpeed, [0.25, 0.75], - 'cpuSpeed quantization'); - - // Go through one more update cycle so any (incorrect) update for observer1 - // makes it through the IPC queues. - - const observer3_updates = []; - await new Promise((resolve, reject) => { - const observer3 = new ComputePressureObserver( - update => { - observer3_updates.push(update); - resolve(); - }, - {cpuUtilizationThresholds: [0.75], cpuSpeedThresholds: [0.25]}); - t.add_cleanup(() => observer3.stop()); - observer3.observe().catch(reject); - }); - - assert_equals(observer1_updates.length, 0, - 'stopped observers should not receive callbacks'); - - assert_equals(observer3_updates.length, 1); - assert_in_array(observer3_updates[0].cpuUtilization, [0.375, 0.875], - 'cpuUtilization quantization'); - assert_in_array(observer3_updates[0].cpuSpeed, [0.125, 0.625], - 'cpuSpeed quantization'); - -}, 'Stopped ComputePressureObservers do not receive updates');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window-expected.txt new file mode 100644 index 0000000..375f8f4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +PASS Calling takeRecords() before observe() +FAIL takeRecords() returns empty record after callback invoke assert_equals: No record available expected 0 but got 1 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window.js new file mode 100644 index 0000000..fdd21592 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_take_records.tentative.https.window.js
@@ -0,0 +1,28 @@ +'use strict'; + +test(t => { + const observer = new ComputePressureObserver( + t.unreached_func('This callback should not have been called.'), + {cpuUtilizationThresholds: [0.25], cpuSpeedThresholds: [0.75]}); + + const records = observer.takeRecords(); + assert_equals(records.length, 0, 'No record before observe'); +}, 'Calling takeRecords() before observe()'); + +promise_test(async t => { + let observer; + const record = await new Promise((resolve, reject) => { + observer = new ComputePressureObserver( + resolve, + {cpuUtilizationThresholds: [0.25], cpuSpeedThresholds: [0.75]}); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); + }); + + assert_in_array( + record.cpuUtilization, [0.125, 0.625], 'cpuUtilization quantization'); + assert_in_array(record.cpuSpeed, [0.375, 0.875], 'cpuSpeed quantization'); + + const records = observer.takeRecords(); + assert_equals(records.length, 0, 'No record available'); +}, 'takeRecords() returns empty record after callback invoke');
diff --git a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tenative.https.window.js b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tentative.https.window.js similarity index 74% rename from third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tenative.https.window.js rename to third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tentative.https.window.js index 837fa9d6..ebe384a 100644 --- a/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tenative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/compute-pressure/compute_pressure_values.tentative.https.window.js
@@ -8,11 +8,11 @@ const observer = new ComputePressureObserver( resolve, {cpuUtilizationThresholds: [0.25], cpuSpeedThresholds: [0.75]}); - t.add_cleanup(() => observer.stop()); - observer.observe().catch(reject); + t.add_cleanup(() => observer.disconnect()); + observer.observe('cpu').catch(reject); }); - assert_in_array(update.cpuUtilization, [0.125, 0.625], - 'cpuUtilization quantization'); + assert_in_array( + update.cpuUtilization, [0.125, 0.625], 'cpuUtilization quantization'); assert_in_array(update.cpuSpeed, [0.375, 0.875], 'cpuSpeed quantization'); }, 'ComputePressureObserver quantizes utilization and speed separately');
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-001.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-001.html new file mode 100644 index 0000000..b10d516 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-001.html
@@ -0,0 +1,10 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <div style="display: table-cell; background: green;"> + <div style="height: 70px; width: 50px; break-inside: avoid;"></div> + <div style="height: 100px; width: 50px; break-inside: avoid;"></div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-002.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-002.html new file mode 100644 index 0000000..6df44aa --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-002.html
@@ -0,0 +1,9 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <div style="display: table-cell; background: green; height: 200px;"> + <div style="width: 50px; height: 200%;"></div> + </div> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-003.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-003.html new file mode 100644 index 0000000..32e1201 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-003.html
@@ -0,0 +1,12 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <table style="border-spacing: 0;"> + <td style="background: green; padding: 0;" rowspan="2"> + <div style="height: 70px; width: 50px; break-inside: avoid;"></div> + <div style="height: 100px; width: 50px; break-inside: avoid;"></div> + </td> + </table> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-004.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-004.html new file mode 100644 index 0000000..2390e21 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-004.html
@@ -0,0 +1,21 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<style> +td { padding: 0; } +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <table style="border-spacing: 0;"> + <tr> + <td><div style="height: 180px;"></div></td> + <td style="background: green;" rowspan="2"> + <div style="height: 70px; width: 50px; break-inside: avoid;"></div> + <div style="height: 100px; width: 50px; break-inside: avoid;"></div> + </td> + </tr> + <tr> + <td></td> + </tr> + </table> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-005.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-005.html new file mode 100644 index 0000000..23fcc73 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-005.html
@@ -0,0 +1,21 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<style> +td { padding: 0; } +</style> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <table style="border-spacing: 0;"> + <tr> + <td><div style="height: 180px;"></div></td> + <td style="background: green;" rowspan="2"> + <div style="height: 70px; width: 50px; break-inside: avoid;"></div> + <div style="height: 100px; width: 50px; break-inside: avoid;"></div> + </td> + </tr> + <tr> + <td style="height: 20px;"></td> + </tr> + </table> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-006.html b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-006.html new file mode 100644 index 0000000..10286647 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/table/table-cell-expansion-006.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<link rel="help" href="https://drafts.csswg.org/css-tables-3/#fragmentation"> +<link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="columns: 2; gap: 0; column-fill: auto; height: 100px; width: 100px; background: red;"> + <table style="border-spacing: 0;"> + <td style="background: green; padding: 0; writing-mode: vertical-rl;"> + <div style="min-width: 100px; width: 200%; height: 100px;"></div> + </td> + </table> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt new file mode 100644 index 0000000..61813b8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL StorageKey: test 3P about:blank window opened from a 3P iframe assert_true: about:blank window opened by 3P iframe does not inherit 3P iframe's StorageKey expected true got false +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html new file mode 100644 index 0000000..de94fb2 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative.html
@@ -0,0 +1,75 @@ +<!doctype html> +<meta charset=utf-8> +<title>localStorage: about:blank partitioning</title> +<meta name=help href="https://privacycg.github.io/storage-partitioning/"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/common/get-host-info.sub.js"></script> +<script src="/webstorage/resources/partitioning-utils.js"></script> +<body> +<script> +const path = + "webstorage/resources/localstorage-about-blank-partitioned-win-open.html"; +const crossSiteURL = `${get_host_info().HTTP_NOTSAMESITE_ORIGIN}/${path}`; +const sameSiteURL = `${get_host_info().HTTP_ORIGIN}/${path}`; +let firstPartyID = getOrCreateID("userID3"); +let crossSiteIframeID; +let sameSiteIframeID; +let crossSiteIframe; +let crossSiteIframeAboutBlankID; +let frameMessageCount = 0; + +promise_test(async t => { + localStorage.clear(); + + // Step 1. Add a cross-site iframe + return addIframePromise(crossSiteURL).then(async crossSiteIframe => { + return new Promise(resolve => { + window.addEventListener("message", async e => { + const payload = { + command: "open about:blank window" + } + + if (e.data.message === "window loaded") { + // Step 2. cross-site iframe is loaded, capture reference to its ID + crossSiteIframeID = e.data.userID; + // Step 3. Ask the cross-site iframe to create an about:blank window + crossSiteIframe.contentWindow.postMessage(payload, e.origin); + } + + if (e.data.message === "about:blank frame ID") { + // Step 4. capture reference to 3P iframe's about:blank window ID + crossSiteIframeAboutBlankID = e.data.userID; + crossSiteIframe.contentWindow.postMessage( + {command: "close about:blank window"}, "*"); + } + + if (e.data.message === "about:blank window closed") { + resolve({crossSiteIframeID, crossSiteIframeAboutBlankID}); + } + }); + }).then(ids => { + const { + crossSiteIframeID, + crossSiteIframeAboutBlankID + } = ids; + // Step 5. Assert some things + for (let id in ids) { + assert_true(id !== undefined, "id is not undefined"); + } + // Note: we use assert_true, rather than assert_equals becuase we're + // setting random numbers as IDs - this would mean expectations + // files wouldn't work as intended. + assert_true(crossSiteIframeAboutBlankID !== crossSiteIframeID, + "about:blank window opened by 3P iframe does not inherit 3P iframe's StorageKey"); + assert_true(firstPartyID !== crossSiteIframeAboutBlankID, + "about:blank window open by 3P iframe does not inherit 1P StorageKey"); + + localStorage.clear(); + }) + }); + + +}, "StorageKey: test 3P about:blank window opened from a 3P iframe"); +</script> +</body>
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/localstorage-basic-partitioned.tentative.sub.html b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-basic-partitioned.tentative.sub.html index 39209eae..7ed49b1 100644 --- a/third_party/blink/web_tests/external/wpt/webstorage/localstorage-basic-partitioned.tentative.sub.html +++ b/third_party/blink/web_tests/external/wpt/webstorage/localstorage-basic-partitioned.tentative.sub.html
@@ -4,7 +4,7 @@ <meta name=help href="https://privacycg.github.io/storage-partitioning/"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> -<iframe id="shared-iframe" src="http://{{host}}:{{ports[http][0]}}/webstorage/resources/localstorage-basic-partitioned-iframe.html"></iframe> +<iframe id="shared-iframe" src="http://{{host}}:{{ports[http][0]}}/webstorage/resources/localstorage-about-blank-partitioned-iframe.html"></iframe> <body> <script> // Here's the set-up for this test:
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-basic-partitioned-iframe.html b/third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-about-blank-partitioned-iframe.html similarity index 100% rename from third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-basic-partitioned-iframe.html rename to third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-about-blank-partitioned-iframe.html
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-about-blank-partitioned-win-open.html b/third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-about-blank-partitioned-win-open.html new file mode 100644 index 0000000..90d3a43 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webstorage/resources/localstorage-about-blank-partitioned-win-open.html
@@ -0,0 +1,37 @@ +<!doctype html> +<meta charset="utf-8"> +<script src="./partitioning-utils.js"></script> +<script> +window.addEventListener("load", () => { + localStorage.clear(); + + const userID = getOrCreateID("userID4"); + const payload = { + message: "window loaded", + userID, + } + + let win = window.opener ? window.opener : window.parent; + win.postMessage(payload, "*"); +}); + +window.addEventListener("message", e => { + let win = window.opener ? parent.window.opener : window.parent; + + if (e.data.command == "open about:blank window") { + window.blankWindow = window.open("about:blank"); + const payload = { + message: "about:blank frame ID", + userID: window.blankWindow?.localStorage["userID4"], + } + + let win = window.opener ? parent.window.opener : window.parent; + win.postMessage(payload, "*"); + } + + if (e.data.command == "close about:blank window") { + window.blankWindow.close(); + win.postMessage({message: "about:blank window closed"}, "*"); + } +}); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/webstorage/resources/partitioning-utils.js b/third_party/blink/web_tests/external/wpt/webstorage/resources/partitioning-utils.js new file mode 100644 index 0000000..9d9e0b8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webstorage/resources/partitioning-utils.js
@@ -0,0 +1,20 @@ +function getOrCreateID(key) { + if (!localStorage.getItem(key)) { + const newID = +new Date() + "-" + Math.random(); + localStorage.setItem(key, newID); + } + return localStorage.getItem(key); +} + +function addIframePromise(url) { + return new Promise(resolve => { + const iframe = document.createElement("iframe"); + iframe.style.display = "none"; + iframe.src = url; + iframe.addEventListener("load", (e) => { + resolve(iframe); + }, {once: true}); + + document.body.appendChild(iframe); + }); +}
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 01977b2..e66cca32 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
@@ -12,7 +12,7 @@ 'use strict' test(t => { OriginTrialsHelper.check_properties_exist(this, { - 'ComputePressureObserver': ['observe', 'stop'], + 'ComputePressureObserver': ['observe', 'unobserve', 'disconnect', 'takeRecords'], }); }, 'Compute Pressure API interfaces and properties in Origin-Trial enabled document.'); test(t => {
diff --git a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/README.md b/third_party/blink/web_tests/virtual/layout_ng_flex_frag/README.md deleted file mode 100644 index 63c9564e..0000000 --- a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/README.md +++ /dev/null
@@ -1 +0,0 @@ -Testing LayoutNGFlexFragmentation; see ../../VirtualTestSuites
diff --git a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/README.txt b/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/README.txt deleted file mode 100644 index f7684ff..0000000 --- a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/flexbox/README.txt +++ /dev/null
@@ -1,3 +0,0 @@ - This suite runs the tests in external/wpt/css/css-break/flexbox with -# --enable-blink-features=LayoutNGFlexFragmentation. -# The LayoutNG project is described here: http://goo.gl/1hwhfX
diff --git a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/grid/README.txt b/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/grid/README.txt deleted file mode 100644 index 5570d77..0000000 --- a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/external/wpt/css/css-break/grid/README.txt +++ /dev/null
@@ -1,3 +0,0 @@ - This suite runs the tests in external/wpt/css/css-break/grid with -# --enable-blink-features=LayoutNGGridFragmentation. -# The LayoutNG project is described here: http://goo.gl/1hwhfX
diff --git a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/fast/multicol/flexbox/README.txt b/third_party/blink/web_tests/virtual/layout_ng_flex_frag/fast/multicol/flexbox/README.txt deleted file mode 100644 index 7fe99c2..0000000 --- a/third_party/blink/web_tests/virtual/layout_ng_flex_frag/fast/multicol/flexbox/README.txt +++ /dev/null
@@ -1,3 +0,0 @@ - This suite runs the tests in fast/multicol/flexbox with -# --enable-blink-features=LayoutNGFlexFragmentation. -# The LayoutNG project is described here: http://goo.gl/1hwhfX
diff --git a/third_party/blink/web_tests/virtual/third-party-storage-partitioning/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt b/third_party/blink/web_tests/virtual/third-party-storage-partitioning/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt new file mode 100644 index 0000000..ffff0cd23 --- /dev/null +++ b/third_party/blink/web_tests/virtual/third-party-storage-partitioning/external/wpt/webstorage/localstorage-about-blank-3P-iframe-opens-3P-window.partitioned.tentative-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +PASS StorageKey: test 3P about:blank window opened from a 3P iframe +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index 263f4c3..153ddda5 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -1254,8 +1254,10 @@ static getter supportedSources attribute @@toStringTag method constructor + method disconnect method observe - method stop + method takeRecords + method unobserve interface ComputedAccessibleNode attribute @@toStringTag getter atomic
diff --git a/third_party/breakpad/BUILD.gn b/third_party/breakpad/BUILD.gn index da663f2d..48defa6e 100644 --- a/third_party/breakpad/BUILD.gn +++ b/third_party/breakpad/BUILD.gn
@@ -79,7 +79,7 @@ # {micro,mini}dump_stackwalk and minidump_dump are tool-type executables # that do not build on Windows. if (!is_win) { - if (current_toolchain == host_toolchain) { + if (current_toolchain == host_toolchain || target_os == "mac") { # Contains the code shared by both {micro,mini}dump_stackwalk. static_library("stackwalk_common") { sources = [ @@ -279,7 +279,7 @@ # Mac -------------------------------------------------------------------------- if (is_mac) { - if (current_toolchain == host_toolchain) { + if (current_toolchain == host_toolchain || target_os != "ios") { source_set("common") { sources = [ "breakpad/src/common/dwarf/bytereader.cc",
diff --git a/third_party/wpt_tools/README.chromium b/third_party/wpt_tools/README.chromium index 7ed6365..858cdf1 100644 --- a/third_party/wpt_tools/README.chromium +++ b/third_party/wpt_tools/README.chromium
@@ -1,7 +1,7 @@ Name: web-platform-tests - Test Suites for Web Platform specifications Short Name: wpt URL: https://github.com/web-platform-tests/wpt/ -Version: b94dd9d75160c92f7e444458770e2586cf12d197 +Version: 87c66f4e4498996d2b1d9cd2e0cf9c0f0a3f6a3d License: LICENSES FOR W3C TEST SUITES (https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html) License File: NOT_SHIPPED Security Critical: no
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/requirements.txt b/third_party/wpt_tools/wpt/tools/wptrunner/requirements.txt index dea3bbaa..aa8fa7f 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/requirements.txt +++ b/third_party/wpt_tools/wpt/tools/wptrunner/requirements.txt
@@ -6,4 +6,4 @@ pillow==8.4.0 requests==2.27.1 six==1.16.0 -urllib3[secure]==1.26.9 +urllib3[secure]==1.26.8
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/base.py b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/base.py index 1ed4e2b4..618cdc2b 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/base.py +++ b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/browsers/base.py
@@ -362,13 +362,10 @@ self.logger.debug("Stopping WebDriver") clean = True if self.is_alive(): - # Pass a timeout value to mozprocess Processhandler.kill() - # to ensure it always returns within it. - # See https://bugzilla.mozilla.org/show_bug.cgi?id=1760080 - kill_result = self._proc.kill(timeout=5) + kill_result = self._proc.kill() if force and kill_result != 0: clean = False - self._proc.kill(9, timeout=5) + self._proc.kill(9) success = not self.is_alive() if success and self._output_handler is not None: # Only try to do output post-processing if we managed to shut down
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/chromium.py b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/chromium.py index f2f9a63..e86f333 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/chromium.py +++ b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/chromium.py
@@ -198,13 +198,10 @@ return expected_statuses def suite_start(self, data): - # |data| contains a timestamp in milliseconds, while time.time() gives + # |data| contains a timestamp in microseconds, while time.time() gives # it in seconds. - if self.start_timestamp_seconds is None: - if 'time' in data: - self.start_timestamp_seconds = float(data["time"]) / 1000 - else: - self.start_timestamp_seconds = time.time() + self.start_timestamp_seconds = (float(data["time"]) / 1000 if "time" in data + else time.time()) def test_status(self, data): test_name = data["test"] @@ -260,7 +257,7 @@ # New test, new browser logs. self.browser_log = [] - def shutdown(self, data): + def suite_end(self, data): # Create the final result dictionary final_result = { # There are some required fields that we just hard-code.
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/tests/test_chromium.py b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/tests/test_chromium.py index 14e0788a..53d64df7 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/tests/test_chromium.py +++ b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/formatters/tests/test_chromium.py
@@ -4,31 +4,17 @@ from io import StringIO from mozlog import handlers, structuredlog -import pytest sys.path.insert(0, join(dirname(__file__), "..", "..")) from formatters.chromium import ChromiumFormatter -@pytest.fixture -def logger(): - test_logger = structuredlog.StructuredLogger("test_a") - try: - yield test_logger - finally: - # Loggers of the same name share state globally: - # https://searchfox.org/mozilla-central/rev/1c54648c082efdeb08cf6a5e3a8187e83f7549b9/testing/mozbase/mozlog/mozlog/structuredlog.py#195-196 - # - # Resetting the state here ensures the logger will not be shut down in - # the next test. - test_logger.reset_state() - - -def test_chromium_required_fields(logger, capfd): +def test_chromium_required_fields(capfd): # Test that the test results contain a handful of required fields. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # output a bunch of stuff @@ -36,7 +22,6 @@ logger.test_start("test-id-1") logger.test_end("test-id-1", status="PASS", expected="PASS") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -60,12 +45,13 @@ assert "expected" in test_obj -def test_chromium_test_name_trie(logger, capfd): +def test_chromium_test_name_trie(capfd): # Ensure test names are broken into directories and stored in a trie with # test results at the leaves. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # output a bunch of stuff @@ -76,7 +62,6 @@ logger.test_start("/foo/test-id-2") logger.test_end("/foo/test-id-2", status="ERROR", expected="TIMEOUT") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -100,11 +85,12 @@ assert test_obj["expected"] == "TIMEOUT" -def test_num_failures_by_type(logger, capfd): +def test_num_failures_by_type(capfd): # Test that the number of failures by status type is correctly calculated. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run some tests with different statuses: 3 passes, 1 timeout @@ -118,7 +104,6 @@ logger.test_start("t4") logger.test_end("t4", status="TIMEOUT", expected="CRASH") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -136,11 +121,12 @@ assert num_failures_by_type["TIMEOUT"] == 1 -def test_subtest_messages(logger, capfd): +def test_subtest_messages(capfd): # Tests accumulation of test output # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run two tests with subtest messages. The subtest name should be included @@ -159,7 +145,6 @@ logger.test_end("t2", status="TIMEOUT", expected="PASS", message="t2_message") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -193,11 +178,12 @@ assert "wpt_subtest_failure" not in t2_artifacts.keys() -def test_subtest_failure(logger, capfd): +def test_subtest_failure(capfd): # Tests that a test fails if a subtest fails # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") formatter = ChromiumFormatter() logger.add_handler(handlers.StreamHandler(output, formatter)) @@ -218,7 +204,6 @@ # run the test to completion. logger.test_end("t1", status="PASS", expected="PASS", message="top_message") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -255,11 +240,12 @@ assert "t1" not in formatter.tests_with_subtest_fails -def test_expected_subtest_failure(logger, capfd): +def test_expected_subtest_failure(capfd): # Tests that an expected subtest failure does not cause the test to fail # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") formatter = ChromiumFormatter() logger.add_handler(handlers.StreamHandler(output, formatter)) @@ -281,7 +267,6 @@ # run the test to completion. logger.test_end("t1", status="OK", expected="OK") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -311,11 +296,12 @@ assert test_obj["expected"] == "PASS" -def test_unexpected_subtest_pass(logger, capfd): +def test_unexpected_subtest_pass(capfd): # A subtest that unexpectedly passes is considered a failure condition. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") formatter = ChromiumFormatter() logger.add_handler(handlers.StreamHandler(output, formatter)) @@ -333,7 +319,6 @@ # run the test to completion. logger.test_end("t1", status="PASS", expected="PASS") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -364,11 +349,12 @@ assert "t1" not in formatter.tests_with_subtest_fails -def test_expected_test_fail(logger, capfd): +def test_expected_test_fail(capfd): # Check that an expected test-level failure is treated as a Pass # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run some tests with different statuses: 3 passes, 1 timeout @@ -376,7 +362,6 @@ logger.test_start("t1") logger.test_end("t1", status="ERROR", expected="ERROR") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -397,12 +382,13 @@ assert "is_unexpected" not in test_obj -def test_unexpected_test_fail(logger, capfd): +def test_unexpected_test_fail(capfd): # Check that an unexpected test-level failure is marked as unexpected and # as a regression. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run some tests with different statuses: 3 passes, 1 timeout @@ -410,7 +396,6 @@ logger.test_start("t1") logger.test_end("t1", status="ERROR", expected="OK") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -432,12 +417,13 @@ assert test_obj["is_unexpected"] is True -def test_flaky_test_expected(logger, capfd): +def test_flaky_test_expected(capfd): # Check that a flaky test with multiple possible statuses is seen as # expected if its actual status is one of the possible ones. # set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run a test that is known to be flaky @@ -445,7 +431,6 @@ logger.test_start("t1") logger.test_end("t1", status="ERROR", expected="OK", known_intermittent=["ERROR", "TIMEOUT"]) logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -468,12 +453,13 @@ assert "is_unexpected" not in test_obj -def test_flaky_test_unexpected(logger, capfd): +def test_flaky_test_unexpected(capfd): # Check that a flaky test with multiple possible statuses is seen as # unexpected if its actual status is NOT one of the possible ones. # set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run a test that is known to be flaky @@ -481,7 +467,6 @@ logger.test_start("t1") logger.test_end("t1", status="ERROR", expected="OK", known_intermittent=["TIMEOUT"]) logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -504,11 +489,12 @@ assert test_obj["is_unexpected"] is True -def test_precondition_failed(logger, capfd): +def test_precondition_failed(capfd): # Check that a failed precondition gets properly handled. # set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run a test with a precondition failure @@ -516,7 +502,6 @@ logger.test_start("t1") logger.test_end("t1", status="PRECONDITION_FAILED", expected="OK") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -538,49 +523,13 @@ assert test_obj["is_unexpected"] is True -def test_repeated_runs(logger, capfd): - # Check that the logger outputs one report after multiple test suite runs. - - # Set up the handler. - output = StringIO() - logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) - - # Run a test suite for the first time. - logger.suite_start(["t1"], run_info={}, time=123) - logger.test_start("t1") - logger.test_end("t1", status="PASS", expected="PASS", known_intermittent=[]) - logger.suite_end() - - # Run the test suite for the second time. - logger.suite_start(["t1"], run_info={}, time=456) - logger.test_start("t1") - logger.test_end("t1", status="FAIL", expected="PASS", known_intermittent=[]) - logger.suite_end() - - logger.shutdown() - - # check nothing got output to stdout/stderr - # (note that mozlog outputs exceptions during handling to stderr!) - captured = capfd.readouterr() - assert captured.out == "" - assert captured.err == "" - - # check the actual output of the formatter - output.seek(0) - output_json = json.load(output) - - # The latest status (FAIL) replaces the earlier one (PASS). - test_obj = output_json["tests"]["t1"] - assert test_obj["actual"] == "FAIL" - assert test_obj["expected"] == "PASS" - - -def test_known_intermittent_empty(logger, capfd): +def test_known_intermittent_empty(capfd): # If the known_intermittent list is empty, we want to ensure we don't append # any extraneous characters to the output. # set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run a test and include an empty known_intermittent list @@ -588,7 +537,6 @@ logger.test_start("t1") logger.test_end("t1", status="OK", expected="OK", known_intermittent=[]) logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -607,11 +555,12 @@ assert test_obj["expected"] == "PASS" -def test_known_intermittent_duplicate(logger, capfd): +def test_known_intermittent_duplicate(capfd): # We don't want to have duplicate statuses in the final "expected" field. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # There are two duplications in this input: @@ -622,7 +571,6 @@ logger.test_start("t1") logger.test_end("t1", status="ERROR", expected="ERROR", known_intermittent=["FAIL", "ERROR"]) logger.suite_end() - logger.shutdown() # Check nothing got output to stdout/stderr. # (Note that mozlog outputs exceptions during handling to stderr!) @@ -640,11 +588,12 @@ assert test_obj["expected"] == "FAIL" -def test_reftest_screenshots(logger, capfd): +def test_reftest_screenshots(capfd): # reftest_screenshots, if present, should be plumbed into artifacts. # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) # Run a reftest with reftest_screenshots. @@ -658,7 +607,6 @@ ] }) logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!) @@ -677,11 +625,12 @@ ] -def test_process_output_crashing_test(logger, capfd): +def test_process_output_crashing_test(capfd): """Test that chromedriver logs are preserved for crashing tests""" # Set up the handler. output = StringIO() + logger = structuredlog.StructuredLogger("test_a") logger.add_handler(handlers.StreamHandler(output, ChromiumFormatter())) logger.suite_start(["t1", "t2", "t3"], run_info={}, time=123) @@ -703,7 +652,6 @@ logger.test_end("t3", status="FAIL", expected="PASS") logger.suite_end() - logger.shutdown() # check nothing got output to stdout/stderr # (note that mozlog outputs exceptions during handling to stderr!)
diff --git a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/wptrunner.py b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/wptrunner.py index f7fa8809..40674cc6 100644 --- a/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/wptrunner.py +++ b/third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/wptrunner.py
@@ -466,7 +466,6 @@ else: rv = not run_tests(**kwargs)[0] or logged_critical.has_log finally: - logger.shutdown() logger.remove_handler(handler) return rv
diff --git a/third_party/zlib/contrib/tests/infcover.cc b/third_party/zlib/contrib/tests/infcover.cc index c5300a5..16dd744 100644 --- a/third_party/zlib/contrib/tests/infcover.cc +++ b/third_party/zlib/contrib/tests/infcover.cc
@@ -395,7 +395,9 @@ mem_setup(&strm); strm.avail_in = 0; strm.next_in = Z_NULL; - ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream)); + char versioncpy[] = ZLIB_VERSION; + versioncpy[0] -= 1; + ret = inflateInit_(&strm, versioncpy, (int)sizeof(z_stream)); assert(ret == Z_VERSION_ERROR); mem_done(&strm, "wrong version");
diff --git a/third_party/zlib/patches/0009-infcover-oob.patch b/third_party/zlib/patches/0009-infcover-oob.patch new file mode 100644 index 0000000..648360f3 --- /dev/null +++ b/third_party/zlib/patches/0009-infcover-oob.patch
@@ -0,0 +1,24 @@ +From 75690b2683667be5535ac6243438115dc9c40f6a Mon Sep 17 00:00:00 2001 +From: Florian Mayer <fmayer@google.com> +Date: Wed, 16 Mar 2022 16:38:36 -0700 +Subject: [PATCH] Fix out of bounds in infcover.c. + +--- + test/infcover.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/test/infcover.c b/test/infcover.c +index 2be01646c..a6d83693c 100644 +--- a/test/infcover.c ++++ b/test/infcover.c +@@ -373,7 +373,9 @@ local void cover_support(void) + mem_setup(&strm); + strm.avail_in = 0; + strm.next_in = Z_NULL; +- ret = inflateInit_(&strm, ZLIB_VERSION - 1, (int)sizeof(z_stream)); ++ char versioncpy[] = ZLIB_VERSION; ++ versioncpy[0] -= 1; ++ ret = inflateInit_(&strm, versioncpy, (int)sizeof(z_stream)); + assert(ret == Z_VERSION_ERROR); + mem_done(&strm, "wrong version"); +
diff --git a/tools/code_coverage/create_js_source_maps/OWNERS b/tools/code_coverage/create_js_source_maps/OWNERS new file mode 100644 index 0000000..1d7635e --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/OWNERS
@@ -0,0 +1,3 @@ +benreich@chromium.org +iby@chromium.org +tiborg@chromium.org
diff --git a/tools/code_coverage/create_js_source_maps/PRESUBMIT.py b/tools/code_coverage/create_js_source_maps/PRESUBMIT.py new file mode 100644 index 0000000..c4d5f23 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/PRESUBMIT.py
@@ -0,0 +1,38 @@ +# Copyright 2022 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +"""create_js_source_maps presubmit script. + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for +details on the presubmit API built into gcl. +""" +USE_PYTHON3 = True +PRESUBMIT_VERSION = '2.0.0' + + +def CheckLint(input_api, output_api): + results = input_api.canned_checks.RunPylint(input_api, output_api) + results += input_api.canned_checks.CheckPatchFormatted(input_api, + output_api, + check_js=True) + try: + import sys + old_sys_path = sys.path[:] + cwd = input_api.PresubmitLocalPath() + sys.path += [input_api.os_path.join(cwd, '..', '..')] + from web_dev_style import presubmit_support + results += presubmit_support.CheckStyleESLint(input_api, output_api) + finally: + sys.path = old_sys_path + return results + + +def CheckUnittests(input_api, output_api): + results = input_api.canned_checks.RunUnitTests( + input_api, + output_api, [ + input_api.os_path.join(input_api.PresubmitLocalPath(), 'test', + 'create_js_source_maps_test.py') + ], + run_on_python2=False) + return results
diff --git a/tools/code_coverage/create_js_source_maps/create_js_source_maps.gni b/tools/code_coverage/create_js_source_maps/create_js_source_maps.gni new file mode 100644 index 0000000..8beaac3 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/create_js_source_maps.gni
@@ -0,0 +1,30 @@ +# Copyright 2022 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# NOTE: The "create_js_source_maps" build rule must come after the +# "preprocess_if_expr" build rule(s) in the BUILD.gn file. If you are getting +# "Target not found in this context" errors, check that the deps +# names are correct and that they are defined earlier in the same BUILD.gn file. +template("create_js_source_maps") { + action_foreach(target_name) { + script = + "//tools/code_coverage/create_js_source_maps/create_js_source_maps.py" + args = [] + inputs = [ + "//tools/code_coverage/create_js_source_maps/create_js_source_maps.js", + ] + sources = [] + deps = invoker.deps + foreach(dependency, deps) { + foreach(preprocess_output, get_target_outputs(dependency)) { + if (get_path_info(preprocess_output, "extension") == "ts" || + get_path_info(preprocess_output, "extension") == "js") { + sources += [ preprocess_output ] + } + } + } + outputs = [ "$target_gen_dir/{{source}}.map" ] + args = [ "{{source}}" ] + } +}
diff --git a/tools/code_coverage/create_js_source_maps/create_js_source_maps.js b/tools/code_coverage/create_js_source_maps/create_js_source_maps.js new file mode 100644 index 0000000..768fecc7 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/create_js_source_maps.js
@@ -0,0 +1,109 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/** + * @fileoverview A simple wrapper around mozilla/source-map. Scans a file + * processed by preprocess_if_expr.py looking for erasure comments. It creates + * a sourcemap mapping the post-processed TypeScript or JavaScript back to the + * original TypeScript or JavaScript. + */ + +import fs from 'fs'; +import path from 'path'; + +import {ArgumentParser} from '../../../third_party/js_code_coverage/node_modules/argparse/argparse.js'; +import {SourceMapGenerator} from '../../../third_party/js_code_coverage/node_modules/source-map/source-map.js'; + +// Regex matching the comment indicating that preprocess_if_expr removed lines. +// The capture group contains the number of lines removed. Must match the +// comment added by tools/grit/grit/format/html_inline.py +const GRIT_REMOVED_LINES_REGEX = /grit-removed-lines:(\d+)/g; + +/** + * Adds a mapping for a line. We only map lines, not columns -- we don't have + * enough information to map columns within a line. (And the usual usage of + * preprocess_if_expr means we don't expect to see partial line removals with + * code after the removal.) + * + * @param {SourceMapGenerator} map The SourceMapGenerator. + * @param {string} sourceFileName The name of the original file. + * @param {number} originalLine The current line in the original source file. + * @param {number} generatedLine The current line in the generated (processed) + * source file. + * @param {boolean} verbose If true, print detailed information about the + * mappings as they are added. + */ +function addMapping(map, sourceFileName, originalLine, generatedLine, verbose) { + const mapping = { + source: sourceFileName, + original: { + line: originalLine, + column: 0, + }, + generated: { + line: generatedLine, + column: 0, + }, + }; + if (verbose) { + console.log(mapping); + } + map.addMapping(mapping); +} + +/** + * Processes one processed TypeScript or JavaScript file and produces one + * source map file. + * + * @param {string} inputFileName The TypeScript or JavaScript file to read from. + * @param {boolean} verbose If true, print detailed information about the + * mappings as they are added. + */ +function processOneFile(inputFileName, verbose) { + const inputFile = fs.readFileSync(inputFileName, 'utf8'); + const inputLines = inputFile.split('\n'); + const inputFileBaseName = path.basename(inputFileName); + const map = new SourceMapGenerator(); + + let originalLine = 0; + let generatedLine = 0; + + for (const line of inputLines) { + generatedLine++; + originalLine++; + + // Add to sourcemap before looking for removal comments. The beginning of + // the generated line came from the parts before the removal comment. + addMapping(map, inputFileBaseName, originalLine, generatedLine, verbose); + + for (const removal of line.matchAll(GRIT_REMOVED_LINES_REGEX)) { + const removedLines = Number.parseInt(removal[1], 10); + if (verbose) { + console.log(`Found grit-removed-lines:${removedLines} on line ${ + generatedLine}`); + } + originalLine += removedLines; + } + } + + fs.writeFileSync(inputFileName + '.map', map.toString()); +} + +function main() { + const parser = new ArgumentParser({ + description: + 'Creates source maps for files preprocessed by preprocess_if_expr' + }); + + parser.addArgument( + ['-v', '--verbose'], + {help: 'Print each mapping & removed-line comment', action: 'storeTrue'}); + parser.addArgument('input', {help: 'Input file name', action: 'store'}); + + const argv = parser.parseArgs(); + + processOneFile(argv.input, argv.verbose); +} + +main();
diff --git a/tools/code_coverage/create_js_source_maps/create_js_source_maps.py b/tools/code_coverage/create_js_source_maps/create_js_source_maps.py new file mode 100755 index 0000000..8f861453 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/create_js_source_maps.py
@@ -0,0 +1,20 @@ +#!/usr/bin/env vpython3 +# Copyright 2022 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import sys +from pathlib import Path + +_HERE_DIR = Path(__file__).parent +_SOURCE_MAP_CREATOR = (_HERE_DIR / 'create_js_source_maps.js').resolve() + +_NODE_PATH = (_HERE_DIR.parent.parent.parent / 'third_party' / 'node').resolve() +sys.path.append(str(_NODE_PATH)) +import node + +# Invokes "node create_js_source_maps.js (args)"" +# We can't use third_party/node/node.py directly from the gni template because +# we don't have a good way to specify the path to create_js_source_maps.js in a +# gni template. +node.RunNode([str(_SOURCE_MAP_CREATOR)] + sys.argv[1:])
diff --git a/tools/code_coverage/create_js_source_maps/package.json b/tools/code_coverage/create_js_source_maps/package.json new file mode 100644 index 0000000..25612e0 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/package.json
@@ -0,0 +1,9 @@ +{ + "name": "create_js_source_maps", + "version": "0.1", + "description": "Create JavaScript source maps after preprocess_if_expr", + "main": "create_js_source_maps.js", + "files": [ "create_js_source_maps.js" ], + "license": "SEE LICENSE IN ../../../LICENSE", + "type" : "module" +}
diff --git a/tools/code_coverage/create_js_source_maps/test/create_js_source_maps_test.py b/tools/code_coverage/create_js_source_maps/test/create_js_source_maps_test.py new file mode 100755 index 0000000..c02e0325 --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/test/create_js_source_maps_test.py
@@ -0,0 +1,114 @@ +#!/usr/bin/env vpython3 +# Copyright 2022 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import json +import os +import shutil +import sys +import tempfile +import unittest + +from pathlib import Path + +_HERE_DIR = Path(__file__).parent.resolve() +_SOURCE_MAP_PROCESSOR = (_HERE_DIR.parent / + 'create_js_source_maps.js').resolve() +_SOURCE_MAP_TRANSLATOR = (_HERE_DIR / 'translate_source_map.js').resolve() + +_NODE_PATH = (_HERE_DIR.parent.parent.parent.parent / 'third_party' / + 'node').resolve() +sys.path.append(str(_NODE_PATH)) +import node + + +class CreateSourceMapsTest(unittest.TestCase): + def setUp(self): + self._out_folder = None + + def tearDown(self): + if self._out_folder: + shutil.rmtree(self._out_folder) + + def _translate(self, source_map, line, column): + """ Translates from post-transform to pre-transform using a source map. + + Translates a line and column in some hypothetical processed JavaScript + back into the hypothetical original line and column using the indicated + source map. Returns the pre-processed line and column. + """ + stdout = node.RunNode([ + str(_SOURCE_MAP_TRANSLATOR), "--source_map", source_map, "--line", + str(line), "--column", + str(column) + ]) + result = json.loads(stdout) + assert isinstance(result['line'], int) + assert isinstance(result['column'], int) + return result['line'], result['column'] + + def testPostProcessedFile(self): + ''' Test that a known starting file translates back correctly + + Assume we start with the following file: + Line 1 + // <if expr="foo"> Line 2 + Line 3 deleted + // Line 4 </if> + Line 5 + // <if expr="bar"> Line 6 + Line 7 deleted + Line 8 deleted + // Line 9 </if> + Line 10 + Line 11 + + Make sure we can map the various non-deleted lines back to their correct + locations. + ''' + assert not self._out_folder + self._out_folder = tempfile.mkdtemp(dir=_HERE_DIR) + + file_after_preprocess = b'''Line 1 + // /*grit-removed-lines:2*/ + Line 5 + // /*grit-removed-lines:3*/ + Line 10 + Line 11 + ''' + input_fd, input_file_name = tempfile.mkstemp(dir=self._out_folder, + text=True, + suffix=".js") + os.write(input_fd, file_after_preprocess) + os.close(input_fd) + node.RunNode([str(_SOURCE_MAP_PROCESSOR), input_file_name]) + map_path = input_file_name + ".map" + + # Check mappings: + # Line 1 is before any removed lines, so it still maps to line 1 + line, column = self._translate(map_path, 1, 2) + self.assertEqual(line, 1) + # Column number always snaps back to the column number of the most recent + # mapping point, so it's zero not the correct column number. This seems to + # be a limitation of the sourcemap format. + self.assertEqual(column, 0) + + # Original line 5 ends up on translated line 3 + line, column = self._translate(map_path, 3, 2) + self.assertEqual(line, 5) + self.assertEqual(column, 0) + + # Original line 10 ends up on line 5 + line, column = self._translate(map_path, 5, 2) + self.assertEqual(line, 10) + self.assertEqual(column, 0) + + # Original line 11 ends up on line 6 + line, column = self._translate(map_path, 6, 2) + self.assertEqual(line, 11) + self.assertEqual(column, 0) + + +if __name__ == '__main__': + unittest.main()
diff --git a/tools/code_coverage/create_js_source_maps/test/translate_source_map.js b/tools/code_coverage/create_js_source_maps/test/translate_source_map.js new file mode 100644 index 0000000..9a3d41f --- /dev/null +++ b/tools/code_coverage/create_js_source_maps/test/translate_source_map.js
@@ -0,0 +1,47 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/** + * @fileoverview A simple wrapper around mozilla/source-map. Takes a source map + * and a location in the post-processed file and prints the corresponding + * location in the pre-processing file. + * + * Helper for create_js_source_maps_test.py. + */ +import fs from 'fs'; + +import {SourceMapConsumer} from '../../../../third_party/js_code_coverage/node_modules/source-map/source-map.js'; +// TODO(crbug.com/1307980): Move argparse to the js_code_coverage library. +import {ArgumentParser} from '../../../../third_party/node/node_modules/argparse/index.js'; + +const parser = new ArgumentParser({ + description: 'Applies a JavaScript sourcemap to a line and column number' +}); + +parser.addArgument( + '--source_map', + {help: 'Source map to use for translation', required: true}); +parser.addArgument( + '--line', + {help: 'Line number in post-processed file', type: 'int', required: true}); +parser.addArgument('--column', { + help: 'Column number in post-processed file', + type: 'int', + required: true +}); + +const argv = parser.parseArgs(); + + +const sourceMap = JSON.parse(fs.readFileSync(argv.source_map)); +// Async function to get around "Cannot use keyword 'await' outside an async +// function" complaint in ESLint. Our version of node would allow us to use +// 'await' at the top level, but our version of ESLint fails. +(async function() { + const consumer = await new SourceMapConsumer(sourceMap); + const result = + consumer.originalPositionFor({line: argv.line, column: argv.column}); + console.log(JSON.stringify(result)); + consumer.destroy(); +}());
diff --git a/tools/grit/preprocess_if_expr.gni b/tools/grit/preprocess_if_expr.gni index b00e516..7d59819 100644 --- a/tools/grit/preprocess_if_expr.gni +++ b/tools/grit/preprocess_if_expr.gni
@@ -46,5 +46,10 @@ ] outputs += [ invoker.out_manifest ] } + + if (defined(invoker.enable_removal_comments) && + invoker.enable_removal_comments) { + args += [ "--enable_removal_comments" ] + } } }
diff --git a/tools/grit/preprocess_if_expr.py b/tools/grit/preprocess_if_expr.py index 1d069bb..60efde9 100644 --- a/tools/grit/preprocess_if_expr.py +++ b/tools/grit/preprocess_if_expr.py
@@ -21,8 +21,9 @@ def __init__(self): super(PreprocessIfExprNode, self).__init__() - def PreprocessIfExpr(self, content): - return grit.format.html_inline.CheckConditionalElements(self, content) + def PreprocessIfExpr(self, content, removal_comments_extension): + return grit.format.html_inline.CheckConditionalElements( + self, content, removal_comments_extension) def EvaluateCondition(self, expr): return grit.node.base.Node.EvaluateExpression(expr, self.defines, @@ -57,6 +58,21 @@ return defines +def ExtensionForComments(input_file): + """Get the file extension that determines the comment style. + + Returns the file extension that determines the format of the + 'grit-removed-lines' comments. '.ts' or '.js' will produce '/*...*/'-style + comments, '.html; will produce '<!-- -->'-style comments. + """ + split = os.path.splitext(input_file) + extension = split[1] + # .html.ts and .html.js files should still use HTML comments. + if os.path.splitext(split[0])[1] == '.html': + extension = '.html' + return extension + + def main(argv): parser = argparse.ArgumentParser() parser.add_argument('--in-folder', required=True) @@ -66,6 +82,7 @@ parser.add_argument('-D', '--defines', nargs="*", action='append') parser.add_argument('-E', '--environment') parser.add_argument('-t', '--target') + parser.add_argument('--enable_removal_comments', action='store_true') args = parser.parse_args(argv) in_folder = os.path.normpath(os.path.join(_CWD, args.in_folder)) @@ -81,8 +98,12 @@ with io.open(in_path, encoding='utf-8', mode='r') as f: content = f.read() + removal_comments_extension = None # None means no removal comments + if args.enable_removal_comments: + removal_comments_extension = ExtensionForComments(input_file) + try: - preprocessed = node.PreprocessIfExpr(content) + preprocessed = node.PreprocessIfExpr(content, removal_comments_extension) except: raise Exception('Error processing %s' % in_path) out_path = os.path.join(out_folder, input_file)
diff --git a/tools/grit/preprocess_if_expr_test.py b/tools/grit/preprocess_if_expr_test.py index 8ef803f..dbe866b 100644 --- a/tools/grit/preprocess_if_expr_test.py +++ b/tools/grit/preprocess_if_expr_test.py
@@ -25,7 +25,7 @@ with open(os.path.join(self._out_folder, file_name), 'r') as f: return f.read() - def _run_test(self, defines, file_name): + def _run_test(self, additional_options, file_name, expected_file_name): assert not self._out_folder self._out_folder = tempfile.mkdtemp(dir=_HERE_DIR) preprocess_if_expr.main([ @@ -35,15 +35,39 @@ self._out_folder, '--in-files', file_name, - ] + defines) + ] + additional_options) + actual = self._read_out_file(file_name) + with open(os.path.join(_HERE_DIR, 'preprocess_tests', expected_file_name), + 'r') as f: + expected = f.read() + self.assertMultiLineEqual(expected, actual) def testPreprocess(self): - self._run_test(['-D', 'foo', '-D', 'bar'], 'test_with_ifexpr.js') - actual = self._read_out_file('test_with_ifexpr.js') - self.assertIn('I should be included in HTML', actual) - self.assertIn('I should be included in JS', actual) - self.assertNotIn('I should be excluded from HTML', actual) - self.assertNotIn('I should be excluded from JS', actual) + self._run_test(['-D', 'foo', '-D', 'bar'], 'test_with_ifexpr.js', + 'test_with_ifexpr_expected.js') + + def testPreprocessWithComments(self): + self._run_test(['-D', 'foo', '-D', 'bar', '--enable_removal_comments'], + 'test_with_ifexpr.js', + 'test_with_ifexpr_expected_comments.js') + + def testPreprocessTypescriptWithComments(self): + self._run_test(['-D', 'foo', '-D', 'bar', '--enable_removal_comments'], + 'test_with_ifexpr.ts', 'test_with_ifexpr_expected.ts') + + def testPreprocessHtmlWithComments(self): + self._run_test(['-D', 'foo', '--enable_removal_comments'], + 'test_with_ifexpr.html', 'test_with_ifexpr_expected.html') + + def testPreprocessJavaScriptHtmlTemplateWithComments(self): + self._run_test(['-D', 'foo', '--enable_removal_comments'], + 'test_with_ifexpr.html.js', + 'test_with_ifexpr_expected.html.js') + + def testPreprocessTypeScriptHtmlTemplateWithComments(self): + self._run_test(['-D', 'foo', '--enable_removal_comments'], + 'test_with_ifexpr.html.ts', + 'test_with_ifexpr_expected.html.ts') if __name__ == '__main__':
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr.html b/tools/grit/preprocess_tests/test_with_ifexpr.html new file mode 100644 index 0000000..2f4daff --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr.html
@@ -0,0 +1,16 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +</head> +<body> +Always present text +<if expr="foo"> +Text for foo only +</if> +<if expr="orange"> +Text for orange only +</if> +More text for everyone +</body> +</html>
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr.html.js b/tools/grit/preprocess_tests/test_with_ifexpr.html.js new file mode 100644 index 0000000..0beeec30 --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr.html.js
@@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function getTemplate() { + return `<!--_html_template_start_--><html> + <head> + <meta charset="utf-8"> + </head> + <body> + Always present text + <if expr="foo"> + Text for foo only + </if> + <if expr="bar"> + Text for bar only + </if> + More text for everyone + </body> + </html><!--_html_template_end_-->`; +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr.html.ts b/tools/grit/preprocess_tests/test_with_ifexpr.html.ts new file mode 100644 index 0000000..4c2ba2c --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr.html.ts
@@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +export function getTemplate() { + return `<!--_html_template_start_--><html> + <head> + <meta charset="utf-8"> + </head> + <body> + Always present text + <if expr="foo"> + Text for foo only + </if> + <if expr="bar"> + Text for bar only + </if> + More text for everyone + </body> + </html><!--_html_template_end_-->`; +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr.js b/tools/grit/preprocess_tests/test_with_ifexpr.js index f4da4a6..dd377c9 100644 --- a/tools/grit/preprocess_tests/test_with_ifexpr.js +++ b/tools/grit/preprocess_tests/test_with_ifexpr.js
@@ -1,3 +1,7 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + Polymer({ is: 'cr-foo', @@ -13,6 +17,7 @@ onClick_() { // <if expr="orange"> console.log('I should be excluded from JS'); + console.log('I also should be excluded'); // </if> // <if expr="foo"> console.log('I should be included in JS');
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr.ts b/tools/grit/preprocess_tests/test_with_ifexpr.ts new file mode 100644 index 0000000..2d12e4a --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr.ts
@@ -0,0 +1,13 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +export function clickHandler() { + // <if expr="orange"> + console.log('I should be excluded from TS'); + console.log('I also should be excluded'); + // </if> + // <if expr="foo"> + console.log('I should be included in TS'); + // </if> +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected.html b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html new file mode 100644 index 0000000..31ed024 --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html
@@ -0,0 +1,14 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +</head> +<body> +Always present text + +Text for foo only + +<!--grit-removed-lines:2--> +More text for everyone +</body> +</html>
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.js b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.js new file mode 100644 index 0000000..1abae5d3 --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.js
@@ -0,0 +1,19 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +function getTemplate() { + return `<!--_html_template_start_--><html> + <head> + <meta charset="utf-8"> + </head> + <body> + Always present text + + Text for foo only + + <!--grit-removed-lines:2--> + More text for everyone + </body> + </html><!--_html_template_end_-->`; +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.ts b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.ts new file mode 100644 index 0000000..95529fdf --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected.html.ts
@@ -0,0 +1,19 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +export function getTemplate() { + return `<!--_html_template_start_--><html> + <head> + <meta charset="utf-8"> + </head> + <body> + Always present text + + Text for foo only + + <!--grit-removed-lines:2--> + More text for everyone + </body> + </html><!--_html_template_end_-->`; +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected.js b/tools/grit/preprocess_tests/test_with_ifexpr_expected.js new file mode 100644 index 0000000..621208c --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected.js
@@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +Polymer({ + is: 'cr-foo', + + _template: html` + + <button on-click="onClick_">I should be included in HTML</button> + + + `, + + onClick_() { + // + // + console.log('I should be included in JS'); + // + } +});
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected.ts b/tools/grit/preprocess_tests/test_with_ifexpr_expected.ts new file mode 100644 index 0000000..657438cf --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected.ts
@@ -0,0 +1,10 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +export function clickHandler() { + // /*grit-removed-lines:3*/ + // + console.log('I should be included in TS'); + // +}
diff --git a/tools/grit/preprocess_tests/test_with_ifexpr_expected_comments.js b/tools/grit/preprocess_tests/test_with_ifexpr_expected_comments.js new file mode 100644 index 0000000..e29b2ec --- /dev/null +++ b/tools/grit/preprocess_tests/test_with_ifexpr_expected_comments.js
@@ -0,0 +1,21 @@ +// Copyright 2022 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +Polymer({ + is: 'cr-foo', + + _template: html` + + <button on-click="onClick_">I should be included in HTML</button> + + /*grit-removed-lines:2*/ + `, + + onClick_() { + // /*grit-removed-lines:3*/ + // + console.log('I should be included in JS'); + // + } +});
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 13135fbc..588ea8d 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -346,8 +346,9 @@ 'fuchsia-fyi-x64-rel': 'release_bot_fuchsia', 'fuchsia-fyi-x64-reviver': 'release_bot_fuchsia', 'fuchsia-fyi-x64-wst': 'fuchsia_workstation_bot', + 'ios-m1-simulator': 'ios_simulator_debug_static_bot_xctest_arm64', 'ios14-beta-simulator': 'ios_simulator_debug_static_bot_xctest', - 'ios14-sdk-simulator': 'ios_simulator_debug_static_bot_xctest_arm64', + 'ios14-sdk-simulator': 'ios_simulator_debug_static_bot_xctest', 'ios15-beta-simulator': 'ios_simulator_debug_static_bot_xctest', 'ios15-sdk-device': 'ios_device_release_static_bot_xctest', 'ios15-sdk-simulator': 'ios_simulator_debug_static_bot_xctest', @@ -1150,8 +1151,9 @@ 'ios-asan': 'ios_simulator_release_static_asan_bot_xctest', 'ios-catalyst': 'ios_catalyst_debug_static_bot_compile_only_libfuzzer_no_dsyms_no_lld_no_remoting', 'ios-device': 'ios_device_release_compile_only', + 'ios-m1-simulator': 'ios_simulator_debug_static_bot_xctest_arm64', 'ios14-beta-simulator': 'ios_simulator_debug_static_bot_xctest', - 'ios14-sdk-simulator': 'ios_simulator_debug_static_bot_xctest_arm64', + 'ios14-sdk-simulator': 'ios_simulator_debug_static_bot_xctest', 'ios15-beta-simulator': 'ios_simulator_debug_static_bot_xctest', 'ios15-sdk-simulator': 'ios_simulator_debug_static_bot_xctest', 'ios-clang-tidy-rel': 'ios_device_release_compile_only',
diff --git a/tools/mb/mb_config_expectations/chromium.fyi.json b/tools/mb/mb_config_expectations/chromium.fyi.json index 8506d9f..86960a0 100644 --- a/tools/mb/mb_config_expectations/chromium.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.fyi.json
@@ -731,6 +731,19 @@ "use_goma": true } }, + "ios-m1-simulator": { + "gn_args": { + "enable_run_ios_unittests_with_xctest": true, + "ios_set_attributes_for_xcode_project_generation": false, + "is_component_build": false, + "is_debug": true, + "symbol_level": 1, + "target_cpu": "arm64", + "target_environment": "simulator", + "target_os": "ios", + "use_goma": true + } + }, "ios-reclient": { "gn_args": { "enable_run_ios_unittests_with_xctest": true, @@ -846,7 +859,7 @@ "is_component_build": false, "is_debug": true, "symbol_level": 1, - "target_cpu": "arm64", + "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", "use_goma": true
diff --git a/tools/mb/mb_config_expectations/tryserver.chromium.mac.json b/tools/mb/mb_config_expectations/tryserver.chromium.mac.json index 8651b84e..a644763e 100644 --- a/tools/mb/mb_config_expectations/tryserver.chromium.mac.json +++ b/tools/mb/mb_config_expectations/tryserver.chromium.mac.json
@@ -284,6 +284,19 @@ "use_goma": true } }, + "ios-m1-simulator": { + "gn_args": { + "enable_run_ios_unittests_with_xctest": true, + "ios_set_attributes_for_xcode_project_generation": false, + "is_component_build": false, + "is_debug": true, + "symbol_level": 1, + "target_cpu": "arm64", + "target_environment": "simulator", + "target_os": "ios", + "use_goma": true + } + }, "ios-simulator": { "gn_args": { "coverage_instrumentation_input_file": "//.code-coverage/files_to_instrument.txt", @@ -430,7 +443,7 @@ "is_component_build": false, "is_debug": true, "symbol_level": 1, - "target_cpu": "arm64", + "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", "use_goma": true
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 687ea0f7..911b7ab 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -16766,6 +16766,18 @@ <int value="2" label="Failed"/> </enum> +<enum name="ConversionCreateAggregatableReportStatus"> + <int value="0" label="Success"/> + <int value="1" label="Internal error"/> + <int value="2" label="No capacity for conversion destination"/> + <int value="3" label="No matching impressions"/> + <int value="4" label="Rate-limited"/> + <int value="5" label="Excessive reporting origins"/> + <int value="6" label="No histograms created"/> + <int value="7" label="Insufficient aggregatable budget"/> + <int value="8" label="No matching source filter data"/> +</enum> + <enum name="ConversionPostSendReportDeleteEvent"> <obsolete> The error rate is not high enough to merit monitoring. @@ -16798,6 +16810,8 @@ <int value="6" label="Rate-limited"/> <int value="7" label="Priority lower than existing reports"/> <int value="8" label="Dropped for noise"/> + <int value="9" label="Excessive reporting origins"/> + <int value="10" label="No matching source filter data"/> </enum> <enum name="ConversionStorageSqlInitStatus"> @@ -33520,7 +33534,7 @@ <int value="280" label="HTMLAppletElement"/> <int value="281" label="HTMLMediaElementSeekToFragmentStart"/> <int value="282" label="HTMLMediaElementPauseAtFragmentEnd"/> - <int value="283" label="PrefixedWindowURL"/> + <int value="283" label="OBSOLETE_PrefixedWindowURL"/> <int value="284" label="PrefixedWorkerURL"/> <int value="285" label="WindowOrientation"/> <int value="286" label="DOMStringListContains"/> @@ -34677,7 +34691,7 @@ <int value="1410" label="RegisterProtocolHandlerInsecureOrigin"/> <int value="1411" label="CrossOriginWindowAlert"/> <int value="1412" label="CrossOriginWindowConfirm"/> - <int value="1413" label="CrossOriginWindowPrompt"/> + <int value="1413" label="OBSOLETE_CrossOriginWindowPrompt"/> <int value="1414" label="CrossOriginWindowPrint"/> <int value="1415" label="MediaStreamOnActive"/> <int value="1416" label="MediaStreamOnInactive"/> @@ -35777,8 +35791,8 @@ <int value="2473" label="TextToSpeech_SpeakDisallowedByAutoplay"/> <int value="2474" label="StaleWhileRevalidateEnabled"/> <int value="2475" label="MediaElementSourceOnOfflineContext"/> - <int value="2476" label="MediaStreamDestinationOnOfflineContext"/> - <int value="2477" label="MediaStreamSourceOnOfflineContext"/> + <int value="2476" label="OBSOLETE_MediaStreamDestinationOnOfflineContext"/> + <int value="2477" label="OBSOLETE_MediaStreamSourceOnOfflineContext"/> <int value="2478" label="RTCDataChannelInitMaxRetransmitTime"/> <int value="2479" label="RTCPeerConnectionCreateDataChannelMaxPacketLifeTime"/> @@ -36530,7 +36544,7 @@ <int value="3166" label="XRSessionRequestHitTestSource"/> <int value="3167" label="XRSessionRequestHitTestSourceForTransientInput"/> <int value="3168" label="XRDOMOverlay"/> - <int value="3169" label="CssStyleSheetReplaceWithImport"/> + <int value="3169" label="OBSOLETE_CssStyleSheetReplaceWithImport"/> <int value="3170" label="CryptoAlgorithmEd25519"/> <int value="3171" label="CryptoAlgorithmX25519"/> <int value="3172" label="DisplayNames"/> @@ -37291,7 +37305,7 @@ <int value="3898" label="SanitizerAPIGetDefaultConfig"/> <int value="3899" label="ComputePressureObserver_Constructor"/> <int value="3900" label="ComputePressureObserver_Observe"/> - <int value="3901" label="ComputePressureObserver_Stop"/> + <int value="3901" label="OBSOLETE_ComputePressureObserver_Stop"/> <int value="3902" label="WebAppWindowControlsOverlay"/> <int value="3903" label="PaymentRequestShowWithoutGestureOrToken"/> <int value="3904" label="V8Navigator_UpdateAdInterestGroups_Method"/> @@ -37587,6 +37601,9 @@ <int value="4181" label="BluetoothDeviceForget"/> <int value="4182" label="TopicsAPI_BrowsingTopics_Method"/> <int value="4183" label="BlockingAttributeRenderToken"/> + <int value="4184" label="ComputePressureObserver_Unobserve"/> + <int value="4185" label="ComputePressureObserver_Disconnect"/> + <int value="4186" label="ComputePressureObserver_TakeRecords"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -39250,6 +39267,7 @@ <int value="9" label="Android Documents Provider"/> <int value="10" label="SMB File Share"/> <int value="11" label="System internal"/> + <int value="12" label="Guest OS Files"/> </enum> <enum name="FileManagerZipHandlerType"> @@ -50655,6 +50673,16 @@ <int value="3" label="Failure Threshold Reached"/> </enum> +<enum name="LinkPrefetchMimeType"> + <int value="0" label="Unknown"/> + <int value="1" label="HTML/XHTML"/> + <int value="2" label="Script"/> + <int value="3" label="Style"/> + <int value="4" label="Font"/> + <int value="5" label="Image"/> + <int value="6" label="Media"/> +</enum> + <enum name="LinkToggleState"> <int value="0" label="Link"/> <int value="1" label="No Link"/> @@ -69096,6 +69124,12 @@ <int value="5" label="Metric value was less than 10 seconds"/> </enum> +<enum name="PageLoadTrackerPageType"> + <int value="0" label="Primary Page"/> + <int value="1" label="Prerender Page"/> + <int value="2" label="FencedFrames Page"/> +</enum> + <enum name="PageScaleFactorRange"> <int value="0" label="<25%"/> <int value="1" label="25-49%"/>
diff --git a/tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS b/tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS index fb2493df..19e99f2d 100644 --- a/tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS +++ b/tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS
@@ -12,6 +12,7 @@ bingler@chromium.org cfredric@chromium.org chadduffin@chromium.org +changhaohan@chromium.org csharrison@chromium.org cthomp@chromium.org curranmax@chromium.org
diff --git a/tools/metrics/histograms/metadata/accessibility/histograms.xml b/tools/metrics/histograms/metadata/accessibility/histograms.xml index a7002fb..91f5ad6 100644 --- a/tools/metrics/histograms/metadata/accessibility/histograms.xml +++ b/tools/metrics/histograms/metadata/accessibility/histograms.xml
@@ -605,7 +605,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak" enum="BooleanEnabled" - expires_after="2022-04-10"> + expires_after="2023-03-23"> <owner>dtseng@chromium.org</owner> <owner>katie@chromium.org</owner> <owner>chrome-a11y-core@google.com</owner> @@ -616,7 +616,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.BackgroundShading" - enum="BooleanEnabled" expires_after="2022-05-01"> + enum="BooleanEnabled" expires_after="2023-03-23"> <owner>katie@chromium.org</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -625,7 +625,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.BubbleDismissMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2022-04-17"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -636,7 +636,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.EnhancedNetworkVoices" - enum="BooleanEnabled" expires_after="2022-06-30"> + enum="BooleanEnabled" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -646,7 +646,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.NavigationControls" - enum="BooleanEnabled" expires_after="2022-04-03"> + enum="BooleanEnabled" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -656,7 +656,7 @@ <histogram name="Accessibility.CrosSelectToSpeak.OverrideSpeechRateMultiplier" enum="CrosSelectToSpeakOverrideSpeechRateMultiplier" - expires_after="2022-04-24"> + expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -671,7 +671,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.ParagraphNavigationMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2022-04-24"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -682,7 +682,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.SentenceNavigationMethod" - enum="CrosSelectToSpeakActivationMethod" expires_after="2022-05-01"> + enum="CrosSelectToSpeakActivationMethod" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -693,7 +693,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.StartSpeechMethod" - enum="CrosSelectToSpeakStartSpeechMethod" expires_after="2022-04-03"> + enum="CrosSelectToSpeakStartSpeechMethod" expires_after="2023-03-23"> <owner>katie@chromium.org</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -704,7 +704,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.StateChangeEvent" - enum="CrosSelectToSpeakStateChangeEvent" expires_after="2022-04-03"> + enum="CrosSelectToSpeakStateChangeEvent" expires_after="2023-03-23"> <owner>katie@chromium.org</owner> <owner>chrome-a11y-core@google.com</owner> <summary> @@ -717,7 +717,7 @@ </histogram> <histogram name="Accessibility.CrosSelectToSpeak.TtsEngineUsed" - enum="CrosSelectToSpeakTtsEngineUsed" expires_after="2022-06-30"> + enum="CrosSelectToSpeakTtsEngineUsed" expires_after="2023-03-23"> <owner>ajitnarayanan@google.com</owner> <owner>chrome-a11y-core@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index b5af847..a1a8899 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -1074,10 +1074,24 @@ timing when the image data associated with the URI is needed. Another metric Android.DragDrop.Image.OpenFileTime.FirstExpired only records at most once per URI, to avoid counting in retries from drop target app when Chrome - rejects the expired URI. This metric is recoreded when Chrome receives an + rejects the expired URI. This metric is recorded when Chrome receives an expired URI to retrieve data. If the URI is not the latest expired one, the - metric will not be recoreded because we could not calcuate the elapsed time - for older URIs. Android only. + metric will not be recorded because we do not calculate the elapsed time for + older URIs. Android only. + </summary> +</histogram> + +<histogram name="Android.DragDrop.Image.OpenFileTime.FirstAttempt" units="ms" + expires_after="2022-07-01"> + <owner>shuyng@google.com</owner> + <owner>clank-large-form-factors@google.com</owner> + <summary> + Records the duration between receiving Android Drag End event and the first + ContentProvider#openFile attempted by the drop target app. The duration is + calculated during the first ContentProvider#openFile for each URI. Another + metric Android.DragDrop.Image.OpenFileTime.LastAttempt is recorded for the + last ContentProvider#openFile. Record 0 if the duration is negative (e.g. + ContentProvider#openFile is accessed before drag ends). Android only. </summary> </histogram> @@ -1094,9 +1108,9 @@ per URI. Another metric Android.DragDrop.Image.OpenFileTime.AllExpired records multiple times per URI, to gives us the holistic view about the timing when the image data associated with the URI is needed. This metric is - recoreded when Chrome receives an expired URI to retrieve data. If the URI - is not the latest expired one, the metric will not be recoreded because we - could not calcuate the elapsed time for older URIs. Android only. + recorded when Chrome receives an expired URI to retrieve data. If the URI is + not the latest expired one, the metric will not be recorded because we do + not calculate the elapsed time for older URIs. Android only. </summary> </histogram> @@ -1107,8 +1121,12 @@ <summary> Records the duration between receiving Android Drag End event and the last ContentProvider#openFile attempted by the drop target app. The duration is - calculated when the image data expired at the designated time limit. Android - only. + calculated when the image data expired at the designated time limit. It is + not recorded if the image data is replaced before the time limit due to the + start of the next image drag. Another metric + Android.DragDrop.Image.OpenFileTime.FirstAttempt is recorded for the first + ContentProvider#openFile. Record 0 if the duration is negative (e.g. + ContentProvider#openFile is accessed before drag ends). Android only. </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/blink/histograms.xml b/tools/metrics/histograms/metadata/blink/histograms.xml index ca4827b..a8b27e2b 100644 --- a/tools/metrics/histograms/metadata/blink/histograms.xml +++ b/tools/metrics/histograms/metadata/blink/histograms.xml
@@ -1907,6 +1907,17 @@ </summary> </histogram> +<histogram name="Blink.Prefetch.LinkPrefetchMimeType" + enum="LinkPrefetchMimeType" expires_after="2022-09-01"> + <owner>jbroman@chromium.org</owner> + <summary> + Categorizes MIME types of responses to "prefetch" links. Intended + to gather data about whether this feature is used mainly for documents, + subresources, or both. Emitted once per resource fetched (which may be more + than one per page). + </summary> +</histogram> + <histogram base="true" name="Blink.PrePaint.UpdateTime" units="microseconds" expires_after="2022-09-11"> <!-- Name completed by histogram_suffixes name="BlinkUpdateTimePreFCPSuffixes" -->
diff --git a/tools/metrics/histograms/metadata/dev/OWNERS b/tools/metrics/histograms/metadata/dev/OWNERS new file mode 100644 index 0000000..b1a606d --- /dev/null +++ b/tools/metrics/histograms/metadata/dev/OWNERS
@@ -0,0 +1,5 @@ +per-file OWNERS=file://tools/metrics/histograms/metadata/METRIC_REVIEWER_OWNERS + +# Prefer sending CLs to the owners listed below. +# Use chromium-metrics-reviews@google.com as a backup. +changhaohan@chromium.org \ No newline at end of file
diff --git a/tools/metrics/histograms/metadata/input/histograms.xml b/tools/metrics/histograms/metadata/input/histograms.xml index 0827be86..6b3e6bd 100644 --- a/tools/metrics/histograms/metadata/input/histograms.xml +++ b/tools/metrics/histograms/metadata/input/histograms.xml
@@ -372,14 +372,14 @@ </histogram> <histogram name="InputMethod.AutoCorrectLevel" enum="IMECorrectionLevel" - expires_after="2022-04-03"> + expires_after="2022-10-03"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>The auto-correction level for suggestion engine.</summary> </histogram> <histogram name="InputMethod.Category" enum="InputMethodCategory" - expires_after="2022-04-17"> + expires_after="2022-10-17"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -488,7 +488,7 @@ </histogram> <histogram name="InputMethod.Handwriting.CharsEdited10s" units="chars" - expires_after="2022-04-10"> + expires_after="2022-10-10"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -498,7 +498,7 @@ </histogram> <histogram name="InputMethod.Handwriting.CharsEdited5s" units="chars" - expires_after="2022-04-17"> + expires_after="2022-10-17"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -585,7 +585,7 @@ </histogram> <histogram name="InputMethod.KeyEventLatency" units="ms" - expires_after="2022-04-24"> + expires_after="2022-10-24"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>Time taken by the engine to handle a key event.</summary> @@ -790,7 +790,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.BackspaceCount" units="units" - expires_after="2022-04-17"> + expires_after="2022-10-17"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -834,7 +834,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.CharactersCommitted" units="units" - expires_after="2022-04-17"> + expires_after="2022-10-17"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -884,7 +884,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.ContainerBehavior" - enum="VirtualKeyboardContainerType" expires_after="2022-04-24"> + enum="VirtualKeyboardContainerType" expires_after="2022-10-24"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -905,7 +905,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.Duration" units="seconds" - expires_after="2022-05-01"> + expires_after="2022-10-01"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>How long the virtual keyboard was visible.</summary> @@ -921,7 +921,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.Emoji.TriggerType" - enum="VirtualKeyboardEmojiTriggerType" expires_after="2022-04-24"> + enum="VirtualKeyboardEmojiTriggerType" expires_after="2022-10-24"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>How emojis were inserted.</summary> @@ -1017,7 +1017,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.Layout" enum="IMEVKLayout" - expires_after="2022-04-03"> + expires_after="2022-10-03"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary> @@ -1128,7 +1128,7 @@ </histogram> <histogram name="InputMethod.VirtualKeyboard.SwitchMode" enum="IMEVKMode" - expires_after="2022-05-01"> + expires_after="2022-11-01"> <owner>shend@chromium.org</owner> <owner>essential-inputs-team@google.com</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index e293f012..6d26b68 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -3076,6 +3076,19 @@ </summary> </histogram> +<histogram name="Conversions.AggregatableReport.CreateReportStatus" + enum="ConversionCreateAggregatableReportStatus" expires_after="2022-09-17"> + <owner>linnan@chromium.org</owner> + <owner>johnidel@chromium.org</owner> + <owner>measurement-api-dev+metrics@google.com</owner> + <summary> + Measures how often aggregatable reports are stored successfully or rejected + and why. Recorded once for each trigger event processed by the attribution + storage layer. `kNoHistograms` will be logged if the trigger doesn't declare + aggregatable trigger data. + </summary> +</histogram> + <histogram name="Conversions.AggregatableReport.ReportSendOutcome" enum="ConversionReportSendOutcome" expires_after="2022-09-08"> <owner>linnan@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index dc702b51..88da4da 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -1881,6 +1881,16 @@ </summary> </histogram> +<histogram name="PageLoad.Internal.PageType" enum="PageLoadTrackerPageType" + expires_after="2022-09-01"> + <owner>toyoshim@chromium.org</owner> + <owner>mparch-dev@chromium.org</owner> + <summary> + This records the Page type that each PageLoadTracker tracks. This metric is + recorded when a PageLoadTracker is created for a Page. + </summary> +</histogram> + <histogram name="PageLoad.Internal.PaintTiming.LargestContentfulPaint.ContentType" enum="LargestContentType" expires_after="2022-09-11">
diff --git a/tools/metrics/histograms/metadata/power/histograms.xml b/tools/metrics/histograms/metadata/power/histograms.xml index 2eae0bb..8279dad 100644 --- a/tools/metrics/histograms/metadata/power/histograms.xml +++ b/tools/metrics/histograms/metadata/power/histograms.xml
@@ -726,6 +726,9 @@ <histogram name="Power.CpuAffinityExperiments.ProcessAffinityMode" enum="CpuAffinityMode" expires_after="2022-10-04"> + <obsolete> + Deprecated in 03/2022 because the Power Scheduler feature did not launch. + </obsolete> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <owner>woa-performance@google.com</owner> @@ -738,6 +741,9 @@ <histogram name="Power.CpuAffinityExperiments.ProcessAffinityUpdateSuccess" enum="BooleanSuccess" expires_after="2022-10-04"> + <obsolete> + Deprecated in 03/2022 because the Power Scheduler feature did not launch. + </obsolete> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <owner>woa-performance@google.com</owner> @@ -1614,6 +1620,9 @@ <histogram name="Power.PowerScheduler.ThrottlingDuration" units="ms" expires_after="2022-10-04"> + <obsolete> + Deprecated in 03/2022 because the Power Scheduler feature did not launch. + </obsolete> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <owner>woa-performance@google.com</owner> @@ -1626,6 +1635,9 @@ <histogram name="Power.PowerScheduler.ThrottlingDurationPerCpuAffinityMode" enum="CpuAffinityMode" expires_after="2022-10-04"> + <obsolete> + Deprecated in 03/2022 because the Power Scheduler feature did not launch. + </obsolete> <owner>eseckler@chromium.org</owner> <owner>skyostil@chromium.org</owner> <owner>woa-performance@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index e9eb79d..901cd67 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml
@@ -1858,6 +1858,16 @@ </summary> </histogram> +<histogram name="SafeBrowsing.TailoredSecurity.SyncPromptSkippedAlreadyEnabled" + enum="BooleanSkipped" expires_after="2022-07-23"> + <owner>drubery@chromium.org</owner> + <owner>chrome-safebrowsing-alerts@google.com</owner> + <summary> + Records whether a sync prompt was skipped because the user had already + consented to Enhanced Safe Browsing. + </summary> +</histogram> + <histogram name="SafeBrowsing.TailoredSecurityConsented{Status}{PromptType}Outcome" enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2022-11-22"> @@ -2000,6 +2010,17 @@ </summary> </histogram> +<histogram name="SafeBrowsing.V4Database.SizeLinear" units="MB" + expires_after="2022-08-28"> + <owner>richche@chromium.org</owner> + <owner>chrome-safebrowsing-alerts@google.com</owner> + <summary> + The size of the SafeBrowsing database or file on disk in megabytes, after + reading it from disk on startup and after a database update has occurred. + Linear version of the histogram above. + </summary> +</histogram> + <histogram name="SafeBrowsing.V4DatabaseOpen.Time" units="ms" expires_after="M77"> <owner>vakh@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/sharing/histograms.xml b/tools/metrics/histograms/metadata/sharing/histograms.xml index 5f3cd14b..f712d6d 100644 --- a/tools/metrics/histograms/metadata/sharing/histograms.xml +++ b/tools/metrics/histograms/metadata/sharing/histograms.xml
@@ -598,7 +598,7 @@ <histogram name="Sharing.SmsFetcherAvailableDeviceCount" units="devices" expires_after="2022-08-21"> <owner>yigu@chromium.org</owner> - <owner>web-identity@google.com</owner> + <owner>src/content/browser/sms/OWNERS</owner> <summary> The number of available devices when making a request on desktop which is triggered by calling the WebOTP API. This is logged once per API call. @@ -607,9 +607,9 @@ </histogram> <histogram name="Sharing.SmsFetcherClientNameIsEmpty" enum="BooleanEmpty" - expires_after="2022-05-01"> + expires_after="2022-08-21"> <owner>yigu@chromium.org</owner> - <owner>web-identity@google.com</owner> + <owner>src/content/browser/sms/OWNERS</owner> <summary> Records whether the remote client name is empty. This could happen on early version of Chrome. This is logged once per notification when asking for user @@ -618,9 +618,9 @@ </histogram> <histogram name="Sharing.SmsFetcherScreenOnAndUnlocked" enum="Boolean" - expires_after="2022-07-17"> + expires_after="2022-08-21"> <owner>yigu@chromium.org</owner> - <owner>web-identity@google.com</owner> + <owner>src/content/browser/sms/OWNERS</owner> <summary> Records whether the phone is on and unlocked when we show the notification to users. False if either the phone is locked or the phone does not have a @@ -629,9 +629,9 @@ </histogram> <histogram name="Sharing.SmsFetcherTapWithChromeDestroyed" enum="Boolean" - expires_after="2022-05-01"> + expires_after="2022-08-21"> <owner>yigu@chromium.org</owner> - <owner>web-identity@google.com</owner> + <owner>src/content/browser/sms/OWNERS</owner> <summary> Records whether a user taps/dismisses the notification after Chrome is destroyed. This could happen if the user manually swipes away Chrome from
diff --git a/tools/perf/core/bot_platforms.py b/tools/perf/core/bot_platforms.py index bd1fdfc..e07ad34d 100644 --- a/tools/perf/core/bot_platforms.py +++ b/tools/perf/core/bot_platforms.py
@@ -390,13 +390,6 @@ _GetBenchmarkConfig('v8.browsing_desktop'), _GetBenchmarkConfig('rendering.desktop', abridged=True), ]) -_WIN_10_AMD_BENCHMARK_CONFIGS = PerfSuite([ - _GetBenchmarkConfig('jetstream'), - _GetBenchmarkConfig('jetstream2'), - _GetBenchmarkConfig('kraken'), - _GetBenchmarkConfig('octane'), - _GetBenchmarkConfig('system_health.common_desktop'), -]) _WIN_10_AMD_LAPTOP_BENCHMARK_CONFIGS = PerfSuite([ _GetBenchmarkConfig('jetstream'), _GetBenchmarkConfig('jetstream2'), @@ -569,8 +562,6 @@ 'Windows Intel HD 630 towers, Core i7-7700 3.6 GHz, 16GB RAM,' ' Intel Kaby Lake HD Graphics 630', _WIN_10_BENCHMARK_CONFIGS, 26, 'win', executables=_WIN_10_EXECUTABLE_CONFIGS) -WIN_10_AMD = PerfPlatform('win-10_amd-perf', 'Windows AMD chipset', - _WIN_10_AMD_BENCHMARK_CONFIGS, 1, 'win') WIN_10_AMD_LAPTOP = PerfPlatform('win-10_amd_laptop-perf', 'Windows 10 Laptop with AMD chipset.', _WIN_10_AMD_LAPTOP_BENCHMARK_CONFIGS, 5, 'win')
diff --git a/tools/perf/core/perf_data_generator.py b/tools/perf/core/perf_data_generator.py index 3f9a36ef..4c2ac37 100755 --- a/tools/perf/core/perf_data_generator.py +++ b/tools/perf/core/perf_data_generator.py
@@ -797,30 +797,6 @@ 'synthetic_product_name': 'OptiPlex 7050 (Dell Inc.)' }, }, - 'win-10_amd-perf': { - 'tests': [ - { - 'isolate': 'performance_test_suite', - 'extra_args': [ - '--assert-gpu-compositing', - ], - }, - ], - 'platform': - 'win', - 'target_bits': - 64, - 'dimension': { - 'pool': 'chrome.tests.perf', - # Explicitly set GPU driver version and Windows OS version such - # that we can be informed if this - # version ever changes or becomes inconsistent. It is important - # that bots are homogeneous. See crbug.com/988045 for history. - 'os': 'Windows-10-18363.476', - 'gpu': '1002:15d8-27.20.1034.6', - 'synthetic_product_name': '11A5S4L300 [ThinkCentre M75q-1] (LENOVO)' - }, - }, 'win-10_amd_laptop-perf': { 'tests': [ {
diff --git a/tools/perf/core/perf_json_config_validator.py b/tools/perf/core/perf_json_config_validator.py index 780019cb..31f44327 100644 --- a/tools/perf/core/perf_json_config_validator.py +++ b/tools/perf/core/perf_json_config_validator.py
@@ -137,8 +137,7 @@ builder_name) elif builder_name in ('win-10-perf', 'Win 7 Nvidia GPU Perf', 'win-10_laptop_low_end-perf_HP-Candidate', - 'win-10_laptop_low_end-perf', 'win-10_amd-perf', - 'win-10_amd_laptop-perf'): + 'win-10_laptop_low_end-perf', 'win-10_amd_laptop-perf'): if browser_options.browser != 'release_x64': raise ValueError("%s must use 'release_x64' browser type" % builder_name)
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 2b5f8d4..71d4603 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,24 +5,24 @@ "remote_path": "perfetto_binaries/trace_processor_shell/linux_arm64/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "win": { - "hash": "5127b1604db423852685508350ffb5c3fa0f5421", - "remote_path": "perfetto_binaries/trace_processor_shell/win/30a70afa95f9ec2b490cf83681649cc898d5dc08/trace_processor_shell.exe" + "hash": "7268cf44400656f50b5ba8a2e7cd45d187772b46", + "remote_path": "perfetto_binaries/trace_processor_shell/win/5ed301fb68e249da0551a15599a2f80111581497/trace_processor_shell.exe" }, "linux_arm": { "hash": "58893933be305d3bfe0a72ebebcacde2ac3ca893", "remote_path": "perfetto_binaries/trace_processor_shell/linux_arm/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "mac": { - "hash": "a94fceff1c79d9302e2a48d41846ffba7089191e", - "remote_path": "perfetto_binaries/trace_processor_shell/mac/30a70afa95f9ec2b490cf83681649cc898d5dc08/trace_processor_shell" + "hash": "26a32b1eee816e5c6c4da2ce42e928893cd78c7f", + "remote_path": "perfetto_binaries/trace_processor_shell/mac/5ed301fb68e249da0551a15599a2f80111581497/trace_processor_shell" }, "mac_arm64": { "hash": "c0397e87456ad6c6a7aa0133e5b81c97adbab4ab", "remote_path": "perfetto_binaries/trace_processor_shell/mac_arm64/cefb3e0ec3a0580c996f801e854fe02963c03d5c/trace_processor_shell" }, "linux": { - "hash": "bf80f5218b04d71fc1531b97aad8da6088949df7", - "remote_path": "perfetto_binaries/trace_processor_shell/linux/30a70afa95f9ec2b490cf83681649cc898d5dc08/trace_processor_shell" + "hash": "b4ce5a257b6894de4363377ce40b21b9c632db7e", + "remote_path": "perfetto_binaries/trace_processor_shell/linux/ae44ad76bdf06db6f4e11186dd30cfdbc7d852b0/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/tools/perf/core/shard_maps/timing_data/win-10_amd-perf_timing.json b/tools/perf/core/shard_maps/timing_data/win-10_amd-perf_timing.json deleted file mode 100644 index ced048c..0000000 --- a/tools/perf/core/shard_maps/timing_data/win-10_amd-perf_timing.json +++ /dev/null
@@ -1,338 +0,0 @@ -[ - { - "duration": "178.0", - "name": "jetstream/JetStream" - }, - { - "duration": "170.0", - "name": "jetstream2/JetStream2" - }, - { - "duration": "19.0", - "name": "kraken/http://krakenbenchmark.mozilla.org/kraken-1.1/driver.html" - }, - { - "duration": "37.0", - "name": "octane/Octane" - }, - { - "duration": "33.0", - "name": "system_health.common_desktop/browse:media:googleplaystore:2021" - }, - { - "duration": "74.0", - "name": "system_health.common_desktop/browse:media:imgur" - }, - { - "duration": "88.0", - "name": "system_health.common_desktop/browse:media:pinterest:2018" - }, - { - "duration": "58.0", - "name": "system_health.common_desktop/browse:media:tumblr:2018" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:media:youtube:2019" - }, - { - "duration": "64.0", - "name": "system_health.common_desktop/browse:media:youtubetv:2019" - }, - { - "duration": "73.0", - "name": "system_health.common_desktop/browse:media:youtubetv_watch:2020" - }, - { - "duration": "43.0", - "name": "system_health.common_desktop/browse:news:cnn:2021" - }, - { - "duration": "47.0", - "name": "system_health.common_desktop/browse:news:flipboard:2020" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:news:hackernews:2020" - }, - { - "duration": "66.0", - "name": "system_health.common_desktop/browse:news:nytimes:2020" - }, - { - "duration": "57.0", - "name": "system_health.common_desktop/browse:news:reddit:2020" - }, - { - "duration": "49.0", - "name": "system_health.common_desktop/browse:search:google:2020" - }, - { - "duration": "34.0", - "name": "system_health.common_desktop/browse:search:google_india:2021" - }, - { - "duration": "66.0", - "name": "system_health.common_desktop/browse:social:facebook_infinite_scroll:2018" - }, - { - "duration": "56.0", - "name": "system_health.common_desktop/browse:social:tumblr_infinite_scroll:2018" - }, - { - "duration": "49.0", - "name": "system_health.common_desktop/browse:social:twitter:2018" - }, - { - "duration": "60.0", - "name": "system_health.common_desktop/browse:social:twitter_infinite_scroll:2018" - }, - { - "duration": "57.0", - "name": "system_health.common_desktop/browse:tech:discourse_infinite_scroll:2018" - }, - { - "duration": "53.0", - "name": "system_health.common_desktop/browse:tools:autocad:2021" - }, - { - "duration": "37.0", - "name": "system_health.common_desktop/browse:tools:docs_scrolling" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:earth:2020" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:gmail-compose:2020" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:gmail-labelclick:2020" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:gmail-openconversation:2020" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:gmail-search:2020" - }, - { - "duration": "69.0", - "name": "system_health.common_desktop/browse:tools:maps:2019" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse:tools:sheets:2019" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/browse_accessibility:media:youtube" - }, - { - "duration": "28.0", - "name": "system_health.common_desktop/browse_accessibility:tech:codesearch:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:chrome:blank" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:games:alphabetty:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:games:bubbles:2020" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:games:lazors" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:games:miniclip:2018" - }, - { - "duration": "23.0", - "name": "system_health.common_desktop/load:games:spychase:2018" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:media:9gag" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:media:dailymotion:2019" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:media:facebook_feed:desktop:2020" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:media:facebook_photos:2018" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:media:facebook_photos:desktop:2020" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:media:flickr:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:media:google_images:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:media:imgur:2018" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:media:soundcloud:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:media:youtube:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:media:youtubelivingroom:2020" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:news:bbc:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:news:cnn:2020" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:news:flipboard" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:news:hackernews:2018" - }, - { - "duration": "22.0", - "name": "system_health.common_desktop/load:news:nytimes:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:news:qq:2018" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:news:reddit:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:news:wikipedia:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:search:amazon:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:search:baidu:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:search:ebay:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:search:flipkart:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:search:google:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:search:taobao:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:search:yahoo:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:search:yandex:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:social:instagram:2018" - }, - { - "duration": "21.0", - "name": "system_health.common_desktop/load:social:pinterest:2019" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:social:vk:2018" - }, - { - "duration": "28.0", - "name": "system_health.common_desktop/load:tools:chat:2020" - }, - { - "duration": "73.0", - "name": "system_health.common_desktop/load:tools:docs:2019" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load:tools:drive:2019" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/load:tools:gmail:2019" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:tools:stackoverflow:2018" - }, - { - "duration": "19.0", - "name": "system_health.common_desktop/load:tools:weather:2019" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load_accessibility:media:wikipedia:2018" - }, - { - "duration": "20.0", - "name": "system_health.common_desktop/load_accessibility:shopping:amazon:2018" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/long_running:tools:gmail-background" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/long_running:tools:gmail-foreground" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/multitab:misc:typical24" - }, - { - "duration": "6.0", - "name": "system_health.common_desktop/multitab:misc:typical24:2018" - }, - { - "duration": "44.0", - "name": "system_health.common_desktop/play:media:google_play_music" - }, - { - "duration": "44.0", - "name": "system_health.common_desktop/play:media:soundcloud:2018" - } -] \ No newline at end of file
diff --git a/tools/perf/core/shard_maps/win-10_amd-perf_map.json b/tools/perf/core/shard_maps/win-10_amd-perf_map.json deleted file mode 100644 index 08faffc..0000000 --- a/tools/perf/core/shard_maps/win-10_amd-perf_map.json +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "0": { - "benchmarks": { - "jetstream": { - "abridged": false - }, - "jetstream2": { - "abridged": false - }, - "kraken": { - "abridged": false - }, - "octane": { - "abridged": false - }, - "system_health.common_desktop": { - "abridged": false - } - } - }, - "extra_infos": { - "num_stories": 84, - "predicted_min_shard_time": 2657.0, - "predicted_min_shard_index": 0, - "predicted_max_shard_time": 2657.0, - "predicted_max_shard_index": 0, - "shard #0": 2657.0 - } -} \ No newline at end of file
diff --git a/tools/uberblame.py b/tools/uberblame.py index 89b6d88..b1dd14d3 100755 --- a/tools/uberblame.py +++ b/tools/uberblame.py
@@ -1,12 +1,12 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 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. import argparse -import cgi import colorsys import difflib +import html import random import os import re @@ -249,7 +249,7 @@ it = iter(diff) for line in it: while not line.startswith('@@'): - line = it.next() + line = next(it) parts = line.split(' ') previous_start, previous_end = parse_chunk_header_file_range( parts[1].lstrip('-')) @@ -261,7 +261,7 @@ added_lines_end = None removed_lines = [] while previous_start < previous_end or current_start < current_end: - line = it.next() + line = next(it) firstchar = line[0] line = line[1:] if not in_delta and (firstchar == '-' or firstchar == '+'): @@ -335,20 +335,20 @@ data = [] while True: buf = file.read(BUF_SIZE) - parts = buf.split('\0') + parts = buf.split(b'\0') data.append(parts[0]) if len(parts) > 1: - joined = ''.join(data) - if joined != '': - yield joined + joined = b''.join(data) + if joined != b'': + yield joined.decode() for i in range(1, len(parts) - 1): - if parts[i] != '': - yield parts[i] + if parts[i] != b'': + yield parts[i].decode() data = [parts[-1]] if len(buf) < BUF_SIZE: - joined = ''.join(data) - if joined != '': - yield joined + joined = b''.join(data) + if joined != b'': + yield joined.decode() return @@ -356,14 +356,17 @@ """Parses git log output into a stream of Commit objects. """ substring_generator = generate_substrings(git_log_stdout) - while True: - hash = substring_generator.next() - author_name = substring_generator.next() - author_email = substring_generator.next() - author_date = substring_generator.next() - message = substring_generator.next().rstrip('\n') - diff = substring_generator.next().split('\n')[1:-1] - yield Commit(hash, author_name, author_email, author_date, message, diff) + try: + while True: + hash = next(substring_generator) + author_name = next(substring_generator) + author_email = next(substring_generator) + author_date = next(substring_generator) + message = next(substring_generator).rstrip('\n') + diff = next(substring_generator).split('\n')[1:-1] + yield Commit(hash, author_name, author_email, author_date, message, diff) + except StopIteration: + pass def uberblame_aux(file_name, git_log_stdout, data, tokenization_method): @@ -384,7 +387,6 @@ blame = tokenization_method(data) blamed_tokens = 0 - total_tokens = len(blame) uber_blame = (data, blame[:]) for commit in generate_commits(git_log_stdout): @@ -448,11 +450,11 @@ git_log = subprocess.Popen( cmd_git_log, stdout=subprocess.PIPE, stderr=subprocess.PIPE) data = subprocess.check_output( - ['git', 'show', '%s:%s' % (revision, file_name)]) + ['git', 'show', '%s:%s' % (revision, file_name)]).decode() data, blame = uberblame_aux(file_name, git_log.stdout, data, tokenization_method) - _, stderr = git_log.communicate() + stderr = git_log.communicate()[1].decode() if git_log.returncode != 0: raise subprocess.CalledProcessError(git_log.returncode, cmd_git_log, stderr) return data, blame @@ -482,7 +484,7 @@ colorized = [] for line in diff: - escaped = cgi.escape(line.replace('\r', ''), quote=True) + escaped = html.escape(line.replace('\r', ''), quote=True) if line.startswith('+'): colorized.append('<span class=\\"addition\\">%s</span>' % escaped) elif line.startswith('-'): @@ -515,7 +517,7 @@ # loading the same blame of the same file twice will result in the # same generated HTML page. random.seed(0x52937865ec62d1ea) - html = """\ + page = """\ <html> <head> <style> @@ -594,7 +596,7 @@ </body> </html> """ - html = textwrap.dedent(html) + page = textwrap.dedent(page) commits = {} lines = [] commit_colors = {} @@ -627,7 +629,7 @@ lines.append(('<span class="token" style="background-color: %s" ' + 'onclick="display_commit("%s")">') % (color, hash)) - lines.append(cgi.escape(c)) + lines.append(html.escape(c)) column += 1 row += 1 commit_data = ['{\n'] @@ -649,7 +651,7 @@ author_email=commit.author_email, author_date=commit.author_date, message=commit.message) - commit_display = cgi.escape(commit_display, quote=True) + commit_display = html.escape(commit_display, quote=True) commit_display += colorize_diff(commit.diff) commit_display = re.sub(links, '<a href=\\"\\1\\">\\1</a>', commit_display) commit_display = commit_display.replace('\n', '\\n') @@ -659,10 +661,10 @@ line_nums = range(1, row if lastline.strip() == '' else row + 1) line_nums = '\n'.join([str(num) for num in line_nums]) lines = ''.join(lines) - return html % (commit_data, line_nums, lines) + return page % (commit_data, line_nums, lines) -def show_visualization(html): +def show_visualization(page): """Display |html| in a web browser. Args: @@ -672,7 +674,7 @@ # TODO(thomasanderson): spin up a temporary web server to serve this # file so we don't have to leak it. html_file = tempfile.NamedTemporaryFile(delete=False, suffix='.html') - html_file.write(html) + html_file.write(page.encode()) html_file.flush() if sys.platform.startswith('linux'): # Don't show any messages when starting the browser.
diff --git a/ui/android/java/src/org/chromium/ui/base/DropDataContentProvider.java b/ui/android/java/src/org/chromium/ui/base/DropDataContentProvider.java index 418e0b70..c0177468 100644 --- a/ui/android/java/src/org/chromium/ui/base/DropDataContentProvider.java +++ b/ui/android/java/src/org/chromium/ui/base/DropDataContentProvider.java
@@ -153,8 +153,10 @@ static void clearCache() { synchronized (LOCK) { clearCacheData(); - if (sDragEndTime > 0 && sDragEndTime <= sOpenFileLastAccessTime) { - long duration = sOpenFileLastAccessTime - sDragEndTime; + if (sDragEndTime > 0 && sOpenFileLastAccessTime > 0) { + // If ContentProvider#openFile is received before Android Drag End event, set the + // duration to 0 to avoid negative value. + long duration = Math.max(0, sOpenFileLastAccessTime - sDragEndTime); RecordHistogram.recordMediumTimesHistogram( "Android.DragDrop.Image.OpenFileTime.LastAttempt", duration); } @@ -247,10 +249,11 @@ return null; } byte[] imageBytes; + long elapsedRealtime = SystemClock.elapsedRealtime(); synchronized (LOCK) { if (!uri.equals(sContentProviderUri)) { if (uri.equals(sLastUri)) { - long duration = SystemClock.elapsedRealtime() - sLastUriClearedTimestamp; + long duration = elapsedRealtime - sLastUriClearedTimestamp; RecordHistogram.recordMediumTimesHistogram( "Android.DragDrop.Image.OpenFileTime.AllExpired", duration); if (!sLastUriRecorded) { @@ -261,7 +264,13 @@ } return null; } - sOpenFileLastAccessTime = SystemClock.elapsedRealtime(); + if (sOpenFileLastAccessTime == 0) { + // If Android Drag End event has not been received yet, treat the duration as 0 ms. + long duration = sDragEndTime == 0 ? 0 : elapsedRealtime - sDragEndTime; + RecordHistogram.recordMediumTimesHistogram( + "Android.DragDrop.Image.OpenFileTime.FirstAttempt", duration); + } + sOpenFileLastAccessTime = elapsedRealtime; imageBytes = sImageBytes; } return openPipeHelper(uri, getType(uri), null, imageBytes, mDropPipeDataWriter);
diff --git a/ui/android/junit/src/org/chromium/ui/base/DropDataContentProviderTest.java b/ui/android/junit/src/org/chromium/ui/base/DropDataContentProviderTest.java index bf53c42..161a8d0e 100644 --- a/ui/android/junit/src/org/chromium/ui/base/DropDataContentProviderTest.java +++ b/ui/android/junit/src/org/chromium/ui/base/DropDataContentProviderTest.java
@@ -126,9 +126,10 @@ public void testClearCacheWithDelay() throws FileNotFoundException { Uri uri = DropDataContentProvider.cache(IMAGE_DATA_A, EXTENSION_A); DropDataContentProvider.setClearCachedDataIntervalMs(CLEAR_CACHED_DATA_INTERVAL_MS); - DropDataContentProvider.onDragEnd(true); ShadowLooper.idleMainLooper(1, TimeUnit.MILLISECONDS); + // #openFile could be called before or after the Android Drag End event. mDropDataContentProvider.openFile(uri, "r"); + DropDataContentProvider.onDragEnd(true); Assert.assertNotNull( "Image bytes should not be null immediately after clear cache with delay.", DropDataContentProvider.getImageBytesForTesting()); @@ -136,6 +137,7 @@ DropDataContentProvider.getHandlerForTesting()); Assert.assertEquals("The MIME type for jpg file should be image/jpeg", "image/jpeg", mDropDataContentProvider.getType(uri)); + assertImageFirstOpenFileRecorded(/*expectedCnt*/ 1); assertImageLastOpenFileRecorded(/*expectedCnt*/ 0); ShadowLooper.idleMainLooper(CLEAR_CACHED_DATA_INTERVAL_MS, TimeUnit.MILLISECONDS); @@ -143,6 +145,7 @@ DropDataContentProvider.getImageBytesForTesting()); Assert.assertNull("MIME type should be null after the delayed time.", mDropDataContentProvider.getType(uri)); + assertImageFirstOpenFileRecorded(/*expectedCnt*/ 1); assertImageLastOpenFileRecorded(/*expectedCnt*/ 1); } @@ -153,6 +156,7 @@ DropDataContentProvider.setClearCachedDataIntervalMs(CLEAR_CACHED_DATA_INTERVAL_MS); DropDataContentProvider.onDragEnd(true); ShadowLooper.idleMainLooper(1, TimeUnit.MILLISECONDS); + mDropDataContentProvider.openFile(uri, "r"); // Android.DragDrop.Image.UriCreatedInterval is not recorded for the first created Uri. assertImageUriCreatedIntervalRecorded(/*expectedCnt*/ 0); @@ -174,9 +178,10 @@ assertImageFirstExpiredOpenFileRecorded(/*expectedCnt*/ 1); assertImageAllExpiredOpenFileRecorded(/*expectedCnt*/ 2); + ShadowLooper.idleMainLooper(CLEAR_CACHED_DATA_INTERVAL_MS, TimeUnit.MILLISECONDS); + assertImageFirstOpenFileRecorded(/*expectedCnt*/ 1); // Android.DragDrop.Image.OpenFileTime.LastAttempt is not recorded because #clearCache is // cancelled by the second #cache. - ShadowLooper.idleMainLooper(CLEAR_CACHED_DATA_INTERVAL_MS, TimeUnit.MILLISECONDS); assertImageLastOpenFileRecorded(/*expectedCnt*/ 0); } @@ -187,15 +192,22 @@ ShadowRecordHistogram.getHistogramTotalCountForTesting(histogram)); } - private void assertImageLastOpenFileRecorded(int expectedCnt) { - final String histogram = "Android.DragDrop.Image.OpenFileTime.LastAttempt"; + private void assertImageUriCreatedIntervalRecorded(int expectedCnt) { + final String histogram = "Android.DragDrop.Image.UriCreatedInterval"; final String errorMsg = "<" + histogram + "> is not recorded properly."; Assert.assertEquals(errorMsg, expectedCnt, ShadowRecordHistogram.getHistogramTotalCountForTesting(histogram)); } - private void assertImageUriCreatedIntervalRecorded(int expectedCnt) { - final String histogram = "Android.DragDrop.Image.UriCreatedInterval"; + private void assertImageFirstOpenFileRecorded(int expectedCnt) { + final String histogram = "Android.DragDrop.Image.OpenFileTime.FirstAttempt"; + final String errorMsg = "<" + histogram + "> is not recorded properly."; + Assert.assertEquals(errorMsg, expectedCnt, + ShadowRecordHistogram.getHistogramTotalCountForTesting(histogram)); + } + + private void assertImageLastOpenFileRecorded(int expectedCnt) { + final String histogram = "Android.DragDrop.Image.OpenFileTime.LastAttempt"; final String errorMsg = "<" + histogram + "> is not recorded properly."; Assert.assertEquals(errorMsg, expectedCnt, ShadowRecordHistogram.getHistogramTotalCountForTesting(histogram));
diff --git a/ui/base/webui/web_ui_util.cc b/ui/base/webui/web_ui_util.cc index c991b5f..fab26d4 100644 --- a/ui/base/webui/web_ui_util.cc +++ b/ui/base/webui/web_ui_util.cc
@@ -19,6 +19,7 @@ #include "build/chromeos_buildflags.h" #include "net/base/escape.h" #include "third_party/modp_b64/modp_b64.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/template_expressions.h"
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h index 19bc094..bf36efe1 100644 --- a/ui/base/x/x11_util.h +++ b/ui/base/x/x11_util.h
@@ -21,6 +21,7 @@ #include "base/synchronization/lock.h" #include "build/build_config.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkColorType.h" #include "ui/base/x/x11_cursor.h" #include "ui/gfx/icc_profile.h" #include "ui/gfx/image/image_skia.h"
diff --git a/ui/color/color_id.h b/ui/color/color_id.h index 5a188c11..d9db2d7 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h
@@ -58,6 +58,7 @@ E_CPONLY(kColorButtonForegroundDisabled) \ E_CPONLY(kColorButtonForegroundProminent) \ E_CPONLY(kColorButtonForegroundUnchecked) \ + E_CPONLY(kColorCustomFrameCaptionForeground) \ E_CPONLY(kColorDebugBoundsOutline) \ E_CPONLY(kColorDebugContentOutline) \ E_CPONLY(kColorDialogBackground) \
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc index cce1bf8df..a89f393 100644 --- a/ui/color/ui_color_mixer.cc +++ b/ui/color/ui_color_mixer.cc
@@ -47,6 +47,7 @@ mixer[kColorButtonForegroundProminent] = GetColorWithMaxContrast(kColorButtonBackgroundProminent); mixer[kColorButtonForegroundUnchecked] = {kColorSecondaryForeground}; + mixer[kColorCustomFrameCaptionForeground] = {SK_ColorWHITE}; mixer[kColorDebugBoundsOutline] = SetAlpha(SK_ColorRED, 0x30); mixer[kColorDebugContentOutline] = SetAlpha(SK_ColorBLUE, 0x30); mixer[kColorDialogBackground] = {kColorPrimaryBackground};
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js index d05b3e39b..9104b94 100644 --- a/ui/file_manager/file_manager/common/js/util.js +++ b/ui/file_manager/file_manager/common/js/util.js
@@ -1087,6 +1087,7 @@ case VolumeManagerCommon.RootType.ANDROID_FILES: case VolumeManagerCommon.RootType.DOCUMENTS_PROVIDER: case VolumeManagerCommon.RootType.SMB: + case VolumeManagerCommon.RootType.GUEST_OS: return locationInfo.volumeInfo.label; default: console.error('Unsupported root type: ' + locationInfo.rootType); @@ -1135,6 +1136,7 @@ * - "My Files"/{Downloads,PvmDefault,Camera} directories, or * - "Play Files"/{<any-directory>,DCIM/Camera} directories, or * - "Linux Files" root "/" directory + * - "Guest OS" root "/" directory * * which cannot be modified such as deleted/cut or renamed. * @@ -1211,6 +1213,10 @@ return entry.fullPath === '/'; } + if (volumeType === VolumeManagerCommon.RootType.GUEST_OS) { + return entry.fullPath === '/'; + } + return false; };
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js index d8de0b05..86eb7da 100644 --- a/ui/file_manager/file_manager/foreground/js/directory_model.js +++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -810,7 +810,9 @@ return; } - // Do not rescan for crostini errors. + // Do not rescan for Guest OS (including Crostini) errors. + // TODO(crbug/1293229): Guest OS currently reuses the Crostini error + // string, but once it gets its own strings this needs to include both. if (event.error.name === constants.CROSTINI_CONNECT_ERR) { return; } @@ -1306,7 +1308,12 @@ event.added[0].source === VolumeManagerCommon.Source.FILE) || (event.added[0].volumeType === VolumeManagerCommon.VolumeType.CROSTINI && - this.getCurrentRootType() === VolumeManagerCommon.RootType.CROSTINI)) { + this.getCurrentRootType() === VolumeManagerCommon.RootType.CROSTINI) || + // TODO(crbug/1293229): Don't redirect if the user is looking at a + // different Guest OS folder. + (event.added[0].volumeType === + VolumeManagerCommon.VolumeType.GUEST_OS && + this.getCurrentRootType() === VolumeManagerCommon.RootType.GUEST_OS)) { // Resolving a display root on FSP volumes is instant, despite the // asynchronous call. event.added[0].resolveDisplayRoot().then((displayRoot) => {
diff --git a/ui/file_manager/file_manager/foreground/js/navigation_list_model.js b/ui/file_manager/file_manager/foreground/js/navigation_list_model.js index dc834d3..cbeb331e 100644 --- a/ui/file_manager/file_manager/foreground/js/navigation_list_model.js +++ b/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
@@ -687,13 +687,26 @@ // mounting, which means we're just dealing with fake entries here. This // gets updated to handle real volumes once we support mounting them. if (util.isGuestOsEnabled()) { - // Remove all GuestOs entries and add the current ones. + // Remove all GuestOs placeholders, we readd any if they're needed. myFilesEntry.removeAllByRootType(VolumeManagerCommon.RootType.GUEST_OS); + + // For each volume, add any which aren't already in the list. + for (const volume of getVolumes( + VolumeManagerCommon.VolumeType.GUEST_OS)) { + if (myFilesEntry.findIndexByVolumeInfo(volume.volumeInfo) === -1) { + myFilesEntry.addEntry(new VolumeEntry(volume.volumeInfo)); + } + } + // Now we add any guests we know about which don't already have a + // matching volume. for (const item of this.guestOsPlaceholders_) { - // It's a fake item, link the navigation model so DirectoryTree can - // choose the correct DirectoryItem for it. - item.entry.navigationModel = item; - myFilesEntry.addEntry(item.entry); + if (!getVolumes(VolumeManagerCommon.VolumeType.GUEST_OS) + .find(v => v.label === item.label)) { + // Since it's a fake item, link the navigation model so + // DirectoryTree can choose the correct DirectoryItem for it. + item.entry.navigationModel = item; + myFilesEntry.addEntry(item.entry); + } } }
diff --git a/ui/file_manager/file_manager/foreground/js/quick_view_uma.js b/ui/file_manager/file_manager/foreground/js/quick_view_uma.js index 69d629b..d8e43022 100644 --- a/ui/file_manager/file_manager/foreground/js/quick_view_uma.js +++ b/ui/file_manager/file_manager/foreground/js/quick_view_uma.js
@@ -81,7 +81,7 @@ console.error('Unknown volume type: ' + volumeType); } // Record stats of dialog types. It must be in sync with - // FileDialogType enum in tools/metrics/histograms/histogram.xml. + // FileDialogType enum in tools/metrics/histograms/enums.xml. metrics.recordEnum('QuickView.DialogType', this.dialogType_, [ DialogType.SELECT_FOLDER, DialogType.SELECT_UPLOAD_FOLDER, @@ -105,7 +105,7 @@ }; /** - * The order should be consistnet with the definition in histograms.xml. + * The order should be consistent with the definition in histograms.xml. * * @const {!Array<QuickViewUma.WayToOpen>} * @private @@ -118,7 +118,7 @@ /** * Keep the order of this in sync with FileManagerVolumeType in - * tools/metrics/histograms/histograms.xml. + * tools/metrics/histograms/enums.xml. * * @type {!Array<VolumeManagerCommon.VolumeType>} * @const @@ -136,4 +136,5 @@ VolumeManagerCommon.VolumeType.DOCUMENTS_PROVIDER, VolumeManagerCommon.VolumeType.SMB, VolumeManagerCommon.VolumeType.SYSTEM_INTERNAL, + VolumeManagerCommon.VolumeType.GUEST_OS, ];
diff --git a/ui/file_manager/integration_tests/file_manager/guest_os.js b/ui/file_manager/integration_tests/file_manager/guest_os.js index cd75a93..d9029ad3 100644 --- a/ui/file_manager/integration_tests/file_manager/guest_os.js +++ b/ui/file_manager/integration_tests/file_manager/guest_os.js
@@ -49,35 +49,6 @@ }; /** - * Tests that clicking on a Guest OS entry in the sidebar triggers a mount - * event, and an error is returned. - * TODO(crbug/1293229): Scan errors don't seem to show up in the UI any more. - * Need to fix that, then update this test to check for the expected error. - */ -testcase.mountGuestError = async () => { - const guestName = 'Jellylorum'; - // Start off with one guest. - const id = await sendTestMessage( - {name: 'registerMountableGuest', displayName: guestName}); - // Open the files app. - const appId = - await setupAndWaitUntilReady(RootPath.DOWNLOADS, [ENTRIES.hello], []); - - // Wait for our guest to appear and click it. - const query = '#directory-tree [root-type-icon=guest_os]'; - await remoteCall.waitAndClickElement(appId, query); - - // Check that the Guest is selected. - // TODO(crbug/1293229): It looks like scan errors are no longer surfaced in - // the UI, I remember they used to be? Need to figure out surfacing errors and - // then we check that instead. - await remoteCall.waitForElement(appId, `#breadcrumbs[path=${guestName}]`); - - // We expect there to be an error, from the mount failure. - return IGNORE_APP_ERRORS; -}; - -/** * Tests that the list of guests is updated when new guests are added or * removed. */ @@ -119,3 +90,42 @@ } await remoteCall.waitForElementsCount(appId, [query], names.length); }; + +/** + * Tests that clicking on a Guest OS entry in the sidebar mounts the + * corresponding volume, and that the UI is update appropriately (volume in + * sidebar and not fake, contents show up once done loading, etc). + */ +testcase.mountGuestSuccess = async () => { + const guestName = 'JennyAnyDots'; + // Start off with one guest. + const id = await sendTestMessage( + {name: 'registerMountableGuest', displayName: guestName, canMount: true}); + // Open the files app. + const appId = + await setupAndWaitUntilReady(RootPath.DOWNLOADS, [ENTRIES.hello], []); + + // Wait for our guest to appear and click it. + const query = '#directory-tree [root-type-icon=guest_os]'; + await remoteCall.waitAndClickElement(appId, query); + + // Wait until it's loaded. + await remoteCall.waitForElement( + appId, `#breadcrumbs[path="My files/${guestName}"]`); + + // We should have a volume in the sidebar + await remoteCall.waitForElement( + appId, + `.tree-item[volume-type-for-testing="guest_os"][entry-label="${ + guestName}"]`); + + // We should no longer have a fake + await remoteCall.waitForElementsCount(appId, [query], 0); + + // And the volume should be focused in the main window + await remoteCall.waitForElement( + appId, `#list-container[scan-completed="${guestName}"]`); + + // It should not be read-only + await remoteCall.waitForElement(appId, '#read-only-indicator[hidden]'); +};
diff --git a/ui/gfx/image/image_ios_unittest.mm b/ui/gfx/image/image_ios_unittest.mm index 961c1c3e..5994411d 100644 --- a/ui/gfx/image/image_ios_unittest.mm +++ b/ui/gfx/image/image_ios_unittest.mm
@@ -10,6 +10,7 @@ #include "base/mac/scoped_cftyperef.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/image/image_skia.h" namespace {
diff --git a/ui/gfx/image/image_skia.cc b/ui/gfx/image/image_skia.cc index 27dbf9b..002514e 100644 --- a/ui/gfx/image/image_skia.cc +++ b/ui/gfx/image/image_skia.cc
@@ -17,6 +17,7 @@ #include "base/no_destructor.h" #include "base/sequence_checker.h" #include "build/build_config.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size_conversions.h"
diff --git a/ui/gfx/image/image_skia.h b/ui/gfx/image/image_skia.h index a8cf256..8679035 100644 --- a/ui/gfx/image/image_skia.h +++ b/ui/gfx/image/image_skia.h
@@ -10,9 +10,10 @@ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/gfx_export.h" +class SkBitmap; + namespace gfx { class ImageSkiaRep; class ImageSkiaSource;
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h index d7bf6e53..d3039d7 100644 --- a/ui/gtk/window_frame_provider_gtk.h +++ b/ui/gtk/window_frame_provider_gtk.h
@@ -6,6 +6,7 @@ #define UI_GTK_WINDOW_FRAME_PROVIDER_GTK_H_ #include "base/containers/flat_map.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/views/linux_ui/linux_ui.h" #include "ui/views/linux_ui/window_frame_provider.h"
diff --git a/ui/message_center/views/notification_header_view.h b/ui/message_center/views/notification_header_view.h index 313675b..28d03c8e 100644 --- a/ui/message_center/views/notification_header_view.h +++ b/ui/message_center/views/notification_header_view.h
@@ -9,6 +9,7 @@ #include "base/memory/raw_ptr.h" #include "base/timer/timer.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/gfx/text_constants.h" #include "ui/message_center/message_center_export.h"
diff --git a/ui/message_center/views/notification_header_view_unittest.cc b/ui/message_center/views/notification_header_view_unittest.cc index 9ba4782b9..935dbb4 100644 --- a/ui/message_center/views/notification_header_view_unittest.cc +++ b/ui/message_center/views/notification_header_view_unittest.cc
@@ -11,6 +11,7 @@ #include "base/test/task_environment.h" #include "base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/color_utils.h"
diff --git a/ui/ozone/platform/x11/test/x11_drag_drop_client_unittest.cc b/ui/ozone/platform/x11/test/x11_drag_drop_client_unittest.cc index b7de53a..e4f8670 100644 --- a/ui/ozone/platform/x11/test/x11_drag_drop_client_unittest.cc +++ b/ui/ozone/platform/x11/test/x11_drag_drop_client_unittest.cc
@@ -19,6 +19,7 @@ #include "base/test/task_environment.h" #include "base/threading/thread_task_runner_handle.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-shared.h"
diff --git a/ui/shell_dialogs/select_file_dialog_lacros.cc b/ui/shell_dialogs/select_file_dialog_lacros.cc index c5eb1f4..54fc9ed5 100644 --- a/ui/shell_dialogs/select_file_dialog_lacros.cc +++ b/ui/shell_dialogs/select_file_dialog_lacros.cc
@@ -101,6 +101,10 @@ GetShellWindowUniqueId(owning_window) == owning_shell_window_id_; } +void SelectFileDialogLacros::ListenerDestroyed() { + listener_ = nullptr; +} + void SelectFileDialogLacros::SelectFileImpl( Type type, const std::u16string& title,
diff --git a/ui/shell_dialogs/select_file_dialog_lacros.h b/ui/shell_dialogs/select_file_dialog_lacros.h index 7d513c6..8c92c49c 100644 --- a/ui/shell_dialogs/select_file_dialog_lacros.h +++ b/ui/shell_dialogs/select_file_dialog_lacros.h
@@ -48,7 +48,7 @@ void* params) override; bool HasMultipleFileTypeChoicesImpl() override; bool IsRunning(gfx::NativeWindow owning_window) const override; - void ListenerDestroyed() override {} + void ListenerDestroyed() override; private: // Private because SelectFileDialog is ref-counted.
diff --git a/ui/views/bubble/bubble_border.cc b/ui/views/bubble/bubble_border.cc index 0f88d9d..b151e2ae 100644 --- a/ui/views/bubble/bubble_border.cc +++ b/ui/views/bubble/bubble_border.cc
@@ -14,9 +14,13 @@ #include "base/no_destructor.h" #include "base/notreached.h" #include "cc/paint/paint_flags.h" -#include "third_party/skia/include/core/SkDrawLooper.h" +#include "third_party/skia/include/core/SkBlendMode.h" +#include "third_party/skia/include/core/SkClipOp.h" #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkPoint.h" +#include "third_party/skia/include/core/SkRRect.h" +#include "third_party/skia/include/core/SkRect.h" +#include "third_party/skia/include/core/SkScalar.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" #include "ui/gfx/canvas.h"
diff --git a/ui/views/bubble/bubble_border.h b/ui/views/bubble/bubble_border.h index b7f5fd6..fa27820 100644 --- a/ui/views/bubble/bubble_border.h +++ b/ui/views/bubble/bubble_border.h
@@ -17,6 +17,7 @@ #include "ui/views/views_export.h" class SkRRect; +struct SkRect; namespace gfx { class Canvas;
diff --git a/ui/views/bubble/bubble_frame_view_unittest.cc b/ui/views/bubble/bubble_frame_view_unittest.cc index ef62086..80cab8c 100644 --- a/ui/views/bubble/bubble_frame_view_unittest.cc +++ b/ui/views/bubble/bubble_frame_view_unittest.cc
@@ -11,6 +11,8 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "build/build_config.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/events/base_event_utils.h" #include "ui/events/event.h" #include "ui/gfx/geometry/insets.h"
diff --git a/ui/views/controls/button/image_button_unittest.cc b/ui/views/controls/button/image_button_unittest.cc index 2a5d1d7..2c9b333c 100644 --- a/ui/views/controls/button/image_button_unittest.cc +++ b/ui/views/controls/button/image_button_unittest.cc
@@ -4,6 +4,7 @@ #include "ui/views/controls/button/image_button.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/layout.h" #include "ui/views/border.h" #include "ui/views/style/platform_style.h"
diff --git a/ui/views/controls/button/md_text_button_unittest.cc b/ui/views/controls/button/md_text_button_unittest.cc index 5602477..d7c3239 100644 --- a/ui/views/controls/button/md_text_button_unittest.cc +++ b/ui/views/controls/button/md_text_button_unittest.cc
@@ -4,6 +4,8 @@ #include "ui/views/controls/button/md_text_button.h" +#include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/skia/include/core/SkColor.h" #include "ui/color/color_id.h" #include "ui/color/color_provider.h" #include "ui/views/background.h"
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc index 2b3dd7ce..3f340e5 100644 --- a/ui/views/window/custom_frame_view.cc +++ b/ui/views/window/custom_frame_view.cc
@@ -371,8 +371,10 @@ gfx::Rect rect = title_bounds_; rect.set_x(GetMirroredXForRect(title_bounds_)); - canvas->DrawStringRect(delegate->GetWindowTitle(), GetWindowTitleFontList(), - SK_ColorWHITE, rect); + canvas->DrawStringRect( + delegate->GetWindowTitle(), GetWindowTitleFontList(), + GetColorProvider()->GetColor(ui::kColorCustomFrameCaptionForeground), + rect); } void CustomFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {