diff --git a/DEPS b/DEPS index 4468b0f..ac539b8 100644 --- a/DEPS +++ b/DEPS
@@ -207,11 +207,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': '1fd3e5d89a8f840f859fb9c379e58defe9c399ab', + 'angle_revision': '527064f19fb0d29e90ce0d69b07bbdb8533b3a58', # 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': '02818d1fdd05410fa9d3ffa6f9ce313a63d03dcf', + 'swiftshader_revision': '375fee944c76785a7027789a2336b0ff7a821041', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -266,7 +266,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': '0d0e5bfe429c3b6cb79c977dbec15ff3ce18bea2', + 'devtools_frontend_revision': '13f6549d5a10990a334488d85684bed77c72f2d0', # 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. @@ -302,7 +302,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'spv_tools_revision': 'fcb22ecf0f7e7baa761c7ab01317cca5b14fcc35', + 'spv_tools_revision': 'd91afd8de27a064f938a196fdea2ace234971faa', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -881,7 +881,7 @@ # Tools used when building Chrome for Chrome OS. This affects both the Simple # Chrome workflow, as well as the chromeos-chrome ebuild. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '124ea2073720aa86e57239b1483a50961166382c', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'af5911446cd05354464bc60274f91c6a304d6ade', 'condition': 'checkout_chromeos', }, @@ -1254,7 +1254,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'd2958971d9c5140dc046c60e02229fbb569df502', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '2e66e500622a31640e7635d7beba406bb6089a64', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1486,7 +1486,7 @@ }, 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '5b5abd79106a1770bb6fdab9e40f7270c7d4259a', + Var('webrtc_git') + '/src.git' + '@' + 'b33a7186e6ab94f3cc77d82e6d6de08350fbb232', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1558,7 +1558,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@fbeee8fe0c0bc1ee5a70f7375dd0cb048ea7bafe', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@7f2fceb9ed0ee4c1b8105fc9e3069ef1b21d5f0d', 'condition': 'checkout_src_internal', }, @@ -1566,7 +1566,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'T6gPp8Ky1tPZf16RQSiLa1YTO1Q2iv-5oa8YHP4nq8YC', + 'version': '4PfglR4idxErCwlOi4wGGe41pnR_tcljR1Vo_Sa5OzcC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1577,7 +1577,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'NmnsodASCDlnL1R0fAI_q3in9QdwqYpagivmAet3MhcC', + 'version': 'V6gjYXMRLJxHGHFBf1xdXOzgqXS9c8VnXY5Dm66uN6AC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal',
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index ab30915e..66c115da 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -332,7 +332,6 @@ '^chrome/browser/media_galleries/', '^chrome/browser/media/', '^chrome/browser/metrics/', - '^chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc', '^chrome/browser/net/', '^chrome/browser/notifications/', '^chrome/browser/ntp_tiles/ntp_tiles_browsertest.cc',
diff --git a/android_webview/tools/system_webview_shell/test/data/webexposed/not-webview-exposed.txt b/android_webview/tools/system_webview_shell/test/data/webexposed/not-webview-exposed.txt index 0ec9993..7ee756cc 100644 --- a/android_webview/tools/system_webview_shell/test/data/webexposed/not-webview-exposed.txt +++ b/android_webview/tools/system_webview_shell/test/data/webexposed/not-webview-exposed.txt
@@ -134,6 +134,11 @@ interface ServiceWorkerRegistration : EventTarget getter backgroundFetch +# Periodic Background Sync API is not enabled in Android webview, crbug.com/1134599 +interface PeriodicSyncManager +interface ServiceWorkerRegistration : EventTarget + getter periodicSync + # support_webgl2_compute_context not supported on android, crbug.com/865569 interface WebGL2ComputeRenderingContext
diff --git a/ash/ambient/ambient_constants.h b/ash/ambient/ambient_constants.h index 56b010c7..426a538 100644 --- a/ash/ambient/ambient_constants.h +++ b/ash/ambient/ambient_constants.h
@@ -28,6 +28,9 @@ constexpr base::TimeDelta kWeatherRefreshInterval = base::TimeDelta::FromMinutes(5); +// The delay between ambient mode starts and enabling lock screen. +constexpr base::TimeDelta kLockScreenDelay = base::TimeDelta::FromSeconds(5); + // The batch size of topics to fetch in one request. constexpr int kTopicsBatchSize = 100;
diff --git a/ash/ambient/ambient_controller.cc b/ash/ambient/ambient_controller.cc index e97d001..40d4d5e 100644 --- a/ash/ambient/ambient_controller.cc +++ b/ash/ambient/ambient_controller.cc
@@ -96,10 +96,6 @@ return visibility == AmbientUiVisibility::kHidden; } -bool IsLockScreenUi(AmbientUiMode mode) { - return mode == AmbientUiMode::kLockScreenUi; -} - bool IsAmbientModeEnabled() { if (!AmbientClient::Get()->IsAmbientModeAllowed()) return false; @@ -204,7 +200,8 @@ // Record metrics on ambient mode usage. ambient::RecordAmbientModeActivation( - /*ui_mode=*/ambient_ui_model_.ui_mode(), + /*ui_mode=*/LockScreen::HasInstance() ? AmbientUiMode::kLockScreenUi + : AmbientUiMode::kInSessionUi, /*tablet_mode=*/Shell::Get()->IsInTabletMode()); DCHECK(!start_time_); @@ -309,7 +306,11 @@ // wait. RequestAccessToken(base::DoNothing(), /*may_refresh_token_on_lock=*/true); - ShowUi(AmbientUiMode::kLockScreenUi); + if (!IsShown()) { + // When lock screen starts, we don't immediately show the UI. The Ui is + // hidden and will show after a delay. + ShowHiddenUi(); + } } else { // Ambient screen will be destroyed along with the lock screen when user // logs in. @@ -364,7 +365,7 @@ is_screen_off_ = false; // If screen is back on, turn on ambient mode for lock screen. if (LockScreen::HasInstance()) - ShowUi(AmbientUiMode::kLockScreenUi); + ShowHiddenUi(); } void AmbientController::ScreenIdleStateChanged( @@ -382,16 +383,7 @@ if (!idle_state.dimmed()) return; - auto* session_controller = Shell::Get()->session_controller(); - if (session_controller->CanLockScreen() && - session_controller->ShouldLockScreenAutomatically()) { - if (!session_controller->IsScreenLocked()) { - // TODO(b/161469136): revise this behavior after further discussion. - Shell::Get()->session_controller()->LockScreen(); - } - } else { - ShowUi(AmbientUiMode::kInSessionUi); - } + ShowUi(); } void AmbientController::AddAmbientViewDelegateObserver( @@ -404,8 +396,8 @@ delegate_.RemoveObserver(observer); } -void AmbientController::ShowUi(AmbientUiMode mode) { - DVLOG(1) << "ShowUi: " << mode; +void AmbientController::ShowUi() { + DVLOG(1) << __func__; // TODO(meilinw): move the eligibility check to the idle entry point once // implemented: b/149246117. @@ -414,30 +406,24 @@ return; } - ambient_ui_model_.SetUiMode(mode); - switch (mode) { - case AmbientUiMode::kInSessionUi: - ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kShown); - break; - case AmbientUiMode::kLockScreenUi: - ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kHidden); - break; - } + ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kShown); } -void AmbientController::CloseUi() { - ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kClosed); -} - -void AmbientController::HideLockScreenUi() { - DCHECK(IsLockScreenUi(ambient_ui_model_.ui_mode())); +void AmbientController::ShowHiddenUi() { + DVLOG(1) << __func__; ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kHidden); } +void AmbientController::CloseUi() { + DVLOG(1) << __func__; + + ambient_ui_model_.SetUiVisibility(AmbientUiVisibility::kClosed); +} + void AmbientController::ToggleInSessionUi() { - if (!container_view_) - ShowUi(AmbientUiMode::kInSessionUi); + if (ambient_ui_model_.ui_visibility() == AmbientUiVisibility::kClosed) + ShowUi(); else CloseUi(); } @@ -448,16 +434,12 @@ void AmbientController::OnBackgroundPhotoEvents() { // Dismisses the ambient screen when user interacts with the background photo. - if (IsLockScreenUi(ambient_ui_model_.ui_mode())) - HideLockScreenUi(); + if (LockScreen::HasInstance()) + ShowHiddenUi(); else CloseUi(); } -void AmbientController::UpdateUiMode(AmbientUiMode ui_mode) { - ambient_ui_model_.SetUiMode(ui_mode); -} - void AmbientController::AcquireWakeLock() { if (!wake_lock_) { mojo::Remote<device::mojom::WakeLockProvider> provider; @@ -472,6 +454,17 @@ DCHECK(wake_lock_); wake_lock_->RequestWakeLock(); VLOG(1) << "Acquired wake lock"; + + auto* session_controller = Shell::Get()->session_controller(); + if (session_controller->CanLockScreen() && + session_controller->ShouldLockScreenAutomatically()) { + if (!session_controller->IsScreenLocked()) { + delayed_lock_timer_.Start( + FROM_HERE, kLockScreenDelay, base::BindOnce([]() { + Shell::Get()->session_controller()->LockScreen(); + })); + } + } } void AmbientController::ReleaseWakeLock() { @@ -480,6 +473,8 @@ wake_lock_->CancelWakeLock(); VLOG(1) << "Released wake lock"; + + delayed_lock_timer_.Stop(); } void AmbientController::CloseWidget(bool immediately) {
diff --git a/ash/ambient/ambient_controller.h b/ash/ambient/ambient_controller.h index b088199..47ccb1b 100644 --- a/ash/ambient/ambient_controller.h +++ b/ash/ambient/ambient_controller.h
@@ -20,6 +20,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/scoped_observer.h" +#include "base/timer/timer.h" #include "chromeos/dbus/power/power_manager_client.h" #include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h" @@ -71,12 +72,12 @@ void AddAmbientViewDelegateObserver(AmbientViewDelegateObserver* observer); void RemoveAmbientViewDelegateObserver(AmbientViewDelegateObserver* observer); - // Invoked to show/close ambient UI in |mode|. - void ShowUi(AmbientUiMode mode); + void ShowUi(); + // Ui will be enabled but not shown immediately. If there is no user activity + // Ui will be shown after a short delay. + void ShowHiddenUi(); void CloseUi(); - void HideLockScreenUi(); - void ToggleInSessionUi(); // Returns true if the |container_view_| is currently visible. @@ -85,8 +86,6 @@ // Handles events on the background photo. void OnBackgroundPhotoEvents(); - void UpdateUiMode(AmbientUiMode ui_mode); - void RequestAccessToken( AmbientAccessTokenController::AccessTokenCallback callback, bool may_refresh_token_on_lock = false); @@ -185,6 +184,8 @@ // Used to record Ambient mode engagement metrics. base::Optional<base::Time> start_time_ = base::nullopt; + base::OneShotTimer delayed_lock_timer_; + base::WeakPtrFactory<AmbientController> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AmbientController); };
diff --git a/ash/ambient/ambient_controller_unittest.cc b/ash/ambient/ambient_controller_unittest.cc index a9724db..56e9c72 100644 --- a/ash/ambient/ambient_controller_unittest.cc +++ b/ash/ambient/ambient_controller_unittest.cc
@@ -43,7 +43,7 @@ // Ambient mode will show after inacivity and successfully loading first // image. FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()); EXPECT_EQ(AmbientUiModel::Get()->ui_visibility(), @@ -65,7 +65,7 @@ // Ambient mode will not show after inacivity and successfully loading first // image. FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_FALSE(container_view()); EXPECT_EQ(AmbientUiModel::Get()->ui_visibility(), @@ -80,7 +80,7 @@ TEST_F(AmbientControllerTest, HideAmbientScreen) { LockScreen(); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()); EXPECT_EQ(AmbientUiModel::Get()->ui_visibility(), @@ -101,7 +101,7 @@ TEST_F(AmbientControllerTest, CloseAmbientScreenUponUnlock) { LockScreen(); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()); EXPECT_EQ(AmbientUiModel::Get()->ui_visibility(), @@ -294,16 +294,13 @@ TEST_F(AmbientControllerTest, CheckAcquireAndReleaseWakeLockWhenBatteryIsCharging) { // Simulate a device being connected to a charger initially. - power_manager::PowerSupplyProperties proto; - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_CHARGING); - PowerStatus::Get()->SetProtoForTesting(proto); + SetPowerStateCharging(); // Lock screen to start ambient mode, and flush the loop to ensure // the acquire wake lock request has reached the wake lock provider. LockScreen(); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_EQ(1, GetNumOfActiveWakeLocks( device::mojom::WakeLockType::kPreventDisplaySleep)); @@ -330,17 +327,11 @@ TEST_F(AmbientControllerTest, CheckAcquireAndReleaseWakeLockWhenBatteryStateChanged) { - // Simulate a device being disconnected with a charger initially. - power_manager::PowerSupplyProperties proto; - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_DISCHARGING); - proto.set_external_power( - power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED); - PowerStatus::Get()->SetProtoForTesting(proto); + SetPowerStateDischarging(); // Lock screen to start ambient mode. LockScreen(); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(ambient_controller()->IsShown()); // Should not acquire wake lock when device is not charging. @@ -348,14 +339,7 @@ device::mojom::WakeLockType::kPreventDisplaySleep)); // Connect the device with a charger. - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_CHARGING); - proto.set_external_power( - power_manager::PowerSupplyProperties_ExternalPower_AC); - PowerStatus::Get()->SetProtoForTesting(proto); - // Notify the controller about the power status change, and flush the loop to - // ensure the wake lock request has reached the wake lock provider. - ambient_controller()->OnPowerStatusChanged(); + SetPowerStateCharging(); base::RunLoop().RunUntilIdle(); // Should acquire the wake lock when battery is charging. @@ -363,24 +347,14 @@ device::mojom::WakeLockType::kPreventDisplaySleep)); // Simulates a full battery. - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_FULL); - proto.set_external_power( - power_manager::PowerSupplyProperties_ExternalPower_AC); - PowerStatus::Get()->SetProtoForTesting(proto); - ambient_controller()->OnPowerStatusChanged(); + SetPowerStateFull(); // Should keep the wake lock as the charger is still connected. EXPECT_EQ(1, GetNumOfActiveWakeLocks( device::mojom::WakeLockType::kPreventDisplaySleep)); // Disconnects the charger again. - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_DISCHARGING); - proto.set_external_power( - power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED); - PowerStatus::Get()->SetProtoForTesting(proto); - ambient_controller()->OnPowerStatusChanged(); + SetPowerStateDischarging(); base::RunLoop().RunUntilIdle(); // Should release the wake lock when battery is not charging. @@ -395,7 +369,7 @@ TEST_F(AmbientControllerTest, ShouldDismissContainerViewWhenKeyPressed) { ShowAmbientScreen(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()->GetWidget()->IsVisible()); // Simulates a random keyboard press event. @@ -409,7 +383,7 @@ TEST_F(AmbientControllerTest, ShouldDismissContainerViewOnRealMouseMove) { ShowAmbientScreen(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()->GetWidget()->IsVisible()); // Simulates a tiny mouse move within the threshold, which should be ignored. @@ -425,29 +399,34 @@ TEST_F(AmbientControllerTest, ShouldDismissAndThenComesBack) { LockScreen(); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()->GetWidget()->IsVisible()); GetEventGenerator()->PressKey(ui::KeyboardCode::VKEY_1, ui::EF_NONE); EXPECT_FALSE(container_view()); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()->GetWidget()->IsVisible()); } TEST_F(AmbientControllerTest, ShouldShowAmbientScreenWithLockscreenWhenScreenIsDimmed) { GetSessionControllerClient()->SetShouldLockScreenAutomatically(true); + SetPowerStateCharging(); EXPECT_FALSE(ambient_controller()->IsShown()); - // Should lock the device and enter ambient mode when the screen is dimmed. + // Should enter ambient mode when the screen is dimmed. SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/false); - EXPECT_TRUE(IsLocked()); + EXPECT_FALSE(IsLocked()); EXPECT_FALSE(ambient_controller()->IsShown()); - FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); + EXPECT_TRUE(ambient_controller()->IsShown()); + + FastForwardToLockScreen(); + EXPECT_TRUE(IsLocked()); + // Should not disrupt ongoing ambient mode. EXPECT_TRUE(ambient_controller()->IsShown()); // Closes ambient for clean-up. @@ -455,8 +434,35 @@ EXPECT_FALSE(ambient_controller()->IsShown()); } +TEST_F(AmbientControllerTest, + ShouldShowAmbientScreenWithoutLockscreenWhenScreenIsDimmed) { + GetSessionControllerClient()->SetShouldLockScreenAutomatically(true); + // When power is discharging, we do not lock the screen with ambient + // mode since we do not prevent the device go to sleep which will natually + // lock the device. + SetPowerStateDischarging(); + EXPECT_FALSE(ambient_controller()->IsShown()); + + // Should not lock the device and enter ambient mode when the screen is + // dimmed. + SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/false); + EXPECT_FALSE(IsLocked()); + EXPECT_FALSE(ambient_controller()->IsShown()); + + FastForwardToInactivity(); + FastForwardTiny(); + EXPECT_TRUE(ambient_controller()->IsShown()); + + FastForwardToLockScreen(); + EXPECT_FALSE(IsLocked()); + + // Closes ambient for clean-up. + CloseAmbientScreen(); +} + TEST_F(AmbientControllerTest, ShouldShowAmbientScreenWhenScreenIsDimmed) { GetSessionControllerClient()->SetShouldLockScreenAutomatically(false); + SetPowerStateCharging(); EXPECT_FALSE(ambient_controller()->IsShown()); // Should not lock the device but enter ambient mode when the screen is @@ -464,9 +470,12 @@ SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/false); EXPECT_FALSE(IsLocked()); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(ambient_controller()->IsShown()); + FastForwardToLockScreen(); + EXPECT_FALSE(IsLocked()); + // Closes ambient for clean-up. CloseAmbientScreen(); } @@ -481,42 +490,46 @@ SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/false); EXPECT_FALSE(IsLocked()); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(ambient_controller()->IsShown()); // Should dismiss ambient mode screen. SetScreenBrightnessAndWait(/*percent=*/0); SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/true); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_FALSE(ambient_controller()->IsShown()); // Screen back on again, should not have ambient screen. SetScreenBrightnessAndWait(/*percent=*/50); SetScreenIdleStateAndWait(/*dimmed=*/false, /*off=*/false); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_FALSE(ambient_controller()->IsShown()); } TEST_F(AmbientControllerTest, ShouldHideAmbientScreenWhenDisplayIsOffThenComesBackWithLockScreen) { GetSessionControllerClient()->SetShouldLockScreenAutomatically(true); + SetPowerStateCharging(); EXPECT_FALSE(ambient_controller()->IsShown()); // Should not lock the device and enter ambient mode when the screen is // dimmed. SetScreenBrightnessAndWait(/*percent=*/50); SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/false); - EXPECT_TRUE(IsLocked()); + EXPECT_FALSE(IsLocked()); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(ambient_controller()->IsShown()); + FastForwardToLockScreen(); + EXPECT_TRUE(IsLocked()); + // Should dismiss ambient mode screen. SetScreenBrightnessAndWait(/*percent=*/0); SetScreenIdleStateAndWait(/*dimmed=*/true, /*off=*/true); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_FALSE(ambient_controller()->IsShown()); // Screen back on again, should not have ambient screen, but still has lock @@ -527,7 +540,7 @@ EXPECT_FALSE(ambient_controller()->IsShown()); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(ambient_controller()->IsShown()); } @@ -539,7 +552,7 @@ EXPECT_TRUE(cursor_manager->IsCursorVisible()); FastForwardToInactivity(); - FastForwardToNextImage(); + FastForwardTiny(); EXPECT_TRUE(container_view()); EXPECT_EQ(AmbientUiModel::Get()->ui_visibility(),
diff --git a/ash/ambient/test/ambient_ash_test_base.cc b/ash/ambient/test/ambient_ash_test_base.cc index 9626297..90b08f4 100644 --- a/ash/ambient/test/ambient_ash_test_base.cc +++ b/ash/ambient/test/ambient_ash_test_base.cc
@@ -35,6 +35,9 @@ #include "ui/views/controls/label.h" namespace ash { +namespace { +constexpr float kFastForwardFactor = 1.0001; +} // namespace class TestAmbientURLLoaderImpl : public AmbientURLLoader { public: @@ -141,7 +144,7 @@ void AmbientAshTestBase::ShowAmbientScreen() { // The widget will be destroyed in |AshTestBase::TearDown()|. - ambient_controller()->ShowUi(AmbientUiMode::kInSessionUi); + ambient_controller()->ShowUi(); // The UI only shows when images are downloaded to avoid showing blank screen. FastForwardToNextImage(); // Flush the message loop to finish all async calls. @@ -149,12 +152,11 @@ } void AmbientAshTestBase::HideAmbientScreen() { - ambient_controller()->HideLockScreenUi(); + ambient_controller()->ShowHiddenUi(); } void AmbientAshTestBase::CloseAmbientScreen() { - ambient_controller()->ambient_ui_model()->SetUiVisibility( - AmbientUiVisibility::kClosed); + ambient_controller()->CloseUi(); } void AmbientAshTestBase::LockScreen() { @@ -242,11 +244,51 @@ void AmbientAshTestBase::FastForwardToInactivity() { task_environment()->FastForwardBy( - 2 * AmbientController::kAutoShowWaitTimeInterval); + kFastForwardFactor * AmbientController::kAutoShowWaitTimeInterval); } void AmbientAshTestBase::FastForwardToNextImage() { - task_environment()->FastForwardBy(1.2 * kPhotoRefreshInterval); + task_environment()->FastForwardBy(kFastForwardFactor * kPhotoRefreshInterval); +} + +void AmbientAshTestBase::FastForwardTiny() { + // `TestAmbientURLLoaderImpl` has a small delay (1ms) to fake download delay, + // here we fake plenty of time to download the image. + task_environment()->FastForwardBy(base::TimeDelta::FromMilliseconds(10)); +} + +void AmbientAshTestBase::FastForwardToLockScreen() { + task_environment()->FastForwardBy(kFastForwardFactor * kLockScreenDelay); +} + +void AmbientAshTestBase::SetPowerStateCharging() { + power_manager::PowerSupplyProperties proto; + proto.set_battery_state( + power_manager::PowerSupplyProperties_BatteryState_CHARGING); + proto.set_external_power( + power_manager::PowerSupplyProperties_ExternalPower_AC); + PowerStatus::Get()->SetProtoForTesting(proto); + ambient_controller()->OnPowerStatusChanged(); +} + +void AmbientAshTestBase::SetPowerStateDischarging() { + power_manager::PowerSupplyProperties proto; + proto.set_battery_state( + power_manager::PowerSupplyProperties_BatteryState_DISCHARGING); + proto.set_external_power( + power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED); + PowerStatus::Get()->SetProtoForTesting(proto); + ambient_controller()->OnPowerStatusChanged(); +} + +void AmbientAshTestBase::SetPowerStateFull() { + power_manager::PowerSupplyProperties proto; + proto.set_battery_state( + power_manager::PowerSupplyProperties_BatteryState_FULL); + proto.set_external_power( + power_manager::PowerSupplyProperties_ExternalPower_AC); + PowerStatus::Get()->SetProtoForTesting(proto); + ambient_controller()->OnPowerStatusChanged(); } void AmbientAshTestBase::FastForwardToRefreshWeather() {
diff --git a/ash/ambient/test/ambient_ash_test_base.h b/ash/ambient/test/ambient_ash_test_base.h index 188dab6..a863d78 100644 --- a/ash/ambient/test/ambient_ash_test_base.h +++ b/ash/ambient/test/ambient_ash_test_base.h
@@ -96,9 +96,20 @@ // Advance the task environment timer to load the next photo. void FastForwardToNextImage(); + // Advance the task environment timer a tiny amount. This is intended to + // trigger any pending async operations. + void FastForwardTiny(); + // Advance the task environment timer to load the weather info. void FastForwardToRefreshWeather(); + // Advance the task environment timer to ambient mode lock screen delay. + void FastForwardToLockScreen(); + + void SetPowerStateCharging(); + void SetPowerStateDischarging(); + void SetPowerStateFull(); + // Returns the number of active wake locks of type |type|. int GetNumOfActiveWakeLocks(device::mojom::WakeLockType type);
diff --git a/ash/ambient/ui/media_string_view_unittest.cc b/ash/ambient/ui/media_string_view_unittest.cc index c6435481..834021f 100644 --- a/ash/ambient/ui/media_string_view_unittest.cc +++ b/ash/ambient/ui/media_string_view_unittest.cc
@@ -371,6 +371,7 @@ // Simulates Ambient Mode shown on lock-screen. LockScreen(); FastForwardToInactivity(); + FastForwardTiny(); // Simulates active and playing media session. SimulateMediaPlaybackStateChanged(
diff --git a/ash/fast_ink/fast_ink_host.cc b/ash/fast_ink/fast_ink_host.cc index d08a547e..93e2eba0 100644 --- a/ash/fast_ink/fast_ink_host.cc +++ b/ash/fast_ink/fast_ink_host.cc
@@ -10,6 +10,7 @@ #include <memory> +#include "ash/public/cpp/ash_switches.h" #include "base/bind.h" #include "base/threading/thread_task_runner_handle.h" #include "cc/base/math_util.h" @@ -257,6 +258,21 @@ gpu::kNullSurfaceHandle); LOG_IF(ERROR, !gpu_memory_buffer_) << "Failed to create GPU memory buffer"; + if (ash::switches::ShouldClearFastInkBuffer()) { + bool map_result = gpu_memory_buffer_->Map(); + LOG_IF(ERROR, !map_result) << "Failed to map gpu buffer"; + uint8_t* memory = static_cast<uint8_t*>(gpu_memory_buffer_->memory(0)); + if (memory != nullptr) { + gfx::Size size = gpu_memory_buffer_->GetSize(); + int stride = gpu_memory_buffer_->stride(0); + // Clear the buffer before usage, since it may be uninitialized. + // (http://b/168735625) + for (int i = 0; i < size.height(); ++i) + memset(memory + i * stride, 0, size.width() * 4); + } + gpu_memory_buffer_->Unmap(); + } + frame_sink_holder_ = std::make_unique<LayerTreeFrameSinkHolder>( this, host_window_->CreateLayerTreeFrameSink()); }
diff --git a/ash/public/cpp/ambient/ambient_ui_model.cc b/ash/public/cpp/ambient/ambient_ui_model.cc index deb5638..919f012 100644 --- a/ash/public/cpp/ambient/ambient_ui_model.cc +++ b/ash/public/cpp/ambient/ambient_ui_model.cc
@@ -44,13 +44,6 @@ NotifyAmbientUiVisibilityChanged(); } -void AmbientUiModel::SetUiMode(AmbientUiMode ui_mode) { - if (ui_mode_ == ui_mode) - return; - - ui_mode_ = ui_mode; -} - void AmbientUiModel::NotifyAmbientUiVisibilityChanged() { for (auto& observer : observers_) observer.OnAmbientUiVisibilityChanged(ui_visibility_); @@ -68,4 +61,19 @@ return out; } +std::ostream& operator<<(std::ostream& out, AmbientUiVisibility visibility) { + switch (visibility) { + case AmbientUiVisibility::kShown: + out << "kShown"; + break; + case AmbientUiVisibility::kHidden: + out << "kHidden"; + break; + case AmbientUiVisibility::kClosed: + out << "kClosed"; + break; + } + return out; +} + } // namespace ash
diff --git a/ash/public/cpp/ambient/ambient_ui_model.h b/ash/public/cpp/ambient/ambient_ui_model.h index 12cf948..b515701e 100644 --- a/ash/public/cpp/ambient/ambient_ui_model.h +++ b/ash/public/cpp/ambient/ambient_ui_model.h
@@ -51,18 +51,12 @@ // Updates current UI visibility and notifies all subscribers. void SetUiVisibility(AmbientUiVisibility visibility); - // Updates current UI mode. - void SetUiMode(AmbientUiMode ui_mode); - AmbientUiVisibility ui_visibility() const { return ui_visibility_; } - AmbientUiMode ui_mode() const { return ui_mode_; } - private: void NotifyAmbientUiVisibilityChanged(); AmbientUiVisibility ui_visibility_ = AmbientUiVisibility::kClosed; - AmbientUiMode ui_mode_ = AmbientUiMode::kLockScreenUi; base::ObserverList<AmbientUiModelObserver> observers_; }; @@ -70,6 +64,9 @@ ASH_PUBLIC_EXPORT std::ostream& operator<<(std::ostream& out, AmbientUiMode mode); +ASH_PUBLIC_EXPORT std::ostream& operator<<(std::ostream& out, + AmbientUiVisibility visibility); + } // namespace ash #endif // ASH_PUBLIC_CPP_AMBIENT_AMBIENT_UI_MODEL_H_
diff --git a/ash/public/cpp/ash_switches.cc b/ash/public/cpp/ash_switches.cc index 9a627ba..918133f8 100644 --- a/ash/public/cpp/ash_switches.cc +++ b/ash/public/cpp/ash_switches.cc
@@ -20,6 +20,10 @@ namespace ash { namespace switches { +// Clear the fast ink buffer upon creation. This is needed on some devices that +// do not zero out new buffers. +const char kAshClearFastInkBuffer[] = "ash-clear-fast-ink-buffer"; + // Force the pointer (cursor) position to be kept inside root windows. const char kAshConstrainPointerToRoot[] = "ash-constrain-pointer-to-root"; @@ -166,5 +170,10 @@ return base::CommandLine::ForCurrentProcess()->HasSwitch(kEnableDimShelf); } +bool ShouldClearFastInkBuffer() { + return base::CommandLine::ForCurrentProcess()->HasSwitch( + kAshClearFastInkBuffer); +} + } // namespace switches } // namespace ash
diff --git a/ash/public/cpp/ash_switches.h b/ash/public/cpp/ash_switches.h index f709d8c..0b4dafc 100644 --- a/ash/public/cpp/ash_switches.h +++ b/ash/public/cpp/ash_switches.h
@@ -18,6 +18,7 @@ // Please keep alphabetized. // TODO(sky): fix order! +ASH_PUBLIC_EXPORT extern const char kAshClearFastInkBuffer[]; ASH_PUBLIC_EXPORT extern const char kAshConstrainPointerToRoot[]; ASH_PUBLIC_EXPORT extern const char kAshContextualNudgesInterval[]; ASH_PUBLIC_EXPORT extern const char kAshContextualNudgesResetShownCount[]; @@ -50,6 +51,7 @@ ASH_PUBLIC_EXPORT base::Optional<base::TimeDelta> ContextualNudgesInterval(); ASH_PUBLIC_EXPORT bool ContextualNudgesResetShownCount(); ASH_PUBLIC_EXPORT bool IsUsingShelfAutoDim(); +ASH_PUBLIC_EXPORT bool ShouldClearFastInkBuffer(); } // namespace switches } // namespace ash
diff --git a/ash/system/accessibility/switch_access_menu_button.cc b/ash/system/accessibility/switch_access_menu_button.cc index b2dfa1c..e2b1d1e 100644 --- a/ash/system/accessibility/switch_access_menu_button.cc +++ b/ash/system/accessibility/switch_access_menu_button.cc
@@ -82,8 +82,6 @@ void SwitchAccessMenuButton::GetAccessibleNodeData(ui::AXNodeData* node_data) { views::Button::GetAccessibleNodeData(node_data); - node_data->AddStringAttribute(ax::mojom::StringAttribute::kName, - base::UTF16ToUTF8(label_->GetText())); node_data->AddStringAttribute(ax::mojom::StringAttribute::kValue, action_name_); }
diff --git a/ash/system/media/unified_media_controls_view.cc b/ash/system/media/unified_media_controls_view.cc index 602f8c5..a84b0b9 100644 --- a/ash/system/media/unified_media_controls_view.cc +++ b/ash/system/media/unified_media_controls_view.cc
@@ -195,7 +195,6 @@ AshColorProvider::ContentLayerType::kIconColorPrimary))); drop_down_icon_ = title_row->AddChildView(std::move(drop_down_icon)); - title_row_layout->SetFlexForView(title_label_, 1); track_column->AddChildView(std::move(title_row)); auto artist_label = std::make_unique<views::Label>();
diff --git a/ash/wm/gestures/wm_gesture_handler.cc b/ash/wm/gestures/wm_gesture_handler.cc index c5ba5fa..365cba06 100644 --- a/ash/wm/gestures/wm_gesture_handler.cc +++ b/ash/wm/gestures/wm_gesture_handler.cc
@@ -171,8 +171,8 @@ if (std::fabs(scroll_x) < WmGestureHandler::kHorizontalThresholdDp) return false; - if (IsNaturalScrollOn()) { - if (GetOffset(scroll_x) < 0 && !DesksController::Get()->GetNextDesk() && + if (!IsNaturalScrollOn()) { + if (scroll_x > 0 && !DesksController::Get()->GetNextDesk() && DesksController::Get()->GetPreviousDesk()) { if (!gDidWrongLastDeskGesture) { gDidWrongLastDeskGesture = true; @@ -180,7 +180,7 @@ ShowReverseGestureToast(kSwitchLastDeskToastId, IDS_CHANGE_LAST_DESK_REVERSE_GESTURE); } - } else if (GetOffset(scroll_x) > 0 && + } else if (scroll_x < 0 && !DesksController::Get()->GetPreviousDesk() && DesksController::Get()->GetNextDesk()) { if (!gDidWrongNextDeskGesture) { @@ -197,9 +197,9 @@ } } - // If touchpad reverse scroll is on, the swip direction will invert. + // If touchpad reverse scroll is on, the swipe direction will invert. return DesksController::Get()->ActivateAdjacentDesk( - /*going_left=*/GetOffset(scroll_x) > 0, + /*going_left=*/GetOffset(scroll_x) < 0, DesksSwitchSource::kDeskSwitchTouchpad); }
diff --git a/ash/wm/gestures/wm_gesture_handler_unittest.cc b/ash/wm/gestures/wm_gesture_handler_unittest.cc index 4ce701a..5cf0971 100644 --- a/ash/wm/gestures/wm_gesture_handler_unittest.cc +++ b/ash/wm/gestures/wm_gesture_handler_unittest.cc
@@ -246,18 +246,18 @@ ASSERT_EQ(2u, desk_controller->desks().size()); ASSERT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); - // Tests that scrolling left should take us to the next desk. - ScrollToSwitchDesks(/*scroll_left=*/true); + // Tests that scrolling right should take us to the next desk. + ScrollToSwitchDesks(/*scroll_left=*/false); EXPECT_EQ(desk_controller->desks()[1].get(), desk_controller->active_desk()); - // Tests that scrolling right should take us to the previous desk. - ScrollToSwitchDesks(/*scroll_left=*/false); + // Tests that scrolling left should take us to the previous desk. + ScrollToSwitchDesks(/*scroll_left=*/true); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); // Tests that since there is no previous desk, we remain on the same desk when - // scrolling right. + // scrolling left. const float long_scroll = WmGestureHandler::kHorizontalThresholdDp; - Scroll(long_scroll, 0.f, kNumFingersForDesksSwitch); + Scroll(-long_scroll, 0.f, kNumFingersForDesksSwitch); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); } @@ -272,12 +272,12 @@ const float short_scroll = WmGestureHandler::kHorizontalThresholdDp - 10.f; const float long_scroll = WmGestureHandler::kHorizontalThresholdDp; // Tests that a short horizontal scroll does not switch desks. - Scroll(short_scroll, 0.f, kNumFingersForDesksSwitch); + Scroll(-short_scroll, 0.f, kNumFingersForDesksSwitch); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); // Tests that a scroll that meets the horizontal requirements, but is mostly // vertical does not switch desks. - Scroll(long_scroll, long_scroll + 10.f, kNumFingersForDesksSwitch); + Scroll(-long_scroll, long_scroll + 10.f, kNumFingersForDesksSwitch); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); // Tests that a vertical scroll does not switch desks. @@ -297,7 +297,7 @@ const float long_scroll = WmGestureHandler::kHorizontalThresholdDp * 3; DeskSwitchAnimationWaiter waiter; - Scroll(-long_scroll, 0, kNumFingersForDesksSwitch); + Scroll(long_scroll, 0, kNumFingersForDesksSwitch); waiter.Wait(); EXPECT_EQ(desk_controller->desks()[1].get(), desk_controller->active_desk()); } @@ -317,7 +317,7 @@ ASSERT_TRUE(session_controller->IsScreenLocked()); const float long_scroll = WmGestureHandler::kHorizontalThresholdDp * 3; - Scroll(-long_scroll, 0, kNumFingersForDesksSwitch); + Scroll(long_scroll, 0, kNumFingersForDesksSwitch); EXPECT_FALSE(desk_controller->AreDesksBeingModified()); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); } @@ -564,11 +564,11 @@ const Desk* desk1 = GetActiveDesk(); const Desk* desk2 = GetNextDesk(); - // Scroll right to get next desk. - ScrollToSwitchDesks(/*scroll_left=*/false); + // Scroll left to get next desk. + ScrollToSwitchDesks(/*scroll_left=*/true); EXPECT_EQ(desk2, GetActiveDesk()); - // Scroll left to get previous desk. - ScrollToSwitchDesks(/*scroll_right=*/true); + // Scroll right to get previous desk. + ScrollToSwitchDesks(/*scroll_right=*/false); EXPECT_EQ(desk1, GetActiveDesk()); }
diff --git a/base/debug/stack_trace_unittest.cc b/base/debug/stack_trace_unittest.cc index 34e8ea35..5649eec 100644 --- a/base/debug/stack_trace_unittest.cc +++ b/base/debug/stack_trace_unittest.cc
@@ -356,11 +356,12 @@ ExpectStackFramePointers<kDepth>(frames, kDepth, /*copy_stack=*/false); } -#if defined(MEMORY_SANITIZER) // The test triggers use-of-uninitialized-value errors on MSan bots. // This is expected because we're walking and reading the stack, and // sometimes we read fp / pc from the place that previously held // uninitialized value. +// TODO(crbug.com/1132511): Enable this test on Fuchsia. +#if defined(MEMORY_SANITIZER) || defined(OS_FUCHSIA) #define MAYBE_TraceStackFramePointersFromBuffer \ DISABLED_TraceStackFramePointersFromBuffer #else
diff --git a/base/test/gmock_callback_support.h b/base/test/gmock_callback_support.h index c02e209..14461053 100644 --- a/base/test/gmock_callback_support.h +++ b/base/test/gmock_callback_support.h
@@ -54,9 +54,10 @@ typename Tuple, std::enable_if_t<std::is_copy_constructible<Tuple>::value, int> = 0> auto RunOnceCallbackImpl(Tuple&& tuple) { - return [tuple = std::move(tuple)](auto&&... args) -> decltype(auto) { - return RunImpl(std::move(internal::get<I>(args...)), tuple); - }; + return + [tuple = std::forward<Tuple>(tuple)](auto&&... args) -> decltype(auto) { + return RunImpl(std::move(internal::get<I>(args...)), tuple); + }; } // Invoked when the arguments to a OnceCallback are not copy constructible. In @@ -68,8 +69,8 @@ auto RunOnceCallbackImpl(Tuple&& tuple) { // Mock actions need to be copyable, but `tuple` is not. Wrap it in in a // `scoped_refptr` to allow it to be copied. - auto tuple_ptr = - base::MakeRefCounted<base::RefCountedData<Tuple>>(std::move(tuple)); + auto tuple_ptr = base::MakeRefCounted<base::RefCountedData<Tuple>>( + std::forward<Tuple>(tuple)); return [tuple_ptr = std::move(tuple_ptr)](auto&&... args) mutable -> decltype(auto) { // Since running the action will move out of the arguments, `tuple_ptr` is @@ -85,9 +86,10 @@ // multiple times. Move-only arguments are not supported. template <size_t I, typename Tuple> auto RunRepeatingCallbackImpl(Tuple&& tuple) { - return [tuple = std::move(tuple)](auto&&... args) -> decltype(auto) { - return RunImpl(internal::get<I>(args...), tuple); - }; + return + [tuple = std::forward<Tuple>(tuple)](auto&&... args) -> decltype(auto) { + return RunImpl(internal::get<I>(args...), tuple); + }; } } // namespace internal
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc index 843196d..3cf448d6 100644 --- a/base/test/launcher/test_launcher.cc +++ b/base/test/launcher/test_launcher.cc
@@ -20,7 +20,6 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_file.h" -#include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/hash/hash.h" #include "base/lazy_instance.h" @@ -42,7 +41,6 @@ #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/system/sys_info.h" -#include "base/task/post_job.h" #include "base/task/post_task.h" #include "base/task/thread_pool/thread_pool_instance.h" #include "base/test/gtest_util.h" @@ -639,14 +637,15 @@ class TestRunner { public: explicit TestRunner(TestLauncher* launcher, - size_t max_workers = 1u, + size_t runner_count = 1u, size_t batch_size = 1u) : launcher_(launcher), - max_workers_(max_workers), + runner_count_(runner_count), batch_size_(batch_size) {} // Sets |test_names| to be run, with |batch_size| tests per process. - // Posts a job to run LaunchChildGTestProcess on |max_workers| workers. + // Posts LaunchNextTask |runner_count| number of times, each with a separate + // task runner. void Run(const std::vector<std::string>& test_names); private: @@ -658,131 +657,104 @@ test_names.front().find(kPreTestPrefix) != std::string::npos; } - bool IsSingleThreaded() const { return batch_size_ == 0; } + // Launches the next child process on |task_runner| and clears + // |last_task_temp_dir| from the previous task. + void LaunchNextTask(scoped_refptr<TaskRunner> task_runner, + const FilePath& last_task_temp_dir); - void WorkerTask(scoped_refptr<TaskRunner> main_task_runner, - base::JobDelegate* delegate); - size_t GetMaxConcurrency(size_t worker_count) { - AutoLock auto_lock(lock_); - if (IsSingleThreaded()) - return tests_to_run_.empty() ? 0 : 1; - - // Round up the division to ensure enough workers for all tests. - return std::min((tests_to_run_.size() + batch_size_ - 1) / batch_size_, - max_workers_); + // Forwards |last_task_temp_dir| and launches the next task on main thread. + // The method is called on |task_runner|. + void ClearAndLaunchNext(scoped_refptr<TaskRunner> main_thread_runner, + scoped_refptr<TaskRunner> task_runner, + const FilePath& last_task_temp_dir) { + main_thread_runner->PostTask( + FROM_HERE, + BindOnce(&TestRunner::LaunchNextTask, weak_ptr_factory_.GetWeakPtr(), + task_runner, last_task_temp_dir)); } - // Cleans up |task_temp_dir| from a previous task and quits |run_loop| if - // |done|. - void CleanupTask(base::ScopedTempDir task_temp_dir, bool done); - ThreadChecker thread_checker_; + std::vector<std::string> tests_to_run_; TestLauncher* const launcher_; - JobHandle job_handle_; - // Max number of workers to use. - const size_t max_workers_; + std::vector<scoped_refptr<TaskRunner>> task_runners_; + // Number of sequenced task runners to use. + const size_t runner_count_; + // Number of TaskRunners that have finished. + size_t runners_done_ = 0; // Number of tests per process, 0 is special case for all tests. const size_t batch_size_; RunLoop run_loop_; - // Protects member used concurrently by worker tasks. - base::Lock lock_; - std::vector<std::string> tests_to_run_ GUARDED_BY(lock_); - base::WeakPtrFactory<TestRunner> weak_ptr_factory_{this}; }; void TestRunner::Run(const std::vector<std::string>& test_names) { DCHECK(thread_checker_.CalledOnValidThread()); - // No workers, fail immediately. - CHECK_GT(max_workers_, 0u); - if (test_names.empty()) - return; - - { - AutoLock auto_lock(lock_); - tests_to_run_ = test_names; - // Reverse test order to avoid coping the whole vector when removing tests. - std::reverse(tests_to_run_.begin(), tests_to_run_.end()); + // No sequence runners, fail immediately. + CHECK_GT(runner_count_, 0u); + tests_to_run_ = test_names; + // Reverse test order to avoid coping the whole vector when removing tests. + std::reverse(tests_to_run_.begin(), tests_to_run_.end()); + runners_done_ = 0; + task_runners_.clear(); + for (size_t i = 0; i < runner_count_; i++) { + task_runners_.push_back(ThreadPool::CreateSequencedTaskRunner( + {MayBlock(), TaskShutdownBehavior::BLOCK_SHUTDOWN})); + ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, + BindOnce(&TestRunner::LaunchNextTask, weak_ptr_factory_.GetWeakPtr(), + task_runners_.back(), FilePath())); } - - job_handle_ = base::PostJob( - FROM_HERE, {TaskPriority::USER_BLOCKING, MayBlock()}, - BindRepeating(&TestRunner::WorkerTask, Unretained(this), - ThreadTaskRunnerHandle::Get()), - BindRepeating(&TestRunner::GetMaxConcurrency, Unretained(this))); - run_loop_.Run(); } -void TestRunner::WorkerTask(scoped_refptr<TaskRunner> main_task_runner, - base::JobDelegate* delegate) { - bool done = false; - while (!done && !delegate->ShouldYield()) { - // Create a temporary directory for this task. This directory will hold the - // flags and results files for the child processes as well as their User - // Data dir, where appropriate. For platforms that support per-child temp - // dirs, this directory will also contain one subdirectory per child for - // that child's process-wide temp dir. - base::ScopedTempDir task_temp_dir; - CHECK(task_temp_dir.CreateUniqueTempDir()); - int child_index = 0; - bool reuse_state = true; - while (reuse_state) { - std::vector<std::string> batch; - { - AutoLock auto_lock(lock_); - size_t batch_size; - // Single threaded case runs all tests in one batch. - if (IsSingleThreaded()) - batch_size = tests_to_run_.size(); - // Run remaining tests up to |batch_size_|. - else - batch_size = std::min(batch_size_, tests_to_run_.size()); - batch.assign(tests_to_run_.rbegin(), - tests_to_run_.rbegin() + batch_size); - tests_to_run_.erase(tests_to_run_.end() - batch_size, - tests_to_run_.end()); - done = tests_to_run_.empty(); - } - if (batch.empty()) - break; - - launcher_->LaunchChildGTestProcess( - main_task_runner, batch, task_temp_dir.GetPath(), - CreateChildTempDirIfSupported(task_temp_dir.GetPath(), - child_index++)); - reuse_state = !done && ShouldReuseStateFromLastBatch(batch); - } - - // Cleaning up test results is scheduled to |main_task_runner| because it - // must happen after all post processing step that was scheduled in - // LaunchChildGTestProcess to |main_task_runner|. - main_task_runner->PostTask( - FROM_HERE, - BindOnce(&TestRunner::CleanupTask, weak_ptr_factory_.GetWeakPtr(), - std::move(task_temp_dir), done)); - } -} - -void TestRunner::CleanupTask(base::ScopedTempDir task_temp_dir, bool done) { +void TestRunner::LaunchNextTask(scoped_refptr<TaskRunner> task_runner, + const FilePath& last_task_temp_dir) { DCHECK(thread_checker_.CalledOnValidThread()); - // delete previous temporary directory - if (!task_temp_dir.Delete()) { + if (!last_task_temp_dir.empty() && + !DeletePathRecursively(last_task_temp_dir)) { // This needs to be non-fatal at least for Windows. - LOG(WARNING) << "Failed to delete " - << task_temp_dir.GetPath().AsUTF8Unsafe(); + LOG(WARNING) << "Failed to delete " << last_task_temp_dir.AsUTF8Unsafe(); } - if (!done) + // No more tests to run, finish sequence. + if (tests_to_run_.empty()) { + runners_done_++; + // All sequence runners are done, quit the loop. + if (runners_done_ == runner_count_) + run_loop_.QuitWhenIdle(); return; - - if (job_handle_) { - job_handle_.Cancel(); - run_loop_.QuitWhenIdle(); } + + // Create a temporary directory for this task. This directory will hold the + // flags and results files for the child processes as well as their User Data + // dir, where appropriate. For platforms that support per-child temp dirs, + // this directory will also contain one subdirectory per child for that + // child's process-wide temp dir. + base::FilePath task_temp_dir; + CHECK(CreateNewTempDirectory(FilePath::StringType(), &task_temp_dir)); + bool post_to_current_runner = true; + size_t batch_size = (batch_size_ == 0) ? tests_to_run_.size() : batch_size_; + + int child_index = 0; + while (post_to_current_runner && !tests_to_run_.empty()) { + batch_size = std::min(batch_size, tests_to_run_.size()); + std::vector<std::string> batch(tests_to_run_.rbegin(), + tests_to_run_.rbegin() + batch_size); + tests_to_run_.erase(tests_to_run_.end() - batch_size, tests_to_run_.end()); + task_runner->PostTask( + FROM_HERE, + BindOnce(&TestLauncher::LaunchChildGTestProcess, Unretained(launcher_), + ThreadTaskRunnerHandle::Get(), batch, task_temp_dir, + CreateChildTempDirIfSupported(task_temp_dir, child_index++))); + post_to_current_runner = ShouldReuseStateFromLastBatch(batch); + } + task_runner->PostTask( + FROM_HERE, + BindOnce(&TestRunner::ClearAndLaunchNext, Unretained(this), + ThreadTaskRunnerHandle::Get(), task_runner, task_temp_dir)); } // Returns the number of files and directories in |dir|, or 0 if |dir| is empty.
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 900c75e9..06434cc8 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -0.20201001.3.1 +0.20201002.0.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 900c75e9..06434cc8 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -0.20201001.3.1 +0.20201002.0.1
diff --git a/build/mac_toolchain.py b/build/mac_toolchain.py index 603903d6..8d138b58 100755 --- a/build/mac_toolchain.py +++ b/build/mac_toolchain.py
@@ -36,7 +36,7 @@ 'default': 'wXywrnOhzFxwLYlwO62UzRxVCjnu6DoSI2D2jrCd00gC', # This contains binaries from Xcode 12.2 beta 2, along with the # 11 SDK (aka 12B5025f). - 'xcode_12_beta': '8BjeNPCdtYPajEJ0cPZXG5ATuuBCHPTBfYEuGrdE5KcC', + 'xcode_12_beta': 'G4U9cOycs9JFzxLNSMaRuoS3NZwiB6RLwg0v4dh3Vw4C', } # The toolchain will not be downloaded if the minimum OS version is not met.
diff --git a/build/xcode_binaries.yaml b/build/xcode_binaries.yaml index b77cc0d..6b41905 100644 --- a/build/xcode_binaries.yaml +++ b/build/xcode_binaries.yaml
@@ -29,9 +29,10 @@ - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size-classic - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip - - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libtapi.dylib - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib + - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libswiftDemangle.dylib + - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libtapi.dylib - file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/migcom - file: Contents/Developer/usr/bin/atos - file: Contents/Resources/English.lproj/License.rtf
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni index 0df0263..81662cd 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni
@@ -1615,6 +1615,7 @@ "java/src/org/chromium/chrome/browser/tracing/settings/TracingCategoriesSettings.java", "java/src/org/chromium/chrome/browser/tracing/settings/TracingSettings.java", "java/src/org/chromium/chrome/browser/translate/TranslateBridge.java", + "java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java", "java/src/org/chromium/chrome/browser/translate/TranslateUtils.java", "java/src/org/chromium/chrome/browser/ui/BottomContainer.java", "java/src/org/chromium/chrome/browser/ui/BottomSheetManager.java",
diff --git a/chrome/android/chrome_test_java_sources.gni b/chrome/android/chrome_test_java_sources.gni index e6687d6..526dafb6 100644 --- a/chrome/android/chrome_test_java_sources.gni +++ b/chrome/android/chrome_test_java_sources.gni
@@ -592,6 +592,7 @@ "javatests/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhoneTest.java", "javatests/src/org/chromium/chrome/browser/tracing/settings/TracingSettingsTest.java", "javatests/src/org/chromium/chrome/browser/translate/TranslateCompactInfoBarTest.java", + "javatests/src/org/chromium/chrome/browser/translate/TranslateIntentTest.java", "javatests/src/org/chromium/chrome/browser/ui/system/StatusBarColorControllerTest.java", "javatests/src/org/chromium/chrome/browser/undo_tab_close_snackbar/UndoBarControllerTest.java", "javatests/src/org/chromium/chrome/browser/usage_stats/TabSuspensionTest.java",
diff --git a/chrome/android/expectations/monochrome_public_bundle.AndroidManifest.expected b/chrome/android/expectations/monochrome_public_bundle.AndroidManifest.expected index 6fcffa86..a4a74f2 100644 --- a/chrome/android/expectations/monochrome_public_bundle.AndroidManifest.expected +++ b/chrome/android/expectations/monochrome_public_bundle.AndroidManifest.expected
@@ -11,6 +11,7 @@ <permission android:name="$PACKAGE.permission.CHILD_SERVICE" android:protectionLevel="signature"/> <permission android:label="Debug web pages" android:name="$PACKAGE.permission.DEBUG" android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS" android:protectionLevel="signature"/> <permission android:name="$PACKAGE.permission.READ_WRITE_BOOKMARK_FOLDERS" android:protectionLevel="signatureOrSystem"/> + <permission android:name="$PACKAGE.permission.TRANSLATE" android:protectionLevel="signature"/> <uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.location.gps" android:required="false"/> <uses-feature android:name="android.hardware.microphone" android:required="false"/> @@ -751,6 +752,16 @@ </intent-filter> # DIFF-ANCHOR: dea53031 <meta-data android:name="android.app.shortcuts" android:resource="@xml/launchershortcuts"/> </activity-alias> # DIFF-ANCHOR: 5042984f + <activity-alias # DIFF-ANCHOR: 03398466 + android:exported="true" + android:name="com.google.android.apps.chrome.TranslateDispatcher" + android:permission="$PACKAGE.permission.TRANSLATE" + android:targetActivity="org.chromium.chrome.browser.document.ChromeLauncherActivity"> + <intent-filter> # DIFF-ANCHOR: 75e5f897 + <action android:name="org.chromium.chrome.browser.translate.TRANSLATE_TAB"/> + <category android:name="android.intent.category.DEFAULT"/> + </intent-filter> # DIFF-ANCHOR: 75e5f897 + </activity-alias> # DIFF-ANCHOR: 03398466 <activity-alias # DIFF-ANCHOR: dcfe2999 android:label="@string/webapp_activity_title" android:name="com.google.android.apps.chrome.webapps.WebappActivity"
diff --git a/chrome/android/expectations/trichrome_chrome_bundle.AndroidManifest.expected b/chrome/android/expectations/trichrome_chrome_bundle.AndroidManifest.expected index 1ee8405..88d71fe 100644 --- a/chrome/android/expectations/trichrome_chrome_bundle.AndroidManifest.expected +++ b/chrome/android/expectations/trichrome_chrome_bundle.AndroidManifest.expected
@@ -11,6 +11,7 @@ <permission android:name="$PACKAGE.permission.CHILD_SERVICE" android:protectionLevel="signature"/> <permission android:label="Debug web pages" android:name="$PACKAGE.permission.DEBUG" android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS" android:protectionLevel="signature"/> <permission android:name="$PACKAGE.permission.READ_WRITE_BOOKMARK_FOLDERS" android:protectionLevel="signatureOrSystem"/> + <permission android:name="$PACKAGE.permission.TRANSLATE" android:protectionLevel="signature"/> <uses-feature android:name="android.hardware.camera" android:required="false"/> <uses-feature android:name="android.hardware.location.gps" android:required="false"/> <uses-feature android:name="android.hardware.microphone" android:required="false"/> @@ -724,6 +725,16 @@ </intent-filter> # DIFF-ANCHOR: dea53031 <meta-data android:name="android.app.shortcuts" android:resource="@xml/launchershortcuts"/> </activity-alias> # DIFF-ANCHOR: 5042984f + <activity-alias # DIFF-ANCHOR: 03398466 + android:exported="true" + android:name="com.google.android.apps.chrome.TranslateDispatcher" + android:permission="$PACKAGE.permission.TRANSLATE" + android:targetActivity="org.chromium.chrome.browser.document.ChromeLauncherActivity"> + <intent-filter> # DIFF-ANCHOR: 75e5f897 + <action android:name="org.chromium.chrome.browser.translate.TRANSLATE_TAB"/> + <category android:name="android.intent.category.DEFAULT"/> + </intent-filter> # DIFF-ANCHOR: 75e5f897 + </activity-alias> # DIFF-ANCHOR: 03398466 <activity-alias # DIFF-ANCHOR: dcfe2999 android:label="@string/webapp_activity_title" android:name="com.google.android.apps.chrome.webapps.WebappActivity"
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml index 4d0a6e2..36b8d6d 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml
@@ -94,6 +94,8 @@ android:label="Debug web pages" android:permissionGroup="android.permission-group.DEVELOPMENT_TOOLS" android:protectionLevel="signature" /> + <permission android:name="{{ manifest_package }}.permission.TRANSLATE" + android:protectionLevel="signature" /> <uses-permission android:name="{{ manifest_package }}.permission.C2D_MESSAGE" /> <uses-permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" /> @@ -348,6 +350,17 @@ <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> </activity-alias> + <activity-alias android:name="com.google.android.apps.chrome.TranslateDispatcher" + android:targetActivity="org.chromium.chrome.browser.document.ChromeLauncherActivity" + android:exported="true" + {% if channel == 'stable' %} + android:permission="{{ manifest_package }}.permission.TRANSLATE" + {% endif %} > + <intent-filter> + <action android:name="org.chromium.chrome.browser.translate.TRANSLATE_TAB" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity-alias> <activity android:name="org.chromium.chrome.browser.media.MediaLauncherActivity" android:theme="@android:style/Theme.NoDisplay"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index 60523871..ca797e8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -148,6 +148,7 @@ import org.chromium.chrome.browser.tasks.tab_management.TabUiFeatureUtilities; import org.chromium.chrome.browser.toolbar.ToolbarButtonInProductHelpController; import org.chromium.chrome.browser.toolbar.top.ToolbarControlContainer; +import org.chromium.chrome.browser.translate.TranslateIntentHandler; import org.chromium.chrome.browser.ui.RootUiCoordinator; import org.chromium.chrome.browser.ui.TabObscuringHandler; import org.chromium.chrome.browser.ui.appmenu.AppMenuPropertiesDelegate; @@ -1044,7 +1045,7 @@ mInactivityTracker.register(this.getLifecycleDispatcher()); mIntentWithEffect = false; if (getSavedInstanceState() == null && intent != null) { - if (!mIntentHandler.shouldIgnoreIntent(intent)) { + if (!mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/true)) { mIntentWithEffect = mIntentHandler.onNewIntent(intent); } @@ -1360,6 +1361,12 @@ assert false; } + @Override + public void processTranslateTabIntent( + @Nullable String targetLanguageCode, @Nullable String expectedUrl) { + TranslateIntentHandler.translateTab(getActivityTab(), targetLanguageCode, expectedUrl); + } + /** * Opens a new Tab with the possibility of showing it in a Custom Tab, instead. *
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java index 9fd68be..6449740 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java
@@ -48,6 +48,7 @@ import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabLaunchType; +import org.chromium.chrome.browser.translate.TranslateIntentHandler; import org.chromium.chrome.browser.webapps.WebappActivity; import org.chromium.components.embedder_support.util.UrlConstants; import org.chromium.components.embedder_support.util.UrlUtilities; @@ -333,6 +334,16 @@ Intent intent); void processWebSearchIntent(String query); + + /** + * Processes a TRANSLATE_TAB intent. + * @param targetLanguageCode The language code that the page should be translated into. + * Optional. + * @param expectedUrl The URL of the page that should be translated. If this doesn't match + * the current tab, no translate will be performed. + */ + void processTranslateTabIntent( + @Nullable String targetLanguageCode, @Nullable String expectedUrl); } /** Sets whether or not test intents are enabled. */ @@ -470,7 +481,8 @@ intent, TabOpenType.BRING_TAB_TO_FRONT_STRING, Tab.INVALID_TAB_ID); if (url == null && tabIdToBringToFront == Tab.INVALID_TAB_ID && tabOpenType != TabOpenType.OPEN_NEW_INCOGNITO_TAB) { - return handleWebSearchIntent(intent); + return handleWebSearchIntent(intent) + || TranslateIntentHandler.handleTranslateTabIntent(intent, mDelegate); } String referrerUrl = getReferrerUrlIncludingExtraHeaders(intent); @@ -870,9 +882,10 @@ * Returns true if the app should ignore a given intent. * * @param intent Intent to check. + * @param startedActivity True if the Activity was not running prior to receiving the Intent. * @return true if the intent should be ignored. */ - public boolean shouldIgnoreIntent(Intent intent) { + public boolean shouldIgnoreIntent(Intent intent, boolean startedActivity) { // Although not documented to, many/most methods that retrieve values from an Intent may // throw. Because we can't control what packages might send to us, we should catch any // Throwable and then fail closed (safe). This is ugly, but resolves top crashers in the @@ -911,6 +924,12 @@ return false; } + // Ignore Translate intents if they were the intent that started the activity. + if (startedActivity && intent != null + && TranslateIntentHandler.ACTION_TRANSLATE_TAB.equals(intent.getAction())) { + return true; + } + // Ignore all intents that specify a Chrome internal scheme if they did not come from // a trustworthy source. String scheme = getSanitizedUrlScheme(url);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java index a97b5a8..47b35ac8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
@@ -43,6 +43,7 @@ import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.searchwidget.SearchActivity; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.translate.TranslateIntentHandler; import org.chromium.chrome.browser.vr.VrModuleProvider; import org.chromium.chrome.browser.webapps.WebappLauncherActivity; import org.chromium.components.browser_ui.media.MediaNotificationUma; @@ -220,6 +221,12 @@ } @Override + public void processTranslateTabIntent( + @Nullable String targetLanguageCode, @Nullable String expectedUrl) { + assert false; + } + + @Override public void processUrlViewIntent(String url, String referer, String headers, @IntentHandler.TabOpenType int tabOpenType, String externalAppId, int tabIdToBringToFront, boolean hasUserGesture, boolean isRendererInitiated, @@ -238,6 +245,22 @@ } /** + * Adds a token to TRANSLATE_TAB intents that we know were sent from a first party app. + * + * TRANSLATE_TAB requires a signature permission. We know that permission has been enforced (and + * thus comes from a first party application) if it was routed via the TranslateDispatcher + * activity-alias. In this case, add a token so IntentHandler knows the intent is from a first + * party app. + */ + private static void maybeAuthenticateFirstPartyTranslateIntent(Intent intent) { + if (intent != null && TranslateIntentHandler.ACTION_TRANSLATE_TAB.equals(intent.getAction()) + && TranslateIntentHandler.COMPONENT_TRANSLATE_DISPATCHER.equals( + intent.getComponent().getClassName())) { + IntentHandler.addTrustedIntentExtras(intent); + } + } + + /** * @return Whether the intent is for launching a Custom Tab. */ public static boolean isCustomTabIntent(Intent intent) { @@ -385,6 +408,8 @@ maybePrefetchDnsInBackground(); + maybeAuthenticateFirstPartyTranslateIntent(mIntent); + Intent newIntent = new Intent(mIntent); String targetActivityClassName = MultiWindowUtils.getInstance() .getTabbedActivityForIntent(newIntent, mActivity)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java index df5de481..2aac9260b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -1004,7 +1004,7 @@ } super.onNewIntentWithNative(intent); - if (mIntentHandler.shouldIgnoreIntent(intent)) return; + if (mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/false)) return; // We send this intent so that we can enter WebVr presentation mode if needed. This // call doesn't consume the intent because it also has the url that we need to load. @@ -1474,6 +1474,10 @@ } @Override + public void processTranslateTabIntent( + @Nullable String targetLanguageCode, @Nullable String expectedUrl) {} + + @Override public void processUrlViewIntent(String url, String referer, String headers, @TabOpenType int tabOpenType, String externalAppId, int tabIdToBringToFront, boolean hasUserGesture, boolean isRendererInitiated,
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java index 7c289e2..fd42155 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
@@ -170,7 +170,7 @@ ChromeActivityCommonsModule commonsModule) { // mIntentHandler comes from the base class. IntentIgnoringCriterion intentIgnoringCriterion = - (intent) -> mIntentHandler.shouldIgnoreIntent(intent); + (intent) -> mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/true); BaseCustomTabActivityModule baseCustomTabsModule = new BaseCustomTabActivityModule(mIntentDataProvider, getStartupTabPreloader(),
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java b/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java index 246053b4..e305f81 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/infobar/TranslateCompactInfoBar.java
@@ -359,6 +359,23 @@ Snackbar.UMA_TRANSLATE_ALWAYS, ACTION_AUTO_ALWAYS_TRANSLATE); } + private boolean updateTargetLanguage(String languageCode) { + // Set the target code in TranslateOptions. + if (!mOptions.setTargetLanguage(languageCode)) { + return false; + } + + // Adjust UI if options were updated successfully. + mTabLayout.replaceTabTitle( + TARGET_TAB_INDEX, mOptions.getRepresentationFromCode(languageCode)); + return true; + } + + @CalledByNative + public void onTargetLanguageChanged(String languageCode) { + updateTargetLanguage(languageCode); + } + @Override protected void onNativeDestroyed() { mNativeTranslateInfoBarPtr = 0; @@ -469,30 +486,30 @@ } @Override - public void onTargetMenuItemClicked(String code) { - // Reset target code in both UI and native. - if (mNativeTranslateInfoBarPtr != 0 && mOptions.setTargetLanguage(code)) { + public void onTargetMenuItemClicked(String languageCode) { + // Set the target code in both UI and native. + if (mNativeTranslateInfoBarPtr != 0 && updateTargetLanguage(languageCode)) { recordInfobarAction(INFOBAR_MORE_LANGUAGES_TRANSLATE); recordInfobarLanguageData( INFOBAR_HISTOGRAM_MORE_LANGUAGES_LANGUAGE, mOptions.targetLanguageCode()); + // Update the target language in the backend. TranslateCompactInfoBarJni.get().applyStringTranslateOption(mNativeTranslateInfoBarPtr, - TranslateCompactInfoBar.this, TranslateOption.TARGET_CODE, code); - // Adjust UI. - mTabLayout.replaceTabTitle(TARGET_TAB_INDEX, mOptions.getRepresentationFromCode(code)); + TranslateCompactInfoBar.this, TranslateOption.TARGET_CODE, languageCode); startUserInitiatedTranslation(); } } @Override - public void onSourceMenuItemClicked(String code) { - // Reset source code in both UI and native. - if (mNativeTranslateInfoBarPtr != 0 && mOptions.setSourceLanguage(code)) { + public void onSourceMenuItemClicked(String languageCode) { + // Set the source code in both UI and native. + if (mNativeTranslateInfoBarPtr != 0 && mOptions.setSourceLanguage(languageCode)) { recordInfobarLanguageData( INFOBAR_HISTOGRAM_PAGE_NOT_IN_LANGUAGE, mOptions.sourceLanguageCode()); TranslateCompactInfoBarJni.get().applyStringTranslateOption(mNativeTranslateInfoBarPtr, - TranslateCompactInfoBar.this, TranslateOption.SOURCE_CODE, code); + TranslateCompactInfoBar.this, TranslateOption.SOURCE_CODE, languageCode); // Adjust UI. - mTabLayout.replaceTabTitle(SOURCE_TAB_INDEX, mOptions.getRepresentationFromCode(code)); + mTabLayout.replaceTabTitle( + SOURCE_TAB_INDEX, mOptions.getRepresentationFromCode(languageCode)); startUserInitiatedTranslation(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java index 97dbbef..79d1ce2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/StartupTabPreloader.java
@@ -160,7 +160,7 @@ if (IntentUtils.safeGetBooleanExtra(intent, EXTRA_DISABLE_STARTUP_TAB_PRELOADER, false)) { return false; } - if (mIntentHandler.shouldIgnoreIntent(intent)) return false; + if (mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/true)) return false; if (getUrlFromIntent(intent) == null) return false; // We don't support incognito tabs because only chrome can send new incognito tab
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java index aafb760..675a02a 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java
@@ -82,6 +82,8 @@ if (otrProfile == null) { return Profile.getLastUsedRegularProfile().getPrimaryOTRProfile(); } + + return otrProfile; } return Profile.getLastUsedRegularProfile().getPrimaryOTRProfile(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateBridge.java index b09bd99c..944aad1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateBridge.java
@@ -27,6 +27,13 @@ } /** + * Initates a translation on the given tab to the given target language. + */ + public static void translateTabToLanguage(Tab tab, String targetLanguageCode) { + TranslateBridgeJni.get().translateToLanguage(tab.getWebContents(), targetLanguageCode); + } + + /** * Returns true iff the current tab can be manually translated. */ public static boolean canManuallyTranslate(Tab tab) { @@ -189,6 +196,7 @@ @NativeMethods interface Natives { void manualTranslateWhenReady(WebContents webContents); + void translateToLanguage(WebContents webContents, String targetLanguageCode); boolean canManuallyTranslate(WebContents webContents); boolean shouldShowManualTranslateIPH(WebContents webContents); void setPredefinedTargetLanguage(WebContents webContents, String targetLanguage);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java new file mode 100644 index 0000000..777bc41 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java
@@ -0,0 +1,157 @@ +// Copyright 2020 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.chrome.browser.translate; + +import android.content.Intent; +import android.text.TextUtils; + +import androidx.annotation.IntDef; +import androidx.annotation.Nullable; + +import org.chromium.base.FeatureList; +import org.chromium.base.IntentUtils; +import org.chromium.base.metrics.RecordHistogram; +import org.chromium.chrome.browser.IntentHandler; +import org.chromium.chrome.browser.IntentHandler.IntentHandlerDelegate; +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.tab.Tab; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Utility functions used for handling TRANSLATE_TAB intents. + */ +public class TranslateIntentHandler { + /** + * An intent to signal that Chrome should start translating the current foreground tab. + */ + public static final String ACTION_TRANSLATE_TAB = + "org.chromium.chrome.browser.translate.TRANSLATE_TAB"; + + /** + * The activity-alias that all TRANSLATE_TAB intents must be sent to. + * + * Intents sent to other activities cannot have the signature permission enforced. Translate + * intents that do not match this component must be ignored. + */ + public static final String COMPONENT_TRANSLATE_DISPATCHER = + "com.google.android.apps.chrome.TranslateDispatcher"; + + /** + * Extra to indicate the target (ISO 639) language code of a translate intent. + */ + public static final String EXTRA_TARGET_LANGUAGE_CODE = + "com.android.chrome.translate.target_language_code"; + + /** + * Extra to indicate the expected URL of the page to be translated. This is to be used as a + * check in case the tab changes between the translate info being provided to Assistant and when + * the Translate intent is received. No translate will occur if this does not match the URL of + * the current foreground tab. + */ + public static final String EXTRA_EXPECTED_URL = "com.android.chrome.translate.expected_url"; + + /** + * Represents the outcome of processing a TRANSLATE_TAB intent. + * DO NOT reorder items in this interface, because it's mirrored to UMA (as + * TranslateTabIntentResult). Values should be enumerated from 0 and can't have gaps. When + * removing items, comment them out and keep existing numeric values stable. + */ + @IntDef({TranslateTabIntentResult.FEATURE_DISABLED, TranslateTabIntentResult.MISSING_AUTH_TOKEN, + TranslateTabIntentResult.TAB_WAS_NULL, TranslateTabIntentResult.INCOGNITO_TAB, + TranslateTabIntentResult.EXPECTED_URL_MISMATCH, + TranslateTabIntentResult.CANNOT_TRANSLATE_TAB, TranslateTabIntentResult.SUCCESS}) + @Retention(RetentionPolicy.SOURCE) + public @interface TranslateTabIntentResult { + int FEATURE_DISABLED = 0; + int MISSING_AUTH_TOKEN = 1; + int TAB_WAS_NULL = 2; + int INCOGNITO_TAB = 3; + int EXPECTED_URL_MISMATCH = 4; + int CANNOT_TRANSLATE_TAB = 5; + int SUCCESS = 6; + // Update TranslateTabIntentResult in enums.xml when adding new items. + int NUM_ENTRIES = 7; + } + + private static void recordTranslateTabResultUMA(@TranslateTabIntentResult int result) { + RecordHistogram.recordEnumeratedHistogram( + "Translate.TranslateTabIntentResult", result, TranslateTabIntentResult.NUM_ENTRIES); + } + + /** + * Translates the given tab to the given target language, if possible. + * @param tab The tab in question. + * @param targetLanguageCode The language to translate into. The user's preferred target + * language will be used if targetLanguageCode is null or empty. + * @param expectedUrl The URL of the page that should be translated. If this doesn't match the + * current tab, no translation will be performed. + */ + public static void translateTab( + @Nullable Tab tab, @Nullable String targetLanguageCode, @Nullable String expectedUrl) { + if (tab == null) { + recordTranslateTabResultUMA(TranslateTabIntentResult.TAB_WAS_NULL); + return; + } + if (tab.isIncognito()) { + recordTranslateTabResultUMA(TranslateTabIntentResult.INCOGNITO_TAB); + return; + } + if (expectedUrl == null || !expectedUrl.equals(tab.getUrlString())) { + recordTranslateTabResultUMA(TranslateTabIntentResult.EXPECTED_URL_MISMATCH); + return; + } + if (!TranslateUtils.canTranslateCurrentTab(tab)) { + recordTranslateTabResultUMA(TranslateTabIntentResult.CANNOT_TRANSLATE_TAB); + return; + } + + if (targetLanguageCode == null || TextUtils.isEmpty(targetLanguageCode)) { + TranslateBridge.translateTabWhenReady(tab); + } else { + TranslateBridge.translateTabToLanguage(tab, targetLanguageCode); + } + recordTranslateTabResultUMA(TranslateTabIntentResult.SUCCESS); + } + + /** + * Determines if a given intent is a TRANSLATE_TAB intent and handles it if the intent feature + * is enabled. + * @param intent The intent in question. + * @param delegate A delegate used to interact with the Activity that received the intent. + * @return True if the intent has been handled and should not be processed by fallback intent + * handlers. False otherwise. + */ + public static boolean handleTranslateTabIntent(Intent intent, IntentHandlerDelegate delegate) { + if (intent == null || !ACTION_TRANSLATE_TAB.equals(intent.getAction())) { + return false; + } + + assert FeatureList.isInitialized(); + if (!ChromeFeatureList.isEnabled(ChromeFeatureList.TRANSLATE_INTENT)) { + recordTranslateTabResultUMA(TranslateTabIntentResult.FEATURE_DISABLED); + // Return false here to let fallback handlers process the intent. This preserves + // externally visible behavior when the Feature is disabled. + return false; + } + + // Check to see if the auth token was added by LaunchIntentDispatcher. If so, we know that + // the signature permission was enforced. + if (!IntentHandler.wasIntentSenderChrome(intent)) { + recordTranslateTabResultUMA(TranslateTabIntentResult.MISSING_AUTH_TOKEN); + // Return true here to mark the intent as handled. This will prevent further fallback + // logic from trying to handle the malformed translate intent. + return true; + } + + String languageCode = IntentUtils.safeGetStringExtra(intent, EXTRA_TARGET_LANGUAGE_CODE); + String expectedUrl = IntentUtils.safeGetStringExtra(intent, EXTRA_EXPECTED_URL); + + delegate.processTranslateTabIntent(languageCode, expectedUrl); + + return true; + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java index 02d0ab9..d80dc45 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java
@@ -37,6 +37,7 @@ import org.chromium.chrome.browser.customtabs.CustomTabsConnection; import org.chromium.chrome.browser.customtabs.CustomTabsTestUtils; import org.chromium.chrome.browser.test.CommandLineInitRule; +import org.chromium.chrome.browser.translate.TranslateIntentHandler; import org.chromium.chrome.browser.webapps.WebappLauncherActivity; import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.webapps.WebappTestHelper; @@ -602,6 +603,19 @@ Intent intent = WebappLauncherActivity.createIntentToLaunchForWebapp( webappLauncherActivityIntent, launchData, 0); - assertFalse(mIntentHandler.shouldIgnoreIntent(intent)); + assertFalse(mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/true)); + } + + /** + * Test that IntentHandler#shouldIgnoreIntent() returns true for Translate intents that cause + * the Activity to start. + */ + @Test + @SmallTest + @Feature({"Android-AppBase"}) + public void testShouldIgnoreIntentTranslateStartsActivity() { + Intent intent = new Intent(TranslateIntentHandler.ACTION_TRANSLATE_TAB); + assertFalse(mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/false)); + assertTrue(mIntentHandler.shouldIgnoreIntent(intent, /*startedActivity=*/true)); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java index 360ee75..ec7d017 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/UrlSchemeTest.java
@@ -19,6 +19,7 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.TestFileUtil; @@ -39,6 +40,7 @@ /** Test suite for different Android URL schemes. */ @RunWith(ChromeJUnit4ClassRunner.class) +@Batch(Batch.PER_CLASS) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class UrlSchemeTest { @Rule
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java index 4fb6cbd..6ba6bfe 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/page_info/PageInfoViewTest.java
@@ -5,7 +5,6 @@ package org.chromium.chrome.browser.page_info; import static androidx.test.espresso.Espresso.onView; -import static androidx.test.espresso.action.ViewActions.click; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.ViewMatchers.Visibility.GONE; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; @@ -25,10 +24,15 @@ import android.os.Build; import android.view.View; +import android.view.ViewConfiguration; import android.widget.Button; +import androidx.test.espresso.UiController; +import androidx.test.espresso.ViewAction; +import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.filters.MediumTest; +import org.hamcrest.Matcher; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; @@ -37,7 +41,6 @@ import org.junit.runner.RunWith; import org.chromium.base.test.util.CommandLineFlags; -import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; import org.chromium.chrome.browser.flags.ChromeSwitches; @@ -57,6 +60,7 @@ import org.chromium.components.user_prefs.UserPrefs; import org.chromium.content_public.browser.test.util.JavaScriptUtils; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.content_public.browser.test.util.TouchCommon; import org.chromium.content_public.common.ContentSwitches; import org.chromium.net.test.EmbeddedTestServerRule; import org.chromium.net.test.ServerCertificate; @@ -99,6 +103,31 @@ } } + // Alternative to Espresso's click() that hopefully does not fail with INJECT_EVENTS error. + // TODO(dullweber): Move to TouchCommon library if it works. + ViewAction click() { + return new ViewAction() { + @Override + public Matcher<View> getConstraints() { + return ViewMatchers.isDisplayingAtLeast(90); + } + + @Override + public String getDescription() { + return "TouchCommon.singleClickView()"; + } + + @Override + public void perform(UiController uiController, View view) { + TouchCommon.singleClickView(view); + // Performing same timeout as espresso. + long timeout = (long) ((float) ViewConfiguration.getTapTimeout() * 1.5F + + ViewConfiguration.getPressedStateDuration()); + uiController.loopMainThreadForAtLeast(timeout); + } + }; + } + @ClassRule public static DisableAnimationsTestRule disableAnimationsRule = new DisableAnimationsTestRule(); @@ -225,7 +254,6 @@ @Test @MediumTest @Feature({"RenderTest"}) - @DisabledTest(message = "https://crbug.com/1133770") public void testShowOnExpiredCertificateWebsite() throws IOException { mTestServerRule.setCertificateType(ServerCertificate.CERT_EXPIRED); loadUrlAndOpenPageInfo(mTestServerRule.getServer().getURL(sSimpleHtml));
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateIntentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateIntentTest.java new file mode 100644 index 0000000..2dd274c --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateIntentTest.java
@@ -0,0 +1,377 @@ +// Copyright 2020 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.chrome.browser.translate; + +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Build.VERSION_CODES; + +import androidx.test.filters.MediumTest; +import androidx.test.filters.SmallTest; + +import org.hamcrest.Matchers; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.ClassRule; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.ContextUtils; +import org.chromium.base.test.util.Batch; +import org.chromium.base.test.util.CommandLineFlags; +import org.chromium.base.test.util.DisableIf; +import org.chromium.chrome.browser.IntentHandler; +import org.chromium.chrome.browser.document.ChromeLauncherActivity; +import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.flags.ChromeSwitches; +import org.chromium.chrome.browser.infobar.InfoBarContainer; +import org.chromium.chrome.browser.infobar.TranslateCompactInfoBar; +import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; +import org.chromium.chrome.test.ChromeTabbedActivityTestRule; +import org.chromium.chrome.test.batch.BlankCTATabInitialStateRule; +import org.chromium.chrome.test.util.InfoBarTestAnimationListener; +import org.chromium.chrome.test.util.browser.Features; +import org.chromium.content_public.browser.test.util.Criteria; +import org.chromium.content_public.browser.test.util.CriteriaHelper; +import org.chromium.content_public.browser.test.util.TestThreadUtils; + +import java.util.List; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.TimeoutException; + +/** + * Tests for the "ACTION_TRANSLATE_TAB" intent. + */ +@RunWith(ChromeJUnit4ClassRunner.class) +@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) +@Batch(Batch.PER_CLASS) +public class TranslateIntentTest { + @ClassRule + public static final ChromeTabbedActivityTestRule sActivityTestRule = + new ChromeTabbedActivityTestRule(); + @Rule + public final BlankCTATabInitialStateRule mInitialStateRule = + new BlankCTATabInitialStateRule(sActivityTestRule, false); + + private static final String TRANSLATE_PAGE = "/chrome/test/data/translate/fr_test.html"; + private static final String NON_TRANSLATE_PAGE = + "/chrome/test/data/translate/english_page.html"; + + private InfoBarContainer mInfoBarContainer; + private InfoBarTestAnimationListener mListener; + + /** + * Wait until the activity tab is translatable. This is useful in cases where we can't wait on + * the infobar. + */ + private void waitUntilTranslatable() { + CriteriaHelper.pollInstrumentationThread(() -> { + Tab tab = sActivityTestRule.getActivity().getActivityTab(); + Criteria.checkThat(tab, Matchers.notNullValue()); + boolean canManuallyTranslate = false; + try { + canManuallyTranslate = TestThreadUtils.runOnUiThreadBlocking( + () -> TranslateBridge.canManuallyTranslate(tab)); + } catch (ExecutionException e) { + e.printStackTrace(); + canManuallyTranslate = false; + } + Criteria.checkThat(canManuallyTranslate, Matchers.is(true)); + }); + } + + /** + * Wait until the given translate infobar is in the given state. + */ + private void waitForTranslateInfoBarState(boolean expectTranslated) { + TranslateCompactInfoBar infoBar = + (TranslateCompactInfoBar) mInfoBarContainer.getInfoBarsForTesting().get(0); + + CriteriaHelper.pollInstrumentationThread(() -> { + if (expectTranslated) { + return !infoBar.isSourceTabSelectedForTesting() + && infoBar.isTargetTabSelectedForTesting(); + } else { + return infoBar.isSourceTabSelectedForTesting() + && !infoBar.isTargetTabSelectedForTesting(); + } + }); + } + + /** + * Sends a TRANSLATE_TAB intent to the test activity with the given expectedUrl and, if + * non-null, targetLanguageCode. + */ + private void sendTranslateIntent(String expectedUrl, String targetLanguageCode) { + final Intent intent = new Intent(TranslateIntentHandler.ACTION_TRANSLATE_TAB); + if (expectedUrl != null) { + intent.putExtra(TranslateIntentHandler.EXTRA_EXPECTED_URL, expectedUrl); + } + if (targetLanguageCode != null) { + intent.putExtra(TranslateIntentHandler.EXTRA_TARGET_LANGUAGE_CODE, targetLanguageCode); + } + IntentHandler.addTrustedIntentExtras(intent); + TestThreadUtils.runOnUiThreadBlocking( + () -> sActivityTestRule.getActivity().onNewIntent(intent)); + } + + @Before + public void setUp() { + mInfoBarContainer = sActivityTestRule.getInfoBarContainer(); + mListener = new InfoBarTestAnimationListener(); + mInfoBarContainer.addAnimationListener(mListener); + } + + @After + public void tearDown() { + mInfoBarContainer.removeAnimationListener(mListener); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.DisableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentDisabled() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + sendTranslateIntent(url, null); + + // No translation occurs. + waitForTranslateInfoBarState(false); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentOnTranslatePage() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + sendTranslateIntent(url, null); + + // Only the target tab is selected. + waitForTranslateInfoBarState(true); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentOnNonTranslatePage() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(NON_TRANSLATE_PAGE); + // Load a page that doesn't trigger the translate recommendation. + sActivityTestRule.loadUrl(url); + + waitUntilTranslatable(); + Assert.assertTrue(mInfoBarContainer.getInfoBarsForTesting().isEmpty()); + + sendTranslateIntent(url, null); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + + // Only the target tab is selected. + waitForTranslateInfoBarState(true); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentWithTargetLanguage() throws TimeoutException, ExecutionException { + final String url = sActivityTestRule.getTestServer().getURL(NON_TRANSLATE_PAGE); + // Load a page that doesn't trigger the translate recommendation. + sActivityTestRule.loadUrl(url); + + waitUntilTranslatable(); + Assert.assertTrue(mInfoBarContainer.getInfoBarsForTesting().isEmpty()); + + List<String> acceptCodes = + TestThreadUtils.runOnUiThreadBlocking(() -> TranslateBridge.getUserLanguageCodes()); + Assert.assertFalse(acceptCodes.contains("de")); + + sendTranslateIntent(url, "de"); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + + // Only the target tab is selected. + waitForTranslateInfoBarState(true); + + // Verify that German has been added to the user's accept languages. + acceptCodes = + TestThreadUtils.runOnUiThreadBlocking(() -> TranslateBridge.getUserLanguageCodes()); + Assert.assertTrue(acceptCodes.contains("de")); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentWithUnsupportedTargetLanguage() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(NON_TRANSLATE_PAGE); + // Load a page that doesn't trigger the translate recommendation. + sActivityTestRule.loadUrl(url); + + waitUntilTranslatable(); + Assert.assertTrue(mInfoBarContainer.getInfoBarsForTesting().isEmpty()); + + sendTranslateIntent(url, "unsupported"); + + Assert.assertTrue(mInfoBarContainer.getInfoBarsForTesting().isEmpty()); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentOnIncognito() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrlInNewTab(url, /*incognito=*/true); + // A new tab is opened for this test so we need to get the new container. + mInfoBarContainer = sActivityTestRule.getInfoBarContainer(); + InfoBarTestAnimationListener mListener = new InfoBarTestAnimationListener(); + mInfoBarContainer.addAnimationListener(mListener); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + sendTranslateIntent(url, null); + + // No translation should happen. + waitForTranslateInfoBarState(false); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentWithUrlMismatch() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + sendTranslateIntent("http://incorrect.com", null); + + // No translation should happen. + waitForTranslateInfoBarState(false); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentWithoutExpectedUrl() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + sendTranslateIntent(null, null); + + // No translation should happen. + waitForTranslateInfoBarState(false); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentVerifyComponent() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + Context context = ContextUtils.getApplicationContext(); + + final Intent intent = new Intent(TranslateIntentHandler.ACTION_TRANSLATE_TAB); + intent.setClassName(context, "com.google.android.apps.chrome.TranslateDispatcher"); + intent.putExtra(TranslateIntentHandler.EXTRA_EXPECTED_URL, url); + // Send this via startActivity so we don't bypass LaunchIntentHandler. + TestThreadUtils.runOnUiThreadBlocking(() -> context.startActivity(intent)); + + // Only the target tab is selected. + waitForTranslateInfoBarState(true); + } + + @Test + @MediumTest + @DisableIf. + Build(sdk_is_greater_than = VERSION_CODES.LOLLIPOP_MR1, sdk_is_less_than = VERSION_CODES.N, + message = "Consistently failing on Marshmallow https://crbug.com/1127786") + @Features.EnableFeatures({ChromeFeatureList.TRANSLATE_INTENT}) + public void + testTranslateIntentIncorrectComponent() throws TimeoutException { + final String url = sActivityTestRule.getTestServer().getURL(TRANSLATE_PAGE); + // Load a page that triggers the translate recommendation. + sActivityTestRule.loadUrl(url); + mListener.addInfoBarAnimationFinished("InfoBar not opened."); + waitForTranslateInfoBarState(false); + + Context context = ContextUtils.getApplicationContext(); + + final Intent intent = new Intent(TranslateIntentHandler.ACTION_TRANSLATE_TAB); + // Bypassing the TranslateDispatcher activity alias should reject the intent. + intent.setClass(context, ChromeLauncherActivity.class); + intent.putExtra(TranslateIntentHandler.EXTRA_EXPECTED_URL, url); + TestThreadUtils.runOnUiThreadBlocking(() -> context.startActivity(intent)); + + // No translation should happen. + waitForTranslateInfoBarState(false); + } + + @Test + @SmallTest + public void testTranslateIntentFilter() { + Context context = ContextUtils.getApplicationContext(); + PackageManager pm = context.getPackageManager(); + final Intent intent = new Intent(TranslateIntentHandler.ACTION_TRANSLATE_TAB); + intent.setPackage(context.getPackageName()); + final ComponentName component = intent.resolveActivity(pm); + Assert.assertEquals( + component.getClassName(), TranslateIntentHandler.COMPONENT_TRANSLATE_DISPATCHER); + } +}
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerDelegateTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerDelegateTest.java index 5f61ba1..2c8be3f4 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerDelegateTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/signin/account_picker/AccountPickerDelegateTest.java
@@ -93,6 +93,8 @@ private AccountPickerDelegate mDelegate; + private CoreAccountInfo mCoreAccountInfo; + @Before public void setUp() { initMocks(this); @@ -105,6 +107,10 @@ .thenReturn(mIdentityManagerMock); when(IdentityServicesProvider.get().getSigninManager(any())).thenReturn(mSigninManagerMock); + Account account = + mAccountManagerTestRule.addAccount(AccountManagerTestRule.TEST_ACCOUNT_EMAIL); + mCoreAccountInfo = mAccountManagerTestRule.toCoreAccountInfo(account.name); + mDelegate = new AccountPickerDelegate( mWindowAndroidMock, mTabMock, mWebSigninBridgeFactoryMock, CONTINUE_URL); when(mWebSigninBridgeFactoryMock.create(eq(mProfileMock), any(), eq(mDelegate))) @@ -118,14 +124,11 @@ @Test public void testSignInSucceeded() { - Account account = - mAccountManagerTestRule.addAccount(AccountManagerTestRule.TEST_ACCOUNT_EMAIL); - CoreAccountInfo coreAccountInfo = mAccountManagerTestRule.toCoreAccountInfo(account.name); - mDelegate.signIn(coreAccountInfo, error -> {}); + mDelegate.signIn(mCoreAccountInfo, error -> {}); InOrder calledInOrder = inOrder(mWebSigninBridgeFactoryMock, mSigninManagerMock); calledInOrder.verify(mWebSigninBridgeFactoryMock) - .create(mProfileMock, coreAccountInfo, mDelegate); - calledInOrder.verify(mSigninManagerMock).signin(eq(coreAccountInfo), any()); + .create(mProfileMock, mCoreAccountInfo, mDelegate); + calledInOrder.verify(mSigninManagerMock).signin(eq(mCoreAccountInfo), any()); mDelegate.onSigninSucceeded(); verify(mTabMock).loadUrl(mLoadUrlParamsCaptor.capture()); LoadUrlParams loadUrlParams = mLoadUrlParamsCaptor.getValue(); @@ -134,17 +137,14 @@ @Test public void testSignInAborted() { - Account account = - mAccountManagerTestRule.addAccount(AccountManagerTestRule.TEST_ACCOUNT_EMAIL); - CoreAccountInfo coreAccountInfo = mAccountManagerTestRule.toCoreAccountInfo(account.name); doAnswer(invocation -> { SigninManager.SignInCallback callback = invocation.getArgument(1); callback.onSignInAborted(); return null; }) .when(mSigninManagerMock) - .signin(eq(coreAccountInfo), any()); - mDelegate.signIn(coreAccountInfo, error -> {}); + .signin(eq(mCoreAccountInfo), any()); + mDelegate.signIn(mCoreAccountInfo, error -> {}); verify(mWebSigninBridgeMock).destroy(); } @@ -153,30 +153,24 @@ // In case an error is fired because cookies are taking longer to generate than usual, // if user retries the sign-in from the error screen, we need to sign out the user // first before signing in again. - Account account = - mAccountManagerTestRule.addAccount(AccountManagerTestRule.TEST_ACCOUNT_EMAIL); - CoreAccountInfo coreAccountInfo = mAccountManagerTestRule.toCoreAccountInfo(account.name); - mDelegate.signIn(coreAccountInfo, error -> {}); - when(mIdentityManagerMock.getPrimaryAccountInfo(anyInt())).thenReturn(coreAccountInfo); + mDelegate.signIn(mCoreAccountInfo, error -> {}); + when(mIdentityManagerMock.getPrimaryAccountInfo(anyInt())).thenReturn(mCoreAccountInfo); - mDelegate.signIn(coreAccountInfo, error -> {}); + mDelegate.signIn(mCoreAccountInfo, error -> {}); InOrder calledInOrder = inOrder(mWebSigninBridgeMock, mSigninManagerMock, mWebSigninBridgeFactoryMock, mSigninManagerMock); calledInOrder.verify(mWebSigninBridgeMock).destroy(); calledInOrder.verify(mSigninManagerMock).signOut(anyInt()); calledInOrder.verify(mWebSigninBridgeFactoryMock) - .create(mProfileMock, coreAccountInfo, mDelegate); - calledInOrder.verify(mSigninManagerMock).signin(eq(coreAccountInfo), any()); + .create(mProfileMock, mCoreAccountInfo, mDelegate); + calledInOrder.verify(mSigninManagerMock).signin(eq(mCoreAccountInfo), any()); } @Test public void testSignInFailedWithConnectionError() { - Account account = - mAccountManagerTestRule.addAccount(AccountManagerTestRule.TEST_ACCOUNT_EMAIL); - CoreAccountInfo coreAccountInfo = mAccountManagerTestRule.toCoreAccountInfo(account.name); Callback<GoogleServiceAuthError> mockCallback = mock(Callback.class); GoogleServiceAuthError error = new GoogleServiceAuthError(State.CONNECTION_FAILED); - mDelegate.signIn(coreAccountInfo, mockCallback); + mDelegate.signIn(mCoreAccountInfo, mockCallback); mDelegate.onSigninFailed(error); verify(mockCallback).onResult(error); // WebSigninBridge should be kept alive in case cookies are taking longer to
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt index 7791275..070d7f2 100644 --- a/chrome/android/profiles/newest.txt +++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-87.0.4278.0_rc-r1-merged.afdo.bz2 +chromeos-chrome-amd64-87.0.4279.0_rc-r1-merged.afdo.bz2
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 185a959a..666c4d5 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -772,22 +772,34 @@ Set up this device for work or personal use </message> <message name="IDS_OOBE_USER_CREATION_CHILD_BUTTON_LABEL" desc="The label of the button that leads to set up device for child."> - Your child + A child </message> <message name="IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION" desc="The description of the button that leads to set up device for child."> - Set digital ground rules to help your child learn, play, and explore + Set digital ground rules to help children play, explore and do schoolwork at home </message> <message name="IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE" desc="Title of the screen which allows users to choose signin method for child."> - Set up this <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> for your child + Set up this <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> for a child </message> <message name="IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE" desc="Subtitle of the screen which allows users to choose signin method for child."> - To set up parental controls, your child must have a Google Account that you'll help manage. You can set screen time limits, approve or block websites, and more with the Family Link app. + To set up parental controls, a child must have a Google Account managed by a parent. <ph name="DEVICE_TYPE_PLURAL">$1<ex>Chromebooks</ex></ph> allow parents to set up screen limits, approve or block websites, and do more with the Family Link app. If the child needs to do schoolwork on sites like Google Classroom, a school account can be added later. + </message> + <message name="IDS_OOBE_USER_CREATION_CHILD_SIGNIN_LEARN_MORE" desc="Learn more link text in child account creation screen."> + Learn more </message> <message name="IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL" desc="The label of the button that leads to child account creation."> - Create a Google Account for your child + Create a Google Account for a child </message> <message name="IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL" desc="The label of the button that leads to child sign in using existing account."> - Sign in with your child's Google Account + Sign in with a child's Google Account + </message> + <message name="IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_PARENT_NOTIFICATION_TEXT" desc="Text displayed to parent on child account creation screen."> + Parents, the next few steps are for you. You can hand the <ph name="DEVICE_TYPE">$1<ex>Chromebook</ex></ph> back to the child after account setup. + </message> + <message name="IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TITLE" desc="Title of the learn more dialog on child account creation screen."> + Add a school account later + </message> + <message name="IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TEXT" desc="Text of the learn more dialog on child account creation screen."> + Parental controls are not supported for school accounts. To add a school account to access Google Classroom and other websites for schoolwork at home, sign in with the child's personal account first. You can add the school account later in setup. </message> <!-- Strings for the OOBE demo setup flow --> @@ -2597,6 +2609,9 @@ <message name="IDS_ENTERPRISE_LOGIN_ERROR_ALLOWLIST" desc="Couldn't sign in because user is not authorized by the administrator."> You are not authorized to use this device. Please contact the administrator for sign-in permission. </message> + <message name="IDS_ENTERPRISE_AND_FAMILY_LINK_LOGIN_ERROR_ALLOWLIST" desc="Couldn't sign in because user is not authorized by the administrator."> + You are not authorized to use this device. Please contact the administrator for sign-in permission or sign in with a Google account supervised by Family Link. + </message> <message name="IDS_LOCK_SCREEN_VERIFY_ACCOUNT" desc="Title of online account verification on the lock screen"> Verify account </message>
diff --git a/chrome/app/chromeos_strings_grdp/IDS_ENTERPRISE_AND_FAMILY_LINK_LOGIN_ERROR_ALLOWLIST.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_ENTERPRISE_AND_FAMILY_LINK_LOGIN_ERROR_ALLOWLIST.png.sha1 new file mode 100644 index 0000000..99b71407 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_ENTERPRISE_AND_FAMILY_LINK_LOGIN_ERROR_ALLOWLIST.png.sha1
@@ -0,0 +1 @@ +ad0fbbdc86daca6568665e4e26277f3da3216a59 \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL.png.sha1 index 061161fc..9711f3e 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL.png.sha1
@@ -1 +1 @@ -5ffb83e470ed2730c5dde3e26d0c08268feaa581 \ No newline at end of file +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION.png.sha1 index 1cb1ab1e..8eccce98 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION.png.sha1
@@ -1 +1 @@ -985a43c1a7f9a552c75335cffa17b010cf08d8fa \ No newline at end of file +021929a55123d89ba678c6fd4fd8a2508a438c20 \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_LABEL.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_LABEL.png.sha1 index 1cb1ab1e..8eccce98 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_LABEL.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_BUTTON_LABEL.png.sha1
@@ -1 +1 @@ -985a43c1a7f9a552c75335cffa17b010cf08d8fa \ No newline at end of file +021929a55123d89ba678c6fd4fd8a2508a438c20 \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_LEARN_MORE.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_LEARN_MORE.png.sha1 new file mode 100644 index 0000000..9711f3e --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_LEARN_MORE.png.sha1
@@ -0,0 +1 @@ +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE.png.sha1 index 061161fc..9711f3e 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE.png.sha1
@@ -1 +1 @@ -5ffb83e470ed2730c5dde3e26d0c08268feaa581 \ No newline at end of file +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE.png.sha1 index 061161fc..9711f3e 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE.png.sha1
@@ -1 +1 @@ -5ffb83e470ed2730c5dde3e26d0c08268feaa581 \ No newline at end of file +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL.png.sha1 index 061161fc..9711f3e 100644 --- a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL.png.sha1 +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL.png.sha1
@@ -1 +1 @@ -5ffb83e470ed2730c5dde3e26d0c08268feaa581 \ No newline at end of file +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TEXT.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TEXT.png.sha1 new file mode 100644 index 0000000..83b7995 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TEXT.png.sha1
@@ -0,0 +1 @@ +a0152f6aae2afab87de742fd777c48b9398c4ddf \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TITLE.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TITLE.png.sha1 new file mode 100644 index 0000000..83b7995 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TITLE.png.sha1
@@ -0,0 +1 @@ +a0152f6aae2afab87de742fd777c48b9398c4ddf \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_PARENT_NOTIFICATION_TEXT.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_PARENT_NOTIFICATION_TEXT.png.sha1 new file mode 100644 index 0000000..9711f3e --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_PARENT_NOTIFICATION_TEXT.png.sha1
@@ -0,0 +1 @@ +0b55f6ae17cad345a391ee81b3f4cd38e6a6c36f \ No newline at end of file
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 54ad1ca..4945b340 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -10204,18 +10204,6 @@ </message> <!-- Ad Blocking UI strings. --> - <message name="IDS_ALWAYS_ALLOW_ADS" desc="Explanation associated with a toggle to allow ads after ads have been blocked on the page. To be used on pages where the ad blocking UI is governed by a persistent permissions-based allowlist."> - Always allow ads on this site - </message> - <message name="IDS_BLOCKED_ADS_INFOBAR_MESSAGE" desc="The mini infobar message shown to users on Android when Chrome has blocked ads on the site because the site tends to show intrusive ads. Will be presented as a sentence, next to a Details link to expand the infobar."> - Ads blocked. - </message> - <message name="IDS_BLOCKED_ADS_PROMPT_TITLE" desc="Title of the prompt shown to users in the omnibox or infobar when Chrome has blocked ads on the site because the site tends to show intrusive ads. The title will stand alone next to an icon so there is no need for a period." formatter_data="android_java"> - Ads blocked - </message> - <message name="IDS_BLOCKED_ADS_PROMPT_EXPLANATION" desc="A warning that a site has, in the past, shown intrusive or misleading ads. To be shown in an expanded infobar / bubble"> - This site shows intrusive or misleading ads. - </message> <message name="IDS_BLOCKED_ADS_PROMPT_TOOLTIP" desc="Explanation that Chrome blocked ads on this site. To be shown as a tooltip on the Ads blocked desktop bubble"> Ads blocked on this site </message>
diff --git a/chrome/app/profiles_strings.grdp b/chrome/app/profiles_strings.grdp index 29223a8..bcac73e 100644 --- a/chrome/app/profiles_strings.grdp +++ b/chrome/app/profiles_strings.grdp
@@ -675,6 +675,14 @@ </if> <if expr="not chromeos and not is_android"> + <!-- Profile customization bubble --> + <message name="IDS_PROFILE_CUSTOMIZATION_DONE_BUTTON_LABEL" desc="Text for the Done button on the profile customization bubble"> + Done + </message> + <message name="IDS_PROFILE_CUSTOMIZATION_PICK_THEME_TITLE" desc="Title of the section of the profile customization bubble where the user can select a theme color for the profile"> + Pick a theme color + </message> + <!-- Profile Picker --> <message name="IDS_PROFILE_PICKER_ADD_SPACE_BUTTON" desc="Text for the add space button on the profile picker main view"> Add
diff --git a/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_DONE_BUTTON_LABEL.png.sha1 b/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_DONE_BUTTON_LABEL.png.sha1 new file mode 100644 index 0000000..b250a271 --- /dev/null +++ b/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_DONE_BUTTON_LABEL.png.sha1
@@ -0,0 +1 @@ +1b7fd92091f037fb66ce7d607fe3eae4ed922691 \ No newline at end of file
diff --git a/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_PICK_THEME_TITLE.png.sha1 b/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_PICK_THEME_TITLE.png.sha1 new file mode 100644 index 0000000..b250a271 --- /dev/null +++ b/chrome/app/profiles_strings_grdp/IDS_PROFILE_CUSTOMIZATION_PICK_THEME_TITLE.png.sha1
@@ -0,0 +1 @@ +1b7fd92091f037fb66ce7d607fe3eae4ed922691 \ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 60e1150..f1dd2bc 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -6659,10 +6659,19 @@ kOsDesktop, FEATURE_VALUE_TYPE( browsing_data::features::kEnableBrowsingDataLifetimeManager)}, - // NOTE: Adding a new flag requires adding a corresponding entry to enum - // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag - // Histograms" in tools/metrics/histograms/README.md (run the - // AboutFlagsHistogramTest unit test to verify this process). + +#if defined(OS_ANDROID) + {"wallet-requires-first-sync-setup", + flag_descriptions::kWalletRequiresFirstSyncSetupCompleteName, + flag_descriptions::kWalletRequiresFirstSyncSetupCompleteDescription, + kOsAndroid, + FEATURE_VALUE_TYPE( + autofill::features::kWalletRequiresFirstSyncSetupComplete)}, +#endif // defined(OS_ANDROID) + // NOTE: Adding a new flag requires adding a corresponding entry to enum + // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag + // Histograms" in tools/metrics/histograms/README.md (run the + // AboutFlagsHistogramTest unit test to verify this process). }; class FlagsStateSingleton : public flags_ui::FlagsState::Delegate {
diff --git a/chrome/browser/android/password_edit_delegate_settings_impl.cc b/chrome/browser/android/password_edit_delegate_settings_impl.cc index 68f09a0..47754304 100644 --- a/chrome/browser/android/password_edit_delegate_settings_impl.cc +++ b/chrome/browser/android/password_edit_delegate_settings_impl.cc
@@ -11,7 +11,8 @@ PasswordEditDelegateSettingsImpl::PasswordEditDelegateSettingsImpl( Profile* profile, - base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change, + base::span<const std::unique_ptr<password_manager::PasswordForm>> + forms_to_change, std::vector<base::string16> existing_usernames) : profile_(profile), existing_usernames_(std::move(existing_usernames)) { DCHECK(!forms_to_change.empty()); @@ -21,7 +22,7 @@ forms_to_change_.reserve(forms_to_change.size()); for (const auto& password_form : forms_to_change) { forms_to_change_.push_back( - std::make_unique<autofill::PasswordForm>(*password_form)); + std::make_unique<password_manager::PasswordForm>(*password_form)); } }
diff --git a/chrome/browser/android/password_edit_delegate_settings_impl.h b/chrome/browser/android/password_edit_delegate_settings_impl.h index 8abbd69..c87600ca 100644 --- a/chrome/browser/android/password_edit_delegate_settings_impl.h +++ b/chrome/browser/android/password_edit_delegate_settings_impl.h
@@ -11,7 +11,7 @@ #include "base/strings/string16.h" #include "chrome/browser/android/password_edit_delegate.h" #include "chrome/browser/android/password_editing_bridge.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_store_consumer.h" class Profile; @@ -27,7 +27,8 @@ // username conflicts with any previously existing ones. PasswordEditDelegateSettingsImpl( Profile* profile, - base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change, + base::span<const std::unique_ptr<password_manager::PasswordForm>> + forms_to_change, std::vector<base::string16> existing_usernames); ~PasswordEditDelegateSettingsImpl() override; @@ -37,7 +38,7 @@ private: Profile* profile_ = nullptr; std::vector<base::string16> existing_usernames_; - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change_; + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change_; }; #endif // CHROME_BROWSER_ANDROID_PASSWORD_EDIT_DELEGATE_SETTINGS_IMPL_H_
diff --git a/chrome/browser/android/password_edit_delegate_settings_impl_unittest.cc b/chrome/browser/android/password_edit_delegate_settings_impl_unittest.cc index 6f3ae23..19f9ce34 100644 --- a/chrome/browser/android/password_edit_delegate_settings_impl_unittest.cc +++ b/chrome/browser/android/password_edit_delegate_settings_impl_unittest.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/android/password_edit_delegate_settings_impl.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/test/base/testing_profile.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_list_sorter.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/browser/test_password_store.h" @@ -40,7 +40,7 @@ constexpr char kUsername2[] = "user2"; std::vector<std::pair<std::string, std::string>> GetUsernamesAndPasswords( - const std::vector<autofill::PasswordForm>& forms) { + const std::vector<password_manager::PasswordForm>& forms) { std::vector<std::pair<std::string, std::string>> result; result.reserve(forms.size()); for (const auto& form : forms) { @@ -51,10 +51,10 @@ return result; } -autofill::PasswordForm MakeSavedForm(const GURL& origin, - base::StringPiece username, - base::StringPiece password) { - autofill::PasswordForm form; +password_manager::PasswordForm MakeSavedForm(const GURL& origin, + base::StringPiece username, + base::StringPiece password) { + password_manager::PasswordForm form; form.url = origin; form.signon_realm = origin.GetOrigin().spec(); form.username_element = base::ASCIIToUTF16("Email"); @@ -64,15 +64,16 @@ return form; } -std::vector<std::unique_ptr<autofill::PasswordForm>> ExtractEquivalentForms( - const autofill::PasswordForm& edited_form, - const std::vector<autofill::PasswordForm>& saved_forms) { +std::vector<std::unique_ptr<password_manager::PasswordForm>> +ExtractEquivalentForms( + const password_manager::PasswordForm& edited_form, + const std::vector<password_manager::PasswordForm>& saved_forms) { std::string sort_key = password_manager::CreateSortKey(edited_form); - std::vector<std::unique_ptr<autofill::PasswordForm>> equivalent_forms; - for (const autofill::PasswordForm& form : saved_forms) { + std::vector<std::unique_ptr<password_manager::PasswordForm>> equivalent_forms; + for (const password_manager::PasswordForm& form : saved_forms) { if (password_manager::CreateSortKey(form) == sort_key) { equivalent_forms.push_back( - std::make_unique<autofill::PasswordForm>(form)); + std::make_unique<password_manager::PasswordForm>(form)); } } return equivalent_forms; @@ -80,7 +81,7 @@ std::vector<base::string16> ExtractUsernamesSameUrl( const GURL& url, - const std::vector<autofill::PasswordForm>& saved_forms) { + const std::vector<password_manager::PasswordForm>& saved_forms) { std::vector<base::string16> existing_usernames; for (const auto& form : saved_forms) { if (form.url == url) { @@ -106,14 +107,14 @@ void RunUntilIdle() { task_environment_.RunUntilIdle(); } std::unique_ptr<PasswordEditDelegateSettingsImpl> CreateTestDelegate( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& forms, + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& forms, std::vector<base::string16> existing_usernames); - const std::vector<autofill::PasswordForm>& GetStoredPasswordsForRealm( + const std::vector<password_manager::PasswordForm>& GetStoredPasswordsForRealm( base::StringPiece signon_realm); void InitializeStoreWithForms( - const std::vector<autofill::PasswordForm>& saved_forms); + const std::vector<password_manager::PasswordForm>& saved_forms); private: content::BrowserTaskEnvironment task_environment_; @@ -131,13 +132,13 @@ std::unique_ptr<PasswordEditDelegateSettingsImpl> PasswordEditDelegateSettingsImplTest::CreateTestDelegate( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& forms, + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& forms, std::vector<base::string16> existing_usernames) { return std::make_unique<PasswordEditDelegateSettingsImpl>( &profile_, forms, std::move(existing_usernames)); } -const std::vector<autofill::PasswordForm>& +const std::vector<password_manager::PasswordForm>& PasswordEditDelegateSettingsImplTest::GetStoredPasswordsForRealm( base::StringPiece signon_realm) { const auto& stored_passwords = GetStore()->stored_passwords(); @@ -146,7 +147,7 @@ } void PasswordEditDelegateSettingsImplTest::InitializeStoreWithForms( - const std::vector<autofill::PasswordForm>& saved_forms) { + const std::vector<password_manager::PasswordForm>& saved_forms) { for (const auto& form : saved_forms) { GetStore()->AddLogin(form); } @@ -154,11 +155,11 @@ } TEST_F(PasswordEditDelegateSettingsImplTest, EditPassword) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - std::vector<autofill::PasswordForm> saved_forms = {edited_form}; + std::vector<password_manager::PasswordForm> saved_forms = {edited_form}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -174,13 +175,13 @@ } TEST_F(PasswordEditDelegateSettingsImplTest, EditUsername) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - std::vector<autofill::PasswordForm> saved_forms = {edited_form}; + std::vector<password_manager::PasswordForm> saved_forms = {edited_form}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -196,13 +197,13 @@ } TEST_F(PasswordEditDelegateSettingsImplTest, EditUsernameAndPassword) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - std::vector<autofill::PasswordForm> saved_forms = {edited_form}; + std::vector<password_manager::PasswordForm> saved_forms = {edited_form}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -218,14 +219,15 @@ } TEST_F(PasswordEditDelegateSettingsImplTest, RejectSameUsernameForSameRealm) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - autofill::PasswordForm other_form = + password_manager::PasswordForm other_form = MakeSavedForm(GURL(kExampleCom), kUsername2, kPassword2); - std::vector<autofill::PasswordForm> saved_forms = {edited_form, other_form}; + std::vector<password_manager::PasswordForm> saved_forms = {edited_form, + other_form}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -241,14 +243,15 @@ } TEST_F(PasswordEditDelegateSettingsImplTest, UpdateDuplicates) { - autofill::PasswordForm edited_form = MakeSavedForm( + password_manager::PasswordForm edited_form = MakeSavedForm( GURL(base::StrCat({kExampleCom, "pathA"})), kUsername1, kPassword1); - autofill::PasswordForm other_form = MakeSavedForm( + password_manager::PasswordForm other_form = MakeSavedForm( GURL(base::StrCat({kExampleCom, "pathB"})), kUsername1, kPassword1); - std::vector<autofill::PasswordForm> saved_forms = {edited_form, other_form}; + std::vector<password_manager::PasswordForm> saved_forms = {edited_form, + other_form}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -266,19 +269,19 @@ TEST_F(PasswordEditDelegateSettingsImplTest, EditUsernameForTheRightCredential) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - autofill::PasswordForm other_form1 = + password_manager::PasswordForm other_form1 = MakeSavedForm(GURL(kExampleCom), kUsername2, kPassword2); - autofill::PasswordForm other_form2 = + password_manager::PasswordForm other_form2 = MakeSavedForm(GURL(kExampleOrg), kUsername1, kPassword1); - autofill::PasswordForm other_form3 = + password_manager::PasswordForm other_form3 = MakeSavedForm(GURL(kExampleOrg), kUsername2, kPassword2); - std::vector<autofill::PasswordForm> saved_forms = {edited_form, other_form1, - other_form2, other_form3}; + std::vector<password_manager::PasswordForm> saved_forms = { + edited_form, other_form1, other_form2, other_form3}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms); @@ -299,19 +302,19 @@ TEST_F(PasswordEditDelegateSettingsImplTest, EditPasswordForTheRightCredential) { - autofill::PasswordForm edited_form = + password_manager::PasswordForm edited_form = MakeSavedForm(GURL(kExampleCom), kUsername1, kPassword1); - autofill::PasswordForm other_form1 = + password_manager::PasswordForm other_form1 = MakeSavedForm(GURL(kExampleCom), kUsername2, kPassword2); - autofill::PasswordForm other_form2 = + password_manager::PasswordForm other_form2 = MakeSavedForm(GURL(kExampleOrg), kUsername1, kPassword1); - autofill::PasswordForm other_form3 = + password_manager::PasswordForm other_form3 = MakeSavedForm(GURL(kExampleOrg), kUsername2, kPassword2); - std::vector<autofill::PasswordForm> saved_forms = {edited_form, other_form1, - other_form2, other_form3}; + std::vector<password_manager::PasswordForm> saved_forms = { + edited_form, other_form1, other_form2, other_form3}; InitializeStoreWithForms(saved_forms); - std::vector<std::unique_ptr<autofill::PasswordForm>> forms_to_change = + std::vector<std::unique_ptr<password_manager::PasswordForm>> forms_to_change = ExtractEquivalentForms(edited_form, saved_forms); std::vector<base::string16> existing_usernames = ExtractUsernamesSameUrl(edited_form.url, saved_forms);
diff --git a/chrome/browser/android/password_editing_bridge.cc b/chrome/browser/android/password_editing_bridge.cc index eed76a5..03968c77 100644 --- a/chrome/browser/android/password_editing_bridge.cc +++ b/chrome/browser/android/password_editing_bridge.cc
@@ -23,7 +23,8 @@ JNIEnv* env, const base::android::JavaParamRef<jobject>& context, Profile* profile, - base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change, + base::span<const std::unique_ptr<password_manager::PasswordForm>> + forms_to_change, std::vector<base::string16> existing_usernames) { // |forms_to_change| is built in // |PasswordManagerPresnter::TryGetPasswordForms|, which under certain
diff --git a/chrome/browser/android/password_editing_bridge.h b/chrome/browser/android/password_editing_bridge.h index 89592138..3af3895e5 100644 --- a/chrome/browser/android/password_editing_bridge.h +++ b/chrome/browser/android/password_editing_bridge.h
@@ -39,7 +39,8 @@ JNIEnv* env, const base::android::JavaParamRef<jobject>& context, Profile* profile, - base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change, + base::span<const std::unique_ptr<password_manager::PasswordForm>> + forms_to_change, std::vector<base::string16> existing_usernames); void HandleEditSavedPasswordEntry(
diff --git a/chrome/browser/android/password_ui_view_android.cc b/chrome/browser/android/password_ui_view_android.cc index 76c738eec..d82bce09 100644 --- a/chrome/browser/android/password_ui_view_android.cc +++ b/chrome/browser/android/password_ui_view_android.cc
@@ -30,9 +30,9 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/signin/identity_manager_factory.h" #include "chrome/grit/generated_resources.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/export/password_csv_writer.h" #include "components/password_manager/core/browser/leak_detection/authenticated_leak_check.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_ui_utils.h" #include "components/password_manager/core/browser/ui/credential_provider_interface.h" #include "content/public/browser/browser_thread.h" @@ -73,7 +73,8 @@ } void PasswordUIViewAndroid::SetPasswordList( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& password_list) { + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& + password_list) { JNIEnv* env = base::android::AttachCurrentThread(); ScopedJavaLocalRef<jobject> ui_controller = weak_java_ui_controller_.get(env); if (!ui_controller.is_null()) { @@ -83,7 +84,7 @@ } void PasswordUIViewAndroid::SetPasswordExceptionList( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& password_exception_list) { JNIEnv* env = base::android::AttachCurrentThread(); ScopedJavaLocalRef<jobject> ui_controller = weak_java_ui_controller_.get(env); @@ -104,7 +105,7 @@ const JavaRef<jobject>&, int index) { DCHECK_EQ(State::ALIVE, state_); - const autofill::PasswordForm* form = + const password_manager::PasswordForm* form = password_manager_presenter_.GetPassword(index); if (!form) { return Java_PasswordUIView_createSavedPasswordEntry( @@ -125,7 +126,7 @@ const JavaRef<jobject>&, int index) { DCHECK_EQ(State::ALIVE, state_); - const autofill::PasswordForm* form = + const password_manager::PasswordForm* form = password_manager_presenter_.GetPasswordException(index); if (!form) return ConvertUTF8ToJavaString(env, std::string()); @@ -232,7 +233,7 @@ credential_provider_for_testing_ ? credential_provider_for_testing_ : &password_manager_presenter_; - std::vector<std::unique_ptr<autofill::PasswordForm>> passwords = + std::vector<std::unique_ptr<password_manager::PasswordForm>> passwords = provider->GetAllPasswords(); // The UI should not trigger serialization if there are not passwords.
diff --git a/chrome/browser/android/password_ui_view_android.h b/chrome/browser/android/password_ui_view_android.h index f34d66d8..24b8848 100644 --- a/chrome/browser/android/password_ui_view_android.h +++ b/chrome/browser/android/password_ui_view_android.h
@@ -50,10 +50,10 @@ // PasswordUIView implementation. Profile* GetProfile() override; void SetPasswordList( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& password_list) - override; + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& + password_list) override; void SetPasswordExceptionList( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& password_exception_list) override; // Calls from Java.
diff --git a/chrome/browser/android/password_ui_view_android_unittest.cc b/chrome/browser/android/password_ui_view_android_unittest.cc index 0a4b631..33a2761 100644 --- a/chrome/browser/android/password_ui_view_android_unittest.cc +++ b/chrome/browser/android/password_ui_view_android_unittest.cc
@@ -19,8 +19,8 @@ #include "base/macros.h" #include "base/run_loop.h" #include "base/strings/utf_string_conversions.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/export/password_csv_writer.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/ui/credential_provider_interface.h" #include "content/public/test/browser_task_environment.h" #include "content/public/test/test_utils.h" @@ -33,9 +33,9 @@ namespace android { -using autofill::PasswordForm; using base::android::AttachCurrentThread; using base::android::JavaParamRef; +using password_manager::PasswordForm; namespace {
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 8145d5e..056d0a75 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -337,6 +337,8 @@ <include name="IDR_ERROR_DIALOG_JS" file="resources\user_manager\error_dialog.js" type="BINDATA" /> <include name="IDR_PROFILE_BROWSER_PROXY_HTML" file="resources\user_manager\profile_browser_proxy.html" type="BINDATA" /> <include name="IDR_PROFILE_BROWSER_PROXY_JS" file="resources\user_manager\profile_browser_proxy.js" type="BINDATA" /> + <include name="IDR_PROFILE_CUSTOMIZATION_HTML" file="resources\signin\profile_customization\profile_customization.html" type="BINDATA" /> + <include name="IDR_PROFILE_CUSTOMIZATION_APP_JS" file="${root_gen_dir}\chrome\browser\resources\signin\profile_customization\profile_customization_app.js" use_base_dir="false" type="BINDATA" /> <include name="IDR_USER_MANAGER_HTML" file="resources\user_manager\user_manager.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" /> <include name="IDR_USER_MANAGER_JS" file="resources\user_manager\user_manager.js" flattenhtml="true" type="BINDATA" /> <include name="IDR_USER_MANAGER_PAGES_HTML" file="resources\user_manager\user_manager_pages.html" type="BINDATA" />
diff --git a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc index 8a574a4..afcf599d 100644 --- a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc +++ b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
@@ -906,7 +906,8 @@ OobeBaseTest::SetUpCommandLine(command_line); // Many bots don't have keyboard/mice which triggers the HID detection // dialog in the OOBE. Avoid confusing the tests with that. - command_line->AppendSwitch(chromeos::switches::kDisableHIDDetectionOnOOBE); + command_line->AppendSwitch( + chromeos::switches::kDisableHIDDetectionOnOOBEForTesting); } SpeechMonitor sm_;
diff --git a/chrome/browser/chromeos/crosapi/message_center_ash.cc b/chrome/browser/chromeos/crosapi/message_center_ash.cc index 4dbb901..e9dbf421 100644 --- a/chrome/browser/chromeos/crosapi/message_center_ash.cc +++ b/chrome/browser/chromeos/crosapi/message_center_ash.cc
@@ -4,7 +4,9 @@ #include "chrome/browser/chromeos/crosapi/message_center_ash.h" +#include <string> #include <utility> +#include <vector> #include "base/bind.h" #include "base/check.h" @@ -177,4 +179,14 @@ mc::MessageCenter::Get()->RemoveNotification(id, /*by_user=*/false); } +void MessageCenterAsh::GetDisplayedNotifications( + GetDisplayedNotificationsCallback callback) { + mc::NotificationList::Notifications notifications = + mc::MessageCenter::Get()->GetNotifications(); + std::vector<std::string> ids; + for (mc::Notification* notification : notifications) + ids.push_back(notification->id()); + std::move(callback).Run(ids); +} + } // namespace crosapi
diff --git a/chrome/browser/chromeos/crosapi/message_center_ash.h b/chrome/browser/chromeos/crosapi/message_center_ash.h index da1dfea9..7379e533 100644 --- a/chrome/browser/chromeos/crosapi/message_center_ash.h +++ b/chrome/browser/chromeos/crosapi/message_center_ash.h
@@ -27,6 +27,8 @@ mojom::NotificationPtr notification, mojo::PendingRemote<mojom::NotificationDelegate> delegate) override; void CloseNotification(const std::string& id) override; + void GetDisplayedNotifications( + GetDisplayedNotificationsCallback callback) override; private: mojo::Receiver<mojom::MessageCenter> receiver_;
diff --git a/chrome/browser/chromeos/crosapi/message_center_ash_unittest.cc b/chrome/browser/chromeos/crosapi/message_center_ash_unittest.cc index 3536443..3e3303f 100644 --- a/chrome/browser/chromeos/crosapi/message_center_ash_unittest.cc +++ b/chrome/browser/chromeos/crosapi/message_center_ash_unittest.cc
@@ -4,21 +4,28 @@ #include "chrome/browser/chromeos/crosapi/message_center_ash.h" +#include <memory> +#include <string> + #include "base/optional.h" #include "base/strings/utf_string_conversions.h" #include "base/test/task_environment.h" #include "base/time/time.h" +#include "chromeos/crosapi/mojom/message_center.mojom-test-utils.h" #include "chromeos/crosapi/mojom/message_center.mojom.h" #include "chromeos/crosapi/mojom/notification.mojom.h" #include "mojo/public/cpp/bindings/remote.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_unittest_util.h" #include "ui/message_center/message_center.h" #include "ui/message_center/public/cpp/notification.h" #include "ui/message_center/public/cpp/notification_delegate.h" +#include "ui/message_center/public/cpp/notifier_id.h" #include "url/gurl.h" using base::ASCIIToUTF16; @@ -28,6 +35,16 @@ namespace crosapi { namespace { +// Creates an ash message center notification. +std::unique_ptr<message_center::Notification> CreateNotificationWithId( + const std::string& id) { + return std::make_unique<message_center::Notification>( + message_center::NOTIFICATION_TYPE_SIMPLE, id, ASCIIToUTF16("title"), + ASCIIToUTF16("message"), /*icon=*/gfx::Image(), + /*display_source=*/base::string16(), GURL(), message_center::NotifierId(), + message_center::RichNotificationData(), /*delegate=*/nullptr); +} + class MojoDelegate : public mojom::NotificationDelegate { public: MojoDelegate() = default; @@ -325,5 +342,20 @@ EXPECT_EQ(1, mojo_delegate.closed_count_); } +TEST_F(MessageCenterAshTest, GetDisplayedNotifications) { + // Create an ash-side notification. + auto* message_center = message_center::MessageCenter::Get(); + message_center->AddNotification(CreateNotificationWithId("id0")); + message_center->AddNotification(CreateNotificationWithId("id1")); + + // Get the list of notifications. + mojom::MessageCenterAsyncWaiter waiter(message_center_remote_.get()); + std::vector<std::string> ids; + waiter.GetDisplayedNotifications(&ids); + + // The notifications ids are returned. No particular order is specified. + EXPECT_THAT(ids, testing::UnorderedElementsAre("id0", "id1")); +} + } // namespace } // namespace crosapi
diff --git a/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.cc b/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.cc new file mode 100644 index 0000000..bcd7c2f --- /dev/null +++ b/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.cc
@@ -0,0 +1,277 @@ +// Copyright 2020 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/chromeos/file_manager/browser_test_devtools_listener.h" + +#include <stddef.h> +#include <map> +#include <memory> +#include <string> +#include <vector> + +#include "base/files/file_util.h" +#include "base/hash/md5.h" +#include "base/json/json_reader.h" +#include "base/json/json_writer.h" +#include "base/logging.h" +#include "base/run_loop.h" +#include "base/strings/strcat.h" +#include "base/strings/stringprintf.h" +#include "base/threading/thread_restrictions.h" +#include "url/url_util.h" + +namespace file_manager { + +namespace { + +base::span<const uint8_t> StringToSpan(const std::string& str) { + return base::as_bytes(base::make_span(str)); +} + +std::string EncodedURL(const std::string& url) { + url::RawCanonOutputT<char> canonical_url; + url::EncodeURIComponent(url.c_str(), url.size(), &canonical_url); + return std::string(canonical_url.data(), canonical_url.length()); +} + +} // namespace + +DevToolsListener::DevToolsListener(content::DevToolsAgentHost* host, + uint32_t uuid) + : uuid_(base::StringPrintf("%u", uuid)) { + CHECK(!host->IsAttached()); + host->AttachClient(this); + Start(host); +} + +DevToolsListener::~DevToolsListener() = default; + +void DevToolsListener::Navigated(content::DevToolsAgentHost* host) { + CHECK(host->IsAttached() && attached_); + navigated_ = StartJSCoverage(host); +} + +bool DevToolsListener::HasCoverage(content::DevToolsAgentHost* host) { + return attached_ && navigated_; +} + +void DevToolsListener::GetCoverage(content::DevToolsAgentHost* host, + const base::FilePath& store, + const std::string test) { + if (HasCoverage(host)) + StopAndStoreJSCoverage(host, store, test); + navigated_ = false; +} + +void DevToolsListener::Detach(content::DevToolsAgentHost* host) { + if (attached_) + host->DetachClient(this); + navigated_ = false; + attached_ = false; +} + +std::string DevToolsListener::HostString(content::DevToolsAgentHost* host, + const std::string prefix = "") { + std::string result = base::StrCat( + {prefix, " ", host->GetType(), " title: ", host->GetTitle()}); + std::string description = host->GetDescription(); + if (!description.empty()) + base::StrAppend(&result, {" description: ", description}); + std::string url = host->GetURL().spec(); + if (!url.empty()) + base::StrAppend(&result, {" URL: ", url}); + return result; +} + +void DevToolsListener::Start(content::DevToolsAgentHost* host) { + std::string enable_runtime = "{\"id\":10,\"method\":\"Runtime.enable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(enable_runtime)); + + std::string enable_page = "{\"id\":11,\"method\":\"Page.enable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(enable_page)); +} + +bool DevToolsListener::StartJSCoverage(content::DevToolsAgentHost* host) { + std::string enable_profiler = "{\"id\":20,\"method\":\"Profiler.enable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(enable_profiler)); + + std::string start_precise_coverage = + "{\"id\":21,\"method\":\"Profiler.startPreciseCoverage\",\"params\":{" + "\"callCount\":false,\"detailed\":true}}"; + host->DispatchProtocolMessage(this, StringToSpan(start_precise_coverage)); + + std::string enable_debugger = "{\"id\":22,\"method\":\"Debugger.enable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(enable_debugger)); + + std::string skip_pauses = + "{\"id\":23,\"method\":\"Debugger.setSkipAllPauses\"" + ",\"params\":{\"skip\":true}}"; + host->DispatchProtocolMessage(this, StringToSpan(skip_pauses)); + + return true; +} + +void DevToolsListener::StopAndStoreJSCoverage(content::DevToolsAgentHost* host, + const base::FilePath& store, + const std::string test) { + std::string precise_coverage = + "{\"id\":40,\"method\":\"Profiler.takePreciseCoverage\"}"; + host->DispatchProtocolMessage(this, StringToSpan(precise_coverage)); + AwaitMessageResponse(40); + + script_coverage_.reset(value_.release()); + StoreScripts(host, store); + + std::string debugger = "{\"id\":41,\"method\":\"Debugger.disable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(debugger)); + + std::string profiler = "{\"id\":42,\"method\":\"Profiler.disable\"}"; + host->DispatchProtocolMessage(this, StringToSpan(profiler)); + + base::DictionaryValue* result = nullptr; + CHECK(script_coverage_->GetDictionary("result", &result)); + + base::ListValue* coverage_entries = nullptr; + CHECK(result->GetList("result", &coverage_entries)); + + auto entries = std::make_unique<base::ListValue>(); + for (size_t i = 0; i != coverage_entries->GetSize(); ++i) { + base::DictionaryValue* entry = nullptr; + CHECK(coverage_entries->GetDictionary(i, &entry)); + + std::string script_id; + CHECK(entry->GetString("scriptId", &script_id)); + const auto it = script_id_map_.find(script_id); + if (it == script_id_map_.end()) + continue; + + CHECK(entry->SetString("hash", it->second)); + entries->Append(entry->CreateDeepCopy()); + } + + const std::string url = host->GetURL().spec(); + CHECK(result->SetString("encodedHostURL", EncodedURL(url))); + CHECK(result->SetString("hostTitle", host->GetTitle())); + CHECK(result->SetString("hostType", host->GetType())); + CHECK(result->SetString("hostTest", test)); + CHECK(result->SetString("hostURL", url)); + + const std::string md5 = base::MD5String(HostString(host, test)); + std::string coverage = base::StrCat({test, ".", md5, uuid_, ".js.json"}); + base::FilePath path = store.AppendASCII("tests").Append(coverage); + + CHECK(result->SetList("result", std::move(entries))); + CHECK(base::JSONWriter::Write(*result, &coverage)); + base::WriteFile(path, coverage.data(), coverage.size()); + + script_coverage_.reset(); + script_hash_map_.clear(); + script_id_map_.clear(); + script_.clear(); + + AwaitMessageResponse(42); + value_.reset(); +} + +void DevToolsListener::StoreScripts(content::DevToolsAgentHost* host, + const base::FilePath& store) { + for (size_t i = 0; i < script_.size(); ++i, value_.reset()) { + std::string id; + CHECK(script_[i]->GetString("params.scriptId", &id)); + CHECK(!id.empty()); + + std::string url; + if (!script_[i]->GetString("params.url", &url)) + script_[i]->GetString("params.sourceURL", &url); + if (url.empty()) + continue; + + std::string script_source = base::StringPrintf( + "{\"id\":50,\"method\":\"Debugger.getScriptSource\"" + ",\"params\":{\"scriptId\":\"%s\"}}", + id.c_str()); + host->DispatchProtocolMessage(this, StringToSpan(script_source)); + AwaitMessageResponse(50); + + base::DictionaryValue* result = nullptr; + CHECK(value_->GetDictionary("result", &result)); + std::string text; + result->GetString("scriptSource", &text); + if (text.empty()) + continue; + + std::string hash; + CHECK(script_[i]->GetString("params.hash", &hash)); + if (script_id_map_.find(id) != script_id_map_.end()) + LOG(FATAL) << "Duplicate script by id " << url; + script_id_map_[id] = hash; + CHECK(!hash.empty()); + if (script_hash_map_.find(hash) != script_hash_map_.end()) + continue; + script_hash_map_[hash] = id; + + base::DictionaryValue* script = nullptr; + CHECK(script_[i]->GetDictionary("params", &script)); + CHECK(script->SetString("encodedURL", EncodedURL(url))); + CHECK(script->SetString("hash", hash)); + CHECK(script->SetString("text", text)); + CHECK(script->SetString("url", url)); + + base::FilePath path = store.AppendASCII(hash.append(".js.json")); + CHECK(base::JSONWriter::Write(*script, &text)); + if (!base::PathExists(path)) // Deduplication + base::WriteFile(path, text.data(), text.size()); + } +} + +void DevToolsListener::AwaitMessageResponse(int id) { + value_.reset(); + value_id_ = id; + + base::RunLoop run_loop; + value_closure_ = run_loop.QuitClosure(); + run_loop.Run(); +} + +void DevToolsListener::DispatchProtocolMessage( + content::DevToolsAgentHost* host, + base::span<const uint8_t> span_message) { + if (!navigated_) + return; + + std::string message(reinterpret_cast<const char*>(span_message.data()), + span_message.size()); + + std::unique_ptr<base::DictionaryValue> response = + base::DictionaryValue::From(base::JSONReader::ReadDeprecated(message)); + CHECK(response); + + std::string* method = response->FindStringPath("method"); + if (method) { + if (*method == "Debugger.scriptParsed") + script_.push_back(std::move(response)); + else if (*method == "Runtime.executionContextsCreated") + script_.clear(); + return; + } + + base::Optional<int> id = response->FindIntPath("id"); + if (id.has_value() && id.value() == value_id_) { + value_.reset(response.release()); + CHECK(value_closure_); + std::move(value_closure_).Run(); + } +} + +bool DevToolsListener::MayAttachToURL(const GURL& url, bool is_webui) { + return true; +} + +void DevToolsListener::AgentHostClosed(content::DevToolsAgentHost* host) { + CHECK(!value_closure_); + navigated_ = false; + attached_ = false; +} + +} // namespace file_manager
diff --git a/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.h b/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.h new file mode 100644 index 0000000..b60c632 --- /dev/null +++ b/chrome/browser/chromeos/file_manager/browser_test_devtools_listener.h
@@ -0,0 +1,94 @@ +// Copyright 2020 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_CHROMEOS_FILE_MANAGER_BROWSER_TEST_DEVTOOLS_LISTENER_H_ +#define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_BROWSER_TEST_DEVTOOLS_LISTENER_H_ + +#include <map> +#include <memory> +#include <string> +#include <vector> + +#include "base/values.h" +#include "content/public/browser/devtools_agent_host.h" +#include "content/public/browser/devtools_agent_host_client.h" + +namespace file_manager { + +// Collects code coverage from a WebContents during a +// browser test using Chrome Devtools Protocol (CDP). +class DevToolsListener : public content::DevToolsAgentHostClient { + public: + // Attaches to a host and enables CDP. + DevToolsListener(content::DevToolsAgentHost* host, uint32_t uuid); + ~DevToolsListener() override; + + // Starts code coverage. + void Navigated(content::DevToolsAgentHost* host); + + // Returns true if host has started code coverage. + bool HasCoverage(content::DevToolsAgentHost* host); + + // If host HasCoverage() collect the coverage and + // write it into the |store|. + void GetCoverage(content::DevToolsAgentHost* host, + const base::FilePath& store, + const std::string test); + + // Detaches from a host. + void Detach(content::DevToolsAgentHost* host); + + // Returns a string that uniquely identifies a host + // with an optional prefix. + static std::string HostString(content::DevToolsAgentHost* host, + const std::string prefix); + + private: + // Enable CDP on host. + void Start(content::DevToolsAgentHost* host); + + // Starts JavaScript code coverage on host. + bool StartJSCoverage(content::DevToolsAgentHost* host); + + // Collects JavaScript code coverage on host and writes + // it into the |store|. + void StopAndStoreJSCoverage(content::DevToolsAgentHost* host, + const base::FilePath& store, + const std::string test); + + // Stores scripts that are parsed during execution on host. + void StoreScripts(content::DevToolsAgentHost* host, + const base::FilePath& store); + + // Await CDP response to command |id|. + void AwaitMessageResponse(int id); + + // Receives CDP messages sent by host. + void DispatchProtocolMessage(content::DevToolsAgentHost* host, + base::span<const uint8_t> span_message) override; + + // Returns true if URL should be attached to. + bool MayAttachToURL(const GURL& url, bool is_webui) override; + + // Clean up when host is closed. + void AgentHostClosed(content::DevToolsAgentHost* host) override; + + private: + std::vector<std::unique_ptr<base::DictionaryValue>> script_; + std::unique_ptr<base::DictionaryValue> script_coverage_; + std::map<std::string, std::string> script_hash_map_; + std::map<std::string, std::string> script_id_map_; + + base::OnceClosure value_closure_; + std::unique_ptr<base::DictionaryValue> value_; + int value_id_; + + const std::string uuid_; + bool navigated_ = false; + bool attached_ = true; +}; + +} // namespace file_manager + +#endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_BROWSER_TEST_DEVTOOLS_LISTENER_H_
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc index 7f4ac4d..400d079 100644 --- a/chrome/browser/chromeos/login/chrome_restart_request.cc +++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
@@ -152,6 +152,7 @@ ::switches::kDisableWebRtcHWDecoding, ::switches::kDisableWebRtcHWEncoding, ::switches::kOzonePlatform, + ash::switches::kAshClearFastInkBuffer, ash::switches::kAshEnableTabletMode, ash::switches::kAshEnableWaylandServer, ash::switches::kAshForceEnableStylusTools,
diff --git a/chrome/browser/chromeos/login/demo_mode/demo_setup_browsertest.cc b/chrome/browser/chromeos/login/demo_mode/demo_setup_browsertest.cc index dbcf337..c79e71c 100644 --- a/chrome/browser/chromeos/login/demo_mode/demo_setup_browsertest.cc +++ b/chrome/browser/chromeos/login/demo_mode/demo_setup_browsertest.cc
@@ -515,16 +515,8 @@ EXPECT_TRUE(IsConfirmationDialogShown()); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(ADDRESS_SANITIZER) -#define MAYBE_DoNotInvokeWithNonConsecutiveTaps \ - DISABLED_DoNotInvokeWithNonConsecutiveTaps -#else -#define MAYBE_DoNotInvokeWithNonConsecutiveTaps \ - DoNotInvokeWithNonConsecutiveTaps -#endif IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_DoNotInvokeWithNonConsecutiveTaps) { + DoNotInvokeWithNonConsecutiveTaps) { // Use fake time to avoid flakiness. const base::Time kFakeTime = base::Time::UnixEpoch(); SetFakeTimeForMultiTapDetector(kFakeTime); @@ -597,16 +589,8 @@ EXPECT_TRUE(StartupUtils::IsDeviceRegistered()); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(ADDRESS_SANITIZER) -#define MAYBE_OnlineSetupFlowSuccessWithCountryCustomization \ - DISABLED_OnlineSetupFlowSuccessWithCountryCustomization -#else -#define MAYBE_OnlineSetupFlowSuccessWithCountryCustomization \ - OnlineSetupFlowSuccessWithCountryCustomization -#endif IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_OnlineSetupFlowSuccessWithCountryCustomization) { + OnlineSetupFlowSuccessWithCountryCustomization) { // Simulate successful online setup. enrollment_helper_.ExpectEnrollmentMode( policy::EnrollmentConfig::MODE_ATTESTATION); @@ -873,14 +857,7 @@ EXPECT_FALSE(StartupUtils::IsDeviceRegistered()); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(ADDRESS_SANITIZER) -#define MAYBE_OfflineDemoModeUnavailable DISABLED_OfflineDemoModeUnavailable -#else -#define MAYBE_OfflineDemoModeUnavailable OfflineDemoModeUnavailable -#endif -IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_OfflineDemoModeUnavailable) { +IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, OfflineDemoModeUnavailable) { SimulateNetworkDisconnected(); InvokeDemoModeWithAccelerator(); @@ -960,14 +937,8 @@ EXPECT_TRUE(StartupUtils::IsDeviceRegistered()); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(ADDRESS_SANITIZER) -#define MAYBE_OfflineSetupFlowErrorDefault DISABLED_OfflineSetupFlowErrorDefault -#else -#define MAYBE_OfflineSetupFlowErrorDefault OfflineSetupFlowErrorDefault -#endif IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_OfflineSetupFlowErrorDefault) { + OfflineSetupFlowErrorDefault) { // Simulate offline setup failure. enrollment_helper_.ExpectOfflineEnrollmentError( policy::EnrollmentStatus::ForStatus( @@ -1032,16 +1003,8 @@ EXPECT_FALSE(StartupUtils::IsDeviceRegistered()); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(ADDRESS_SANITIZER) -#define MAYBE_OfflineSetupFlowErrorPowerwashRequired \ - DISABLED_OfflineSetupFlowErrorPowerwashRequired -#else -#define MAYBE_OfflineSetupFlowErrorPowerwashRequired \ - OfflineSetupFlowErrorPowerwashRequired -#endif IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_OfflineSetupFlowErrorPowerwashRequired) { + OfflineSetupFlowErrorPowerwashRequired) { // Simulate offline setup failure. enrollment_helper_.ExpectOfflineEnrollmentError( policy::EnrollmentStatus::ForLockError( @@ -1132,16 +1095,8 @@ EXPECT_TRUE(IsScreenShown(EulaView::kScreenId)); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(OS_CHROMEOS) -#define MAYBE_ClickConnectedNetworkOnNetworkScreen \ - DISABLED_ClickConnectedNetworkOnNetworkScreen -#else -#define MAYBE_ClickConnectedNetworkOnNetworkScreen \ - ClickConnectedNetworkOnNetworkScreen -#endif IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, - MAYBE_ClickConnectedNetworkOnNetworkScreen) { + ClickConnectedNetworkOnNetworkScreen) { SimulateNetworkConnected(); SkipToScreen(NetworkScreenView::kScreenId); EXPECT_TRUE(IsScreenDialogElementEnabled(NetworkScreenView::kScreenId, @@ -1154,13 +1109,7 @@ EXPECT_TRUE(IsScreenShown(EulaView::kScreenId)); } -// TODO(https://crbug.com/1121422): Flaky on ChromeOS ASAN. -#if defined(OS_CHROMEOS) -#define MAYBE_BackOnNetworkScreen DISABLED_BackOnNetworkScreen -#else -#define MAYBE_BackOnNetworkScreen BackOnNetworkScreen -#endif -IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, MAYBE_BackOnNetworkScreen) { +IN_PROC_BROWSER_TEST_F(DemoSetupArcSupportedTest, BackOnNetworkScreen) { SimulateNetworkConnected(); SkipToScreen(NetworkScreenView::kScreenId);
diff --git a/chrome/browser/chromeos/login/enable_debugging_browsertest.cc b/chrome/browser/chromeos/login/enable_debugging_browsertest.cc index e81b183..44da2d2 100644 --- a/chrome/browser/chromeos/login/enable_debugging_browsertest.cc +++ b/chrome/browser/chromeos/login/enable_debugging_browsertest.cc
@@ -161,7 +161,8 @@ OobeBaseTest::SetUpCommandLine(command_line); // Disable HID detection because it takes precedence and could block // enable-debugging UI. - command_line->AppendSwitch(chromeos::switches::kDisableHIDDetectionOnOOBE); + command_line->AppendSwitch( + chromeos::switches::kDisableHIDDetectionOnOOBEForTesting); } void SetUpInProcessBrowserTestFixture() override { std::unique_ptr<DBusThreadManagerSetter> dbus_setter =
diff --git a/chrome/browser/chromeos/login/screens/supervision_transition_screen_browsertest.cc b/chrome/browser/chromeos/login/screens/supervision_transition_screen_browsertest.cc index 373c4316..63d55c8 100644 --- a/chrome/browser/chromeos/login/screens/supervision_transition_screen_browsertest.cc +++ b/chrome/browser/chromeos/login/screens/supervision_transition_screen_browsertest.cc
@@ -34,6 +34,18 @@ namespace chromeos { +namespace { + +constexpr char kSupervisionTransitionId[] = "supervision-transition"; + +const test::UIPath kSupervisionDialog = {kSupervisionTransitionId, + "supervisionTransitionDialog"}; +const test::UIPath kErrorDialog = {kSupervisionTransitionId, + "supervisionTransitionErrorDialog"}; +const test::UIPath kAcceptButton = {kSupervisionTransitionId, "accept-button"}; + +} // namespace + // Param returns the original user type. class SupervisionTransitionScreenTest : public MixinBasedInProcessBrowserTest, @@ -100,10 +112,8 @@ IN_PROC_BROWSER_TEST_P(SupervisionTransitionScreenTest, SuccessfulTransition) { OobeScreenWaiter(SupervisionTransitionScreenView::kScreenId).Wait(); - test::OobeJS().ExpectVisiblePath( - {"supervision-transition-md", "supervisionTransitionDialog"}); - test::OobeJS().ExpectHiddenPath( - {"supervision-transition-md", "supervisionTransitionErrorDialog"}); + test::OobeJS().ExpectVisiblePath(kSupervisionDialog); + test::OobeJS().ExpectHiddenPath(kErrorDialog); EXPECT_FALSE(ash::LoginScreenTestApi::IsGuestButtonShown()); EXPECT_FALSE(ash::LoginScreenTestApi::IsAddUserButtonShown()); @@ -129,10 +139,8 @@ DISABLED_TransitionTimeout) { OobeScreenWaiter(SupervisionTransitionScreenView::kScreenId).Wait(); - test::OobeJS().ExpectVisiblePath( - {"supervision-transition-md", "supervisionTransitionDialog"}); - test::OobeJS().ExpectHiddenPath( - {"supervision-transition-md", "supervisionTransitionErrorDialog"}); + test::OobeJS().ExpectVisiblePath(kSupervisionDialog); + test::OobeJS().ExpectHiddenPath(kErrorDialog); EXPECT_FALSE(ash::LoginScreenTestApi::IsGuestButtonShown()); EXPECT_FALSE(ash::LoginScreenTestApi::IsAddUserButtonShown()); @@ -148,17 +156,13 @@ EXPECT_TRUE(ProfileManager::GetPrimaryUserProfile()->GetPrefs()->GetBoolean( arc::prefs::kArcDataRemoveRequested)); - test::OobeJS() - .CreateVisibilityWaiter(true, {"supervision-transition-md", - "supervisionTransitionErrorDialog"}) - ->Wait(); - test::OobeJS().ExpectHiddenPath( - {"supervision-transition-md", "supervisionTransitionDialog"}); + test::OobeJS().CreateVisibilityWaiter(true, kErrorDialog)->Wait(); + test::OobeJS().ExpectHiddenPath(kSupervisionDialog); EXPECT_FALSE(ash::LoginScreenTestApi::IsGuestButtonShown()); EXPECT_FALSE(ash::LoginScreenTestApi::IsAddUserButtonShown()); - test::OobeJS().TapOnPath({"supervision-transition-md", "accept-button"}); + test::OobeJS().TapOnPath(kAcceptButton); logged_in_user_mixin().GetLoginManagerMixin()->WaitForActiveSession(); }
diff --git a/chrome/browser/chromeos/login/startup_utils.cc b/chrome/browser/chromeos/login/startup_utils.cc index 79fd673..e7cc3ebc 100644 --- a/chrome/browser/chromeos/login/startup_utils.cc +++ b/chrome/browser/chromeos/login/startup_utils.cc
@@ -28,6 +28,9 @@ namespace { +constexpr char kDisableHIDDetectionScreenForTests[] = + "oobe.disable_hid_detection_screen_for_tests"; + // Saves boolean "Local State" preference and forces its persistence to disk. void SaveBoolPreferenceForced(const char* pref_name, bool value) { PrefService* prefs = g_browser_process->local_state(); @@ -92,6 +95,7 @@ registry->RegisterIntegerPref(prefs::kDeviceRegistered, -1); registry->RegisterBooleanPref(prefs::kEnrollmentRecoveryRequired, false); registry->RegisterStringPref(prefs::kInitialLocale, "en-US"); + registry->RegisterBooleanPref(kDisableHIDDetectionScreenForTests, false); } // static @@ -178,6 +182,17 @@ } // static +void StartupUtils::DisableHIDDetectionScreenForTests() { + SaveBoolPreferenceForced(kDisableHIDDetectionScreenForTests, true); +} + +// static +bool StartupUtils::IsHIDDetectionScreenDisabledForTests() { + return g_browser_process->local_state()->GetBoolean( + kDisableHIDDetectionScreenForTests); +} + +// static std::string StartupUtils::GetInitialLocale() { std::string locale = g_browser_process->local_state()->GetString(prefs::kInitialLocale);
diff --git a/chrome/browser/chromeos/login/startup_utils.h b/chrome/browser/chromeos/login/startup_utils.h index 3278277..426da521 100644 --- a/chrome/browser/chromeos/login/startup_utils.h +++ b/chrome/browser/chromeos/login/startup_utils.h
@@ -54,6 +54,10 @@ // Mark a device as requiring enrollment recovery. static void MarkEnrollmentRecoveryRequired(); + static void DisableHIDDetectionScreenForTests(); + + static bool IsHIDDetectionScreenDisabledForTests(); + // Returns initial locale from local settings. static std::string GetInitialLocale();
diff --git a/chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc b/chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc index e1d4798..a8c51ce 100644 --- a/chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc +++ b/chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc
@@ -77,7 +77,8 @@ void SetUpCommandLine(base::CommandLine* command_line) override { command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); command_line->AppendSwitch(chromeos::switches::kLoginManager); - command_line->AppendSwitch(chromeos::switches::kDisableHIDDetectionOnOOBE); + command_line->AppendSwitch( + chromeos::switches::kDisableHIDDetectionOnOOBEForTesting); } void SetUpOnMainThread() override {
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc index 9b8805f..aebf08b 100644 --- a/chrome/browser/chromeos/login/wizard_controller.cc +++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -227,12 +227,15 @@ // The HID detection screen is only allowed for form factors without built-in // inputs: Chromebases, Chromebits, and Chromeboxes (crbug.com/965765). bool CanShowHIDDetectionScreen() { + if (chromeos::StartupUtils::IsHIDDetectionScreenDisabledForTests()) + return false; + switch (chromeos::GetDeviceType()) { case chromeos::DeviceType::kChromebase: case chromeos::DeviceType::kChromebit: case chromeos::DeviceType::kChromebox: return !base::CommandLine::ForCurrentProcess()->HasSwitch( - chromeos::switches::kDisableHIDDetectionOnOOBE); + chromeos::switches::kDisableHIDDetectionOnOOBEForTesting); default: return false; } @@ -903,6 +906,13 @@ VLOG(1) << "SkipToUpdateForTesting."; wizard_context_->skip_to_update_for_tests = true; StartupUtils::MarkEulaAccepted(); + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + chromeos::switches::kDisableHIDDetectionOnOOBEForTesting)) { + // We store the flag into local state so it persists restart after the + // update. Command line switch does not persist the restart during the + // test. + StartupUtils::DisableHIDDetectionScreenForTests(); + } PerformPostEulaActions(); InitiateOOBEUpdate(); }
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc index a19bd5d..1885184 100644 --- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -102,6 +102,7 @@ #include "content/public/common/content_switches.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" +#include "content/public/test/test_launcher.h" #include "content/public/test/test_utils.h" #include "net/test/spawned_test_server/spawned_test_server.h" #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" @@ -2846,6 +2847,37 @@ EXPECT_FALSE(configuration->DictEmpty()); } +class HIDDetectionScreenDisabledAfterRestartTest : public OobeBaseTest { + public: + HIDDetectionScreenDisabledAfterRestartTest() = default; + // OobeBaseTest: + void SetUpCommandLine(base::CommandLine* command_line) override { + OobeBaseTest::SetUpCommandLine(command_line); + // Emulating Chrome restart without the flag. + if (content::IsPreTest()) { + command_line->AppendSwitch( + switches::kDisableHIDDetectionOnOOBEForTesting); + } + } +}; + +IN_PROC_BROWSER_TEST_F(HIDDetectionScreenDisabledAfterRestartTest, + PRE_SkipToUpdate) { + // Pref should be false by default. + EXPECT_FALSE(StartupUtils::IsHIDDetectionScreenDisabledForTests()); + + WizardController::default_controller()->SkipToUpdateForTesting(); + // SkipToUpdateForTesting should set the pref when + // switches::kDisableHIDDetectionOnOOBEForTesting is passed. + EXPECT_TRUE(StartupUtils::IsHIDDetectionScreenDisabledForTests()); +} + +IN_PROC_BROWSER_TEST_F(HIDDetectionScreenDisabledAfterRestartTest, + SkipToUpdate) { + // The pref should persist restart. + EXPECT_TRUE(StartupUtils::IsHIDDetectionScreenDisabledForTests()); +} + // TODO(nkostylev): Add test for WebUI accelerators http://crosbug.com/22571 // TODO(merkulova): Add tests for bluetooth HID detection screen variations when
diff --git a/chrome/browser/extensions/api/management/management_api_browsertest.cc b/chrome/browser/extensions/api/management/management_api_browsertest.cc index 4ebf57c..4ea2618 100644 --- a/chrome/browser/extensions/api/management/management_api_browsertest.cc +++ b/chrome/browser/extensions/api/management/management_api_browsertest.cc
@@ -87,7 +87,8 @@ ExtensionManagementApiTestWithBackgroundType, ::testing::Values(ContextType::kPersistentBackground)); -INSTANTIATE_TEST_SUITE_P(ServiceWorker, +// Disabled due to timeouts; see https://crbug.com/1132581. +INSTANTIATE_TEST_SUITE_P(DISABLED_ServiceWorker, ExtensionManagementApiTestWithBackgroundType, ::testing::Values(ContextType::kServiceWorker));
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc index 27208378..fcedde3 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_apitest.cc
@@ -322,7 +322,13 @@ } // Make sure tabCapture API can be granted for Chrome:// pages. -IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, GrantForChromePages) { +// Disabled due to flakes on macOS; see https://crbug.com/1134562. +#if defined(OS_MAC) +#define MAYBE_GrantForChromePages DISABLED_GrantForChromePages +#else +#define MAYBE_GrantForChromePages GrantForChromePages +#endif +IN_PROC_BROWSER_TEST_F(TabCaptureApiTest, MAYBE_GrantForChromePages) { ExtensionTestMessageListener before_open_tab("ready1", true); ASSERT_TRUE(RunExtensionSubtest("tab_capture", "active_tab_chrome_pages.html"))
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 88d8cfa..098322f2 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -4671,6 +4671,11 @@ "expiry_milestone": 90 }, { + "name": "wallet-requires-first-sync-setup", + "owners": [ "treib", "butter-team@google.com" ], + "expiry_milestone": 90 + }, + { "name": "wallet-service-use-sandbox", "owners": [ "jsaul@google.com", "payments-autofill-team@google.com" ], // This flag is used by testing teams to run Google Payments calls against
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 1edcc507..de1a37b5 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -3245,6 +3245,14 @@ const char kTabbedAppOverflowMenuThreeButtonActionbarDescription[] = "If enabled, the actionbar in the overflow menu will have 3 buttons."; +const char kWalletRequiresFirstSyncSetupCompleteName[] = + "Controls whether Wallet (GPay) integration on Android requires " + "first-sync-setup to be complete"; +const char kWalletRequiresFirstSyncSetupCompleteDescription[] = + "Controls whether the Wallet (GPay) integration on Android requires " + "first-sync-setup to be complete. Only has an effect if " + "enable-autofill-account-wallet-storage is also enabled."; + // Non-Android ----------------------------------------------------------------- #else // !defined(OS_ANDROID)
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 1fa701f..ff7ef845 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1852,6 +1852,9 @@ extern const char kTabbedAppOverflowMenuThreeButtonActionbarName[]; extern const char kTabbedAppOverflowMenuThreeButtonActionbarDescription[]; +extern const char kWalletRequiresFirstSyncSetupCompleteName[]; +extern const char kWalletRequiresFirstSyncSetupCompleteDescription[]; + // Non-Android ---------------------------------------------------------------- #else // !defined(OS_ANDROID)
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index 08dcb64..ae8d2457 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -226,6 +226,7 @@ &paint_preview::kPaintPreviewShowOnStartup, &language::kDetailedLanguageSettings, &language::kExplicitLanguageAsk, + &language::kTranslateIntent, &messages::kMessagesForAndroidInfrastructure, &offline_pages::kOfflineIndicatorFeature, &offline_pages::kOfflineIndicatorAlwaysHttpProbeFeature,
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index b5f09c00..5e74544 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -422,6 +422,7 @@ public static final String TEST_DEFAULT_DISABLED = "TestDefaultDisabled"; public static final String TEST_DEFAULT_ENABLED = "TestDefaultEnabled"; public static final String TOUCH_TO_FILL_ANDROID = "TouchToFillAndroid"; + public static final String TRANSLATE_INTENT = "TranslateIntent"; public static final String TRUSTED_WEB_ACTIVITY_LOCATION_DELEGATION = "TrustedWebActivityLocationDelegation"; public static final String TRUSTED_WEB_ACTIVITY_NEW_DISCLOSURE =
diff --git a/chrome/browser/installable/installable_manager.cc b/chrome/browser/installable/installable_manager.cc index 09dc6acb..7b2dd255 100644 --- a/chrome/browser/installable/installable_manager.cc +++ b/chrome/browser/installable/installable_manager.cc
@@ -756,7 +756,8 @@ void InstallableManager::OnDidCheckOfflineCapability( base::TimeTicks check_service_worker_start_time, - content::OfflineCapability capability) { + content::OfflineCapability capability, + int64_t service_worker_registration_id) { switch (capability) { case content::OfflineCapability::kSupported: worker_->has_worker = true;
diff --git a/chrome/browser/installable/installable_manager.h b/chrome/browser/installable/installable_manager.h index 2f4f1da..b6a1ee9 100644 --- a/chrome/browser/installable/installable_manager.h +++ b/chrome/browser/installable/installable_manager.h
@@ -218,7 +218,8 @@ content::ServiceWorkerCapability capability); void OnDidCheckOfflineCapability( base::TimeTicks check_service_worker_start_time, - content::OfflineCapability capability); + content::OfflineCapability capability, + int64_t service_worker_registration_id); void CheckAndFetchBestIcon(int ideal_icon_size_in_px, int minimum_icon_size_in_px,
diff --git a/chrome/browser/lacros/keystore_service_lacros_browsertest.cc b/chrome/browser/lacros/keystore_service_lacros_browsertest.cc new file mode 100644 index 0000000..fac82b8 --- /dev/null +++ b/chrome/browser/lacros/keystore_service_lacros_browsertest.cc
@@ -0,0 +1,48 @@ +// Copyright 2020 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 <string> + +#include "chrome/test/base/in_process_browser_test.h" +#include "chromeos/crosapi/mojom/keystore_service.mojom-test-utils.h" +#include "chromeos/crosapi/mojom/keystore_service.mojom.h" +#include "chromeos/lacros/lacros_chrome_service_impl.h" +#include "content/public/test/browser_test.h" + +// This class provides integration testing for the keystore service crosapi. +// TODO(https://crbug.com/1134340): The logic being tested does not rely on +// //chrome or //content so it would be helpful if this lived in a lower-level +// test suite. +class KeystoreServiceLacrosBrowserTest : public InProcessBrowserTest { + protected: + KeystoreServiceLacrosBrowserTest() = default; + + KeystoreServiceLacrosBrowserTest(const KeystoreServiceLacrosBrowserTest&) = + delete; + KeystoreServiceLacrosBrowserTest& operator=( + const KeystoreServiceLacrosBrowserTest&) = delete; + + ~KeystoreServiceLacrosBrowserTest() override = default; + + mojo::Remote<crosapi::mojom::KeystoreService>& keystore_service_remote() { + return chromeos::LacrosChromeServiceImpl::Get()->keystore_service_remote(); + } +}; + +// Tests that providing an incorrectly formatted user keystore challenge returns +// failure. +IN_PROC_BROWSER_TEST_F(KeystoreServiceLacrosBrowserTest, WrongFormattingUser) { + crosapi::mojom::ChallengeAttestationOnlyKeystoreResultPtr result; + std::string challenge = "asdf"; + crosapi::mojom::KeystoreServiceAsyncWaiter async_waiter( + keystore_service_remote().get()); + async_waiter.ChallengeAttestationOnlyKeystore( + challenge, crosapi::mojom::KeystoreType::kUser, /*migrate=*/false, + &result); + ASSERT_TRUE(result->is_error_message()); + + // TODO(https://crbug.com/1134349): Currently this errors out because remote + // attestation is disabled. We want this to error out because of a poorly + // formatted attestation message. +}
diff --git a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc index 8322c34..c5b5dc9 100644 --- a/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc +++ b/chrome/browser/nacl_host/test/gdb_debug_stub_browsertest.cc
@@ -57,8 +57,8 @@ base::Process test_script; std::unique_ptr<base::Environment> env(base::Environment::Create()); nacl::NaClBrowser::SetGdbDebugStubPortListenerForTest( - base::Bind(&NaClGdbDebugStubTest::StartTestScript, base::Unretained(this), - &test_script, test_name)); + base::BindRepeating(&NaClGdbDebugStubTest::StartTestScript, + base::Unretained(this), &test_script, test_name)); // Turn on debug stub logging. env->SetVar("NACLVERBOSITY", "1"); RunTestViaHTTP(nacl_module);
diff --git a/chrome/browser/notifications/notification_platform_bridge_lacros_unittest.cc b/chrome/browser/notifications/notification_platform_bridge_lacros_unittest.cc index a31fdea..bae91f3b 100644 --- a/chrome/browser/notifications/notification_platform_bridge_lacros_unittest.cc +++ b/chrome/browser/notifications/notification_platform_bridge_lacros_unittest.cc
@@ -95,6 +95,9 @@ last_close_id_ = id; } + void GetDisplayedNotifications( + GetDisplayedNotificationsCallback callback) override {} + int display_count_ = 0; std::string last_display_id_; crosapi::mojom::NotificationPtr last_notification_;
diff --git a/chrome/browser/notifications/notification_platform_bridge_mac_unnotification.mm b/chrome/browser/notifications/notification_platform_bridge_mac_unnotification.mm index bda723d..ff3c5fa 100644 --- a/chrome/browser/notifications/notification_platform_bridge_mac_unnotification.mm +++ b/chrome/browser/notifications/notification_platform_bridge_mac_unnotification.mm
@@ -6,13 +6,17 @@ #import <UserNotifications/UserNotifications.h> -#include "base/notreached.h" +#include "base/bind.h" +#include "base/bind_helpers.h" +#include "base/callback.h" +#include "base/callback_helpers.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/notifications/notification_platform_bridge_mac_utils.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.h" #import "chrome/browser/ui/cocoa/notifications/unnotification_response_builder_mac.h" +#include "content/public/browser/browser_task_traits.h" #include "ui/message_center/public/cpp/notification.h" @class UNMutableNotificationContent; @@ -104,26 +108,73 @@ void NotificationPlatformBridgeMacUNNotification::Close( Profile* profile, const std::string& notification_id) { - NOTIMPLEMENTED(); + NSString* candidateId = base::SysUTF8ToNSString(notification_id); + NSString* currentProfileId = base::SysUTF8ToNSString(GetProfileId(profile)); + + [notification_center_ getDeliveredNotificationsWithCompletionHandler:^( + NSArray<UNNotification*>* _Nonnull notifications) { + for (UNNotification* notification in notifications) { + NSString* toastId = [[[[notification request] content] userInfo] + objectForKey:notification_constants::kNotificationId]; + NSString* persistentProfileId = + [[[[notification request] content] userInfo] + objectForKey:notification_constants::kNotificationProfileId]; + + if ([toastId isEqualToString:candidateId] && + [persistentProfileId isEqualToString:currentProfileId]) { + [notification_center_ + removeDeliveredNotificationsWithIdentifiers:@[ toastId ]]; + break; + } + } + }]; + // TODO(crbug/1134539): If the notification was not present as a banner, check + // alerts } void NotificationPlatformBridgeMacUNNotification::GetDisplayed( Profile* profile, GetDisplayedNotificationsCallback callback) const { - NOTIMPLEMENTED(); - std::move(callback).Run(/*notification_ids=*/{}, /*supports_sync=*/false); + bool incognito = profile->IsOffTheRecord(); + NSString* profileId = base::SysUTF8ToNSString(GetProfileId(profile)); + // Create a copyable version of the OnceCallback because ObjectiveC blocks + // copy all referenced variables via copy constructor. + auto copyable_callback = base::AdaptCallbackForRepeating(std::move(callback)); + + [notification_center_ getDeliveredNotificationsWithCompletionHandler:^( + NSArray<UNNotification*>* _Nonnull notifications) { + std::set<std::string> displayedNotifications; + + for (UNNotification* notification in notifications) { + NSString* toastProfileId = [[[[notification request] content] userInfo] + objectForKey:notification_constants::kNotificationProfileId]; + bool incognitoNotification = [[[[[notification request] content] userInfo] + objectForKey:notification_constants::kNotificationIncognito] + boolValue]; + + if ([toastProfileId isEqualToString:profileId] && + incognito == incognitoNotification) { + displayedNotifications.insert( + base::SysNSStringToUTF8([[[[notification request] content] userInfo] + objectForKey:notification_constants::kNotificationId])); + } + } + // TODO(crbug/1134570): Query for displayed alerts as well + + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(copyable_callback, std::move(displayedNotifications), + true /* supports_synchronization */)); + }]; } void NotificationPlatformBridgeMacUNNotification::SetReadyCallback( NotificationBridgeReadyCallback callback) { - NOTIMPLEMENTED(); std::move(callback).Run(/*success=*/true); } void NotificationPlatformBridgeMacUNNotification::DisplayServiceShutDown( - Profile* profile) { - NOTIMPLEMENTED(); -} + Profile* profile) {} void NotificationPlatformBridgeMacUNNotification::RequestPermission() { UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert |
diff --git a/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input.html b/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input.html new file mode 100644 index 0000000..8b413f4 --- /dev/null +++ b/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input.html
@@ -0,0 +1,5 @@ +<iframe id="f"></iframe> +<script> + f.src = origin.replace("example.com", "b.com") + + "/lcp_subframe_input_sub.html"; +</script>
diff --git a/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input_sub.html b/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input_sub.html new file mode 100644 index 0000000..cd81e9d --- /dev/null +++ b/chrome/browser/page_load_metrics/integration_tests/data/lcp_subframe_input_sub.html
@@ -0,0 +1,27 @@ +<div><img src="images/green-16x16.png"></div> +<div id="container"></div> +<script> + var last_url = null; + const test_step_1 = async () => { + return new Promise(resolve => { + new PerformanceObserver(list => { + resolve(last_url = list.getEntries()[0].url.match(/images\/(.*)/)[1]); + }).observe({type: 'largest-contentful-paint', buffered: true}); + }); + }; + const test_step_2 = async () => { + let img = document.createElement("img"); + let img_load = new Promise(resolve => { + new PerformanceObserver(list => { + if (list.getEntries().some(e => e.identifier == "blue")) + resolve(); + }).observe({type: 'element'}); + img.setAttribute("elementtiming", "blue"); + }); + container.appendChild(img); + img.src = "images/blue96x96.png"; + await img_load; + await new Promise(resolve => { requestAnimationFrame(resolve); }); + return last_url; + }; +</script>
diff --git a/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc b/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc index 44338f1..1050bd61 100644 --- a/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc +++ b/chrome/browser/page_load_metrics/integration_tests/largest_contentful_paint_browsertest.cc
@@ -130,3 +130,17 @@ "PageLoad.PaintTiming.NavigationToLargestContentfulPaint.MainFrame", lcp_timestamps[2].value()); } + +IN_PROC_BROWSER_TEST_F(MetricIntegrationTest, + LargestContentfulPaint_SubframeInput) { + Start(); + Load("/lcp_subframe_input.html"); + auto* sub = ChildFrameAt(web_contents()->GetMainFrame(), 0); + EXPECT_EQ(EvalJs(sub, "test_step_1()").value.GetString(), "green-16x16.png"); + + content::SimulateMouseClickAt(web_contents(), 0, + blink::WebMouseEvent::Button::kLeft, + gfx::Point(100, 100)); + + EXPECT_EQ(EvalJs(sub, "test_step_2()").value.GetString(), "green-16x16.png"); +}
diff --git a/chrome/browser/page_load_metrics/integration_tests/metric_integration_test.cc b/chrome/browser/page_load_metrics/integration_tests/metric_integration_test.cc index ff3564d0..e1063bb 100644 --- a/chrome/browser/page_load_metrics/integration_tests/metric_integration_test.cc +++ b/chrome/browser/page_load_metrics/integration_tests/metric_integration_test.cc
@@ -112,6 +112,8 @@ // Set a default window size for consistency. command_line->AppendSwitchASCII(switches::kWindowSize, "800,600"); command_line->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); + + content::IsolateAllSitesForTesting(command_line); } std::unique_ptr<HttpResponse> MetricIntegrationTest::HandleRequest(
diff --git a/chrome/browser/password_check/android/internal/java/res/values/dimens.xml b/chrome/browser/password_check/android/internal/java/res/values/dimens.xml index db59343..b2308315 100644 --- a/chrome/browser/password_check/android/internal/java/res/values/dimens.xml +++ b/chrome/browser/password_check/android/internal/java/res/values/dimens.xml
@@ -4,6 +4,7 @@ found in the LICENSE file. --> <resources> + <dimen name="check_status_text_margin">16dp</dimen> <dimen name="check_status_description_margin_top">2dp</dimen> <dimen name="check_status_icon_margin_horizontal">16dp</dimen> <dimen name="check_status_icon_size">24dp</dimen>
diff --git a/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java b/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java index b0969a8..caf6852 100644 --- a/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java +++ b/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java
@@ -257,14 +257,18 @@ private static void updateActionButton( View view, @PasswordCheckUIStatus int status, Runnable startCheck) { ImageButton restartButton = view.findViewById(R.id.check_status_restart_button); - if (status != PasswordCheckUIStatus.RUNNING) { - restartButton.setVisibility(View.VISIBLE); - restartButton.setClickable(true); - restartButton.setOnClickListener(unusedView -> startCheck.run()); - } else { - restartButton.setVisibility(View.GONE); - restartButton.setClickable(false); - } + LinearLayout textWrapper = view.findViewById(R.id.check_status_text_layout); + boolean shouldBeVisible = shouldShowActionButton(status); + + LinearLayout.LayoutParams layoutParams = + (LinearLayout.LayoutParams) textWrapper.getLayoutParams(); + layoutParams.setMarginEnd(shouldBeVisible ? 0 + : view.getResources().getDimensionPixelSize( + R.dimen.check_status_text_margin)); + + restartButton.setVisibility(shouldBeVisible ? View.VISIBLE : View.GONE); + restartButton.setOnClickListener(shouldBeVisible ? unusedView -> startCheck.run() : null); + restartButton.setClickable(shouldBeVisible); } private static void updateStatusIcon( @@ -278,6 +282,23 @@ .setVisibility(getProgressBarVisibility(status)); } + private static boolean shouldShowActionButton(@PasswordCheckUIStatus int status) { + switch (status) { + case PasswordCheckUIStatus.IDLE: + case PasswordCheckUIStatus.ERROR_OFFLINE: + case PasswordCheckUIStatus.ERROR_UNKNOWN: + return true; + case PasswordCheckUIStatus.RUNNING: + case PasswordCheckUIStatus.ERROR_NO_PASSWORDS: + case PasswordCheckUIStatus.ERROR_SIGNED_OUT: + case PasswordCheckUIStatus.ERROR_QUOTA_LIMIT: + case PasswordCheckUIStatus.ERROR_QUOTA_LIMIT_ACCOUNT_CHECK: + return false; + } + assert false : "Unhandled check status " + status + "on action button update"; + return false; + } + private static int getIconResource( @PasswordCheckUIStatus int status, Integer compromisedCredentialsCount) { switch (status) {
diff --git a/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java b/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java index 7c5d26b..5680c3a6 100644 --- a/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java +++ b/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java
@@ -276,6 +276,24 @@ @Test @MediumTest + public void testStatusDisplaysRestartForOffline() { + runOnUiThreadBlocking(() -> { mModel.get(ITEMS).add(buildHeader(ERROR_OFFLINE)); }); + waitForListViewToHaveLength(1); + assertThat(getActionButton().getVisibility(), is(View.VISIBLE)); + assertTrue(getActionButton().isClickable()); + } + + @Test + @MediumTest + public void testStatusDoesNotDisplayRestartForNoPasswords() { + runOnUiThreadBlocking(() -> { mModel.get(ITEMS).add(buildHeader(ERROR_NO_PASSWORDS)); }); + waitForListViewToHaveLength(1); + assertThat(getActionButton().getVisibility(), is(View.GONE)); + assertFalse(getActionButton().isClickable()); + } + + @Test + @MediumTest public void testStatusRunningText() { runOnUiThreadBlocking( () -> { mModel.get(ITEMS).add(buildHeader(RUNNING, UNKNOWN_PROGRESS)); });
diff --git a/chrome/browser/password_manager/account_password_store_factory.cc b/chrome/browser/password_manager/account_password_store_factory.cc index 80f6c3f..ab1db76 100644 --- a/chrome/browser/password_manager/account_password_store_factory.cc +++ b/chrome/browser/password_manager/account_password_store_factory.cc
@@ -71,7 +71,7 @@ ~UnsyncedCredentialsDeletionNotifierImpl() override = default; // Finds the last active tab and notifies their ManagePasswordsUIController. - void Notify(std::vector<autofill::PasswordForm> credentials) override; + void Notify(std::vector<password_manager::PasswordForm> credentials) override; base::WeakPtr<UnsyncedCredentialsDeletionNotifier> GetWeakPtr() override; private: @@ -85,7 +85,7 @@ : profile_(profile) {} void UnsyncedCredentialsDeletionNotifierImpl::Notify( - std::vector<autofill::PasswordForm> credentials) { + std::vector<password_manager::PasswordForm> credentials) { Browser* browser = chrome::FindBrowserWithProfile(profile_); if (!browser) return;
diff --git a/chrome/browser/password_manager/android/account_chooser_dialog_android.cc b/chrome/browser/password_manager/android/account_chooser_dialog_android.cc index 0e8d583..8f6c348 100644 --- a/chrome/browser/password_manager/android/account_chooser_dialog_android.cc +++ b/chrome/browser/password_manager/android/account_chooser_dialog_android.cc
@@ -34,7 +34,7 @@ void JNI_AccountChooserDialog_AddElementsToJavaCredentialArray( JNIEnv* env, base::android::ScopedJavaLocalRef<jobjectArray> java_credentials_array, - const std::vector<std::unique_ptr<autofill::PasswordForm>>& forms) { + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& forms) { int index = 0; for (const auto& password_form : forms) { base::android::ScopedJavaLocalRef<jobject> java_credential = @@ -85,7 +85,7 @@ } void FetchAvatar(const base::android::ScopedJavaGlobalRef<jobject>& java_dialog, - const autofill::PasswordForm* password_form, + const password_manager::PasswordForm* password_form, int index, network::mojom::URLLoaderFactory* loader_factory) { if (!password_form->icon_url.is_valid()) @@ -100,7 +100,8 @@ AccountChooserDialogAndroid::AccountChooserDialogAndroid( content::WebContents* web_contents, - std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, + std::vector<std::unique_ptr<password_manager::PasswordForm>> + local_credentials, const url::Origin& origin, ManagePasswordsState::CredentialsCallback callback) : content::WebContentsObserver(web_contents), @@ -204,7 +205,7 @@ false /* signin_button_clicked */); } -const std::vector<std::unique_ptr<autofill::PasswordForm>>& +const std::vector<std::unique_ptr<password_manager::PasswordForm>>& AccountChooserDialogAndroid::local_credentials_forms() const { return passwords_data_.GetCurrentForms(); }
diff --git a/chrome/browser/password_manager/android/account_chooser_dialog_android.h b/chrome/browser/password_manager/android/account_chooser_dialog_android.h index 52af6e1..59d0440 100644 --- a/chrome/browser/password_manager/android/account_chooser_dialog_android.h +++ b/chrome/browser/password_manager/android/account_chooser_dialog_android.h
@@ -24,7 +24,8 @@ public: AccountChooserDialogAndroid( content::WebContents* web_contents, - std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, + std::vector<std::unique_ptr<password_manager::PasswordForm>> + local_credentials, const url::Origin& origin, ManagePasswordsState::CredentialsCallback callback); @@ -55,7 +56,7 @@ private: void OnDialogCancel(); - const std::vector<std::unique_ptr<autofill::PasswordForm>>& + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& local_credentials_forms() const; void ChooseCredential(size_t index,
diff --git a/chrome/browser/password_manager/android/account_chooser_dialog_android_unittest.cc b/chrome/browser/password_manager/android/account_chooser_dialog_android_unittest.cc index ff57929e..11de4bf 100644 --- a/chrome/browser/password_manager/android/account_chooser_dialog_android_unittest.cc +++ b/chrome/browser/password_manager/android/account_chooser_dialog_android_unittest.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "chrome/browser/profiles/profile.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/common/password_manager_pref_names.h" @@ -21,7 +21,7 @@ namespace { password_manager::PasswordFormData kFormData = { - autofill::PasswordForm::Scheme::kHtml, + password_manager::PasswordForm::Scheme::kHtml, "http://example.com/", "http://example.com/origin", "http://example.com/action", @@ -43,14 +43,14 @@ void SetUp() override; - MOCK_METHOD1(OnChooseCredential, void(const autofill::PasswordForm*)); + MOCK_METHOD1(OnChooseCredential, void(const password_manager::PasswordForm*)); protected: AccountChooserDialogAndroid* CreateDialogOneAccount(); AccountChooserDialogAndroid* CreateDialogManyAccounts(); AccountChooserDialogAndroid* CreateDialog( - std::vector<std::unique_ptr<autofill::PasswordForm>> credentials); + std::vector<std::unique_ptr<password_manager::PasswordForm>> credentials); private: DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogAndroidTest); @@ -63,7 +63,7 @@ } AccountChooserDialogAndroid* AccountChooserDialogAndroidTest::CreateDialog( - std::vector<std::unique_ptr<autofill::PasswordForm>> credentials) { + std::vector<std::unique_ptr<password_manager::PasswordForm>> credentials) { return new AccountChooserDialogAndroid( web_contents(), std::move(credentials), url::Origin::Create(GURL("https://example.com")), @@ -73,14 +73,14 @@ AccountChooserDialogAndroid* AccountChooserDialogAndroidTest::CreateDialogOneAccount() { - std::vector<std::unique_ptr<autofill::PasswordForm>> credentials; + std::vector<std::unique_ptr<password_manager::PasswordForm>> credentials; credentials.push_back(FillPasswordFormWithData(kFormData)); return CreateDialog(std::move(credentials)); } AccountChooserDialogAndroid* AccountChooserDialogAndroidTest::CreateDialogManyAccounts() { - std::vector<std::unique_ptr<autofill::PasswordForm>> credentials; + std::vector<std::unique_ptr<password_manager::PasswordForm>> credentials; credentials.push_back(FillPasswordFormWithData(kFormData)); credentials.push_back(FillPasswordFormWithData(kFormData)); return CreateDialog(std::move(credentials));
diff --git a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.cc b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.cc index c797fe2..b030c06 100644 --- a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.cc +++ b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.cc
@@ -57,7 +57,7 @@ } void AllPasswordsBottomSheetController::OnGetPasswordStoreResults( - std::vector<std::unique_ptr<autofill::PasswordForm>> results) { + std::vector<std::unique_ptr<password_manager::PasswordForm>> results) { // TODO(crbug.com/1104132): Handle empty credentials case. view_->Show(std::move(results), focused_field_type_); }
diff --git a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.h b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.h index 87b0e75..441432bf 100644 --- a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.h +++ b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller.h
@@ -48,7 +48,8 @@ // PasswordStoreConsumer: void OnGetPasswordStoreResults( - std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; + std::vector<std::unique_ptr<password_manager::PasswordForm>> results) + override; // Instructs AllPasswordsBottomSheetView to show the credentials to the user. void Show();
diff --git a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller_unittest.cc b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller_unittest.cc index b9f2907..dc7a22e 100644 --- a/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller_unittest.cc +++ b/chrome/browser/password_manager/android/all_passwords_bottom_sheet_controller_unittest.cc
@@ -11,8 +11,8 @@ #include "chrome/browser/ui/android/passwords/all_passwords_bottom_sheet_view.h" #include "chrome/test/base/testing_profile.h" #include "components/autofill/core/common/mojom/autofill_types.mojom-forward.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/origin_credential_store.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/browser/stub_password_manager_driver.h" #include "components/password_manager/core/browser/test_password_store.h" @@ -25,7 +25,7 @@ using ::testing::Pointee; using ::testing::UnorderedElementsAre; -using autofill::PasswordForm; +using password_manager::PasswordForm; using password_manager::TestPasswordStore; using password_manager::UiCredential; using CallbackFunctionMock = testing::MockFunction<void()>;
diff --git a/chrome/browser/password_manager/android/credential_android.cc b/chrome/browser/password_manager/android/credential_android.cc index 13b7202..c88c5687 100644 --- a/chrome/browser/password_manager/android/credential_android.cc +++ b/chrome/browser/password_manager/android/credential_android.cc
@@ -13,7 +13,7 @@ base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential( JNIEnv* env, - const autofill::PasswordForm& password_form, + const password_manager::PasswordForm& password_form, int position) { using base::android::ConvertUTF16ToJavaString; using base::android::ConvertUTF8ToJavaString;
diff --git a/chrome/browser/password_manager/android/credential_android.h b/chrome/browser/password_manager/android/credential_android.h index 3c3c50c..289d794c 100644 --- a/chrome/browser/password_manager/android/credential_android.h +++ b/chrome/browser/password_manager/android/credential_android.h
@@ -9,14 +9,14 @@ #include "base/android/jni_array.h" #include "base/android/scoped_java_ref.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" -// Creates Java counterpart of autofill::PasswordForm, assigning it a |position| -// in case form is part of some array of forms and |type| which should be either -// local or federated. +// Creates Java counterpart of password_manager::PasswordForm, assigning it a +// |position| in case form is part of some array of forms and |type| which +// should be either local or federated. base::android::ScopedJavaLocalRef<jobject> CreateNativeCredential( JNIEnv* env, - const autofill::PasswordForm& password_form, + const password_manager::PasswordForm& password_form, int position); // Creates Java Credential[] array of size |size|.
diff --git a/chrome/browser/password_manager/android/password_accessory_controller_impl.cc b/chrome/browser/password_manager/android/password_accessory_controller_impl.cc index 1bc1e38..ef6682e4 100644 --- a/chrome/browser/password_manager/android/password_accessory_controller_impl.cc +++ b/chrome/browser/password_manager/android/password_accessory_controller_impl.cc
@@ -351,14 +351,14 @@ const GURL origin_as_gurl = origin.GetURL(); password_manager::PasswordStore::FormDigest form_digest( - autofill::PasswordForm::Scheme::kHtml, + password_manager::PasswordForm::Scheme::kHtml, password_manager::GetSignonRealm(origin_as_gurl), origin_as_gurl); password_manager::PasswordStore* store = password_client_->GetProfilePasswordStore(); if (saving_enabled) { store->Unblacklist(form_digest, base::NullCallback()); } else { - autofill::PasswordForm form = + password_manager::PasswordForm form = password_manager_util::MakeNormalizedBlacklistedForm( std::move(form_digest)); form.date_created = base::Time::Now();
diff --git a/chrome/browser/password_manager/android/password_accessory_controller_impl_unittest.cc b/chrome/browser/password_manager/android/password_accessory_controller_impl_unittest.cc index d675182..21d8816 100644 --- a/chrome/browser/password_manager/android/password_accessory_controller_impl_unittest.cc +++ b/chrome/browser/password_manager/android/password_accessory_controller_impl_unittest.cc
@@ -24,12 +24,12 @@ #include "chrome/test/base/testing_profile.h" #include "components/autofill/core/browser/ui/accessory_sheet_enums.h" #include "components/autofill/core/common/autofill_features.h" -#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_generation_util.h" #include "components/autofill/core/common/signatures.h" #include "components/password_manager/core/browser/credential_cache.h" #include "components/password_manager/core/browser/mock_password_store.h" #include "components/password_manager/core/browser/origin_credential_store.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/browser/stub_password_manager_client.h" #include "components/password_manager/core/browser/stub_password_manager_driver.h" @@ -48,7 +48,6 @@ using autofill::AccessorySheetData; using autofill::AccessoryTabType; using autofill::FooterCommand; -using autofill::PasswordForm; using autofill::UserInfo; using autofill::mojom::FocusedFieldType; using base::ASCIIToUTF16; @@ -56,6 +55,7 @@ using password_manager::CredentialCache; using password_manager::MockPasswordStore; using password_manager::OriginCredentialStore; +using password_manager::PasswordForm; using testing::_; using testing::ByMove; using testing::Eq; @@ -858,17 +858,16 @@ TEST_F(PasswordAccessoryControllerTest, SavePasswordsEnabledUpdatesStore) { password_manager::PasswordStore::FormDigest form_digest( - autofill::PasswordForm::Scheme::kHtml, kExampleSignonRealm, - GURL(kExampleSite)); + PasswordForm::Scheme::kHtml, kExampleSignonRealm, GURL(kExampleSite)); EXPECT_CALL(*mock_password_store_, Unblacklist(form_digest, _)); controller()->OnToggleChanged( autofill::AccessoryAction::TOGGLE_SAVE_PASSWORDS, true); } TEST_F(PasswordAccessoryControllerTest, SavePasswordsDisabledUpdatesStore) { - autofill::PasswordForm expected_form; + PasswordForm expected_form; expected_form.blocked_by_user = true; - expected_form.scheme = autofill::PasswordForm::Scheme::kHtml; + expected_form.scheme = PasswordForm::Scheme::kHtml; expected_form.signon_realm = kExampleSignonRealm; expected_form.url = GURL(kExampleSite); expected_form.date_created = base::Time::Now();
diff --git a/chrome/browser/password_manager/android/password_generation_controller_impl.cc b/chrome/browser/password_manager/android/password_generation_controller_impl.cc index bd8d41c..64972c9 100644 --- a/chrome/browser/password_manager/android/password_generation_controller_impl.cc +++ b/chrome/browser/password_manager/android/password_generation_controller_impl.cc
@@ -15,10 +15,10 @@ #include "chrome/browser/password_manager/android/password_generation_dialog_view_interface.h" #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "components/autofill/core/common/autofill_features.h" -#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_generation_util.h" #include "components/autofill/core/common/renderer_id.h" #include "components/autofill/core/common/signatures.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_generation_frame_helper.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/password_manager/core/browser/password_manager_client.h"
diff --git a/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc b/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc index 4fa5a3f..3663b54 100644 --- a/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc +++ b/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc
@@ -34,11 +34,11 @@ namespace { using autofill::FooterCommand; -using autofill::PasswordForm; using autofill::mojom::FocusedFieldType; using autofill::password_generation::PasswordGenerationUIData; using base::ASCIIToUTF16; using password_manager::MockPasswordStore; +using password_manager::PasswordForm; using testing::_; using testing::ByMove; using testing::Eq;
diff --git a/chrome/browser/password_manager/android/save_password_infobar_delegate_android_unittest.cc b/chrome/browser/password_manager/android/save_password_infobar_delegate_android_unittest.cc index 2f2f1bb..6a719ff 100644 --- a/chrome/browser/password_manager/android/save_password_infobar_delegate_android_unittest.cc +++ b/chrome/browser/password_manager/android/save_password_infobar_delegate_android_unittest.cc
@@ -15,8 +15,8 @@ #include "chrome/grit/generated_resources.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "components/autofill/core/common/form_data.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/fake_form_fetcher.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_form_manager.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/password_manager/core/browser/password_save_manager_impl.h" @@ -61,10 +61,10 @@ // Constructor for federation credentials. MockPasswordFormManager(password_manager::PasswordManagerClient* client, - const autofill::PasswordForm& form) + const password_manager::PasswordForm& form) : PasswordFormManager( client, - std::make_unique<autofill::PasswordForm>(form), + std::make_unique<password_manager::PasswordForm>(form), std::make_unique<password_manager::FakeFormFetcher>(), std::make_unique<PasswordSaveManagerImpl>( std::make_unique<password_manager::StubFormSaver>())) { @@ -101,7 +101,7 @@ void TearDown() override; PrefService* prefs(); - const autofill::PasswordForm& test_form() { return test_form_; } + const password_manager::PasswordForm& test_form() { return test_form_; } std::unique_ptr<MockPasswordFormManager> CreateMockFormManager( scoped_refptr<PasswordFormMetricsRecorder> metrics_recorder, bool with_federation_origin); @@ -115,7 +115,7 @@ password_manager::StubPasswordManagerClient client_; password_manager::StubPasswordManagerDriver driver_; - autofill::PasswordForm test_form_; + password_manager::PasswordForm test_form_; autofill::FormData observed_form_; private:
diff --git a/chrome/browser/password_manager/android/update_password_infobar_delegate_android.cc b/chrome/browser/password_manager/android/update_password_infobar_delegate_android.cc index 8387269..9372f9e 100644 --- a/chrome/browser/password_manager/android/update_password_infobar_delegate_android.cc +++ b/chrome/browser/password_manager/android/update_password_infobar_delegate_android.cc
@@ -55,7 +55,7 @@ return GetCurrentForms().size() > 1; } -const std::vector<std::unique_ptr<autofill::PasswordForm>>& +const std::vector<std::unique_ptr<password_manager::PasswordForm>>& UpdatePasswordInfoBarDelegate::GetCurrentForms() const { return passwords_state_.GetCurrentForms(); } @@ -75,7 +75,8 @@ // static unsigned int UpdatePasswordInfoBarDelegate::GetDisplayUsernames( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& current_forms, + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& + current_forms, const base::string16& default_username, std::vector<base::string16>* usernames) { unsigned int selected_username = 0;
diff --git a/chrome/browser/password_manager/android/update_password_infobar_delegate_android.h b/chrome/browser/password_manager/android/update_password_infobar_delegate_android.h index 1b5ee46..da1d06f 100644 --- a/chrome/browser/password_manager/android/update_password_infobar_delegate_android.h +++ b/chrome/browser/password_manager/android/update_password_infobar_delegate_android.h
@@ -42,8 +42,8 @@ // credential is being affected. bool ShowMultipleAccounts() const; - const std::vector<std::unique_ptr<autofill::PasswordForm>>& GetCurrentForms() - const; + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& + GetCurrentForms() const; // Returns the username of the saved credentials to be updated by default. const base::string16& GetDefaultUsername() const; @@ -54,7 +54,8 @@ // Exposed for testing. static unsigned int GetDisplayUsernames( - const std::vector<std::unique_ptr<autofill::PasswordForm>>& current_forms, + const std::vector<std::unique_ptr<password_manager::PasswordForm>>& + current_forms, const base::string16& default_username, std::vector<base::string16>* usernames);
diff --git a/chrome/browser/password_manager/android/update_password_infobar_delegate_android_unittest.cc b/chrome/browser/password_manager/android/update_password_infobar_delegate_android_unittest.cc index d125c39..61859a5 100644 --- a/chrome/browser/password_manager/android/update_password_infobar_delegate_android_unittest.cc +++ b/chrome/browser/password_manager/android/update_password_infobar_delegate_android_unittest.cc
@@ -12,8 +12,8 @@ #include "chrome/browser/ui/autofill/chrome_autofill_client.h" #include "chrome/grit/generated_resources.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/core/browser/fake_form_fetcher.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_form_manager.h" #include "components/password_manager/core/browser/password_save_manager_impl.h" #include "components/password_manager/core/browser/stub_form_saver.h" @@ -53,7 +53,7 @@ void SetUp() override; void TearDown() override; - const autofill::PasswordForm& test_form() { return test_form_; } + const password_manager::PasswordForm& test_form() { return test_form_; } // TODO(crbug.com/1048107): Replace real PasswordFormManager instance with the // mock. @@ -69,7 +69,7 @@ password_manager::StubPasswordManagerClient client_; password_manager::StubPasswordManagerDriver driver_; - autofill::PasswordForm test_form_; + password_manager::PasswordForm test_form_; autofill::FormData observed_form_; private: @@ -154,7 +154,7 @@ TEST_F(UpdatePasswordInfoBarDelegateTest, NoCurrentForms) { std::vector<base::string16> usernames; - std::vector<std::unique_ptr<autofill::PasswordForm>> current_forms; + std::vector<std::unique_ptr<password_manager::PasswordForm>> current_forms; base::string16 default_username = base::ASCIIToUTF16("username"); unsigned int selected_username = UpdatePasswordInfoBarDelegate::GetDisplayUsernames( @@ -164,12 +164,13 @@ } TEST_F(UpdatePasswordInfoBarDelegateTest, MultipleCurrentForms) { - std::vector<std::unique_ptr<autofill::PasswordForm>> current_forms; - autofill::PasswordForm additional_form; + std::vector<std::unique_ptr<password_manager::PasswordForm>> current_forms; + password_manager::PasswordForm additional_form; additional_form.username_value = base::ASCIIToUTF16("another username"); - current_forms.push_back(std::make_unique<autofill::PasswordForm>(test_form_)); current_forms.push_back( - std::make_unique<autofill::PasswordForm>(additional_form)); + std::make_unique<password_manager::PasswordForm>(test_form_)); + current_forms.push_back( + std::make_unique<password_manager::PasswordForm>(additional_form)); base::string16 default_username = base::ASCIIToUTF16("another username"); @@ -183,11 +184,12 @@ } TEST_F(UpdatePasswordInfoBarDelegateTest, EmptyUsername) { - std::vector<std::unique_ptr<autofill::PasswordForm>> current_forms; - autofill::PasswordForm additional_form; - current_forms.push_back(std::make_unique<autofill::PasswordForm>(test_form_)); + std::vector<std::unique_ptr<password_manager::PasswordForm>> current_forms; + password_manager::PasswordForm additional_form; current_forms.push_back( - std::make_unique<autofill::PasswordForm>(additional_form)); + std::make_unique<password_manager::PasswordForm>(test_form_)); + current_forms.push_back( + std::make_unique<password_manager::PasswordForm>(additional_form)); base::string16 default_username = test_form_.username_value;
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc index 2de7c7b..187bfa98 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client.cc +++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
@@ -46,7 +46,6 @@ #include "components/autofill/content/browser/content_autofill_driver_factory.h" #include "components/autofill/core/browser/logging/log_manager.h" #include "components/autofill/core/browser/logging/log_receiver.h" -#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_generation_util.h" #include "components/browsing_data/content/browsing_data_helper.h" #include "components/password_manager/content/browser/bad_message.h" @@ -58,6 +57,7 @@ #include "components/password_manager/core/browser/hsts_query.h" #include "components/password_manager/core/browser/http_auth_manager.h" #include "components/password_manager/core/browser/http_auth_manager_impl.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_form_manager_for_ui.h" #include "components/password_manager/core/browser/password_manager_constants.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" @@ -142,11 +142,11 @@ using password_manager::CredentialCache; #endif -using autofill::PasswordForm; using autofill::mojom::FocusedFieldType; using password_manager::BadMessageReason; using password_manager::ContentPasswordManagerDriverFactory; using password_manager::FieldInfoManager; +using password_manager::PasswordForm; using password_manager::PasswordManagerClientHelper; using password_manager::PasswordManagerDriver; using password_manager::PasswordManagerMetricsRecorder; @@ -411,7 +411,7 @@ } bool ChromePasswordManagerClient::PromptUserToChooseCredentials( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, + std::vector<std::unique_ptr<PasswordForm>> local_forms, const url::Origin& origin, CredentialsCallback callback) { // Set up an intercept callback if the prompt is zero-clickable (e.g. just one @@ -479,7 +479,7 @@ } void ChromePasswordManagerClient::NotifyUserAutoSignin( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, + std::vector<std::unique_ptr<PasswordForm>> local_forms, const url::Origin& origin) { DCHECK(!local_forms.empty()); helper_.NotifyUserAutoSignin(); @@ -492,7 +492,7 @@ } void ChromePasswordManagerClient::NotifyUserCouldBeAutoSignedIn( - std::unique_ptr<autofill::PasswordForm> form) { + std::unique_ptr<PasswordForm> form) { helper_.NotifyUserCouldBeAutoSignedIn(std::move(form)); } @@ -510,7 +510,7 @@ void ChromePasswordManagerClient::UpdateCredentialCache( const url::Origin& origin, - const std::vector<const autofill::PasswordForm*>& best_matches, + const std::vector<const PasswordForm*>& best_matches, bool is_blacklisted) { #if defined(OS_ANDROID) credential_cache_.SaveCredentialsAndBlacklistedForOrigin(
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.h b/chrome/browser/password_manager/chrome_password_manager_client.h index 673f64c89..38c4b86 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client.h +++ b/chrome/browser/password_manager/chrome_password_manager_client.h
@@ -97,7 +97,7 @@ password_manager::PasswordManagerDriver* driver, autofill::mojom::FocusedFieldType focused_field_type) override; bool PromptUserToChooseCredentials( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, + std::vector<std::unique_ptr<password_manager::PasswordForm>> local_forms, const url::Origin& origin, CredentialsCallback callback) override; void ShowTouchToFill( @@ -109,28 +109,28 @@ override; void GeneratePassword() override; void NotifyUserAutoSignin( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, + std::vector<std::unique_ptr<password_manager::PasswordForm>> local_forms, const url::Origin& origin) override; void NotifyUserCouldBeAutoSignedIn( - std::unique_ptr<autofill::PasswordForm> form) override; + std::unique_ptr<password_manager::PasswordForm> form) override; void NotifySuccessfulLoginWithExistingPassword( std::unique_ptr<password_manager::PasswordFormManagerForUI> submitted_manager) override; void NotifyStorePasswordCalled() override; void UpdateCredentialCache( const url::Origin& origin, - const std::vector<const autofill::PasswordForm*>& best_matches, + const std::vector<const password_manager::PasswordForm*>& best_matches, bool is_blacklisted) override; void AutomaticPasswordSave( std::unique_ptr<password_manager::PasswordFormManagerForUI> saved_form_manager) override; void PasswordWasAutofilled( - const std::vector<const autofill::PasswordForm*>& best_matches, + const std::vector<const password_manager::PasswordForm*>& best_matches, const url::Origin& origin, - const std::vector<const autofill::PasswordForm*>* federated_matches) - override; + const std::vector<const password_manager::PasswordForm*>* + federated_matches) override; void AutofillHttpAuth( - const autofill::PasswordForm& preferred_match, + const password_manager::PasswordForm& preferred_match, const password_manager::PasswordFormManagerForUI* form_manager) override; void NotifyUserCredentialsWereLeaked( password_manager::CredentialLeakType leak_type,
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc index 75f20cb..527dab6 100644 --- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc +++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
@@ -34,13 +34,13 @@ #include "components/autofill/core/browser/logging/log_router.h" #include "components/autofill/core/browser/test_autofill_client.h" #include "components/autofill/core/common/autofill_features.h" -#include "components/autofill/core/common/password_form.h" #include "components/favicon/core/test/mock_favicon_service.h" #include "components/password_manager/content/browser/content_password_manager_driver.h" #include "components/password_manager/content/browser/password_manager_log_router_factory.h" #include "components/password_manager/core/browser/credential_cache.h" #include "components/password_manager/core/browser/credentials_filter.h" #include "components/password_manager/core/browser/mock_password_store.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/browser/stub_password_manager_client.h" @@ -90,10 +90,10 @@ #include "chrome/browser/password_manager/android/password_generation_controller.h" #endif // defined(OS_ANDROID) -using autofill::PasswordForm; using autofill::mojom::FocusedFieldType; using content::BrowserContext; using content::WebContents; +using password_manager::PasswordForm; using password_manager::PasswordManagerClient; using sessions::GetPasswordStateFromNavigation; using sessions::SerializedNavigationEntry;
diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc index e13e8be..2c7a969b 100644 --- a/chrome/browser/password_manager/credential_manager_browsertest.cc +++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
@@ -197,7 +197,7 @@ .get()); ASSERT_EQ(1u, test_password_store->stored_passwords().size()); - autofill::PasswordForm signin_form = + password_manager::PasswordForm signin_form = test_password_store->stored_passwords().begin()->second[0]; EXPECT_EQ(base::ASCIIToUTF16("user"), signin_form.username_value); EXPECT_EQ(base::ASCIIToUTF16("hunter2"), signin_form.password_value); @@ -272,7 +272,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -308,10 +308,10 @@ password_manager::TestPasswordStore::PasswordMap passwords_map = password_store->stored_passwords(); ASSERT_EQ(1u, passwords_map.size()); - const std::vector<autofill::PasswordForm>& passwords_vector = + const std::vector<password_manager::PasswordForm>& passwords_vector = passwords_map.begin()->second; ASSERT_EQ(1u, passwords_vector.size()); - const autofill::PasswordForm& form = passwords_vector[0]; + const password_manager::PasswordForm& form = passwords_vector[0]; EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); EXPECT_FALSE(form.skip_zero_click); @@ -327,13 +327,13 @@ GURL url = embedded_test_server()->base_url(); - autofill::PasswordForm form_1; + password_manager::PasswordForm form_1; form_1.signon_realm = url.spec(); form_1.url = url; form_1.username_value = base::ASCIIToUTF16("user1"); form_1.password_value = base::ASCIIToUTF16("abcdef"); - autofill::PasswordForm form_2; + password_manager::PasswordForm form_2; form_2.signon_realm = url.spec(); form_2.url = url; form_2.username_value = base::ASCIIToUTF16("user2"); @@ -347,7 +347,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -392,7 +393,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -412,13 +414,13 @@ GURL url = embedded_test_server()->base_url(); - autofill::PasswordForm form_1; + password_manager::PasswordForm form_1; form_1.signon_realm = url.spec(); form_1.url = url; form_1.username_value = base::ASCIIToUTF16("user1"); form_1.password_value = base::ASCIIToUTF16("abcdef"); - autofill::PasswordForm form_2; + password_manager::PasswordForm form_2; form_2.signon_realm = url.spec(); form_2.url = url; form_2.username_value = base::ASCIIToUTF16("user2"); @@ -432,7 +434,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -478,7 +481,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -500,7 +504,7 @@ GURL url = embedded_test_server()->base_url(); - autofill::PasswordForm form_1; + password_manager::PasswordForm form_1; form_1.signon_realm = url.spec(); form_1.username_value = base::ASCIIToUTF16("user1"); form_1.password_value = base::ASCIIToUTF16("abcdef"); @@ -508,7 +512,7 @@ form_1.password_element = base::ASCIIToUTF16("pass"); form_1.url = GURL(url.spec() + "/my/custom/path/"); - autofill::PasswordForm form_2; + password_manager::PasswordForm form_2; form_2.signon_realm = url.spec(); form_2.username_value = base::ASCIIToUTF16("user2"); form_2.password_value = base::ASCIIToUTF16("123456"); @@ -524,7 +528,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -576,7 +581,8 @@ { auto found = password_store->stored_passwords().find(url.spec()); ASSERT_NE(password_store->stored_passwords().end(), found); - const std::vector<autofill::PasswordForm>& passwords = found->second; + const std::vector<password_manager::PasswordForm>& passwords = + found->second; ASSERT_EQ(2U, passwords.size()); EXPECT_EQ(base::ASCIIToUTF16("user1"), passwords[0].username_value); @@ -597,7 +603,7 @@ // The call to |GetURL| is needed to get the correct port. GURL psl_url = https_test_server().GetURL("psl.example.com", "/"); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = psl_url.spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -654,7 +660,7 @@ // The call to |GetURL| is needed to get the correct port. GURL psl_url = https_test_server().GetURL("psl.example.com", "/"); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = psl_url.spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -706,7 +712,7 @@ GURL::Replacements rep; rep.SetSchemeStr(url::kHttpScheme); GURL http_origin = https_origin.ReplaceComponents(rep); - autofill::PasswordForm http_form; + password_manager::PasswordForm http_form; http_form.signon_realm = http_origin.spec(); http_form.url = http_origin; http_form.username_value = base::ASCIIToUTF16("user"); @@ -748,7 +754,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -913,7 +919,7 @@ .get()) ->stored_passwords(); ASSERT_EQ(1u, stored.size()); - autofill::PasswordForm signin_form = stored.begin()->second[0]; + password_manager::PasswordForm signin_form = stored.begin()->second[0]; EXPECT_EQ(base::ASCIIToUTF16("user"), signin_form.username_value); EXPECT_EQ(base::ASCIIToUTF16("API"), signin_form.password_value); EXPECT_EQ(embedded_test_server()->base_url().spec(), @@ -928,7 +934,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("old_pass"); signin_form.username_value = base::ASCIIToUTF16("user");
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc index 554d5a0..564549cf 100644 --- a/chrome/browser/password_manager/password_manager_browsertest.cc +++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -44,13 +44,13 @@ #include "components/autofill/core/common/autofill_features.h" #include "components/autofill/core/common/autofill_switches.h" #include "components/autofill/core/common/form_field_data.h" -#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/renderer_id.h" #include "components/password_manager/content/browser/content_password_manager_driver.h" #include "components/password_manager/content/browser/content_password_manager_driver_factory.h" #include "components/password_manager/core/browser/form_parsing/password_field_prediction.h" #include "components/password_manager/core/browser/http_auth_manager.h" #include "components/password_manager/core/browser/http_auth_observer.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_form_manager.h" #include "components/password_manager/core/browser/test_password_store.h" #include "components/password_manager/core/common/password_manager_features.h" @@ -448,7 +448,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; GURL psl_orogin = embedded_test_server()->GetURL("psl.example.com", "/"); signin_form.signon_realm = psl_orogin.spec(); signin_form.url = psl_orogin; @@ -1178,7 +1178,7 @@ // Get form data for /password/nonplaceholder_username.html autofill::FormData GetPlaceholderUsernameFormData( - autofill::PasswordForm signin_form) { + password_manager::PasswordForm signin_form) { // Build server predictions autofill::FormData form_data; constexpr autofill::FormRendererId form_id(0); @@ -1219,7 +1219,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1284,7 +1284,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1347,7 +1347,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1392,7 +1392,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1523,7 +1523,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1555,7 +1555,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1747,7 +1747,7 @@ GURL::Replacements rep; rep.SetSchemeStr(url::kHttpScheme); GURL http_origin = https_origin.ReplaceComponents(rep); - autofill::PasswordForm http_form; + password_manager::PasswordForm http_form; http_form.signon_realm = http_origin.spec(); http_form.url = http_origin; // Assume that the previous action was already HTTPS one matching the current @@ -1786,7 +1786,7 @@ GURL::Replacements rep; rep.SetSchemeStr(url::kHttpScheme); GURL http_origin = https_origin.ReplaceComponents(rep); - autofill::PasswordForm http_form; + password_manager::PasswordForm http_form; http_form.signon_realm = http_origin.spec(); http_form.url = http_origin; http_form.username_value = base::ASCIIToUTF16("user"); @@ -1870,7 +1870,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1904,7 +1904,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -1935,7 +1935,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -2105,7 +2105,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = base::ASCIIToUTF16("temp"); signin_form.password_value = base::ASCIIToUTF16("random123"); @@ -2321,7 +2321,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = iframe_url.GetOrigin().spec(); signin_form.url = iframe_url; signin_form.username_value = base::ASCIIToUTF16("temp"); @@ -2404,7 +2404,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = iframe_url.GetOrigin().spec(); signin_form.url = iframe_url; signin_form.username_value = base::ASCIIToUTF16("temp"); @@ -2604,7 +2604,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("pw"); signin_form.username_value = base::ASCIIToUTF16("temp"); @@ -2657,7 +2657,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = base::ASCIIToUTF16("temp"); signin_form.password_value = base::ASCIIToUTF16("pw"); @@ -2691,7 +2691,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = base::ASCIIToUTF16("temp"); signin_form.password_value = base::ASCIIToUTF16("pw"); @@ -2767,7 +2767,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("pw"); signin_form.username_value = base::ASCIIToUTF16("temp"); @@ -2806,7 +2806,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -2835,7 +2835,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -2863,7 +2863,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -2904,7 +2904,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -2942,7 +2942,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -3004,8 +3004,8 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm creds; - creds.scheme = autofill::PasswordForm::Scheme::kBasic; + password_manager::PasswordForm creds; + creds.scheme = password_manager::PasswordForm::Scheme::kBasic; creds.signon_realm = http_test_server.base_url().spec() + "test realm"; creds.password_value = base::ASCIIToUTF16("pw"); creds.username_value = base::ASCIIToUTF16("temp"); @@ -3019,7 +3019,7 @@ HttpAuthManager* httpauth_manager = ChromePasswordManagerClient::FromWebContents(WebContents()) ->GetHttpAuthManager(); - autofill::PasswordForm other_form(creds); + password_manager::PasswordForm other_form(creds); other_form.signon_realm = "https://example.com/other realm"; httpauth_manager->SetObserverAndDeliverCredentials(&mock_login_model_observer, other_form); @@ -3052,8 +3052,8 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm creds; - creds.scheme = autofill::PasswordForm::Scheme::kBasic; + password_manager::PasswordForm creds; + creds.scheme = password_manager::PasswordForm::Scheme::kBasic; creds.url = test_page; creds.signon_realm = embedded_test_server()->base_url().spec() + "testrealm"; creds.password_value = base::ASCIIToUTF16("pw"); @@ -3079,7 +3079,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -3107,7 +3107,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -3135,7 +3135,7 @@ scoped_refptr<password_manager::PasswordStore> password_store = PasswordStoreFactory::GetForProfile(browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS); - autofill::PasswordForm login_form; + password_manager::PasswordForm login_form; login_form.signon_realm = embedded_test_server()->base_url().spec(); login_form.action = embedded_test_server()->GetURL("/password/done.html"); login_form.username_value = base::ASCIIToUTF16("myusername"); @@ -3253,7 +3253,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = base::ASCIIToUTF16("temp"); signin_form.password_value = base::ASCIIToUTF16("pw"); @@ -3287,7 +3287,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = base::ASCIIToUTF16("temp"); signin_form.password_value = base::ASCIIToUTF16("pw"); @@ -3320,7 +3320,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -3368,7 +3368,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -3400,7 +3400,7 @@ ASSERT_EQ(1u, passwords_map.size()); auto& passwords_vector = passwords_map.begin()->second; ASSERT_EQ(1u, passwords_vector.size()); - const autofill::PasswordForm& form = passwords_vector[0]; + const password_manager::PasswordForm& form = passwords_vector[0]; EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); EXPECT_TRUE(form.skip_zero_click); @@ -3414,7 +3414,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.password_value = base::ASCIIToUTF16("password"); signin_form.username_value = base::ASCIIToUTF16("user"); @@ -3443,7 +3443,7 @@ ASSERT_EQ(1u, passwords_map.size()); auto& passwords_vector = passwords_map.begin()->second; ASSERT_EQ(1u, passwords_vector.size()); - const autofill::PasswordForm& form = passwords_vector[0]; + const password_manager::PasswordForm& form = passwords_vector[0]; EXPECT_EQ(base::ASCIIToUTF16("user"), form.username_value); EXPECT_EQ(base::ASCIIToUTF16("password"), form.password_value); EXPECT_TRUE(form.skip_zero_click); @@ -3487,7 +3487,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.action = embedded_test_server()->base_url(); @@ -3614,7 +3614,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.url = GURL(url::kAboutBlankURL); signin_form.signon_realm = "about:"; GURL submit_url(embedded_test_server()->GetURL("/password/done.html")); @@ -3816,8 +3816,8 @@ browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm blocked_form; - blocked_form.scheme = autofill::PasswordForm::Scheme::kHtml; + password_manager::PasswordForm blocked_form; + blocked_form.scheme = password_manager::PasswordForm::Scheme::kHtml; blocked_form.signon_realm = http_test_server.base_url().spec(); blocked_form.blocked_by_user = true; password_store->AddLogin(blocked_form); @@ -3879,8 +3879,8 @@ browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm blocked_form; - blocked_form.scheme = autofill::PasswordForm::Scheme::kBasic; + password_manager::PasswordForm blocked_form; + blocked_form.scheme = password_manager::PasswordForm::Scheme::kBasic; blocked_form.signon_realm = embedded_test_server()->base_url().spec(); if (!is_realm_empty) blocked_form.signon_realm += "test realm"; @@ -3922,7 +3922,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = url_A.GetOrigin().spec(); signin_form.url = url_A; signin_form.username_value = base::ASCIIToUTF16("user"); @@ -4020,14 +4020,14 @@ .get()); // Start with two logins in the password store. - autofill::PasswordForm admin_form; + password_manager::PasswordForm admin_form; admin_form.signon_realm = embedded_test_server()->base_url().spec(); admin_form.url = embedded_test_server()->base_url(); admin_form.username_value = base::ASCIIToUTF16("admin"); admin_form.password_value = base::ASCIIToUTF16("random_secret"); password_store->AddLogin(admin_form); - autofill::PasswordForm user_form = admin_form; + password_manager::PasswordForm user_form = admin_form; user_form.username_value = base::ASCIIToUTF16("user"); password_store->AddLogin(user_form); @@ -4094,7 +4094,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.username_value = ASCIIToUTF16("temp"); signin_form.password_value = ASCIIToUTF16("pw");
diff --git a/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc index fb86c666..505c45b 100644 --- a/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc +++ b/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc
@@ -16,7 +16,7 @@ #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" #include "chrome/browser/ui/tab_dialogs.h" #include "components/autofill/core/common/autofill_features.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_test_utils.h" #include "components/password_manager/core/browser/test_password_store.h" #include "components/password_manager/core/common/password_manager_features.h" @@ -77,7 +77,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.url = GURL(origin); signin_form.signon_realm = origin; signin_form.password_value = base::ASCIIToUTF16(password); @@ -141,7 +141,8 @@ return false; } - const std::vector<autofill::PasswordForm>& passwords_vector = found->second; + const std::vector<password_manager::PasswordForm>& passwords_vector = + found->second; for (const auto& found_password : passwords_vector) { if (base::ASCIIToUTF16(username) == found_password.username_value && base::ASCIIToUTF16(password) == found_password.password_value) {
diff --git a/chrome/browser/password_manager/password_manager_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_interactive_uitest.cc index dbab4324..532504e6 100644 --- a/chrome/browser/password_manager/password_manager_interactive_uitest.cc +++ b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
@@ -46,7 +46,7 @@ static_cast<password_manager::TestPasswordStore*>( PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS).get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.username_value = base::ASCIIToUTF16("temp"); @@ -156,7 +156,7 @@ PasswordStoreFactory::GetForProfile( browser()->profile(), ServiceAccessType::IMPLICIT_ACCESS) .get()); - autofill::PasswordForm signin_form; + password_manager::PasswordForm signin_form; signin_form.signon_realm = embedded_test_server()->base_url().spec(); signin_form.url = embedded_test_server()->base_url(); signin_form.username_value = base::ASCIIToUTF16("temp");
diff --git a/chrome/browser/password_manager/password_manager_test_base.cc b/chrome/browser/password_manager/password_manager_test_base.cc index 1d72cd3..cc1851b 100644 --- a/chrome/browser/password_manager/password_manager_test_base.cc +++ b/chrome/browser/password_manager/password_manager_test_base.cc
@@ -78,20 +78,22 @@ bool is_update) override; void OnHideManualFallbackForSaving() override; bool OnChooseCredentials( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, + std::vector<std::unique_ptr<password_manager::PasswordForm>> + local_credentials, const url::Origin& origin, ManagePasswordsState::CredentialsCallback callback) override; void OnPasswordAutofilled( - const std::vector<const autofill::PasswordForm*>& password_forms, + const std::vector<const password_manager::PasswordForm*>& password_forms, const url::Origin& origin, - const std::vector<const autofill::PasswordForm*>* federated_matches) - override; + const std::vector<const password_manager::PasswordForm*>* + federated_matches) override; void DidFinishNavigation( content::NavigationHandle* navigation_handle) override; // ManagePasswordsUIController: void NotifyUnsyncedCredentialsWillBeDeleted( - std::vector<autofill::PasswordForm> unsynced_credentials) override; + std::vector<password_manager::PasswordForm> unsynced_credentials) + override; // Should not be used for manual fallback events. bool IsTargetStateObserved( @@ -206,7 +208,8 @@ } bool CustomManagePasswordsUIController::OnChooseCredentials( - std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials, + std::vector<std::unique_ptr<password_manager::PasswordForm>> + local_credentials, const url::Origin& origin, ManagePasswordsState::CredentialsCallback callback) { ProcessStateExpectations(password_manager::ui::CREDENTIAL_REQUEST_STATE); @@ -215,9 +218,10 @@ } void CustomManagePasswordsUIController::OnPasswordAutofilled( - const std::vector<const autofill::PasswordForm*>& password_forms, + const std::vector<const password_manager::PasswordForm*>& password_forms, const url::Origin& origin, - const std::vector<const autofill::PasswordForm*>* federated_matches) { + const std::vector<const password_manager::PasswordForm*>* + federated_matches) { ProcessStateExpectations(password_manager::ui::MANAGE_STATE); return ManagePasswordsUIController::OnPasswordAutofilled( password_forms, origin, federated_matches); @@ -235,7 +239,7 @@ } void CustomManagePasswordsUIController::NotifyUnsyncedCredentialsWillBeDeleted( - std::vector<autofill::PasswordForm> unsynced_credentials) { + std::vector<password_manager::PasswordForm> unsynced_credentials) { ManagePasswordsUIController::NotifyUnsyncedCredentialsWillBeDeleted( std::move(unsynced_credentials)); was_prompt_automatically_shown_ = true; @@ -408,12 +412,12 @@ PasswordStoreResultsObserver::~PasswordStoreResultsObserver() = default; void PasswordStoreResultsObserver::OnGetPasswordStoreResults( - std::vector<std::unique_ptr<autofill::PasswordForm>> results) { + std::vector<std::unique_ptr<password_manager::PasswordForm>> results) { results_ = std::move(results); run_loop_.Quit(); } -std::vector<std::unique_ptr<autofill::PasswordForm>> +std::vector<std::unique_ptr<password_manager::PasswordForm>> PasswordStoreResultsObserver::WaitForResults() { run_loop_.Run(); return std::move(results_); @@ -702,7 +706,7 @@ ASSERT_EQ(1u, passwords_map.size()); auto& passwords_vector = passwords_map.begin()->second; ASSERT_EQ(1u, passwords_vector.size()); - const autofill::PasswordForm& form = passwords_vector[0]; + const password_manager::PasswordForm& form = passwords_vector[0]; EXPECT_EQ(base::ASCIIToUTF16(username), form.username_value); EXPECT_EQ(base::ASCIIToUTF16(password), form.password_value); }
diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h index 21c06681..dbd20f5 100644 --- a/chrome/browser/password_manager/password_manager_test_base.h +++ b/chrome/browser/password_manager/password_manager_test_base.h
@@ -147,14 +147,15 @@ ~PasswordStoreResultsObserver() override; // Waits for OnGetPasswordStoreResults() and returns the result. - std::vector<std::unique_ptr<autofill::PasswordForm>> WaitForResults(); + std::vector<std::unique_ptr<password_manager::PasswordForm>> WaitForResults(); private: void OnGetPasswordStoreResults( - std::vector<std::unique_ptr<autofill::PasswordForm>> results) override; + std::vector<std::unique_ptr<password_manager::PasswordForm>> results) + override; base::RunLoop run_loop_; - std::vector<std::unique_ptr<autofill::PasswordForm>> results_; + std::vector<std::unique_ptr<password_manager::PasswordForm>> results_; DISALLOW_COPY_AND_ASSIGN(PasswordStoreResultsObserver); };
diff --git a/chrome/browser/password_manager/password_store_utils.cc b/chrome/browser/password_manager/password_store_utils.cc index dc853f1..0059869 100644 --- a/chrome/browser/password_manager/password_store_utils.cc +++ b/chrome/browser/password_manager/password_store_utils.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/password_manager/account_password_store_factory.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/profiles/profile.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_metrics_util.h" #include "components/password_manager/core/browser/password_store.h" @@ -18,7 +18,7 @@ void EditSavedPasswords( Profile* profile, - const base::span<const std::unique_ptr<autofill::PasswordForm>> + const base::span<const std::unique_ptr<password_manager::PasswordForm>> forms_to_change, const base::string16& new_username, const base::Optional<base::string16>& new_password) { @@ -41,7 +41,7 @@ if (!store) { continue; } - autofill::PasswordForm new_form = *old_form; + password_manager::PasswordForm new_form = *old_form; new_form.username_value = new_username; // The desktop logic allows to edit usernames even in cases when the
diff --git a/chrome/browser/password_manager/password_store_utils.h b/chrome/browser/password_manager/password_store_utils.h index ddcbf00..a0e555b 100644 --- a/chrome/browser/password_manager/password_store_utils.h +++ b/chrome/browser/password_manager/password_store_utils.h
@@ -11,10 +11,7 @@ #include "base/memory/scoped_refptr.h" #include "base/optional.h" #include "base/strings/string16.h" - -namespace autofill { -struct PasswordForm; -} +#include "components/password_manager/core/browser/password_form_forward.h" namespace password_manager { class PasswordStore; @@ -29,7 +26,8 @@ // been performed, prior to calling it. void EditSavedPasswords( Profile* profile, - base::span<const std::unique_ptr<autofill::PasswordForm>> forms_to_change, + base::span<const std::unique_ptr<password_manager::PasswordForm>> + forms_to_change, const base::string16& new_username, const base::Optional<base::string16>& new_password);
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc index 28c6cf1..cedb573f 100644 --- a/chrome/browser/password_manager/password_store_x.cc +++ b/chrome/browser/password_manager/password_store_x.cc
@@ -26,7 +26,7 @@ #include "components/prefs/pref_service.h" #include "content/public/browser/notification_service.h" -using autofill::PasswordForm; +using password_manager::PasswordForm; using password_manager::PasswordStoreChange; using password_manager::PasswordStoreChangeList; using password_manager::PasswordStoreDefault; @@ -40,7 +40,7 @@ password_manager::LoginDatabase* login_db) { // Read the unencrypted entries. login_db->disable_encryption(); - std::map<int, std::unique_ptr<autofill::PasswordForm>> logins; + std::map<int, std::unique_ptr<PasswordForm>> logins; if (login_db->GetAllLogins(&logins) != password_manager::FormRetrievalResult::kSuccess) { return PasswordStoreX::FAILED_INIT_ENCRYPTED;
diff --git a/chrome/browser/password_manager/password_store_x.h b/chrome/browser/password_manager/password_store_x.h index 399ff9a1..5f1b5a0 100644 --- a/chrome/browser/password_manager/password_store_x.h +++ b/chrome/browser/password_manager/password_store_x.h
@@ -80,13 +80,13 @@ scoped_refptr<base::SequencedTaskRunner> CreateBackgroundTaskRunner() const override; password_manager::PasswordStoreChangeList AddLoginImpl( - const autofill::PasswordForm& form, + const password_manager::PasswordForm& form, password_manager::AddLoginError* error = nullptr) override; password_manager::PasswordStoreChangeList UpdateLoginImpl( - const autofill::PasswordForm& form, + const password_manager::PasswordForm& form, password_manager::UpdateLoginError* error = nullptr) override; password_manager::PasswordStoreChangeList RemoveLoginImpl( - const autofill::PasswordForm& form) override; + const password_manager::PasswordForm& form) override; password_manager::PasswordStoreChangeList RemoveLoginsByURLAndTimeImpl( const base::RepeatingCallback<bool(const GURL&)>& url_filter, base::Time delete_begin, @@ -96,15 +96,17 @@ base::Time delete_end) override; password_manager::PasswordStoreChangeList DisableAutoSignInForOriginsImpl( const base::RepeatingCallback<bool(const GURL&)>& origin_filter) override; - std::vector<std::unique_ptr<autofill::PasswordForm>> FillMatchingLogins( - const FormDigest& form) override; - std::vector<std::unique_ptr<autofill::PasswordForm>> + std::vector<std::unique_ptr<password_manager::PasswordForm>> + FillMatchingLogins(const FormDigest& form) override; + std::vector<std::unique_ptr<password_manager::PasswordForm>> FillMatchingLoginsByPassword( const base::string16& plain_text_password) override; bool FillAutofillableLogins( - std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) override; + std::vector<std::unique_ptr<password_manager::PasswordForm>>* forms) + override; bool FillBlacklistLogins( - std::vector<std::unique_ptr<autofill::PasswordForm>>* forms) override; + std::vector<std::unique_ptr<password_manager::PasswordForm>>* forms) + override; // Checks whether the login database is encrypted or not. void CheckMigration();
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc index a96c903c..3b93953 100644 --- a/chrome/browser/password_manager/password_store_x_unittest.cc +++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -36,8 +36,8 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -using autofill::PasswordForm; using password_manager::FormRetrievalResult; +using password_manager::PasswordForm; using password_manager::PasswordStoreChange; using password_manager::PasswordStoreChangeList; using password_manager::PrimaryKeyToFormMap; @@ -74,7 +74,7 @@ form.password_element = base::UTF8ToUTF16("password_element"); form.password_value = base::UTF8ToUTF16(kPassword); form.signon_realm = form.url.GetOrigin().spec(); - form.in_store = autofill::PasswordForm::Store::kProfileStore; + form.in_store = password_manager::PasswordForm::Store::kProfileStore; return form; }
diff --git a/chrome/browser/policy/messaging_layer/public/report_client.cc b/chrome/browser/policy/messaging_layer/public/report_client.cc index 4250f4b..7e4b1640 100644 --- a/chrome/browser/policy/messaging_layer/public/report_client.cc +++ b/chrome/browser/policy/messaging_layer/public/report_client.cc
@@ -38,7 +38,7 @@ #include "content/public/browser/browser_thread.h" #include "services/network/public/cpp/shared_url_loader_factory.h" -#if defined(OS_CHROMEOS) +#ifdef OS_CHROMEOS #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" @@ -57,7 +57,7 @@ // NOT THREAD SAFE - these functions must be called on the main thread. // TODO(chromium:1078512) Wrap CloudPolicyClient in a new object so that its // methods, constructor, and destructor are accessed on the correct thread. -#if defined(OS_CHROMEOS) +#ifdef OS_CHROMEOS void BuildCloudPolicyClient( base::OnceCallback< void(StatusOr<std::unique_ptr<policy::CloudPolicyClient>>)> build_cb) { @@ -376,7 +376,7 @@ StatusOr<ReportingClient::InitializationStateTracker::ReleaseLeaderCallback> promo_result) { if (promo_result.status().error_code() == error::FAILED_PRECONDITION) { - // Between building this InitializationContext and attempting to promote to + // Between building this InitializingContext and attempting to promote to // leader, the ReportingClient was configured. Ok response. Complete(Status::StatusOK()); return; @@ -449,11 +449,41 @@ } client_config_->storage = storage_result.ValueOrDie(); - Schedule(&ReportingClient::InitializingContext::UpdateConfiguration, - base::Unretained(this)); + Schedule( + base::BindOnce(&ReportingClient::InitializingContext::CreateUploadClient, + base::Unretained(this))); } -void ReportingClient::InitializingContext::UpdateConfiguration() { +void ReportingClient::InitializingContext::CreateUploadClient() { + ReportingClient* const instance = GetInstance(); + DCHECK(!instance->upload_client_); + UploadClient::Create( + std::move(client_config_->cloud_policy_client), + base::BindRepeating(&StorageModule::ReportSuccess, + client_config_->storage), + base::BindOnce(&InitializingContext::OnUploadClientCreated, + base::Unretained(this))); +} + +void ReportingClient::InitializingContext::OnUploadClientCreated( + StatusOr<std::unique_ptr<UploadClient>> upload_client_result) { + if (!upload_client_result.ok()) { + Complete(Status(error::FAILED_PRECONDITION, + base::StrCat({"Unable to create UploadClient: ", + upload_client_result.status().message()}))); + return; + } + Schedule(&ReportingClient::InitializingContext::UpdateConfiguration, + base::Unretained(this), + std::move(upload_client_result.ValueOrDie())); +} + +void ReportingClient::InitializingContext::UpdateConfiguration( + std::unique_ptr<UploadClient> upload_client) { + ReportingClient* const instance = GetInstance(); + DCHECK(!instance->upload_client_); + instance->upload_client_ = std::move(upload_client); + std::move(update_config_cb_) .Run(std::move(client_config_), base::BindOnce(&ReportingClient::InitializingContext::Complete, @@ -603,13 +633,7 @@ StatusOr<std::unique_ptr<Storage::UploaderInterface>> ReportingClient::BuildUploader(Priority priority) { ReportingClient* const instance = GetInstance(); - if (instance->upload_client_ == nullptr) { - ASSIGN_OR_RETURN( - instance->upload_client_, - UploadClient::Create(std::move(instance->config_->cloud_policy_client), - base::BindRepeating(&StorageModule::ReportSuccess, - instance->config_->storage))); - } + DCHECK(instance->upload_client_); return Uploader::Create( base::BindOnce(&UploadClient::EnqueueUpload, base::Unretained(instance->upload_client_.get())));
diff --git a/chrome/browser/policy/messaging_layer/public/report_client.h b/chrome/browser/policy/messaging_layer/public/report_client.h index 7fcc38dc..1796b9c 100644 --- a/chrome/browser/policy/messaging_layer/public/report_client.h +++ b/chrome/browser/policy/messaging_layer/public/report_client.h
@@ -133,7 +133,11 @@ void OnStorageModuleConfigured( StatusOr<scoped_refptr<StorageModule>> storage_result); - void UpdateConfiguration(); + void CreateUploadClient(); + void OnUploadClientCreated( + StatusOr<std::unique_ptr<UploadClient>> upload_client_result); + + void UpdateConfiguration(std::unique_ptr<UploadClient> upload_client); // Complete calls response with |client_config_| void Complete(Status status);
diff --git a/chrome/browser/policy/messaging_layer/public/report_client_unittest.cc b/chrome/browser/policy/messaging_layer/public/report_client_unittest.cc index 85c8297..8d1c1f8 100644 --- a/chrome/browser/policy/messaging_layer/public/report_client_unittest.cc +++ b/chrome/browser/policy/messaging_layer/public/report_client_unittest.cc
@@ -21,12 +21,11 @@ #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" -// #if defined(OS_CHROMEOS) -// #include "chrome/browser/chromeos/settings/device_settings_service.h" -// #include "components/policy/proto/chrome_device_policy.pb.h" -// #else -// #include "chrome/browser/policy/chrome_browser_policy_connector.h" -// #endif +#ifdef OS_CHROMEOS +#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" +#include "chrome/test/base/testing_profile.h" +#include "components/user_manager/scoped_user_manager.h" +#endif // OS_CHROMEOS namespace reporting { namespace { @@ -54,16 +53,44 @@ class ReportingClientTest : public testing::Test { public: void SetUp() override { +#ifdef OS_CHROMEOS + // Set up fake primary profile. + auto mock_user_manager = + std::make_unique<testing::NiceMock<chromeos::FakeChromeUserManager>>(); + profile_ = std::make_unique<TestingProfile>( + base::FilePath(FILE_PATH_LITERAL("/home/chronos/u-0123456789abcdef"))); + const AccountId account_id(AccountId::FromUserEmailGaiaId( + profile_->GetProfileUserName(), "12345")); + const user_manager::User* user = + mock_user_manager->AddPublicAccountUser(account_id); + mock_user_manager->UserLoggedIn(account_id, user->username_hash(), + /*browser_restart=*/false, + /*is_child=*/false); + user_manager_ = std::make_unique<user_manager::ScopedUserManager>( + std::move(mock_user_manager)); +#endif // OS_CHROMEOS + + // Provide a mock cloud policy client. auto client = std::make_unique<policy::MockCloudPolicyClient>(); client->SetDMToken( policy::DMToken::CreateValidTokenForTesting("FAKE_DM_TOKEN").value()); ReportingClient::Setup_test(std::move(client)); } - void TearDown() override { ReportingClient::Reset_test(); } + void TearDown() override { + ReportingClient::Reset_test(); +#ifdef OS_CHROMEOS + user_manager_.reset(); + profile_.reset(); +#endif // OS_CHROMEOS + } protected: content::BrowserTaskEnvironment task_envrionment_; +#ifdef OS_CHROMEOS + std::unique_ptr<TestingProfile> profile_; + std::unique_ptr<user_manager::ScopedUserManager> user_manager_; +#endif // OS_CHROMEOS const DMToken dm_token_ = DMToken::CreateValidTokenForTesting("TOKEN"); const Destination destination_ = Destination::UPLOAD_EVENTS; const Priority priority_ = Priority::IMMEDIATE;
diff --git a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.cc b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.cc index 30cbf500..de93268 100644 --- a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.cc +++ b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.cc
@@ -26,13 +26,14 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" -#if defined(OS_CHROMEOS) +#ifdef OS_CHROMEOS #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" namespace reporting { namespace { +// This function must run on UI thread. StatusOr<Profile*> GetPrimaryProfile() { if (!user_manager::UserManager::IsInitialized()) { return Status(error::FAILED_PRECONDITION, "User manager not initialized"); @@ -250,18 +251,39 @@ highest_successful_sequence_ = sequencing_information; } -StatusOr<std::unique_ptr<DmServerUploadService>> DmServerUploadService::Create( +void DmServerUploadService::Create( std::unique_ptr<policy::CloudPolicyClient> client, - ReportSuccessfulUploadCallback upload_cb) { + ReportSuccessfulUploadCallback report_upload_success_cb, + base::OnceCallback<void(StatusOr<std::unique_ptr<DmServerUploadService>>)> + created_cb) { if (client == nullptr) { - return Status(error::INVALID_ARGUMENT, "client may not be nullptr."); + std::move(created_cb) + .Run(Status(error::INVALID_ARGUMENT, "client may not be nullptr.")); + return; } - auto uploader = - base::WrapUnique(new DmServerUploadService(std::move(client), upload_cb)); - RETURN_IF_ERROR(uploader->InitRecordHandlers()); - - return uploader; + auto uploader = base::WrapUnique( + new DmServerUploadService(std::move(client), report_upload_success_cb)); +#ifdef OS_CHROMEOS + content::GetUIThreadTaskRunner({})->PostTaskAndReplyWithResult( + FROM_HERE, base::BindOnce(&GetPrimaryProfile), + base::BindOnce( + [](std::unique_ptr<DmServerUploadService> uploader, + base::OnceCallback<void( + StatusOr<std::unique_ptr<DmServerUploadService>>)> created_cb, + StatusOr<Profile*> primary_profile_result) { + if (!primary_profile_result.ok()) { + std::move(created_cb).Run(primary_profile_result.status()); + return; + } + InitRecordHandlers(std::move(uploader), + primary_profile_result.ValueOrDie(), + std::move(created_cb)); + }, + std::move(uploader), std::move(created_cb))); +#else + InitRecordHandlers(std::move(uploader), std::move(created_cb)); +#endif // OS_CHROMEOS } DmServerUploadService::DmServerUploadService( @@ -295,24 +317,74 @@ return Status::StatusOK(); } -Status DmServerUploadService::InitRecordHandlers() { - auto* client = GetClient(); - if (client == nullptr) { - return Status(error::FAILED_PRECONDITION, "Client was null"); +namespace { + +class CollectorCallback { + public: + CollectorCallback(size_t count, base::OnceClosure done_cb) + : count_(count), done_cb_(std::move(done_cb)) { + DCHECK_GT(count, 0u); + } + CollectorCallback(CollectorCallback& other) = delete; + CollectorCallback& operator=(CollectorCallback& other) = delete; + ~CollectorCallback() { std::move(done_cb_).Run(); } + + void Decrement() { + size_t old_count = count_.fetch_sub(1); + DCHECK_GT(old_count, 0u); + if (old_count > 1) { + return; + } + delete this; } - record_handlers_->PushBack(std::make_unique<AppInstallReportHandler>(client), - base::DoNothing()); + private: + std::atomic<size_t> count_; + base::OnceClosure done_cb_; +}; +} // namespace - // Temporary wrapper for MeetDeviceTelementry +void DmServerUploadService::InitRecordHandlers( + std::unique_ptr<DmServerUploadService> uploader, #ifdef OS_CHROMEOS - ASSIGN_OR_RETURN(Profile* const primary_profile, GetPrimaryProfile()); - record_handlers_->PushBack(std::make_unique<MeetDeviceTelemetryReportHandler>( - primary_profile, client), - base::DoNothing()); + Profile* primary_profile, +#endif // OS_CHROMEOS + base::OnceCallback<void(StatusOr<std::unique_ptr<DmServerUploadService>>)> + created_cb) { + auto* client = uploader->GetClient(); + if (client == nullptr) { + std::move(created_cb) + .Run(Status(error::FAILED_PRECONDITION, "Client was null")); + return; + } + + std::vector<std::unique_ptr<RecordHandler>> handlers; + handlers.emplace_back(std::make_unique<AppInstallReportHandler>(client)); +#ifdef OS_CHROMEOS + // Temporary wrapper for MeetDeviceTelemetry + handlers.emplace_back(std::make_unique<MeetDeviceTelemetryReportHandler>( + primary_profile, client)); #endif // OS_CHROMEOS - return Status::StatusOK(); + // Copy record_handlers_ aside, because uploader is going to be moved. + auto record_handlers = uploader->record_handlers_; + + // collector_cb self-destructs upon completion. + CollectorCallback* const collector_cb = new CollectorCallback( + handlers.size(), + base::BindOnce( + [](std::unique_ptr<DmServerUploadService> uploader, + base::OnceCallback<void( + StatusOr<std::unique_ptr<DmServerUploadService>>)> + created_cb) { + std::move(created_cb).Run(std::move(uploader)); + }, + std::move(uploader), std::move(created_cb))); + for (auto& handler : handlers) { + record_handlers->PushBack(std::move(handler), + base::BindOnce(&CollectorCallback::Decrement, + base::Unretained(collector_cb))); + } } void DmServerUploadService::UploadCompletion(
diff --git a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.h b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.h index 0ebaf60a..d6638ac 100644 --- a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.h +++ b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service.h
@@ -21,6 +21,10 @@ #include "components/policy/proto/record_constants.pb.h" #include "net/base/backoff_entry.h" +#ifdef OS_CHROMEOS +#include "chrome/browser/profiles/profile.h" +#endif // OS_CHROMEOS + namespace reporting { // DmServerUploadService uploads events to the DMServer. It does not manage @@ -131,18 +135,20 @@ SEQUENCE_CHECKER(sequence_checker_); }; - // Will create a DMServerUploadService with handlers. - // On successful completion returns a DMServerUploadService. - // If |client| is null, will return error::INVALID_ARGUMENT. + // Will asynchronously create a DMServerUploadService with handlers. + // On successful completion will call |created_cb| with DMServerUploadService. + // If |client| is null, will call |created_cb| with error::INVALID_ARGUMENT. // If any handlers fail to create, or the policy::CloudPolicyClient is null, - // will return error::UNAVAILABLE. + // will call |created_cb| with error::UNAVAILABLE. // // |client| must not be null. - // |completion_cb| should report back to the holder of the created object - // whenever a record set is successfully uploaded. - static StatusOr<std::unique_ptr<DmServerUploadService>> Create( + // |report_upload_success_cb| should report back to the holder of the created + // object whenever a record set is successfully uploaded. + static void Create( std::unique_ptr<policy::CloudPolicyClient> client, - ReportSuccessfulUploadCallback completion_cb); + ReportSuccessfulUploadCallback report_upload_success_cb, + base::OnceCallback<void(StatusOr<std::unique_ptr<DmServerUploadService>>)> + created_cb); ~DmServerUploadService(); Status EnqueueUpload(std::unique_ptr<std::vector<EncryptedRecord>> record); @@ -151,7 +157,13 @@ DmServerUploadService(std::unique_ptr<policy::CloudPolicyClient> client, ReportSuccessfulUploadCallback completion_cb); - Status InitRecordHandlers(); + static void InitRecordHandlers( + std::unique_ptr<DmServerUploadService> uploader, +#ifdef OS_CHROMEOS + Profile* primary_profile, +#endif // OS_CHROMEOS + base::OnceCallback<void(StatusOr<std::unique_ptr<DmServerUploadService>>)> + created_cb); void UploadCompletion(StatusOr<SequencingInformation>) const;
diff --git a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service_unittest.cc b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service_unittest.cc index 79dba036..d3faaae 100644 --- a/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service_unittest.cc +++ b/chrome/browser/policy/messaging_layer/upload/dm_server_upload_service_unittest.cc
@@ -8,7 +8,6 @@ #include <utility> #include <vector> -#include "base/synchronization/waitable_event.h" #include "base/task_runner.h" #include "base/test/task_environment.h" #include "chrome/browser/policy/messaging_layer/util/shared_vector.h" @@ -16,6 +15,7 @@ #include "chrome/test/base/testing_profile.h" #include "components/policy/core/browser/browser_policy_connector.h" #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" +#include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" namespace reporting { @@ -24,10 +24,48 @@ using testing::_; using testing::Return; +// Usage (in tests only): +// +// TestEvent<ResType> e; +// ... Do some async work passing e.cb() as a completion callback of +// base::OnceCallback<void(ResType* res)> type which also may perform some +// other action specified by |done| callback provided by the caller. +// ... = e.result(); // Will wait for e.cb() to be called and return the +// collected result. +// +template <typename ResType> +class TestEvent { + public: + TestEvent() : run_loop_(std::make_unique<base::RunLoop>()) {} + ~TestEvent() = default; + TestEvent(const TestEvent& other) = delete; + TestEvent& operator=(const TestEvent& other) = delete; + ResType result() { + run_loop_->Run(); + return std::forward<ResType>(result_); + } + + // Completion callback to hand over to the processing method. + base::OnceCallback<void(ResType res)> cb() { + return base::BindOnce( + [](base::RunLoop* run_loop, ResType* result, ResType res) { + *result = std::forward<ResType>(res); + run_loop->Quit(); + }, + base::Unretained(run_loop_.get()), base::Unretained(&result_)); + } + + private: + std::unique_ptr<base::RunLoop> run_loop_; + ResType result_; +}; + // Ensures that profile cannot be null. TEST(DmServerUploadServiceTest, DeniesNullptrProfile) { - auto result = - DmServerUploadService::Create(/*profile=*/nullptr, base::DoNothing()); + content::BrowserTaskEnvironment task_envrionment; + TestEvent<StatusOr<std::unique_ptr<DmServerUploadService>>> e; + DmServerUploadService::Create(/*profile=*/nullptr, base::DoNothing(), e.cb()); + StatusOr<std::unique_ptr<DmServerUploadService>> result = e.result(); EXPECT_FALSE(result.ok()); EXPECT_EQ(result.status().error_code(), error::INVALID_ARGUMENT); } @@ -109,7 +147,7 @@ } protected: - base::test::TaskEnvironment task_envrionment_{ + content::BrowserTaskEnvironment task_envrionment_{ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; TestRecordHandler* handler_; @@ -127,7 +165,8 @@ policy::MockCloudPolicyClient client_; }; -TEST_F(DmServerUploaderTest, ProcessesRecord) { +// Disabled due to high flakes; see https://crbug.com/1133962. +TEST_F(DmServerUploaderTest, DISABLED_ProcessesRecord) { // Add an empty record. records_->emplace_back(); @@ -144,7 +183,8 @@ callback_waiter.Wait(); } -TEST_F(DmServerUploaderTest, ProcessesRecords) { +// Disabled due to high flakes; see https://crbug.com/1133962. +TEST_F(DmServerUploaderTest, DISABLED_ProcessesRecords) { for (uint64_t i = 0; i < 10; i++) { EncryptedRecord record; auto* sequencing_info = record.mutable_sequencing_information();
diff --git a/chrome/browser/policy/messaging_layer/upload/upload_client.cc b/chrome/browser/policy/messaging_layer/upload/upload_client.cc index 9fd23adb..7dbc9fe 100644 --- a/chrome/browser/policy/messaging_layer/upload/upload_client.cc +++ b/chrome/browser/policy/messaging_layer/upload/upload_client.cc
@@ -17,15 +17,28 @@ namespace reporting { // static -StatusOr<std::unique_ptr<UploadClient>> UploadClient::Create( +void UploadClient::Create( std::unique_ptr<policy::CloudPolicyClient> cloud_policy_client, - ReportSuccessfulUploadCallback report_success_cb) { + ReportSuccessfulUploadCallback report_upload_success_cb, + base::OnceCallback<void(StatusOr<std::unique_ptr<UploadClient>>)> + created_cb) { auto upload_client = base::WrapUnique(new UploadClient()); - ASSIGN_OR_RETURN(upload_client->dm_server_upload_service_, - DmServerUploadService::Create(std::move(cloud_policy_client), - report_success_cb)); - - return upload_client; + DmServerUploadService::Create( + std::move(cloud_policy_client), report_upload_success_cb, + base::BindOnce( + [](std::unique_ptr<UploadClient> upload_client, + base::OnceCallback<void(StatusOr<std::unique_ptr<UploadClient>>)> + created_cb, + StatusOr<std::unique_ptr<DmServerUploadService>> uploader) { + if (!uploader.ok()) { + std::move(created_cb).Run(uploader.status()); + return; + } + upload_client->dm_server_upload_service_ = + std::move(uploader.ValueOrDie()); + std::move(created_cb).Run(std::move(upload_client)); + }, + std::move(upload_client), std::move(created_cb))); } Status UploadClient::EnqueueUpload(
diff --git a/chrome/browser/policy/messaging_layer/upload/upload_client.h b/chrome/browser/policy/messaging_layer/upload/upload_client.h index 7c02222..969a6c82 100644 --- a/chrome/browser/policy/messaging_layer/upload/upload_client.h +++ b/chrome/browser/policy/messaging_layer/upload/upload_client.h
@@ -26,9 +26,11 @@ using ReportSuccessfulUploadCallback = base::RepeatingCallback<void(SequencingInformation)>; - static StatusOr<std::unique_ptr<UploadClient>> Create( + static void Create( std::unique_ptr<policy::CloudPolicyClient> cloud_policy_client, - ReportSuccessfulUploadCallback report_success_cb); + ReportSuccessfulUploadCallback report_upload_success_cb, + base::OnceCallback<void(StatusOr<std::unique_ptr<UploadClient>>)> + created_cb); ~UploadClient(); UploadClient(const UploadClient& other) = delete;
diff --git a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc index 992c8b5..b979736 100644 --- a/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc +++ b/chrome/browser/policy/messaging_layer/upload/upload_client_unittest.cc
@@ -16,6 +16,8 @@ #include "components/policy/core/common/cloud/mock_cloud_policy_client.h" #include "components/policy/proto/record.pb.h" #include "components/policy/proto/record_constants.pb.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/browser_thread.h" #include "content/public/test/browser_task_environment.h" #include "services/network/test/test_network_connection_tracker.h" @@ -34,6 +36,42 @@ using testing::InvokeArgument; using testing::WithArgs; +// Usage (in tests only): +// +// TestEvent<ResType> e; +// ... Do some async work passing e.cb() as a completion callback of +// base::OnceCallback<void(ResType* res)> type which also may perform some +// other action specified by |done| callback provided by the caller. +// ... = e.result(); // Will wait for e.cb() to be called and return the +// collected result. +// +template <typename ResType> +class TestEvent { + public: + TestEvent() : run_loop_(std::make_unique<base::RunLoop>()) {} + ~TestEvent() = default; + TestEvent(const TestEvent& other) = delete; + TestEvent& operator=(const TestEvent& other) = delete; + ResType result() { + run_loop_->Run(); + return std::forward<ResType>(result_); + } + + // Completion callback to hand over to the processing method. + base::OnceCallback<void(ResType res)> cb() { + return base::BindOnce( + [](base::RunLoop* run_loop, ResType* result, ResType res) { + *result = std::forward<ResType>(res); + run_loop->Quit(); + }, + base::Unretained(run_loop_.get()), base::Unretained(&result_)); + } + + private: + std::unique_ptr<base::RunLoop> run_loop_; + ResType result_; +}; + class TestCallbackWaiter { public: TestCallbackWaiter() : run_loop_(std::make_unique<base::RunLoop>()) {} @@ -62,26 +100,45 @@ std::atomic<int> counter_limit_; }; -TEST(UploadClientTest, CreateUploadClient) { - content::BrowserTaskEnvironment task_envrionment_; +class UploadClientTest : public ::testing::Test { + public: + UploadClientTest() = default; + protected: + void SetUp() override { #ifdef OS_CHROMEOS - // Set up fake primary profile. - auto mock_user_manager = - std::make_unique<testing::NiceMock<chromeos::FakeChromeUserManager>>(); - auto profile = std::make_unique<TestingProfile>( - base::FilePath(FILE_PATH_LITERAL("/home/chronos/u-0123456789abcdef"))); - const AccountId account_id( - AccountId::FromUserEmailGaiaId(profile->GetProfileUserName(), "12345")); - const user_manager::User* user = - mock_user_manager->AddPublicAccountUser(account_id); - mock_user_manager->UserLoggedIn(account_id, user->username_hash(), - /*browser_restart=*/false, - /*is_child=*/false); - auto user_manager = std::make_unique<user_manager::ScopedUserManager>( - std::move(mock_user_manager)); + // Set up fake primary profile. + auto mock_user_manager = + std::make_unique<testing::NiceMock<chromeos::FakeChromeUserManager>>(); + profile_ = std::make_unique<TestingProfile>( + base::FilePath(FILE_PATH_LITERAL("/home/chronos/u-0123456789abcdef"))); + const AccountId account_id(AccountId::FromUserEmailGaiaId( + profile_->GetProfileUserName(), "12345")); + const user_manager::User* user = + mock_user_manager->AddPublicAccountUser(account_id); + mock_user_manager->UserLoggedIn(account_id, user->username_hash(), + /*browser_restart=*/false, + /*is_child=*/false); + user_manager_ = std::make_unique<user_manager::ScopedUserManager>( + std::move(mock_user_manager)); #endif // OS_CHROMEOS + } + void TearDown() override { +#ifdef OS_CHROMEOS + user_manager_.reset(); + profile_.reset(); +#endif // OS_CHROMEOS + } + + content::BrowserTaskEnvironment task_envrionment_; +#ifdef OS_CHROMEOS + std::unique_ptr<TestingProfile> profile_; + std::unique_ptr<user_manager::ScopedUserManager> user_manager_; +#endif // OS_CHROMEOS +}; + +TEST_F(UploadClientTest, CreateUploadClient) { const int kExpectedCallTimes = 10; const uint64_t kGenerationId = 1234; @@ -98,9 +155,9 @@ waiter.Signal(); }))); - auto upload_client_result = - UploadClient::Create(std::move(client), base::DoNothing()); - + TestEvent<StatusOr<std::unique_ptr<UploadClient>>> e; + UploadClient::Create(std::move(client), base::DoNothing(), e.cb()); + StatusOr<std::unique_ptr<UploadClient>> upload_client_result = e.result(); ASSERT_OK(upload_client_result) << upload_client_result.status(); base::Value data{base::Value::Type::DICTIONARY};
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 68f5245..dacac5b 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -84,6 +84,7 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/location_bar/location_bar.h" #include "chrome/browser/ui/search/instant_test_utils.h" +#include "chrome/browser/ui/search/local_ntp_test_utils.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" #include "chrome/browser/ui/webui/welcome/helpers.h" @@ -799,7 +800,8 @@ UpdateProviderPolicy(policies); EXPECT_TRUE(chrome::ExecuteCommand(browser(), IDC_HOME)); EXPECT_TRUE(content::WaitForLoadStop(contents)); - EXPECT_TRUE(search::IsInstantNTP(contents)); + EXPECT_EQ(local_ntp_test_utils::GetFinalNtpUrl(browser()->profile()), + contents->GetURL()); } #if defined(OS_MAC) && defined(ADDRESS_SANITIZER)
diff --git a/chrome/browser/policy/restore_on_startup_policy_browsertest.cc b/chrome/browser/policy/restore_on_startup_policy_browsertest.cc index 74289e4..a798c06 100644 --- a/chrome/browser/policy/restore_on_startup_policy_browsertest.cc +++ b/chrome/browser/policy/restore_on_startup_policy_browsertest.cc
@@ -13,6 +13,7 @@ #include "chrome/browser/search/search.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_tabstrip.h" +#include "chrome/browser/ui/search/local_ntp_test_utils.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" @@ -167,12 +168,14 @@ resource_coordinator::WaitForTransitionToLoaded(model); for (int i = 0; i < size && i < model->count(); ++i) { content::WebContents* web_contents = model->GetWebContentsAt(i); - if (blocked_) + if (blocked_) { CheckURLIsBlockedInWebContents(web_contents, expected_urls_[i]); - else if (expected_urls_[i] == GURL(chrome::kChromeUINewTabURL)) - EXPECT_TRUE(search::IsInstantNTP(web_contents)); - else + } else if (expected_urls_[i] == GURL(chrome::kChromeUINewTabURL)) { + EXPECT_EQ(local_ntp_test_utils::GetFinalNtpUrl(browser()->profile()), + web_contents->GetURL()); + } else { EXPECT_EQ(expected_urls_[i], web_contents->GetURL()); + } } }
diff --git a/chrome/browser/prefs/pref_metrics_service.cc b/chrome/browser/prefs/pref_metrics_service.cc index a6fb962b4..3d900e3c 100644 --- a/chrome/browser/prefs/pref_metrics_service.cc +++ b/chrome/browser/prefs/pref_metrics_service.cc
@@ -19,7 +19,7 @@ #include "chrome/common/url_constants.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/prefs/pref_service.h" -#include "components/search_engines/template_url_prepopulate_data.h" +#include "components/search_engines/search_engine_utils.h" #include "url/gurl.h" PrefMetricsService::PrefMetricsService(Profile* profile) @@ -48,10 +48,9 @@ // pages, e.g. plus.google.com). if (!homepage_is_ntp) { if (homepage_url.is_valid()) { - UMA_HISTOGRAM_ENUMERATION( - "Settings.HomePageEngineType", - TemplateURLPrepopulateData::GetEngineType(homepage_url), - SEARCH_ENGINE_MAX); + UMA_HISTOGRAM_ENUMERATION("Settings.HomePageEngineType", + SearchEngineUtils::GetEngineType(homepage_url), + SEARCH_ENGINE_MAX); } } } @@ -84,10 +83,9 @@ if (url_list->GetString(i, &url_text)) { GURL start_url(url_text); if (start_url.is_valid()) { - UMA_HISTOGRAM_ENUMERATION( - "Settings.StartupPageEngineTypes", - TemplateURLPrepopulateData::GetEngineType(start_url), - SEARCH_ENGINE_MAX); + UMA_HISTOGRAM_ENUMERATION("Settings.StartupPageEngineTypes", + SearchEngineUtils::GetEngineType(start_url), + SEARCH_ENGINE_MAX); } } } @@ -100,10 +98,9 @@ for (size_t i = 0; i < startup_tabs.size(); ++i) { GURL start_url(startup_tabs.at(i).url); if (start_url.is_valid()) { - UMA_HISTOGRAM_ENUMERATION( - "Settings.PinnedTabEngineTypes", - TemplateURLPrepopulateData::GetEngineType(start_url), - SEARCH_ENGINE_MAX); + UMA_HISTOGRAM_ENUMERATION("Settings.PinnedTabEngineTypes", + SearchEngineUtils::GetEngineType(start_url), + SEARCH_ENGINE_MAX); } } #endif
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc index 9979ae2..8fdd405 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
@@ -513,8 +513,16 @@ IDC_OPEN_LINK_IN_PROFILE_LAST)); } +// Flaky crashes on Windows and Chrome OS. https://crbug.com/1119807 +#if defined(OS_WIN) || defined(OS_CHROMEOS) +#define MAYBE_OpenInAppAbsentForURLsInNonLocallyInstalledApp \ + DISABLED_OpenInAppAbsentForURLsInNonLocallyInstalledApp +#else +#define MAYBE_OpenInAppAbsentForURLsInNonLocallyInstalledApp \ + OpenInAppAbsentForURLsInNonLocallyInstalledApp +#endif IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, - OpenInAppAbsentForURLsInNonLocallyInstalledApp) { + MAYBE_OpenInAppAbsentForURLsInNonLocallyInstalledApp) { const AppId app_id = InstallTestWebApp(GURL(kAppUrl1)); // Part of the installation process (setting that this is a locally installed
diff --git a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js index 7c31d7a9f..f4327376 100644 --- a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js +++ b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js
@@ -56,15 +56,18 @@ */ listenUntil(predicate, node, eventType, callback, capture = false) { callback = this.newCallback(callback); - const listenOnce = true; - const listener = new EventHandler( - node, eventType, callback, {predicate, capture, listenOnce}); - listener.start(); - if (predicate()) { - listener.stop(); callback(); + return; } + + const listener = () => { + if (predicate()) { + node.removeEventListener(eventType, listener, capture); + callback.apply(this, arguments); + } + }; + node.addEventListener(eventType, listener, capture); } /**
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn b/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn index d3eb8b9..1bf59d8 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/BUILD.gn
@@ -102,7 +102,6 @@ test_type = "extension" sources = [ "auto_scan_manager_test.js", - "menu_manager_test.js", "navigation_manager_test.js", "nodes/basic_node_test.js", "nodes/desktop_node_test.js",
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager.js b/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager.js index 973abe85..5ab7c2a8 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager.js
@@ -35,9 +35,6 @@ this.clickHandler_ = new EventHandler( [], chrome.automation.EventType.CLICKED, this.onButtonClicked_.bind(this)); - - /** @private {!function()} */ - this.onMenuLoadedForTesting_ = () => {}; } static get instance() { @@ -218,7 +215,6 @@ this.clickHandler_.setNodes(this.menuAutomationNode_); this.clickHandler_.start(); NavigationManager.jumpToSwitchAccessMenu(this.menuAutomationNode_); - this.onMenuLoadedForTesting_(); } /**
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager_test.js b/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager_test.js deleted file mode 100644 index 03a31941..0000000 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/menu_manager_test.js +++ /dev/null
@@ -1,184 +0,0 @@ -// Copyright 2020 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. - -GEN_INCLUDE(['switch_access_e2e_test_base.js']); - -/** Test fixture for the menu manager. */ -SwitchAccessMenuManagerTest = class extends SwitchAccessE2ETest { - openMenuForTextField(desktop) { - const textField = desktop.find({role: 'textField'}); - // We expect there to be at least one text field onscreen (the omnibar). - assertNotNullNorUndefined(textField, 'Couldn\'t find a text field'); - NavigationManager.instance.moveTo_(textField); - MenuManager.enter(); - - assertTrue( - MenuManager.instance.isMenuOpen_, - 'Menu manager should be marked as open'); - assertTrue( - MenuManager.instance.actionNode_.isEquivalentTo(textField), - 'Menu is open for the wrong node'); - } - - // Callback will be called when the menu has loaded, and Switch Access focus - // has shifted to the menu. - setMenuLoadCallback(callback) { - MenuManager.instance.onMenuLoadedForTesting_ = this.newCallback(callback); - } - - waitForMenuClose(callback) { - const closedPredicate = () => { - const node = NavigationManager.desktopNode.find( - {role: 'menu', attributes: {className: 'SwitchAccessMenuView'}}); - if (!node || !node.role) { - return true; - } - if (node.state['offscreen'] || node.state['invisible']) { - return true; - } - if (node.location.width === 0 && node.location.height === 0) { - return true; - } - return false; - }; - this.waitForPredicate(closedPredicate, this.newCallback(callback)); - } -}; - -TEST_F('SwitchAccessMenuManagerTest', 'Enter', function() { - this.runWithLoadedTree('', (desktop) => { - const manager = MenuManager.instance; - - this.setMenuLoadCallback(() => { - assertFalse( - manager.inTextNavigation_, 'Menu should not be in text navigation'); - assertNotNullNorUndefined(manager.actionNode_, 'Menu has no action node'); - const actionNode = manager.actionNode_; - assertEquals( - actionNode.automationNode.role, 'textField', - 'Menu is not open for the textField'); - assertGT( - actionNode.actions.length, 1, - 'TextField should have more than 1 action available'); - - const menuNode = manager.menuAutomationNode_; - assertTrue( - RectUtil.close( - menuNode.location, manager.displayedLocation_, /*tolerance=*/ 10), - 'Menu should be close to the display location'); - assertGT(menuNode.location.width, 0, 'Menu should have a nonzero width'); - assertGT( - menuNode.location.height, 0, 'Menu should have a nonzero height'); - assertFalse( - !!menuNode.state['offscreen'], - 'Menu should not be marked as offscreen'); - - const interestingChildren = - BasicRootNode.getInterestingChildren(menuNode); - const globalActionCount = 1; - assertEquals( - actionNode.actions.length + globalActionCount, - interestingChildren.length, - 'Menu should show all actions for textField (while improved text ' + - 'navigation flag is disabled)'); - for (let i = 0; i < actionNode.actions.length; i++) { - action = actionNode.actions[i]; - button = interestingChildren[i].value; - assertEquals( - action, button, - 'Button ' + i + ' ("' + button + '") should be action "' + action + - '"'); - } - }); - - this.openMenuForTextField(desktop); - }); -}); - -TEST_F('SwitchAccessMenuManagerTest', 'Exit', function() { - this.runWithLoadedTree('', (desktop) => { - const manager = MenuManager.instance; - - this.setMenuLoadCallback(() => { - MenuManager.exit(); - assertFalse(manager.isMenuOpen_, 'Menu should be marked as closed'); - assertFalse( - manager.inTextNavigation_, 'Menu should not be in text navigation'); - assertNullOrUndefined( - manager.actionNode_, 'Action node should have been reset'); - assertNullOrUndefined( - manager.displayedActions_, - 'Displayed actions should have been reset'); - assertNullOrUndefined( - manager.displayedLocation_, - 'Displayed location should have been reset'); - const navGroup = NavigationManager.instance.group_.automationNode; - assertNotEquals( - navGroup.className, 'SwitchAccessMenuView', - 'Navigation manager did not exit the menu'); - - this.waitForMenuClose(); - }); - - this.openMenuForTextField(desktop); - }); -}); - -TEST_F('SwitchAccessMenuManagerTest', 'Navigation', function() { - const website = `<button id="test" aria-pressed=false>First Button</button> - <script> - let state = false; - let button = document.getElementById('test'); - button.onclick = () => { - state = !state; - button.setAttribute('aria-pressed', state); - }; - </script>`; - this.runWithLoadedTree(website, (desktop) => { - const manager = MenuManager.instance; - const navigator = NavigationManager.instance; - - const button = this.findNodeById('test'); - button.addEventListener('checkedStateChanged', this.newCallback((event) => { - assertEquals( - button.htmlAttributes.id, event.target.htmlAttributes.id, - 'Checked state changed on unexpected node'); - })); - navigator.moveTo_(button); - - this.setMenuLoadCallback(() => { - assertTrue( - navigator.group_.isEquivalentTo(manager.menuAutomationNode_), - 'Navigation should be focused on the menu'); - const selectButton = navigator.node_; - assertEquals( - 'select', selectButton.automationNode.value, - 'The first action in the menu should be select'); - NavigationManager.moveForward(); - assertEquals( - 'settings', navigator.node_.automationNode.value, - 'The second action in the menu should be settings'); - NavigationManager.moveForward(); - assertTrue( - navigator.node_ instanceof BackButtonNode, - 'The third element in the menu should be the back button'); - NavigationManager.moveForward(); - assertTrue( - selectButton.equals(navigator.node_), - 'Moving forward from the back button should take us to the first ' + - 'action (select)'); - // Press the select button. - MenuManager.enter(); - - // Wait for the menu to close - this.waitForMenuClose(() => { - assertFalse(manager.isMenuOpen_); - }); - }); - - // Force the menu to show with different actions than it would normally. - manager.actionNode_ = NavigationManager.currentNode; - manager.displayMenuWithActions_(['select', 'settings']); - }); -});
diff --git a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js index 778535cc..e2a69e9 100644 --- a/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js +++ b/chrome/browser/resources/chromeos/accessibility/switch_access/switch_access.js
@@ -53,10 +53,18 @@ */ static findNodeMatching(findParams, foundCallback) { const desktop = NavigationManager.desktopNode; - // Listen for changes to the desktop tree, in case it's not currently there. + // First, check if the node is currently in the tree. + let node = desktop.find(findParams); + if (node) { + foundCallback(node); + return; + } + // If it's not currently in the tree, listen for changes to the desktop + // tree. const eventHandler = new EventHandler( desktop, chrome.automation.EventType.CHILDREN_CHANGED, null /** callback */); + const onEvent = (event) => { if (event.target.matches(findParams)) { // If the event target is the node we're looking for, we've found it. @@ -71,16 +79,9 @@ } } }; + eventHandler.setCallback(onEvent); eventHandler.start(); - - // Check if the node is already in the tree. - let node = desktop.find(findParams); - if (node) { - eventHandler.stop(); - foundCallback(node); - return; - } } /*
diff --git a/chrome/browser/resources/chromeos/login/BUILD.gn b/chrome/browser/resources/chromeos/login/BUILD.gn index 572a988..d1caa41 100644 --- a/chrome/browser/resources/chromeos/login/BUILD.gn +++ b/chrome/browser/resources/chromeos/login/BUILD.gn
@@ -249,6 +249,7 @@ js_library("oobe_supervision_transition") { deps = [ + "components:login_screen_behavior", "components:oobe_dialog_host_behavior", "components:oobe_i18n_behavior", ]
diff --git a/chrome/browser/resources/chromeos/login/md_login.html b/chrome/browser/resources/chromeos/login/md_login.html index 7a60df3a..1161b047 100644 --- a/chrome/browser/resources/chromeos/login/md_login.html +++ b/chrome/browser/resources/chromeos/login/md_login.html
@@ -54,7 +54,6 @@ <link rel="stylesheet" href="oobe_screen_enable_debugging.css"> <link rel="stylesheet" href="oobe_screen_autolaunch.css"> <link rel="stylesheet" href="oobe_screen_auto_enrollment_check.css"> -<link rel="stylesheet" href="oobe_screen_supervision_transition.css"> <link rel="stylesheet" href="screen_app_launch_splash.css"> <link rel="stylesheet" href="screen_error_message.css"> <link rel="stylesheet" href="screen_fatal_error.css">
diff --git a/chrome/browser/resources/chromeos/login/md_login.js b/chrome/browser/resources/chromeos/login/md_login.js index 8e751f04..b319031 100644 --- a/chrome/browser/resources/chromeos/login/md_login.js +++ b/chrome/browser/resources/chromeos/login/md_login.js
@@ -20,7 +20,6 @@ // src="../../../../../ui/login/account_picker/chromeos_user_pod_row.js"> // <include src="cr_ui.js"> // <include src="oobe_screen_autolaunch.js"> -// <include src="oobe_screen_supervision_transition.js"> // <include src="oobe_screen_assistant_optin_flow.js"> // <include src="oobe_select.js"> @@ -61,7 +60,6 @@ login.AppLaunchSplashScreen.register(); login.FatalErrorScreen.register(); login.EncryptionMigrationScreen.register(); - login.SupervisionTransitionScreen.register(); login.UpdateRequiredScreen.register(); login.DiscoverScreen.register(); login.AssistantOptInFlowScreen.register();
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.css b/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.css deleted file mode 100644 index 1d39d3b6..0000000 --- a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.css +++ /dev/null
@@ -1,10 +0,0 @@ -/* Copyright 2018 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. */ - -#supervision-transition { - display: flex; - flex-flow: column; - font-size: 16px; - min-height: 0; -}
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.html b/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.html deleted file mode 100644 index 8d780983..0000000 --- a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.html +++ /dev/null
@@ -1,9 +0,0 @@ -<!-- Copyright 2018 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. --> - -<div class="step hidden" id="supervision-transition" - role="group" hidden> - <supervision-transition-md id="supervision-transition-md"> - </supervision-transition-md> -</div>
diff --git a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.js b/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.js deleted file mode 100644 index e6f0762..0000000 --- a/chrome/browser/resources/chromeos/login/oobe_screen_supervision_transition.js +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2018 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 Oobe Supervision Transition screen implementation. - */ - -login.createScreen( - 'SupervisionTransitionScreen', 'supervision-transition', function() { - return { - /** @override */ - get defaultControl() { - return $('supervision-transition-md'); - }, - - /** @override */ - onBeforeShow(data) { - $('supervision-transition-md') - .setIsRemovingSupervision( - data['isRemovingSupervision'] ? true : false); - }, - }; - });
diff --git a/chrome/browser/resources/chromeos/login/oobe_supervision_transition.html b/chrome/browser/resources/chromeos/login/oobe_supervision_transition.html index 0cdb3ce..f0d2fb58 100644 --- a/chrome/browser/resources/chromeos/login/oobe_supervision_transition.html +++ b/chrome/browser/resources/chromeos/login/oobe_supervision_transition.html
@@ -2,7 +2,7 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> -<dom-module id="supervision-transition-md"> +<dom-module id="supervision-transition"> <template> <style include="oobe-dialog-host"></style> <link rel="stylesheet" href="oobe_supervision_transition.css">
diff --git a/chrome/browser/resources/chromeos/login/oobe_supervision_transition.js b/chrome/browser/resources/chromeos/login/oobe_supervision_transition.js index edbf2039..fc5a0ec 100644 --- a/chrome/browser/resources/chromeos/login/oobe_supervision_transition.js +++ b/chrome/browser/resources/chromeos/login/oobe_supervision_transition.js
@@ -8,9 +8,9 @@ */ Polymer({ - is: 'supervision-transition-md', + is: 'supervision-transition', - behaviors: [OobeI18nBehavior, OobeDialogHostBehavior], + behaviors: [OobeI18nBehavior, OobeDialogHostBehavior, LoginScreenBehavior], properties: { /** @@ -19,6 +19,16 @@ isRemovingSupervision_: Boolean, }, + ready() { + this.initializeLoginScreen('SupervisionTransitionScreen', { + resetAllowed: false, + }); + }, + + onBeforeShow(data) { + this.setIsRemovingSupervision(data['isRemovingSupervision']); + }, + setIsRemovingSupervision(is_removing_supervision) { this.isRemovingSupervision_ = is_removing_supervision; },
diff --git a/chrome/browser/resources/chromeos/login/structure/screens_login.html b/chrome/browser/resources/chromeos/login/structure/screens_login.html index 02992cfa..3171d4f 100644 --- a/chrome/browser/resources/chromeos/login/structure/screens_login.html +++ b/chrome/browser/resources/chromeos/login/structure/screens_login.html
@@ -5,7 +5,8 @@ <!-- Login-specific screens --> <terms-of-service id="terms-of-service" class="step hidden"> </terms-of-service> -<include src="../oobe_screen_supervision_transition.html"> +<supervision-transition id="supervision-transition" class="step hidden" hidden> +</supervision-transition> <gaia-password-changed id="gaia-password-changed" class="step hidden" hidden> </gaia-password-changed>
diff --git a/chrome/browser/resources/chromeos/login/user_creation.html b/chrome/browser/resources/chromeos/login/user_creation.html index cbd09b9f..8d894986 100644 --- a/chrome/browser/resources/chromeos/login/user_creation.html +++ b/chrome/browser/resources/chromeos/login/user_creation.html
@@ -44,8 +44,8 @@ font-size: 16px; font-weight: 500; line-height: 24px; - padding-inline-end: 20px; - padding-inline-start: 20px; + padding-inline-end: 32px; + padding-inline-start: 32px; padding-top: 16px; } @@ -53,6 +53,10 @@ color: var(--oobe-text-color); line-height: 20px; } + + .help-text { + color: var(--oobe-subheader-text-color); + } </style> <oobe-dialog id="userCreationDialog" role="dialog" has-buttons title-key="[[titleKey_]]" subtitle-key="[[subtitleKey_]]" @@ -104,12 +108,19 @@ </div> </oobe-dialog> <oobe-dialog id="childSignInDialog" role="dialog" has-buttons - title-key="childSignInTitle" subtitle-key="childSignInSubtitle" - aria-label$="[[i18nDynamic(locale, 'childSignInTitle')]]" - for-step="child"> + title-key="childSignInTitle" for-step="child" + aria-label$="[[i18nDynamic(locale, 'childSignInTitle')]]"> <hd-iron-icon icon1x="oobe-32:family" icon2x="oobe-64:family" slot="oobe-icon"> </hd-iron-icon> + <div slot="subtitle"> + <div> + [[i18nDynamic(locale, 'childSignInSubtitle')]] + <a href="#" class="oobe-local-link" on-tap="onLearnMoreClicked_"> + [[i18nDynamic(locale, 'childSignInLearnMore')]] + </a> + </div> + </div> <div slot="footer" class="footer-container flex layout vertical center-justified"> <cr-radio-group id="childSignInMethod" class="layout horizontal" @@ -137,6 +148,9 @@ </div> </cr-card-radio-button> </cr-radio-group> + <div class="help-text"> + [[i18nDynamic(locale, 'childSignInParentNotificationText')]] + </div> </div> <div slot="bottom-buttons" class="layout horizontal justified"> <oobe-back-button id="childBackButton" on-tap="onBackClicked_"> @@ -146,5 +160,11 @@ </oobe-next-button> </div> </oobe-dialog> + <oobe-help-dialog id="learnMoreDialog" + title-key="childSignInLearnMoreDialogTitle"> + <div slot="content" class="card-text"> + [[i18nDynamic(locale, 'childSignInLearnMoreDialogText')]] + </div> + </oobe-help-dialog> </template> </dom-module>
diff --git a/chrome/browser/resources/chromeos/login/user_creation.js b/chrome/browser/resources/chromeos/login/user_creation.js index 5fa97196..f6fefce 100644 --- a/chrome/browser/resources/chromeos/login/user_creation.js +++ b/chrome/browser/resources/chromeos/login/user_creation.js
@@ -149,5 +149,9 @@ } }, + onLearnMoreClicked_() { + this.$.learnMoreDialog.showDialog(); + } + }); })();
diff --git a/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.html b/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.html index f1a460b..6ef0755 100644 --- a/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.html +++ b/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.html
@@ -5,6 +5,7 @@ <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> <link rel="import" href="./nearby_page_template.html"> +<link rel="import" href="./nearby_share_settings.html"> <link rel="import" href="./nearby_share_settings_behavior.html"> <dom-module id="nearby-onboarding-page"> @@ -47,6 +48,7 @@ sub-title="$i18n{nearbyShareOnboardingPageSubtitle}" action-button-label="$i18n{nearbyShareActionsNext}" action-button-event-name="next" + action-disabled="[[hasErrorMessage_(errorMessage)]]" cancel-button-label="$i18n{nearbyShareActionsCancel}" cancel-button-event-name="close"> <div id=center-content slot="content"> @@ -55,7 +57,9 @@ </iron-icon> <div id="device-name-column"> <cr-input label="$i18n{nearbyShareOnboardingPageDeviceName}" - id="deviceName" value="[[settings.deviceName]]" autofocus> + id="deviceName" value="[[settings.deviceName]]" + on-input="onDeviceNameInput_" error-message="[[errorMessage]]" + invalid="[[hasErrorMessage_(errorMessage)]]" autofocus> </cr-input> </div> </div>
diff --git a/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.js b/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.js index 3a24618..a6152374 100644 --- a/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.js +++ b/chrome/browser/resources/nearby_share/shared/nearby_onboarding_page.js
@@ -16,7 +16,13 @@ /** @type {?nearby_share.NearbySettings} */ settings: { type: Object, - } + }, + + /** @type {string} */ + errorMessage: { + type: String, + value: '', + }, }, listeners: { @@ -27,7 +33,57 @@ * @private */ onNext_() { - this.set('settings.deviceName', this.$.deviceName.value); - this.fire('change-page', {page: 'visibility'}); + nearby_share.getNearbyShareSettings() + .setDeviceName(this.$.deviceName.value) + .then((result) => { + this.updateErrorMessage_(result.result); + if (result.result === + nearbyShare.mojom.DeviceNameValidationResult.kValid) { + this.fire('change-page', {page: 'visibility'}); + } + }); }, + + /** @private */ + onDeviceNameInput_() { + nearby_share.getNearbyShareSettings() + .validateDeviceName(this.$.deviceName.value) + .then((result) => { + this.updateErrorMessage_(result.result); + }); + }, + + /** + * @private + * + * @param {!nearbyShare.mojom.DeviceNameValidationResult} validationResult The + * error status from validating the provided device name. + */ + updateErrorMessage_(validationResult) { + switch (validationResult) { + case nearbyShare.mojom.DeviceNameValidationResult.kErrorEmpty: + this.errorMessage = this.i18n('nearbyShareDeviceNameEmptyError'); + break; + case nearbyShare.mojom.DeviceNameValidationResult.kErrorTooLong: + this.errorMessage = this.i18n('nearbyShareDeviceNameTooLongError'); + break; + case nearbyShare.mojom.DeviceNameValidationResult.kErrorNotValidUtf8: + this.errorMessage = + this.i18n('nearbyShareDeviceNameInvalidCharactersError'); + break; + default: + this.errorMessage = ''; + break; + } + }, + + /** + * @private + * + * @param {!string} errorMessage The error message. + * @return {boolean} Whether or not the error message exists. + */ + hasErrorMessage_(errorMessage) { + return errorMessage !== ''; + } });
diff --git a/chrome/browser/resources/nearby_share/shared/nearby_shared.gni b/chrome/browser/resources/nearby_share/shared/nearby_shared.gni index 27d4af85..f2187b0 100644 --- a/chrome/browser/resources/nearby_share/shared/nearby_shared.gni +++ b/chrome/browser/resources/nearby_share/shared/nearby_shared.gni
@@ -3,6 +3,7 @@ # found in the LICENSE file. nearby_shared_auto_imports = [ + "chrome/browser/resources/nearby_share/shared/nearby_share_settings.html|getNearbyShareSettings", "chrome/browser/resources/nearby_share/shared/nearby_share_settings_behavior.html|NearbyShareSettingsBehavior,NearbySettings", "chrome/browser/resources/nearby_share/shared/nearby_contact_manager.html|getContactManager,observeContactManager", "ui/webui/resources/html/assert.html|assert,assertNotReached",
diff --git a/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.html b/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.html index 3d32fa5..97ca0da2 100644 --- a/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.html +++ b/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.html
@@ -133,7 +133,7 @@ </style> <div id="products"> <template is="dom-repeat" id="productsRepeat" - items="[[shoppingTask.products]]"> + items="[[shoppingTask.products]]" on-dom-change="onDomChange_"> <a class="product" href="[[item.targetUrl.url]]" on-click="onClick_" on-auxclick="onClick_"> <div class="image"> @@ -146,8 +146,8 @@ </template> </div> <div id="relatedSearches"> - <template is="dom-repeat" id="relatedSearchesRepeat" - items="[[shoppingTask.relatedSearches]]"> + <template is="dom-repeat" id="relatedSearchesRepeat" + items="[[shoppingTask.relatedSearches]]" on-dom-change="onDomChange_"> <a class="pill" href="[[item.targetUrl.url]]" on-click="onClick_" on-auxclick="onClick_"> <div class="loupe"></div>
diff --git a/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.js b/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.js index 1a29bd7a..f516aece 100644 --- a/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.js +++ b/chrome/browser/resources/new_tab_page/modules/shopping_tasks/module.js
@@ -34,6 +34,13 @@ }; } + /** @override */ + ready() { + super.ready(); + /** @type {IntersectionObserver} */ + this.intersectionObserver_ = null; + } + /** @private */ onClick_() { this.dispatchEvent(new Event('usage', {bubbles: true, composed: true})); @@ -43,6 +50,23 @@ onCloseClick_() { this.showInfoDialog = false; } + + /** @private */ + onDomChange_() { + if (!this.intersectionObserver_) { + this.intersectionObserver_ = new IntersectionObserver(entries => { + entries.forEach(({intersectionRatio, target}) => { + target.style.visibility = + intersectionRatio < 1 ? 'hidden' : 'visible'; + }); + this.dispatchEvent(new Event('visibility-update')); + }, {root: this, threshold: 1}); + } else { + this.intersectionObserver_.disconnect(); + } + this.shadowRoot.querySelectorAll('.product, .pill') + .forEach(el => this.intersectionObserver_.observe(el)); + } } customElements.define(
diff --git a/chrome/browser/resources/settings/chromeos/os_icons.html b/chrome/browser/resources/settings/chromeos/os_icons.html index 334d25db..1f47ba26 100644 --- a/chrome/browser/resources/settings/chromeos/os_icons.html +++ b/chrome/browser/resources/settings/chromeos/os_icons.html
@@ -77,7 +77,7 @@ <g id="bluetooth" viewBox="0 0 24 24"><path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88z"></path></g> <g id="bluetooth-connected" viewBox="0 0 24 24"><path d="M7 12l-2-2-2 2 2 2 2-2zm10.71-4.29L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46L13 18.17v-3.76l1.88 1.88zM19 10l-2 2 2 2 2-2-2-2z"></path></g> <g id="bluetooth-disabled" viewBox="0 0 24 24"><path d="M13 5.83l1.88 1.88-1.6 1.6 1.41 1.41 3.02-3.02L12 2h-1v5.03l2 2v-3.2zM5.41 4L4 5.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l4.29-4.29 2.3 2.29L20 18.59 5.41 4zM13 18.17v-3.76l1.88 1.88L13 18.17z"></path></g> - <g id="chevron-left" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"</path></g> + <g id="chevron-left" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g> <g id="end-of-life" viewBox="0 0 24 24"><path d="M4.574 2.916H4.55l.01.01.014-.01zM2.5 4.968v.023a.18.18 0 0 1 .01-.013l-.01-.01zm14.585 10.49v-.024l-.01.013.01.01zm.223 1.817l-.933-.95-4.106-4.11L8.026 7.99 3.675 3.635l-.942-.941-.712-.713L1 3.002l1.733 1.733A9.056 9.056 0 0 0 1.05 9.98c0 1.95.628 3.748 1.683 5.22.574.8 1.274 1.501 2.074 2.075a8.918 8.918 0 0 0 5.218 1.684 8.918 8.918 0 0 0 5.218-1.684L16.991 19l1.02-1.021-.703-.704zM15.243 2.684A8.922 8.922 0 0 0 10.025 1a8.922 8.922 0 0 0-5.218 1.684c-.005.003 4.135 4.16 4.135 4.16l1.083-1.814L15.042 11h-1.846l4.11 4.214a8.939 8.939 0 0 0 .011-10.456 9.021 9.021 0 0 0-2.074-2.074zM12 15H7.012v-3.989L4.5 11l2.227-1.876L12 14.6v.4z" fill="#DB4437" fill-rule="evenodd"></path></g> <g id="fingerprint" viewBox="0 0 24 24"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"></path></g> <g id="gamepad" viewBox="0 0 24 24"><path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"></path></g>
diff --git a/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js b/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js index 8ae4eb53..0ead4de 100644 --- a/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js +++ b/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js
@@ -400,9 +400,9 @@ const /** @type {!Array<settings.Account>} */ accounts = await settings.AccountManagerBrowserProxyImpl.getInstance() .getAccounts(); - // The user might not have any GAIA accounts (e.g. guest mode, Kerberos, - // Active Directory). In these cases the profile row is hidden, so there's - // nothing to do. + // The user might not have any GAIA accounts (e.g. guest mode or Active + // Directory). In these cases the profile row is hidden, so there's nothing + // to do. if (accounts.length == 0) { return; }
diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js index 6de9248..f44c1b36 100644 --- a/chrome/browser/resources/settings/people_page/people_page.js +++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -290,9 +290,9 @@ updateAccounts_: async function() { const /** @type {!Array<{Account}>} */ accounts = await AccountManagerBrowserProxyImpl.getInstance().getAccounts(); - // The user might not have any GAIA accounts (e.g. guest mode, Kerberos, - // Active Directory). In these cases the profile row is hidden, so there's - // nothing to do. + // The user might not have any GAIA accounts (e.g. guest mode or Active + // Directory). In these cases the profile row is hidden, so there's nothing + // to do. if (accounts.length === 0) { return; }
diff --git a/chrome/browser/resources/signin/BUILD.gn b/chrome/browser/resources/signin/BUILD.gn index 000f284..09f2e81 100644 --- a/chrome/browser/resources/signin/BUILD.gn +++ b/chrome/browser/resources/signin/BUILD.gn
@@ -9,6 +9,7 @@ if (!is_chromeos) { deps += [ "dice_web_signin_intercept:closure_compile", + "profile_customization:closure_compile", "profile_picker:closure_compile", "signin_email_confirmation:closure_compile", "signin_error:closure_compile", @@ -25,6 +26,7 @@ if (!is_chromeos) { public_deps += [ "dice_web_signin_intercept:web_components", + "profile_customization:web_components", "signin_email_confirmation:web_components", "signin_error:web_components", "signin_reauth:web_components",
diff --git a/chrome/browser/resources/signin/profile_customization/BUILD.gn b/chrome/browser/resources/signin/profile_customization/BUILD.gn new file mode 100644 index 0000000..35def64 --- /dev/null +++ b/chrome/browser/resources/signin/profile_customization/BUILD.gn
@@ -0,0 +1,21 @@ +# Copyright 2020 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("//third_party/closure_compiler/compile_js.gni") +import("//tools/polymer/html_to_js.gni") + +js_type_check("closure_compile") { + is_polymer3 = true + deps = [ ":profile_customization_app" ] +} + +js_library("profile_customization_app") { + deps = [ + "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", + ] +} + +html_to_js("web_components") { + js_files = [ "profile_customization_app.js" ] +}
diff --git a/chrome/browser/resources/signin/profile_customization/OWNERS b/chrome/browser/resources/signin/profile_customization/OWNERS new file mode 100644 index 0000000..b2464ab --- /dev/null +++ b/chrome/browser/resources/signin/profile_customization/OWNERS
@@ -0,0 +1,2 @@ +file://components/signin/OWNERS +# COMPONENT: Services>SignIn
diff --git a/chrome/browser/resources/signin/profile_customization/profile_customization.html b/chrome/browser/resources/signin/profile_customization/profile_customization.html new file mode 100644 index 0000000..6b927c1 --- /dev/null +++ b/chrome/browser/resources/signin/profile_customization/profile_customization.html
@@ -0,0 +1,24 @@ +<!doctype html> +<html dir="$i18n{textdirection}" lang="$i18n{language}"> + <head> + <meta charset="utf-8"> + <link rel="stylesheet" href="chrome://resources/css/md_colors.css"> + <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> + <style> + body { + height: 100vh; + margin: 0; + width: 100vw; + } + @media (prefers-color-scheme: dark) { + body { + background-color: var(--md-background-color); + } + } + </style> + </head> + <body> + <profile-customization-app></profile-customization-app> + <script type="module" src="profile_customization_app.js"></script> + </body> +</html>
diff --git a/chrome/browser/resources/signin/profile_customization/profile_customization_app.html b/chrome/browser/resources/signin/profile_customization/profile_customization_app.html new file mode 100644 index 0000000..070278b --- /dev/null +++ b/chrome/browser/resources/signin/profile_customization/profile_customization_app.html
@@ -0,0 +1,4 @@ +<div>$i18n{profileCustomizationPickThemeTitle}</div> +<cr-button on-click="onDone_" autofocus> + $i18n{profileCustomizationDoneLabel} +</cr-button>
diff --git a/chrome/browser/resources/signin/profile_customization/profile_customization_app.js b/chrome/browser/resources/signin/profile_customization/profile_customization_app.js new file mode 100644 index 0000000..3d232ff0 --- /dev/null +++ b/chrome/browser/resources/signin/profile_customization/profile_customization_app.js
@@ -0,0 +1,20 @@ +// Copyright 2020 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 'chrome://resources/cr_elements/cr_button/cr_button.m.js'; +import './strings.m.js'; + +import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; + + +Polymer({ + is: 'profile-customization-app', + + _template: html`{__html_template__}`, + + /** @private */ + onDone_() { + // TODO: call native to close the bubble + }, +});
diff --git a/chrome/browser/search/ntp_features.cc b/chrome/browser/search/ntp_features.cc index 3c7c991..8b5c850 100644 --- a/chrome/browser/search/ntp_features.cc +++ b/chrome/browser/search/ntp_features.cc
@@ -63,7 +63,7 @@ // If enabled, the WebUI new tab page will load when a new tab is created // instead of the local NTP. -const base::Feature kWebUI{"NtpWebUI", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kWebUI{"NtpWebUI", base::FEATURE_ENABLED_BY_DEFAULT}; // If disabled, the realbox will not show on the WebUI new tab page. const base::Feature kWebUIRealbox{"WebUIRealbox",
diff --git a/chrome/browser/translate/android/translate_bridge.cc b/chrome/browser/translate/android/translate_bridge.cc index e70aebf..bf55e34 100644 --- a/chrome/browser/translate/android/translate_bridge.cc +++ b/chrome/browser/translate/android/translate_bridge.cc
@@ -20,6 +20,7 @@ #include "components/language/core/common/language_util.h" #include "components/prefs/pref_service.h" #include "components/strings/grit/components_locale_settings.h" +#include "components/translate/core/browser/translate_download_manager.h" #include "components/translate/core/browser/translate_manager.h" #include "components/translate/core/browser/translate_pref_names.h" #include "components/translate/core/browser/translate_prefs.h" @@ -63,6 +64,31 @@ client->ManualTranslateWhenReady(); } +static void JNI_TranslateBridge_TranslateToLanguage( + JNIEnv* env, + const base::android::JavaParamRef<jobject>& j_web_contents, + const base::android::JavaParamRef<jstring>& j_target_language_code) { + content::WebContents* web_contents = + content::WebContents::FromJavaWebContents(j_web_contents); + ChromeTranslateClient* client = + ChromeTranslateClient::FromWebContents(web_contents); + DCHECK(client); + const std::string target_language_code( + ConvertJavaStringToUTF8(env, j_target_language_code)); + const std::string& source_language_code = + client->GetLanguageState().original_language(); + // Only translate if the source language has been determined and both + // languages are supported. + if (!source_language_code.empty() && + translate::TranslateManager::IsTranslatableLanguagePair( + source_language_code, target_language_code)) { + translate::TranslateManager* manager = client->GetTranslateManager(); + DCHECK(manager); + manager->TranslatePage(source_language_code, target_language_code, + /*triggered_from_menu=*/false); + } +} + static jboolean JNI_TranslateBridge_CanManuallyTranslate( JNIEnv* env, const base::android::JavaParamRef<jobject>& j_web_contents) {
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 83e72c1..51dad3a 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -608,6 +608,7 @@ "//components/feed/core/v2:feed_core_v2", "//components/infobars/content", "//components/query_tiles", + "//components/resources:android_resources", "//components/security_state/content/android", ] } else { @@ -2865,6 +2866,8 @@ "signin/dice_web_signin_interceptor_delegate.h", "views/profiles/dice_web_signin_interception_bubble_view.cc", "views/profiles/dice_web_signin_interception_bubble_view.h", + "views/profiles/profile_customization_bubble_view.cc", + "views/profiles/profile_customization_bubble_view.h", "webui/signin/dice_turn_sync_on_helper.cc", "webui/signin/dice_turn_sync_on_helper.h", "webui/signin/dice_turn_sync_on_helper_delegate_impl.cc", @@ -2873,6 +2876,10 @@ "webui/signin/dice_web_signin_intercept_handler.h", "webui/signin/dice_web_signin_intercept_ui.cc", "webui/signin/dice_web_signin_intercept_ui.h", + "webui/signin/profile_customization_handler.cc", + "webui/signin/profile_customization_handler.h", + "webui/signin/profile_customization_ui.cc", + "webui/signin/profile_customization_ui.h", ] } }
diff --git a/chrome/browser/ui/android/DEPS b/chrome/browser/ui/android/DEPS index 17f36cf9..8f0de3f 100644 --- a/chrome/browser/ui/android/DEPS +++ b/chrome/browser/ui/android/DEPS
@@ -1,3 +1,4 @@ include_rules = { "+chrome/android/features/keyboard_accessory/jni_headers", + "+components/resources/android", }
diff --git a/chrome/browser/ui/android/content_settings/ads_blocked_infobar_delegate.cc b/chrome/browser/ui/android/content_settings/ads_blocked_infobar_delegate.cc index 814fc1d..4a135d5 100644 --- a/chrome/browser/ui/android/content_settings/ads_blocked_infobar_delegate.cc +++ b/chrome/browser/ui/android/content_settings/ads_blocked_infobar_delegate.cc
@@ -8,12 +8,11 @@ #include "base/memory/ptr_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/browser/android/android_theme_resources.h" #include "chrome/browser/subresource_filter/chrome_subresource_filter_client.h" #include "chrome/browser/ui/android/infobars/ads_blocked_infobar.h" -#include "chrome/grit/generated_resources.h" #include "components/infobars/content/content_infobar_manager.h" #include "components/infobars/core/infobar.h" +#include "components/resources/android/theme_resources.h" #include "components/strings/grit/components_strings.h" #include "components/subresource_filter/core/browser/subresource_filter_constants.h" #include "content/public/browser/web_contents.h" @@ -73,8 +72,7 @@ base::string16 AdsBlockedInfobarDelegate::GetButtonLabel( InfoBarButton button) const { - return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_OK - : IDS_APP_MENU_RELOAD); + return l10n_util::GetStringUTF16((button == BUTTON_OK) ? IDS_OK : IDS_RELOAD); } bool AdsBlockedInfobarDelegate::Cancel() {
diff --git a/chrome/browser/ui/android/infobars/translate_compact_infobar.cc b/chrome/browser/ui/android/infobars/translate_compact_infobar.cc index 487f711..25aea5c 100644 --- a/chrome/browser/ui/android/infobars/translate_compact_infobar.cc +++ b/chrome/browser/ui/android/infobars/translate_compact_infobar.cc
@@ -235,6 +235,29 @@ } } +void TranslateCompactInfoBar::OnTargetLanguageChanged( + const std::string& target_language_code) { + // TODO(crbug/1093320): intended to mitigate a crash where + // the java infobar is gone. If this works, look into root cause. + if (!HasSetJavaInfoBar()) + return; // No connected Java infobar + + if (!owner()) + return; // We're closing; don't call anything. + + translate::TranslateInfoBarDelegate* delegate = GetDelegate(); + if (delegate->target_language_code().compare(target_language_code) == 0) { + return; + } + delegate->UpdateTargetLanguage(target_language_code); + + JNIEnv* env = base::android::AttachCurrentThread(); + ScopedJavaLocalRef<jstring> target_code = + base::android::ConvertUTF8ToJavaString(env, target_language_code); + Java_TranslateCompactInfoBar_onTargetLanguageChanged(env, GetJavaInfoBar(), + target_code); +} + bool TranslateCompactInfoBar::IsDeclinedByUser() { // Whether there is any affirmative action bit. return action_flags_ == FLAG_NONE;
diff --git a/chrome/browser/ui/android/infobars/translate_compact_infobar.h b/chrome/browser/ui/android/infobars/translate_compact_infobar.h index d160620..6a96be52 100644 --- a/chrome/browser/ui/android/infobars/translate_compact_infobar.h +++ b/chrome/browser/ui/android/infobars/translate_compact_infobar.h
@@ -51,6 +51,8 @@ // TranslateInfoBarDelegate::Observer implementation. void OnTranslateStepChanged(translate::TranslateStep step, translate::TranslateErrors::Type error_type) override; + void OnTargetLanguageChanged( + const std::string& target_language_code) override; // Returns true if the user didn't take any affirmative action. // The function will be called when the translate infobar is dismissed. // If it's true, we will record a declined event.
diff --git a/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.mm b/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.mm index 42606fd..0b2f4715b 100644 --- a/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.mm +++ b/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.mm
@@ -37,6 +37,15 @@ ? [_notificationData objectForKey:notification_constants::kNotificationOrigin] : @""; + + // This uses a private API to prevent notifications from dismissing on default + // action instead of clicking on a button + if ([toast respondsToSelector:@selector + (shouldPreventNotificationDismissalAfterDefaultAction)]) { + [toast setValue:@YES + forKey:@"shouldPreventNotificationDismissalAfterDefaultAction"]; + } + DCHECK( [_notificationData objectForKey:notification_constants::kNotificationId]); NSString* notificationId =
diff --git a/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac_unittest.mm b/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac_unittest.mm new file mode 100644 index 0000000..52b2194 --- /dev/null +++ b/chrome/browser/ui/cocoa/notifications/unnotification_builder_mac_unittest.mm
@@ -0,0 +1,195 @@ +// Copyright 2020 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 <UserNotifications/UserNotifications.h> + +#include "base/mac/scoped_nsobject.h" +#include "base/strings/sys_string_conversions.h" +#include "chrome/browser/notifications/notification_handler.h" +#include "chrome/browser/ui/cocoa/notifications/notification_constants_mac.h" +#import "chrome/browser/ui/cocoa/notifications/unnotification_builder_mac.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { + +API_AVAILABLE(macosx(10.14)) +base::scoped_nsobject<UNNotificationBuilder> NewTestBuilder( + NotificationHandler::Type type) { + base::scoped_nsobject<UNNotificationBuilder> builder( + [[UNNotificationBuilder alloc] init]); + [builder setNotificationId:@"notificationId"]; + [builder setProfileId:@"profileId"]; + [builder setIncognito:false]; + [builder setCreatorPid:@1]; + [builder setNotificationType:[NSNumber numberWithInt:static_cast<int>(type)]]; + return builder; +} + +} // namespace + +TEST(UNNotificationBuilderMacTest, TestNotificationData) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + [builder setTitle:@"Title"]; + [builder setSubTitle:@"https://www.moe.example.com"]; + [builder setContextMessage:@"hey there"]; + UNMutableNotificationContent* content = [builder buildUserNotification]; + EXPECT_EQ("Title", base::SysNSStringToUTF8([content title])); + EXPECT_EQ("hey there", base::SysNSStringToUTF8([content body])); + EXPECT_EQ("https://www.moe.example.com", + base::SysNSStringToUTF8([content subtitle])); + } +} + +TEST(UNNotificationBuilderMacTest, TestNotificationDataMissingContextMessage) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + [builder setContextMessage:@""]; + UNMutableNotificationContent* content = [builder buildUserNotification]; + EXPECT_EQ("", base::SysNSStringToUTF8([content body])); + } +} + +TEST(UNNotificationBuilderMacTest, TestNotificationNoOrigin) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + UNMutableNotificationContent* content = [builder buildUserNotification]; + EXPECT_EQ("", + base::SysNSStringToUTF8([[content userInfo] + objectForKey:notification_constants::kNotificationOrigin])); + } +} + +TEST(UNNotificationBuilderMacTest, TestNotificationWithOrigin) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + [builder setOrigin:@"example.co.uk"]; + UNMutableNotificationContent* content = [builder buildUserNotification]; + EXPECT_EQ("example.co.uk", + base::SysNSStringToUTF8([[content userInfo] + objectForKey:notification_constants::kNotificationOrigin])); + } +} + +TEST(UNNotificationBuilderMacTest, TestNotificationUserInfo) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + UNMutableNotificationContent* content = [builder buildUserNotification]; + + NSDictionary* userInfo = [content userInfo]; + EXPECT_EQ("", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationOrigin])); + EXPECT_EQ("notificationId", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationId])); + EXPECT_EQ( + "profileId", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationProfileId])); + EXPECT_FALSE( + [[userInfo objectForKey:notification_constants::kNotificationIncognito] + boolValue]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationCreatorPid] + isEqualToNumber:@1]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationType] + isEqualToNumber:@0]); + } +} + +TEST(UNNotificationBuilderMacTest, TestNotificationUserInfoNonDefaultValues) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_NON_PERSISTENT); + [builder setNotificationId:@"modified id"]; + [builder setOrigin:@"neworigin.co.uk"]; + [builder setProfileId:@"new profile id"]; + [builder setIncognito:true]; + [builder setCreatorPid:@1512]; + + UNMutableNotificationContent* content = [builder buildUserNotification]; + + NSDictionary* userInfo = [content userInfo]; + EXPECT_EQ("neworigin.co.uk", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationOrigin])); + EXPECT_EQ("modified id", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationId])); + EXPECT_EQ( + "new profile id", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationProfileId])); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationIncognito] + boolValue]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationCreatorPid] + isEqualToNumber:@1512]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationType] + isEqualToNumber:@1]); + } +} + +TEST(UNNotificationBuilderMacTest, TestBuildDictionary) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> dictionaryBuilder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + [dictionaryBuilder setTitle:@"Title"]; + [dictionaryBuilder setSubTitle:@"https://www.moe.example.com"]; + [dictionaryBuilder setContextMessage:@"hey there"]; + NSDictionary* dictionary = [dictionaryBuilder buildDictionary]; + + base::scoped_nsobject<UNNotificationBuilder> builder( + [[UNNotificationBuilder alloc] initWithDictionary:dictionary]); + UNMutableNotificationContent* content = [builder buildUserNotification]; + + EXPECT_EQ("Title", base::SysNSStringToUTF8([content title])); + EXPECT_EQ("hey there", base::SysNSStringToUTF8([content body])); + EXPECT_EQ("https://www.moe.example.com", + base::SysNSStringToUTF8([content subtitle])); + + NSDictionary* userInfo = [content userInfo]; + EXPECT_EQ("", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationOrigin])); + EXPECT_EQ("notificationId", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationId])); + EXPECT_EQ( + "profileId", + base::SysNSStringToUTF8([userInfo + objectForKey:notification_constants::kNotificationProfileId])); + EXPECT_FALSE( + [[userInfo objectForKey:notification_constants::kNotificationIncognito] + boolValue]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationCreatorPid] + isEqualToNumber:@1]); + EXPECT_TRUE( + [[userInfo objectForKey:notification_constants::kNotificationType] + isEqualToNumber:@0]); + } +} + +TEST(UNNotificationBuilderMacTest, + TestNotificationDoesNotCloseOnDefaultAction) { + if (@available(macOS 10.14, *)) { + base::scoped_nsobject<UNNotificationBuilder> builder = + NewTestBuilder(NotificationHandler::Type::WEB_PERSISTENT); + UNMutableNotificationContent* content = [builder buildUserNotification]; + + EXPECT_TRUE([[content + valueForKey:@"shouldPreventNotificationDismissalAfterDefaultAction"] + boolValue]); + } +}
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc index 0c230099..4bf3ea90 100644 --- a/chrome/browser/ui/content_settings/content_setting_image_model.cc +++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -35,6 +35,7 @@ #include "components/permissions/permission_request_manager.h" #include "components/prefs/pref_service.h" #include "components/prerender/browser/prerender_manager.h" +#include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" #include "content/public/browser/web_contents.h" #include "services/device/public/cpp/device_features.h"
diff --git a/chrome/browser/ui/in_product_help/reopen_tab_in_product_help.cc b/chrome/browser/ui/in_product_help/reopen_tab_in_product_help.cc index 75f8cda4..fe48a4d 100644 --- a/chrome/browser/ui/in_product_help/reopen_tab_in_product_help.cc +++ b/chrome/browser/ui/in_product_help/reopen_tab_in_product_help.cc
@@ -31,7 +31,8 @@ // currently living browsers. BrowserList::AddObserver(this); for (Browser* browser : *BrowserList::GetInstance()) { - active_tab_tracker_.AddTabStripModel(browser->tab_strip_model()); + if (browser->profile() == profile_) + active_tab_tracker_.AddTabStripModel(browser->tab_strip_model()); } // |base::Unretained| is safe here since this is a member. @@ -42,7 +43,8 @@ ReopenTabInProductHelp::~ReopenTabInProductHelp() { BrowserList::RemoveObserver(this); for (Browser* browser : *BrowserList::GetInstance()) { - active_tab_tracker_.RemoveTabStripModel(browser->tab_strip_model()); + if (browser->profile() == profile_) + active_tab_tracker_.RemoveTabStripModel(browser->tab_strip_model()); } } @@ -71,11 +73,13 @@ } void ReopenTabInProductHelp::OnBrowserAdded(Browser* browser) { - active_tab_tracker_.AddTabStripModel(browser->tab_strip_model()); + if (browser->profile() == profile_) + active_tab_tracker_.AddTabStripModel(browser->tab_strip_model()); } void ReopenTabInProductHelp::OnBrowserRemoved(Browser* browser) { - active_tab_tracker_.RemoveTabStripModel(browser->tab_strip_model()); + if (browser->profile() == profile_) + active_tab_tracker_.RemoveTabStripModel(browser->tab_strip_model()); } feature_engagement::Tracker* ReopenTabInProductHelp::GetTracker() {
diff --git a/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc b/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc index c0964d3c..2094b742 100644 --- a/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc +++ b/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.cc
@@ -28,6 +28,5 @@ void DiceWebSigninInterceptorDelegate::ShowProfileCustomizationBubble( Browser* browser) { - // TODO(https://crbug.com/1130945): implement the customization bubble. - NOTIMPLEMENTED(); + ShowProfileCustomizationBubbleInternal(browser); }
diff --git a/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h b/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h index 9143b2ea..dfd1758 100644 --- a/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h +++ b/chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h
@@ -34,6 +34,9 @@ Browser* browser, const BubbleParameters& bubble_parameters, base::OnceCallback<void(bool)> callback); + + // Implemented in profile_customization_bubble_view.cc + void ShowProfileCustomizationBubbleInternal(Browser* browser); }; #endif // CHROME_BROWSER_UI_SIGNIN_DICE_WEB_SIGNIN_INTERCEPTOR_DELEGATE_H_
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc index a1dd5dc..6c256b8 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -1930,7 +1930,12 @@ }; // Flaky: https://crbug.com/1126886 -IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorPickerTest, DISABLED_OpensPicker) { +#if defined(USE_OZONE) || defined(OS_WIN) +#define MAYBE_OpensPicker DISABLED_OpensPicker +#else +#define MAYBE_OpensPicker OpensPicker +#endif +IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorPickerTest, MAYBE_OpensPicker) { ASSERT_EQ(1u, chrome::GetTotalBrowserCount()); base::CommandLine command_line(base::CommandLine::NO_PROGRAM); StartWithTwoProfiles(command_line);
diff --git a/chrome/browser/ui/uma_browsing_activity_observer.cc b/chrome/browser/ui/uma_browsing_activity_observer.cc index 4e251cf..ff0b0256 100644 --- a/chrome/browser/ui/uma_browsing_activity_observer.cc +++ b/chrome/browser/ui/uma_browsing_activity_observer.cc
@@ -4,8 +4,10 @@ #include "chrome/browser/ui/uma_browsing_activity_observer.h" +#include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" #include "base/metrics/user_metrics.h" +#include "base/numerics/ranges.h" #include "base/time/time.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/profiles/profile.h" @@ -115,6 +117,8 @@ int app_window_count = 0; int popup_window_count = 0; int tabbed_window_count = 0; + std::map<base::StringPiece, int> unique_domain; + for (auto* browser : *BrowserList::GetInstance()) { // Record how many tabs each window has open. UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.TabCountPerWindow", @@ -123,6 +127,13 @@ TabStripModel* const tab_strip_model = browser->tab_strip_model(); tab_count += tab_strip_model->count(); + for (int i = 0; i < tab_strip_model->count(); ++i) { + base::StringPiece domain = tab_strip_model->GetWebContentsAt(i) + ->GetLastCommittedURL() + .host_piece(); + unique_domain[domain] += 1; + } + const std::vector<tab_groups::TabGroupId>& groups = tab_strip_model->group_model()->ListTabGroups(); tab_group_count += groups.size(); @@ -152,6 +163,15 @@ else if (browser->is_type_normal()) tabbed_window_count++; } + + // Record how many tabs share a domain based on the total number of tabs open. + const std::string tab_count_per_domain_histogram_name = + AppendTabBucketCountToHistogramName(tab_count); + for (auto domain : unique_domain) { + base::UmaHistogramSparse(tab_count_per_domain_histogram_name, + base::ClampToRange(domain.second, 0, 200)); + } + // Record how many tabs total are open (across all windows). UMA_HISTOGRAM_CUSTOM_COUNTS("Tabs.TabCountPerLoad", tab_count, 1, 200, 50); @@ -192,4 +212,42 @@ tabbed_window_count); } +std::string UMABrowsingActivityObserver::AppendTabBucketCountToHistogramName( + int total_tab_count) const { + const char* bucket = nullptr; + if (total_tab_count < 6) { + bucket = "0to5"; + } else if (total_tab_count < 11) { + bucket = "6to10"; + } else if (total_tab_count < 16) { + bucket = "10to15"; + } else if (total_tab_count < 21) { + bucket = "16to20"; + } else if (total_tab_count < 31) { + bucket = "21to30"; + } else if (total_tab_count < 41) { + bucket = "31to40"; + } else if (total_tab_count < 61) { + bucket = "41to60"; + } else if (total_tab_count < 81) { + bucket = "61to80"; + } else if (total_tab_count < 101) { + bucket = "81to100"; + } else if (total_tab_count < 151) { + bucket = "101to150"; + } else if (total_tab_count < 201) { + bucket = "151to200"; + } else if (total_tab_count < 301) { + bucket = "201to300"; + } else if (total_tab_count < 401) { + bucket = "301to400"; + } else if (total_tab_count < 501) { + bucket = "401to500"; + } else { + bucket = "501+"; + } + const char kHistogramBaseName[] = "Tabs.TabCountPerDomainPerLoad"; + return base::StringPrintf("%s.%s", kHistogramBaseName, bucket); +} + } // namespace chrome
diff --git a/chrome/browser/ui/uma_browsing_activity_observer.h b/chrome/browser/ui/uma_browsing_activity_observer.h index 9dfed9e..8390eca 100644 --- a/chrome/browser/ui/uma_browsing_activity_observer.h +++ b/chrome/browser/ui/uma_browsing_activity_observer.h
@@ -41,6 +41,10 @@ // tabs here. void LogBrowserTabCount() const; + // Maps |total_tab_count| to the corresponding histogram bucket with the + // proper name suffix. + std::string AppendTabBucketCountToHistogramName(int total_tab_count) const; + content::NotificationRegistrar registrar_; TabStripModelStatsRecorder tab_recorder_;
diff --git a/chrome/browser/ui/views/profiles/profile_customization_bubble_view.cc b/chrome/browser/ui/views/profiles/profile_customization_bubble_view.cc new file mode 100644 index 0000000..79ea324 --- /dev/null +++ b/chrome/browser/ui/views/profiles/profile_customization_bubble_view.cc
@@ -0,0 +1,70 @@ +// Copyright 2020 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/views/profiles/profile_customization_bubble_view.h" + +#include "base/feature_list.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/signin/dice_web_signin_interceptor_delegate.h" +#include "chrome/browser/ui/ui_features.h" +#include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/frame/toolbar_button_provider.h" +#include "chrome/browser/ui/views/profiles/avatar_toolbar_button.h" +#include "chrome/common/webui_url_constants.h" +#include "content/public/browser/web_contents.h" +#include "content/public/browser/web_ui.h" +#include "ui/views/bubble/bubble_border.h" +#include "ui/views/controls/webview/webview.h" +#include "ui/views/layout/fill_layout.h" +#include "ui/views/widget/widget.h" +#include "url/gurl.h" + +namespace { +constexpr int kCustomizationBubbleHeight = 452; +constexpr int kCustomizationBubbleWidth = 290; +} // namespace + +ProfileCustomizationBubbleView::~ProfileCustomizationBubbleView() = default; + +// static +void ProfileCustomizationBubbleView::CreateBubble(Profile* profile, + views::View* anchor_view) { + // The widget is owned by the views system. + views::Widget* widget = views::BubbleDialogDelegateView::CreateBubble( + new ProfileCustomizationBubbleView(profile, anchor_view)); + // TODO(droger): Delay showing the bubble until the web view is loaded. + widget->Show(); +} + +ProfileCustomizationBubbleView::ProfileCustomizationBubbleView( + Profile* profile, + views::View* anchor_view) + : views::BubbleDialogDelegateView(anchor_view, + views::BubbleBorder::TOP_RIGHT) { + // Create the web view in the native bubble. + std::unique_ptr<views::WebView> web_view = + std::make_unique<views::WebView>(profile); + web_view->LoadInitialURL(GURL(chrome::kChromeUIProfileCustomizationURL)); + web_view->SetPreferredSize( + gfx::Size(kCustomizationBubbleWidth, kCustomizationBubbleHeight)); + AddChildView(std::move(web_view)); + + set_margins(gfx::Insets()); + SetButtons(ui::DIALOG_BUTTON_NONE); // Buttons are implemented in WebUI. + SetLayoutManager(std::make_unique<views::FillLayout>()); +} + +void DiceWebSigninInterceptorDelegate::ShowProfileCustomizationBubbleInternal( + Browser* browser) { + DCHECK(browser); + + if (!base::FeatureList::IsEnabled(features::kProfilesUIRevamp)) + return; + + views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser) + ->toolbar_button_provider() + ->GetAvatarToolbarButton(); + DCHECK(anchor_view); + ProfileCustomizationBubbleView::CreateBubble(browser->profile(), anchor_view); +}
diff --git a/chrome/browser/ui/views/profiles/profile_customization_bubble_view.h b/chrome/browser/ui/views/profiles/profile_customization_bubble_view.h new file mode 100644 index 0000000..4c96889 --- /dev/null +++ b/chrome/browser/ui/views/profiles/profile_customization_bubble_view.h
@@ -0,0 +1,32 @@ +// Copyright 2020 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_VIEWS_PROFILES_PROFILE_CUSTOMIZATION_BUBBLE_VIEW_H_ +#define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CUSTOMIZATION_BUBBLE_VIEW_H_ + +#include "ui/views/bubble/bubble_dialog_delegate_view.h" + +namespace views { +class View; +} // namespace views + +class Profile; + +// This bubble is implemented as a WebUI page rendered inside a native bubble. +class ProfileCustomizationBubbleView : public views::BubbleDialogDelegateView { + public: + ~ProfileCustomizationBubbleView() override; + + ProfileCustomizationBubbleView(const ProfileCustomizationBubbleView& other) = + delete; + ProfileCustomizationBubbleView& operator=( + const ProfileCustomizationBubbleView& other) = delete; + + static void CreateBubble(Profile* profile, views::View* anchor_view); + + private: + ProfileCustomizationBubbleView(Profile* profile, views::View* anchor_view); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CUSTOMIZATION_BUBBLE_VIEW_H_
diff --git a/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.cc b/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.cc index 3471c865..30ce939 100644 --- a/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.cc +++ b/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.cc
@@ -7,6 +7,7 @@ #include <memory> #include <utility> +#include "base/i18n/rtl.h" #include "base/strings/string16.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sharesheet/sharesheet_metrics.h" @@ -79,6 +80,11 @@ } } +bool IsKeyboardCodeArrow(ui::KeyboardCode key_code) { + return key_code == ui::VKEY_UP || key_code == ui::VKEY_DOWN || + key_code == ui::VKEY_RIGHT || key_code == ui::VKEY_LEFT; +} + } // namespace SharesheetBubbleView::SharesheetBubbleView( @@ -140,6 +146,9 @@ main_layout->AddView(std::make_unique<SharesheetExpandButton>(this)); main_layout->AddPaddingRow(views::GridLayout::kFixedSize, kShortSpacing); + main_view_->SetFocusBehavior(View::FocusBehavior::ALWAYS); + main_view_->RequestFocus(); + views::Widget* widget = views::BubbleDialogDelegateView::CreateBubble(this); GetWidget()->GetRootView()->Layout(); widget->Show(); @@ -147,6 +156,7 @@ if (targets_.size() <= (kMaxRowsForDefaultView * kMaxTargetsPerRow)) { width_ = kDefaultBubbleWidth; height_ = kNoExtensionBubbleHeight; + expand_button_->SetVisible(false); } else { SetToDefaultBubbleSizing(); } @@ -195,7 +205,7 @@ scrollable_view->SetLayoutManager(std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kVertical)); layout->set_main_axis_alignment(views::BoxLayout::MainAxisAlignment::kCenter); - scrollable_view->AddChildView(std::move(default_view)); + default_view_ = scrollable_view->AddChildView(std::move(default_view)); expanded_view_ = scrollable_view->AddChildView(std::move(expanded_view)); // Expanded view is not visible by default. @@ -258,9 +268,62 @@ targets_.clear(); active_target_ = base::string16(); intent_.reset(); + keyboard_highlighted_target_ = 0; SetToDefaultBubbleSizing(); } +void SharesheetBubbleView::OnKeyEvent(ui::KeyEvent* event) { + if (!IsKeyboardCodeArrow(event->key_code()) || + event->type() != ui::ET_KEY_RELEASED) { + return; + } + + int delta = 0; + switch (event->key_code()) { + case ui::VKEY_UP: + delta = -kMaxTargetsPerRow; + break; + case ui::VKEY_DOWN: + delta = kMaxTargetsPerRow; + break; + case ui::VKEY_LEFT: + delta = base::i18n::IsRTL() ? 1 : -1; + break; + case ui::VKEY_RIGHT: + delta = base::i18n::IsRTL() ? -1 : 1; + break; + default: + NOTREACHED(); + break; + } + + keyboard_highlighted_target_ += delta; + + int default_view_max = kMaxTargetsPerRow * kMaxRowsForDefaultView - 1; + int max_target_index = targets_.size() - 1; + if ((!show_expanded_view_) && (max_target_index > default_view_max)) { + max_target_index = default_view_max; + } + + if (keyboard_highlighted_target_ > max_target_index) { + keyboard_highlighted_target_ = max_target_index; + } else if (keyboard_highlighted_target_ < 0) { + keyboard_highlighted_target_ = 0; + } + + if (keyboard_highlighted_target_ <= default_view_max) { + default_view_->children()[keyboard_highlighted_target_]->RequestFocus(); + } else { + DCHECK_LT(keyboard_highlighted_target_ - default_view_max, + expanded_view_->children().size()); + DCHECK(show_expanded_view_); + expanded_view_->children()[keyboard_highlighted_target_ - default_view_max] + ->RequestFocus(); + } + + View::OnKeyEvent(event); +} + void SharesheetBubbleView::ButtonPressed(views::Button* sender, const ui::Event& event) { if (sender == expand_button_) {
diff --git a/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.h b/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.h index 49ce592..0340ec12 100644 --- a/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.h +++ b/chrome/browser/ui/views/sharesheet/sharesheet_bubble_view.h
@@ -48,6 +48,9 @@ void CloseBubble(); private: + // ui::EventHandler overrides: + void OnKeyEvent(ui::KeyEvent* event) override; + // views::ButtonListener overrides void ButtonPressed(views::Button* sender, const ui::Event& event) override; @@ -79,8 +82,11 @@ bool user_cancelled_ = true; bool show_expanded_view_ = false; + int keyboard_highlighted_target_ = 0; + views::View* root_view_ = nullptr; views::View* main_view_ = nullptr; + views::View* default_view_ = nullptr; views::View* expanded_view_ = nullptr; views::View* share_action_view_ = nullptr; views::View* parent_view_ = nullptr;
diff --git a/chrome/browser/ui/views/sharesheet/sharesheet_expand_button.cc b/chrome/browser/ui/views/sharesheet/sharesheet_expand_button.cc index cb3f758f..b443a12 100644 --- a/chrome/browser/ui/views/sharesheet/sharesheet_expand_button.cc +++ b/chrome/browser/ui/views/sharesheet/sharesheet_expand_button.cc
@@ -41,6 +41,7 @@ label_->SetLineHeight(kLineHeight); label_->SetEnabledColor(kLabelColor); + SetFocusBehavior(View::FocusBehavior::ALWAYS); SetDefaultView(); }
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc index 4b268f0..96b60ac 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
@@ -344,7 +344,7 @@ properties_->RegisterInterface(kInterfaceStatusNotifierItem); auto set_property = [&](const std::string& property_name, auto&& value) { properties_->SetProperty(kInterfaceStatusNotifierItem, property_name, - std::move(value), false); + std::forward<decltype(value)>(value), false); }; set_property(kPropertyItemIsMenu, DbusBoolean(false)); set_property(kPropertyWindowId, DbusInt32(0));
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 c9abbd9..c74e7d7 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -233,6 +233,7 @@ #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) #include "chrome/browser/ui/sync/sync_promo_ui.h" #include "chrome/browser/ui/webui/browser_switch/browser_switch_ui.h" +#include "chrome/browser/ui/webui/signin/profile_customization_ui.h" #include "chrome/browser/ui/webui/signin/profile_picker_ui.h" #include "chrome/browser/ui/webui/signin/signin_email_confirmation_ui.h" #include "chrome/browser/ui/webui/signin/signin_error_ui.h" @@ -785,9 +786,10 @@ } #endif // defined(OS_ANDROID) #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) - if (url.host_piece() == chrome::kChromeUIProfilePickerHost) { + if (url.host_piece() == chrome::kChromeUIProfileCustomizationHost) + return &NewWebUI<ProfileCustomizationUI>; + if (url.host_piece() == chrome::kChromeUIProfilePickerHost) return &NewWebUI<ProfilePickerUI>; - } if (url.host_piece() == chrome::kChromeUIMdUserManagerHost) return &NewWebUI<UserManagerUI>; if (url.host_piece() == chrome::kChromeUISigninErrorHost &&
diff --git a/chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.cc index 98ffbb060..a7725f5 100644 --- a/chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/user_creation_screen_handler.cc
@@ -47,12 +47,22 @@ IDS_OOBE_USER_CREATION_CHILD_BUTTON_DESCRIPTION); builder->AddF("childSignInTitle", IDS_OOBE_USER_CREATION_CHILD_SIGNIN_TITLE, ui::GetChromeOSDeviceName()); - builder->Add("childSignInSubtitle", - IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE); + builder->AddF("childSignInSubtitle", + IDS_OOBE_USER_CREATION_CHILD_SIGNIN_SUBTITLE, + ui::GetChromeOSDeviceNameInPlural()); builder->Add("createAccountForChildLabel", IDS_OOBE_USER_CREATION_CHILD_ACCOUNT_CREATION_BUTTON_LABEL); builder->Add("signInForChildLabel", IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_BUTTON_LABEL); + builder->AddF("childSignInParentNotificationText", + IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_PARENT_NOTIFICATION_TEXT, + ui::GetChromeOSDeviceName()); + builder->Add("childSignInLearnMore", + IDS_OOBE_USER_CREATION_CHILD_SIGNIN_LEARN_MORE); + builder->Add("childSignInLearnMoreDialogTitle", + IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TITLE); + builder->Add("childSignInLearnMoreDialogText", + IDS_OOBE_USER_CREATION_CHILD_SIGN_IN_LEARN_MORE_DIALOG_TEXT); } void UserCreationScreenHandler::Initialize() {}
diff --git a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler_browsertest.cc b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler_browsertest.cc index 3cd2374..6fb4c06 100644 --- a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler_browsertest.cc +++ b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler_browsertest.cc
@@ -126,8 +126,6 @@ delete; void SetUpOnMainThread() override { - user_manager_enabler_ = std::make_unique<user_manager::ScopedUserManager>( - std::make_unique<chromeos::FakeChromeUserManager>()); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); TestingProfile::Builder profile_builder; profile_builder.SetPath(temp_dir_.GetPath().AppendASCII("TestProfile")); @@ -138,6 +136,7 @@ } profile_ = profile_builder.Build(); + auto user_manager = std::make_unique<chromeos::FakeChromeUserManager>(); const user_manager::User* user; if (GetDeviceAccountInfo().user_type == user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY) { @@ -156,6 +155,12 @@ GetDeviceAccountInfo().id), true, GetDeviceAccountInfo().user_type, profile_.get()); } + primary_account_id_ = user->GetAccountId(); + user_manager->LoginUser(primary_account_id_); + ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, + profile_.get()); + user_manager_enabler_ = std::make_unique<user_manager::ScopedUserManager>( + std::move(user_manager)); identity_manager_ = IdentityManagerFactory::GetForProfile(profile_.get()); @@ -178,7 +183,9 @@ void TearDownOnMainThread() override { handler_.reset(); + ProfileHelper::Get()->RemoveUserFromListForTesting(primary_account_id_); profile_.reset(); + base::RunLoop().RunUntilIdle(); user_manager_enabler_.reset(); } @@ -223,12 +230,12 @@ chromeos::AccountManager* account_manager_ = nullptr; signin::IdentityManager* identity_manager_ = nullptr; content::TestWebUI web_ui_; + AccountId primary_account_id_; std::unique_ptr<TestingAccountManagerUIHandler> handler_; }; -// TODO(https://crbug.com/1131834): Re-enable flaky test. IN_PROC_BROWSER_TEST_P(AccountManagerUIHandlerTest, - DISABLED_OnGetAccountsNoSecondaryAccounts) { + OnGetAccountsNoSecondaryAccounts) { const std::vector<AccountManager::Account> account_manager_accounts = GetAccountsFromAccountManager(); // Only Primary account. @@ -271,9 +278,8 @@ } } -// TODO(https://crbug.com/1131819): Re-enable flaky test. IN_PROC_BROWSER_TEST_P(AccountManagerUIHandlerTest, - DISABLED_OnGetAccountsWithSecondaryAccounts) { + OnGetAccountsWithSecondaryAccounts) { UpsertAccount("secondary1@example.com"); UpsertAccount("secondary2@example.com"); const std::vector<AccountManager::Account> account_manager_accounts =
diff --git a/chrome/browser/ui/webui/signin/profile_customization_handler.cc b/chrome/browser/ui/webui/signin/profile_customization_handler.cc new file mode 100644 index 0000000..b8f93c0 --- /dev/null +++ b/chrome/browser/ui/webui/signin/profile_customization_handler.cc
@@ -0,0 +1,23 @@ +// Copyright 2020 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/signin/profile_customization_handler.h" + +#include "base/bind.h" +#include "base/bind_helpers.h" +#include "content/public/browser/web_ui.h" + +ProfileCustomizationHandler::ProfileCustomizationHandler() = default; + +ProfileCustomizationHandler::~ProfileCustomizationHandler() = default; + +void ProfileCustomizationHandler::RegisterMessages() { + web_ui()->RegisterMessageCallback( + "done", base::BindRepeating(&ProfileCustomizationHandler::HandleDone, + base::Unretained(this))); +} + +void ProfileCustomizationHandler::HandleDone(const base::ListValue* args) { + // TODO: close the bubble +}
diff --git a/chrome/browser/ui/webui/signin/profile_customization_handler.h b/chrome/browser/ui/webui/signin/profile_customization_handler.h new file mode 100644 index 0000000..3be73dc --- /dev/null +++ b/chrome/browser/ui/webui/signin/profile_customization_handler.h
@@ -0,0 +1,31 @@ +// Copyright 2020 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_SIGNIN_PROFILE_CUSTOMIZATION_HANDLER_H_ +#define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_CUSTOMIZATION_HANDLER_H_ + +#include "content/public/browser/web_ui_message_handler.h" + +namespace base { +class ListValue; +} + +// WebUI message handler for the profile customization bubble. +class ProfileCustomizationHandler : public content::WebUIMessageHandler { + public: + ProfileCustomizationHandler(); + ~ProfileCustomizationHandler() override; + + ProfileCustomizationHandler(const ProfileCustomizationHandler&) = delete; + ProfileCustomizationHandler& operator=(const ProfileCustomizationHandler&) = + delete; + + // content::WebUIMessageHandler: + void RegisterMessages() override; + + private: + void HandleDone(const base::ListValue* args); +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_CUSTOMIZATION_HANDLER_H_
diff --git a/chrome/browser/ui/webui/signin/profile_customization_ui.cc b/chrome/browser/ui/webui/signin/profile_customization_ui.cc new file mode 100644 index 0000000..4135672 --- /dev/null +++ b/chrome/browser/ui/webui/signin/profile_customization_ui.cc
@@ -0,0 +1,51 @@ +// Copyright 2020 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/signin/profile_customization_ui.h" + +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/webui/signin/profile_customization_handler.h" +#include "chrome/browser/ui/webui/webui_util.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/grit/browser_resources.h" +#include "chrome/grit/generated_resources.h" +#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 "ui/base/webui/web_ui_util.h" +#include "ui/resources/grit/webui_resources.h" + +ProfileCustomizationUI::ProfileCustomizationUI(content::WebUI* web_ui) + : content::WebUIController(web_ui) { + content::WebUIDataSource* source = content::WebUIDataSource::Create( + chrome::kChromeUIProfileCustomizationHost); + source->SetDefaultResource(IDR_PROFILE_CUSTOMIZATION_HTML); + source->AddResourcePath("profile_customization_app.js", + IDR_PROFILE_CUSTOMIZATION_APP_JS); + + // Localized strings. + source->UseStringsJs(); + source->EnableReplaceI18nInJS(); + static constexpr webui::LocalizedString kLocalizedStrings[] = { + {"profileCustomizationDoneLabel", + IDS_PROFILE_CUSTOMIZATION_DONE_BUTTON_LABEL}, + {"profileCustomizationPickThemeTitle", + IDS_PROFILE_CUSTOMIZATION_PICK_THEME_TITLE}, + }; + webui::AddLocalizedStringsBulk(source, kLocalizedStrings); + + // Resources for testing. + source->OverrideContentSecurityPolicy( + network::mojom::CSPDirectiveName::ScriptSrc, + "script-src chrome://resources chrome://test 'self';"); + source->DisableTrustedTypesCSP(); + source->AddResourcePath("test_loader.js", IDR_WEBUI_JS_TEST_LOADER); + source->AddResourcePath("test_loader.html", IDR_WEBUI_HTML_TEST_LOADER); + + content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source); + + web_ui->AddMessageHandler(std::make_unique<ProfileCustomizationHandler>()); +} + +ProfileCustomizationUI::~ProfileCustomizationUI() = default;
diff --git a/chrome/browser/ui/webui/signin/profile_customization_ui.h b/chrome/browser/ui/webui/signin/profile_customization_ui.h new file mode 100644 index 0000000..1316bb18 --- /dev/null +++ b/chrome/browser/ui/webui/signin/profile_customization_ui.h
@@ -0,0 +1,23 @@ +// Copyright 2020 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_SIGNIN_PROFILE_CUSTOMIZATION_UI_H_ +#define CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_CUSTOMIZATION_UI_H_ + +#include "content/public/browser/web_ui_controller.h" + +namespace content { +class WebUI; +} + +class ProfileCustomizationUI : public content::WebUIController { + public: + explicit ProfileCustomizationUI(content::WebUI* web_ui); + ~ProfileCustomizationUI() override; + + ProfileCustomizationUI(const ProfileCustomizationUI&) = delete; + ProfileCustomizationUI& operator=(const ProfileCustomizationUI&) = delete; +}; + +#endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_PROFILE_CUSTOMIZATION_UI_H_
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc index 667082f..d586650 100644 --- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
@@ -380,6 +380,10 @@ SetCurrentStep(Step::kMissingCapability); } +void AuthenticatorRequestDialogModel::OnAuthenticatorMissingLargeBlob() { + SetCurrentStep(Step::kMissingCapability); +} + void AuthenticatorRequestDialogModel::OnNoCommonAlgorithms() { SetCurrentStep(Step::kMissingCapability); }
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.h b/chrome/browser/webauthn/authenticator_request_dialog_model.h index 588e7a8..f23ab63fe 100644 --- a/chrome/browser/webauthn/authenticator_request_dialog_model.h +++ b/chrome/browser/webauthn/authenticator_request_dialog_model.h
@@ -297,6 +297,10 @@ // user verification capability. void OnAuthenticatorMissingUserVerification(); + // To be called when the selected authenticator doesn't have the requested + // large blob capability. + void OnAuthenticatorMissingLargeBlob(); + // To be called when the selected authenticator doesn't support any of the // COSEAlgorithmIdentifiers requested by the RP. void OnNoCommonAlgorithms();
diff --git a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc index cc26114a..fd728ed 100644 --- a/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc +++ b/chrome/browser/webauthn/chrome_authenticator_request_delegate.cc
@@ -254,6 +254,9 @@ case InterestingFailureReason::kAuthenticatorMissingUserVerification: weak_dialog_model_->OnAuthenticatorMissingUserVerification(); break; + case InterestingFailureReason::kAuthenticatorMissingLargeBlob: + weak_dialog_model_->OnAuthenticatorMissingLargeBlob(); + break; case InterestingFailureReason::kNoCommonAlgorithms: weak_dialog_model_->OnNoCommonAlgorithms(); break;
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index b762e601..64f6b9a 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-master-1601596804-53a4ffa238a2dd27e204a4d6f101c3543de8d4a0.profdata +chrome-linux-master-1601639725-a3be427f79e9860129010f71f852fe4dbfd505c5.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index ad3768ed..2067c8e 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-master-1601326576-88be268f41c8e627e3f353defda83bb3fe16d327.profdata +chrome-win32-master-1601451302-334bfff7bf6218115c999c2dee8e0af417339490.profdata
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc index d7234856..b14b8d1 100644 --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc
@@ -344,11 +344,6 @@ const char kChromeUIDiscardsURL[] = "chrome://discards/"; const char kChromeUIHatsHost[] = "hats"; const char kChromeUIHatsURL[] = "chrome://hats/"; -#if !defined(OS_CHROMEOS) -const char kChromeUIProfilePickerHost[] = "profile-picker"; -const char kChromeUIProfilePickerUrl[] = "chrome://profile-picker/"; -const char kChromeUIProfilePickerStartupQuery[] = "startup"; -#endif #endif #if !defined(OS_ANDROID) @@ -369,6 +364,12 @@ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) const char kChromeUIBrowserSwitchHost[] = "browser-switch"; const char kChromeUIBrowserSwitchURL[] = "chrome://browser-switch/"; +const char kChromeUIProfileCustomizationHost[] = "profile-customization"; +const char kChromeUIProfileCustomizationURL[] = + "chrome://profile-customization"; +const char kChromeUIProfilePickerHost[] = "profile-picker"; +const char kChromeUIProfilePickerUrl[] = "chrome://profile-picker/"; +const char kChromeUIProfilePickerStartupQuery[] = "startup"; #endif #if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || \
diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_constants.h index c48e5ebc..fae8f94c 100644 --- a/chrome/common/webui_url_constants.h +++ b/chrome/common/webui_url_constants.h
@@ -297,9 +297,6 @@ extern const char kChromeUIDiscardsURL[]; extern const char kChromeUIHatsHost[]; extern const char kChromeUIHatsURL[]; -extern const char kChromeUIProfilePickerHost[]; -extern const char kChromeUIProfilePickerUrl[]; -extern const char kChromeUIProfilePickerStartupQuery[]; #endif #if !defined(OS_ANDROID) @@ -320,6 +317,11 @@ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) extern const char kChromeUIBrowserSwitchHost[]; extern const char kChromeUIBrowserSwitchURL[]; +extern const char kChromeUIProfileCustomizationHost[]; +extern const char kChromeUIProfileCustomizationURL[]; +extern const char kChromeUIProfilePickerHost[]; +extern const char kChromeUIProfilePickerUrl[]; +extern const char kChromeUIProfilePickerStartupQuery[]; #endif #if ((defined(OS_LINUX) || defined(OS_CHROMEOS)) && defined(TOOLKIT_VIEWS)) || \
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 9771f28..4ebd41b 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2374,6 +2374,8 @@ "../browser/chromeos/file_manager/file_manager_browsertest.cc", "../browser/chromeos/file_manager/file_manager_browsertest_base.cc", "../browser/chromeos/file_manager/file_manager_browsertest_base.h", + "../browser/chromeos/file_manager/browser_test_devtools_listener.cc", + "../browser/chromeos/file_manager/browser_test_devtools_listener.h", "../browser/chromeos/file_manager/file_manager_jstest.cc", "../browser/chromeos/file_manager/file_manager_jstest_base.cc", "../browser/chromeos/file_manager/file_manager_jstest_base.h", @@ -3090,7 +3092,10 @@ "CHROME_VERSION_MAJOR=" + chrome_version_major, ] - sources = [ "../browser/lacros/screen_manager_lacros_browsertest.cc" ] + sources = [ + "../browser/lacros/keystore_service_lacros_browsertest.cc", + "../browser/lacros/screen_manager_lacros_browsertest.cc", + ] deps = [ ":browser_tests_runner", @@ -5634,6 +5639,7 @@ "../browser/ui/cocoa/main_menu_builder_unittest.mm", "../browser/ui/cocoa/notifications/notification_builder_mac_unittest.mm", "../browser/ui/cocoa/notifications/notification_response_builder_mac_unittest.mm", + "../browser/ui/cocoa/notifications/unnotification_builder_mac_unittest.mm", "../browser/ui/cocoa/notifications/unnotification_response_builder_mac_unittest.mm", "../browser/ui/cocoa/nsmenuitem_additions_unittest.mm", "../browser/ui/cocoa/profiles/profile_menu_controller_unittest.mm",
diff --git a/chrome/test/data/translate/english_page.html b/chrome/test/data/translate/english_page.html new file mode 100644 index 0000000..30b0d42 --- /dev/null +++ b/chrome/test/data/translate/english_page.html
@@ -0,0 +1,7 @@ +<html> +<head><title>This page is in English</title></head> +<body> +No joke! This is a page written in English. Awesome don't you think? +It has to be more than 100 bytes long for the CLD to detect the language correctly. +</body> +</html>
diff --git a/chrome/test/data/webui/chromeos/diagnostics/cpu_card_test.js b/chrome/test/data/webui/chromeos/diagnostics/cpu_card_test.js index e887142e..2f6c65f 100644 --- a/chrome/test/data/webui/chromeos/diagnostics/cpu_card_test.js +++ b/chrome/test/data/webui/chromeos/diagnostics/cpu_card_test.js
@@ -59,11 +59,11 @@ return initializeCpuCard(fakeCpuUsage).then(() => { const dataPoints = diagnostics_test_utils.getDataPointElements(cpuElement); - + const currentlyUsingValue = fakeCpuUsage[0].percent_usage_user + + fakeCpuUsage[0].percent_usage_system; + assertEquals(currentlyUsingValue, dataPoints[0].value); assertEquals( - fakeCpuUsage[0].cpu_temp_degrees_celcius, dataPoints[0].value); - assertEquals(fakeCpuUsage[0].percent_usage_user, dataPoints[1].value); - assertEquals(fakeCpuUsage[0].percent_usage_system, dataPoints[2].value); + fakeCpuUsage[0].cpu_temp_degrees_celcius, dataPoints[1].value); }); }); }); \ No newline at end of file
diff --git a/chrome/test/data/webui/chromeos/diagnostics/diagnostics_browsertest.js b/chrome/test/data/webui/chromeos/diagnostics/diagnostics_browsertest.js index 773eb0dd..3dfdecf 100644 --- a/chrome/test/data/webui/chromeos/diagnostics/diagnostics_browsertest.js +++ b/chrome/test/data/webui/chromeos/diagnostics/diagnostics_browsertest.js
@@ -19,7 +19,8 @@ ['BatteryStatusCard', 'diagnostics/battery_status_card_test.js'], ['FakeObservables', 'diagnostics/fake_observables_test.js'], ['FakeMojoInterface', 'diagnostics/mojo_interface_provider_test.js'], - ['FakeMethodProvider', 'diagnostics/fake_method_provider_test.js']] + ['FakeMethodProvider', 'diagnostics/fake_method_provider_test.js'], + ['PercentBarChart', 'diagnostics/percent_bar_chart_test.js']] .forEach(test => registerTest(...test)); function registerTest(testName, module) {
diff --git a/chrome/test/data/webui/chromeos/diagnostics/percent_bar_chart_test.js b/chrome/test/data/webui/chromeos/diagnostics/percent_bar_chart_test.js new file mode 100644 index 0000000..6b4d94d --- /dev/null +++ b/chrome/test/data/webui/chromeos/diagnostics/percent_bar_chart_test.js
@@ -0,0 +1,63 @@ +// Copyright 2020 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. + +// TODO(jimmyxgong): Use es6 module for mojo binding (crbug/1004256). +import 'chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js'; +import 'chrome://diagnostics/percent_bar_chart.js'; + +import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {flushTasks} from 'chrome://test/test_util.m.js'; + + +suite('PercentBarChartTest', () => { + /** @type {?HTMLElement} */ + let percentBarChartElement = null; + + setup(() => { + PolymerTest.clearBody(); + }); + + teardown(() => { + if (percentBarChartElement) { + percentBarChartElement.remove(); + } + percentBarChartElement = null; + }); + + /** + * @param {string} title + * @param {number} value + * @param {number} max + */ + function initializePercentBarChart(title, value, max) { + assertFalse(!!percentBarChartElement); + + // Add the element to the DOM. + percentBarChartElement = document.createElement('percent-bar-chart'); + assertTrue(!!percentBarChartElement); + document.body.appendChild(percentBarChartElement); + percentBarChartElement.title = title; + percentBarChartElement.value = value; + percentBarChartElement.max = max; + return flushTasks(); + } + + test('InitializePercentBarChart', () => { + const title = 'Test title'; + const value = 10; + const max = 30; + const percent = Math.round(100 * value / max); + return initializePercentBarChart(title, value, max).then(() => { + const paperProgress = percentBarChartElement.$$('paper-progress'); + assertEquals(value, paperProgress.value); + assertEquals(max, paperProgress.max); + + assertEquals( + title, percentBarChartElement.$$('#chartName').textContent.trim()); + assertEquals( + `${percent}`, + percentBarChartElement.$$('#percentageLabel').textContent.trim()); + }); + }); +});
diff --git a/chrome/test/data/webui/nearby_share/shared/BUILD.gn b/chrome/test/data/webui/nearby_share/shared/BUILD.gn index 72385b4..e10ef4a8 100644 --- a/chrome/test/data/webui/nearby_share/shared/BUILD.gn +++ b/chrome/test/data/webui/nearby_share/shared/BUILD.gn
@@ -66,7 +66,9 @@ deps = [ ":fake_nearby_share_settings.m", "../..:chai_assert", + "../..:test_util.m", "//chrome/browser/resources/nearby_share/shared:nearby_onboarding_page.m", + "//ui/webui/resources/cr_elements/cr_input:cr_input.m", ] extra_deps = [ ":modulize" ] externs_list = [ "$externs_path/mocha-2.5.js" ]
diff --git a/chrome/test/data/webui/nearby_share/shared/nearby_onboarding_page_test.js b/chrome/test/data/webui/nearby_share/shared/nearby_onboarding_page_test.js index 5a0ece3e..2a145b4 100644 --- a/chrome/test/data/webui/nearby_share/shared/nearby_onboarding_page_test.js +++ b/chrome/test/data/webui/nearby_share/shared/nearby_onboarding_page_test.js
@@ -3,8 +3,14 @@ // found in the LICENSE file. // clang-format off +// #import 'chrome://nearby/strings.m.js'; // #import 'chrome://nearby/shared/nearby_onboarding_page.m.js'; -// #import {assertEquals} from '../../chai_assert.js'; +// #import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; +// #import {setContactManagerForTesting} from 'chrome://nearby/shared/nearby_contact_manager.m.js'; +// #import {setNearbyShareSettingsForTesting} from 'chrome://nearby/shared/nearby_share_settings.m.js'; +// #import {FakeNearbyShareSettings} from './fake_nearby_share_settings.m.js'; +// #import {assertEquals, assertTrue, assertFalse} from '../../chai_assert.js'; +// #import {waitAfterNextRender} from '../../test_util.m.js'; // clang-format on suite('nearby-onboarding-page', function() { @@ -12,8 +18,14 @@ let element; /** @type {!string} */ const deviceName = 'Test\'s Device'; + /** @type {!nearby_share.FakeNearbyShareSettings} */ + let fakeSettings; setup(function() { + fakeSettings = new nearby_share.FakeNearbyShareSettings(); + fakeSettings.setEnabled(true); + nearby_share.setNearbyShareSettingsForTesting(fakeSettings); + document.body.innerHTML = ''; element = /** @type {!NearbyOnboardingPageElement} */ ( @@ -33,4 +45,30 @@ // Verify the device name is shown correctly. assertEquals(deviceName, element.$$('#deviceName').value); }); + + test('validate device name preference', async () => { + loadTimeData.overrideValues({ + 'nearbyShareDeviceNameEmptyError': 'non-empty', + 'nearbyShareDeviceNameTooLongError': 'non-empty', + 'nearbyShareDeviceNameInvalidCharactersError': 'non-empty' + }); + + const input = /** @type {!CrInputElement} */ (element.$$('#deviceName')); + const pageTemplate = element.$$('nearby-page-template'); + + fakeSettings.setNextDeviceNameResult( + nearbyShare.mojom.DeviceNameValidationResult.kErrorEmpty); + input.fire('input'); + // Allow the validation promise to resolve. + await test_util.waitAfterNextRender(/** @type {!HTMLElement} */ (input)); + assertTrue(input.invalid); + assertTrue(pageTemplate.actionDisabled); + + fakeSettings.setNextDeviceNameResult( + nearbyShare.mojom.DeviceNameValidationResult.kValid); + input.fire('input'); + await test_util.waitAfterNextRender(/** @type {!HTMLElement} */ (input)); + assertFalse(input.invalid); + assertFalse(pageTemplate.actionDisabled); + }); });
diff --git a/chrome/test/data/webui/new_tab_page/modules/shopping_tasks/module_test.js b/chrome/test/data/webui/new_tab_page/modules/shopping_tasks/module_test.js index 02f4fbd..e7a7c08bf 100644 --- a/chrome/test/data/webui/new_tab_page/modules/shopping_tasks/module_test.js +++ b/chrome/test/data/webui/new_tab_page/modules/shopping_tasks/module_test.js
@@ -4,6 +4,7 @@ import {shoppingTasksDescriptor, ShoppingTasksHandlerProxy} from 'chrome://new-tab-page/new_tab_page.js'; import {TestBrowserProxy} from 'chrome://test/test_browser_proxy.m.js'; +import {eventToPromise} from 'chrome://test/test_util.m.js'; suite('NewTabPageModulesShoppingTasksModuleTest', () => { /** @@ -102,4 +103,45 @@ assertEquals('https://blub.com/', pills[1].href); assertEquals('blub', pills[1].querySelector('.search-text').innerText); }); + + test('products and pills are hidden when cutoff', async () => { + const repeat = (n, fn) => Array(n).fill(0).map(fn); + testProxy.handler.setResultFor('getPrimaryShoppingTask', Promise.resolve({ + shoppingTask: { + title: 'Hello world', + products: repeat(20, () => ({ + name: 'foo', + imageUrl: {url: 'https://foo.com/img.png'}, + price: '1 gazillion dollars', + info: 'foo info', + targetUrl: {url: 'https://foo.com'}, + })), + relatedSearches: repeat(20, () => ({ + text: 'baz', + targetUrl: {url: 'https://baz.com'}, + })), + } + })); + await shoppingTasksDescriptor.initialize(); + const moduleElement = shoppingTasksDescriptor.element; + document.body.append(moduleElement); + moduleElement.$.productsRepeat.render(); + moduleElement.$.relatedSearchesRepeat.render(); + const getElements = () => Array.from( + moduleElement.shadowRoot.querySelectorAll('.product, .pill')); + assertEquals(40, getElements().length); + const hiddenCount = () => + getElements().filter(el => el.style.visibility === 'hidden').length; + const checkHidden = async (width, count) => { + const waitForVisibilityUpdate = + eventToPromise('visibility-update', moduleElement); + moduleElement.style.width = width; + await waitForVisibilityUpdate; + assertEquals(count, hiddenCount()); + }; + await checkHidden('500px', 31); + await checkHidden('300px', 35); + await checkHidden('700px', 26); + await checkHidden('500px', 31); + }); });
diff --git a/chrome/test/data/webui/settings/chromeos/nearby_share_receive_dialog_tests.js b/chrome/test/data/webui/settings/chromeos/nearby_share_receive_dialog_tests.js index 166eeb230..8d7a692 100644 --- a/chrome/test/data/webui/settings/chromeos/nearby_share_receive_dialog_tests.js +++ b/chrome/test/data/webui/settings/chromeos/nearby_share_receive_dialog_tests.js
@@ -5,9 +5,10 @@ // clang-format off // #import {assertEquals} from '../../chai_assert.js'; // #import {isChildVisible, waitAfterNextRender} from '../../test_util.m.js'; -// #import {setReceiveManagerForTesting, setContactManagerForTesting} from 'chrome://os-settings/chromeos/os_settings.js'; +// #import {setNearbyShareSettingsForTesting, setReceiveManagerForTesting, setContactManagerForTesting} from 'chrome://os-settings/chromeos/os_settings.js'; // #import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; // #import {FakeContactManager} from '../../nearby_share/shared/fake_nearby_contact_manager.m.js'; +// #import {FakeNearbyShareSettings} from '../../nearby_share/shared/fake_nearby_share_settings.m.js'; // #import {FakeReceiveManager} from './fake_receive_manager.m.js' // clang-format on @@ -18,6 +19,8 @@ let fakeReceiveManager; /** @type {!nearby_share.FakeContactManager} */ let fakeContactManager; + /** @type {!nearby_share.FakeNearbyShareSettings} */ + let fakeSettings; /** * This allows both sub-suites to share the same setup logic but with a @@ -27,9 +30,12 @@ function sharedSetup(enabled) { fakeReceiveManager = new nearby_share.FakeReceiveManager(); fakeContactManager = new nearby_share.FakeContactManager(); + fakeSettings = new nearby_share.FakeNearbyShareSettings(); + fakeSettings.setEnabled(true); nearby_share.setReceiveManagerForTesting(fakeReceiveManager); nearby_share.setContactManagerForTesting(fakeContactManager); + nearby_share.setNearbyShareSettingsForTesting(fakeSettings); PolymerTest.clearBody();
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js b/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js index c6e68ad..e60a9b5 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js +++ b/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js
@@ -1129,6 +1129,7 @@ get extraLibraries() { return super.extraLibraries.concat([ '../../nearby_share/shared/fake_nearby_contact_manager.js', + '../../nearby_share/shared/fake_nearby_share_settings.js', '../../test_util.js', '../../test_browser_proxy.js', 'fake_receive_manager.js',
diff --git a/chrome/updater/run_updater_tests.py b/chrome/updater/run_updater_tests.py index b57ce92..f6230e0d2 100644 --- a/chrome/updater/run_updater_tests.py +++ b/chrome/updater/run_updater_tests.py
@@ -12,7 +12,7 @@ def main(): return typ.main( - path=[path_finder.get_integration_tests_dir()], + tests=[path_finder.get_integration_tests_dir()], )
diff --git a/chrome/updater/test/integration_tests.cc b/chrome/updater/test/integration_tests.cc index 60ed9e4..9c8c0fa2 100644 --- a/chrome/updater/test/integration_tests.cc +++ b/chrome/updater/test/integration_tests.cc
@@ -59,8 +59,7 @@ } #if defined(OS_MAC) -// Flaky: https://crbug.com/1131654 -TEST_F(IntegrationTest, DISABLED_RegisterTestApp) { +TEST_F(IntegrationTest, RegisterTestApp) { RegisterTestApp(); ExpectInstalled(); ExpectActiveVersion(UPDATER_VERSION_STRING);
diff --git a/chrome/updater/win/signing/BUILD.gn b/chrome/updater/win/signing/BUILD.gn index 3a4f7ed..5ab91f7d 100644 --- a/chrome/updater/win/signing/BUILD.gn +++ b/chrome/updater/win/signing/BUILD.gn
@@ -4,9 +4,13 @@ copy("signing") { sources = [ + "$root_out_dir/certificate_tag.exe", "//chrome/tools/build/win/resedit.py", + "//third_party/lzma_sdk/7zr.exe", "sign.py", ] - outputs = [ "$root_out_dir/Updater Signing/{{source_file_part}}" ] + deps = [ "//chrome/updater/tools:certificate_tag" ] + + outputs = [ "$root_out_dir/UpdaterSigning/{{source_file_part}}" ] }
diff --git a/chromecast/app/BUILD.gn b/chromecast/app/BUILD.gn index 231b3f31..17c9d1a 100644 --- a/chromecast/app/BUILD.gn +++ b/chromecast/app/BUILD.gn
@@ -6,13 +6,6 @@ import("//testing/test.gni") import("//tools/grit/grit_rule.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - cast_source_set("app") { sources = [ "cast_main_delegate.cc", @@ -44,14 +37,7 @@ } cast_source_set("cast_crash_client") { - sources = [ - "android/cast_crash_reporter_client_android.cc", - "android/cast_crash_reporter_client_android.h", - "android/crash_handler.cc", - "android/crash_handler.h", - "linux/cast_crash_reporter_client.cc", - "linux/cast_crash_reporter_client.h", - ] + sources = [] deps = [ "//base", @@ -67,7 +53,20 @@ ] } + if (is_linux || is_chromeos) { + sources += [ + "linux/cast_crash_reporter_client.cc", + "linux/cast_crash_reporter_client.h", + ] + } + if (is_android) { + sources += [ + "android/cast_crash_reporter_client_android.cc", + "android/cast_crash_reporter_client_android.h", + "android/crash_handler.cc", + "android/crash_handler.h", + ] deps += [ "//chromecast/base:android_create_sys_info", "//chromecast/base:cast_version", @@ -93,7 +92,11 @@ cast_source_set("unittests") { testonly = true - sources = [ "linux/cast_crash_reporter_client_unittest.cc" ] + sources = [] + + if (is_linux || is_chromeos) { + sources += [ "linux/cast_crash_reporter_client_unittest.cc" ] + } deps = [ "//base",
diff --git a/chromecast/base/BUILD.gn b/chromecast/base/BUILD.gn index fe8ebd7..fdc0dd7 100644 --- a/chromecast/base/BUILD.gn +++ b/chromecast/base/BUILD.gn
@@ -10,13 +10,6 @@ import("//build/config/android/rules.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - declare_args() { # Denotes the type of Cast product. This is #defined as CAST_PRODUCT_TYPE in # version.h. See //third_party/metrics_proto/cast_logs.proto for valid values. @@ -49,12 +42,6 @@ sources = [ "alarm_manager.cc", "alarm_manager.h", - "android/cast_settings_manager.cc", - "android/cast_settings_manager.h", - "android/dumpstate_writer.cc", - "android/dumpstate_writer.h", - "android/system_time_change_notifier_android.cc", - "android/system_time_change_notifier_android.h", "bind_to_task_runner.h", "bitstream_audio_codecs.cc", "bitstream_audio_codecs.h", @@ -104,10 +91,6 @@ "//chromecast:chromecast_buildflags", ] - if (is_android) { - deps += [ ":jni_headers" ] - } - if (chromecast_branding == "public") { sources += [ "cast_features_internal.cc" ] } else { @@ -115,7 +98,16 @@ } if (is_android) { - sources += [ "chromecast_config_android.h" ] + sources += [ + "android/cast_settings_manager.cc", + "android/cast_settings_manager.h", + "android/dumpstate_writer.cc", + "android/dumpstate_writer.h", + "android/system_time_change_notifier_android.cc", + "android/system_time_change_notifier_android.h", + "chromecast_config_android.h", + ] + deps += [ ":jni_headers" ] if (chromecast_branding == "public") { sources += [ "chromecast_config_android_dummy.cc" ] } else {
diff --git a/chromecast/crash/BUILD.gn b/chromecast/crash/BUILD.gn index 38a71cb8..5a7237d 100644 --- a/chromecast/crash/BUILD.gn +++ b/chromecast/crash/BUILD.gn
@@ -5,13 +5,6 @@ import("//chromecast/chromecast.gni") import("//testing/test.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - cast_source_set("build_info") { sources = [ "build_info.cc", @@ -70,23 +63,28 @@ sources += [ "cast_crashdump_uploader.cc", "cast_crashdump_uploader.h", - "linux/crash_util.cc", - "linux/crash_util.h", - "linux/dummy_minidump_generator.cc", - "linux/dummy_minidump_generator.h", - "linux/dump_info.cc", - "linux/dump_info.h", - "linux/minidump_generator.h", - "linux/minidump_params.cc", - "linux/minidump_params.h", - "linux/minidump_uploader.cc", - "linux/minidump_uploader.h", - "linux/minidump_writer.cc", - "linux/minidump_writer.h", - "linux/synchronized_minidump_manager.cc", - "linux/synchronized_minidump_manager.h", ] + if (is_linux || is_chromeos) { + sources += [ + "linux/crash_util.cc", + "linux/crash_util.h", + "linux/dummy_minidump_generator.cc", + "linux/dummy_minidump_generator.h", + "linux/dump_info.cc", + "linux/dump_info.h", + "linux/minidump_generator.h", + "linux/minidump_params.cc", + "linux/minidump_params.h", + "linux/minidump_uploader.cc", + "linux/minidump_uploader.h", + "linux/minidump_writer.cc", + "linux/minidump_writer.h", + "linux/synchronized_minidump_manager.cc", + "linux/synchronized_minidump_manager.h", + ] + } + deps += [ ":build_info", "//chromecast/base", @@ -102,7 +100,10 @@ if (!is_fuchsia) { cast_executable("crash_uploader") { - sources = [ "linux/crash_uploader.cc" ] + sources = [] + if (is_linux || is_chromeos) { + sources += [ "linux/crash_uploader.cc" ] + } deps = [ ":crash", @@ -116,10 +117,13 @@ } cast_source_set("test_support") { - sources = [ - "linux/crash_testing_utils.cc", - "linux/crash_testing_utils.h", - ] + sources = [] + if (is_linux || is_chromeos) { + sources += [ + "linux/crash_testing_utils.cc", + "linux/crash_testing_utils.h", + ] + } deps = [ ":crash",
diff --git a/chromeos/components/diagnostics_ui/resources/cpu_card.html b/chromeos/components/diagnostics_ui/resources/cpu_card.html index 8e07f55..fe824c6 100644 --- a/chromeos/components/diagnostics_ui/resources/cpu_card.html +++ b/chromeos/components/diagnostics_ui/resources/cpu_card.html
@@ -5,13 +5,14 @@ <div slot="title"> <div id="cardTitle">[[i18n('cpuTitle')]]</div> </div> + <!-- TODO(michaelcheco): Add i18n string for percent number format --> + <data-point slot="body" id="cpuUsageUser" + value="[[computeCurrentlyUsing_(cpuUsage_.percent_usage_system, + cpuUsage_.percent_usage_user)]]"> + </data-point> + <!-- TODO(michaelcheco): Investigate whether or not temperature can be + localized. --> <data-point slot="body" id="cpuTemp" value="[[cpuUsage_.cpu_temp_degrees_celcius]]"> </data-point> - <data-point slot="body" id="cpuUsageUser" - value="[[cpuUsage_.percent_usage_user]]"> - </data-point> - <data-point slot="body" id="cpuUsageSystem" - value="[[cpuUsage_.percent_usage_system]]"> - </data-point> </diagnostics-card>
diff --git a/chromeos/components/diagnostics_ui/resources/cpu_card.js b/chromeos/components/diagnostics_ui/resources/cpu_card.js index 51e3957..4c6b4bb0 100644 --- a/chromeos/components/diagnostics_ui/resources/cpu_card.js +++ b/chromeos/components/diagnostics_ui/resources/cpu_card.js
@@ -54,4 +54,12 @@ this.cpuUsage_ = cpuUsage; }, + /** + * @param {number} percentUsageSystem + * @param {number} percentUsageUser + * @private + */ + computeCurrentlyUsing_(percentUsageSystem, percentUsageUser) { + return percentUsageSystem + percentUsageUser; + }, });
diff --git a/chromeos/components/telemetry_extension_ui/resources/message_types.js b/chromeos/components/telemetry_extension_ui/resources/message_types.js index b196901..464f372 100644 --- a/chromeos/components/telemetry_extension_ui/resources/message_types.js +++ b/chromeos/components/telemetry_extension_ui/resources/message_types.js
@@ -15,7 +15,7 @@ /** * Enum for message types. - * @enum { string } + * @enum { !string } */ dpsl_internal.Message = { DIAGNOSTICS_AVAILABLE_ROUTINES: 'DiagnosticsService.GetAvailableRoutines',
diff --git a/chromeos/components/telemetry_extension_ui/resources/trusted.js b/chromeos/components/telemetry_extension_ui/resources/trusted.js index 898290c..4e69257 100644 --- a/chromeos/components/telemetry_extension_ui/resources/trusted.js +++ b/chromeos/components/telemetry_extension_ui/resources/trusted.js
@@ -211,7 +211,7 @@ /** * Requests available routines. - * @return { !Promise<dpsl_internal.DiagnosticsGetAvailableRoutinesResponse> } + * @return {!Promise<!dpsl_internal.DiagnosticsGetAvailableRoutinesResponse>} */ async handleGetAvailableRoutines() { const availableRoutines = @@ -305,11 +305,11 @@ /** * Runs a command on a routine. * @param { !Object } message - * @return { !Promise<dpsl_internal.DiagnosticsGetRoutineUpdateResponse> } + * @return { !Promise<!dpsl_internal.DiagnosticsGetRoutineUpdateResponse> } */ async handleGetRoutineUpdate(message) { const request = - /** @type {dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ( + /** @type {!dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ( message); let routine, command; @@ -347,7 +347,7 @@ try { const response = await handler(message); return this.convertRunRoutineResponse(response.response); - } catch (/** @type !Error */ error) { + } catch (/** @type {!Error} */ error) { return error; } }; @@ -841,7 +841,7 @@ /** * Requests telemetry info. - * @param { Object } message + * @param { !Object } message * @return { !Promise<!dpsl_internal.ProbeTelemetryInfoResponse> } */ async handleProbeTelemetryInfo(message) {
diff --git a/chromeos/components/telemetry_extension_ui/resources/untrusted.js b/chromeos/components/telemetry_extension_ui/resources/untrusted.js index 632edc4..694c36bd 100644 --- a/chromeos/components/telemetry_extension_ui/resources/untrusted.js +++ b/chromeos/components/telemetry_extension_ui/resources/untrusted.js
@@ -45,9 +45,9 @@ */ async getAvailableRoutines() { const response = - /** @type {dpsl_internal.DiagnosticsGetAvailableRoutinesResponse} */ ( - await messagePipe.sendMessage( - dpsl_internal.Message.DIAGNOSTICS_AVAILABLE_ROUTINES)); + /** @type {!dpsl_internal.DiagnosticsGetAvailableRoutinesResponse} */ + (await messagePipe.sendMessage( + dpsl_internal.Message.DIAGNOSTICS_AVAILABLE_ROUTINES)); return response; } @@ -61,7 +61,7 @@ */ async sendCommandToRoutine(routineId, command, includeOutput) { const message = - /** @type {dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ({ + /** @type {!dpsl_internal.DiagnosticsGetRoutineUpdateRequest} */ ({ routineId: routineId, command: command, includeOutput: includeOutput,
diff --git a/chromeos/constants/chromeos_switches.cc b/chromeos/constants/chromeos_switches.cc index 1988163..f30c3bfc 100644 --- a/chromeos/constants/chromeos_switches.cc +++ b/chromeos/constants/chromeos_switches.cc
@@ -221,7 +221,8 @@ const char kDisableGaiaServices[] = "disable-gaia-services"; // Disables HID-detection OOBE screen. -const char kDisableHIDDetectionOnOOBE[] = "disable-hid-detection-on-oobe"; +const char kDisableHIDDetectionOnOOBEForTesting[] = + "disable-hid-detection-on-oobe"; // Avoid doing expensive animations upon login. const char kDisableLoginAnimations[] = "disable-login-animations";
diff --git a/chromeos/constants/chromeos_switches.h b/chromeos/constants/chromeos_switches.h index e830b97..a0d2f7f5 100644 --- a/chromeos/constants/chromeos_switches.h +++ b/chromeos/constants/chromeos_switches.h
@@ -84,7 +84,7 @@ extern const char kDisableFineGrainedTimeZoneDetection[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kDisableGaiaServices[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) -extern const char kDisableHIDDetectionOnOOBE[]; +extern const char kDisableHIDDetectionOnOOBEForTesting[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kDisableLoginAnimations[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
diff --git a/chromeos/crosapi/mojom/message_center.mojom b/chromeos/crosapi/mojom/message_center.mojom index e57ac8e..becd21c 100644 --- a/chromeos/crosapi/mojom/message_center.mojom +++ b/chromeos/crosapi/mojom/message_center.mojom
@@ -20,6 +20,11 @@ // Closes a notification by the ID provided in |notification| above. CloseNotification@1(string id); + + // Returns the IDs of the currently-displayed notifications. Order within the + // array is not guaranteed. Mojo does not support sets. + [MinVersion=1] + GetDisplayedNotifications@2() => (array<string> ids); }; // Handles responses to user actions on notifications. Multiple actions may
diff --git a/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl.cc b/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl.cc index e980d0e..638a3c8 100644 --- a/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl.cc +++ b/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl.cc
@@ -101,10 +101,10 @@ void WifiSyncFeatureManagerImpl::SetIsWifiSyncEnabled(bool enabled) { if (GetCurrentState() == CurrentState::kNoVerifiedHost) { - ResetPendingWifiSyncHostNetworkRequest(); PA_LOG(ERROR) << "WifiSyncFeatureManagerImpl::SetIsWifiSyncEnabled: Network request " "not attempted because there is No Verified Host"; + ResetPendingWifiSyncHostNetworkRequest(); return; } @@ -161,7 +161,6 @@ ->GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost) == multidevice::SoftwareFeatureState::kEnabled); - bool pending_enabled = (GetPendingState() == PendingState::kPendingEnable); if (pending_enabled == enabled_on_host) { @@ -224,12 +223,6 @@ device_sync::mojom::NetworkRequestResult result_code) { network_request_in_flight_ = false; - bool has_valid_pending_request = - (GetCurrentState() == CurrentState::kValidPendingRequest); - if (!has_valid_pending_request) { - ResetPendingWifiSyncHostNetworkRequest(); - } - bool success = (result_code == device_sync::mojom::NetworkRequestResult::kSuccess); @@ -242,11 +235,17 @@ if (success) { PA_LOG(VERBOSE) << ss.str(); + PendingState pending_state = GetPendingState(); + if (pending_state == PendingState::kPendingNone) { + return; + } + + bool pending_enabled = (pending_state == PendingState::kPendingEnable); // If the network request was successful but there is still a pending // network request then trigger a network request immediately. This could // happen if there was a second attempt to set the backend while the first // one was still in progress. - if (has_valid_pending_request) { + if (attempted_to_enable != pending_enabled) { AttemptSetWifiSyncHostStateNetworkRequest(false /* is_retry */); } return; @@ -257,7 +256,7 @@ // If the network request failed and there is still a pending network request, // schedule a retry. - if (has_valid_pending_request) { + if (GetCurrentState() == CurrentState::kValidPendingRequest) { timer_->Start(FROM_HERE, base::TimeDelta::FromMinutes(kNumMinutesBetweenRetries), base::BindOnce(&WifiSyncFeatureManagerImpl::
diff --git a/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl_unittest.cc b/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl_unittest.cc index 37b600b..7455f3e 100644 --- a/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl_unittest.cc +++ b/chromeos/services/multidevice_setup/wifi_sync_feature_manager_impl_unittest.cc
@@ -288,12 +288,11 @@ EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), multidevice::SoftwareFeatureState::kSupported); - - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); EXPECT_EQ(0, GetSetHostNetworkRequestCallbackQueueSize()); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), @@ -307,16 +306,45 @@ multidevice::SoftwareFeature::kWifiSyncHost), multidevice::SoftwareFeatureState::kEnabled); - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], false /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); EXPECT_EQ(0, GetSetHostNetworkRequestCallbackQueueSize()); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], false /* enabled */); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), multidevice::SoftwareFeatureState::kSupported); } +TEST_P(MultiDeviceSetupWifiSyncFeatureManagerImplTest, + NewDevicesSyncedBeforeCallback) { + CreateDelegate(test_devices()[0] /* initial_host */); + + // Attempt to enable wifi sync on host device and succeed + EXPECT_FALSE(delegate()->IsWifiSyncEnabled()); + EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( + multidevice::SoftwareFeature::kWifiSyncHost), + multidevice::SoftwareFeatureState::kSupported); + + SetIsWifiSyncEnabled(true); + EXPECT_EQ(1, GetSetHostNetworkRequestCallbackQueueSize()); + EXPECT_TRUE(delegate()->IsWifiSyncEnabled()); + EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( + multidevice::SoftwareFeature::kWifiSyncHost), + multidevice::SoftwareFeatureState::kSupported); + // Triggers OnNewDevicesSynced + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); + // Triggers Success Callback + InvokePendingSetWifiSyncHostNetworkRequestCallback( + device_sync::mojom::NetworkRequestResult::kSuccess, + false /* expected_to_notify_observer_and_start_retry_timer */); + EXPECT_EQ(0, GetSetHostNetworkRequestCallbackQueueSize()); + + EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( + multidevice::SoftwareFeature::kWifiSyncHost), + multidevice::SoftwareFeatureState::kEnabled); +} + TEST_P(MultiDeviceSetupWifiSyncFeatureManagerImplTest, Failure) { CreateDelegate(test_devices()[0] /* initial_host */); @@ -394,10 +422,10 @@ multidevice::SoftwareFeature::kWifiSyncHost), multidevice::SoftwareFeatureState::kSupported); - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); EXPECT_EQ(0, GetSetHostNetworkRequestCallbackQueueSize()); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), @@ -455,10 +483,10 @@ multidevice::SoftwareFeature::kWifiSyncHost), multidevice::SoftwareFeatureState::kSupported); - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); EXPECT_EQ(0, GetSetHostNetworkRequestCallbackQueueSize()); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), @@ -608,10 +636,10 @@ EXPECT_EQ(1, GetSetHostNetworkRequestCallbackQueueSize()); // Successfully enable on host - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], true /* enabled */); EXPECT_FALSE(delegate()->IsWifiSyncEnabled()); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost), @@ -619,10 +647,10 @@ // A new network request should be scheduled to disable EXPECT_EQ(1, GetSetHostNetworkRequestCallbackQueueSize()); - SetWifiSyncHostInDeviceSyncClient(test_devices()[0], false /* enabled */); InvokePendingSetWifiSyncHostNetworkRequestCallback( device_sync::mojom::NetworkRequestResult::kSuccess, false /* expected_to_notify_observer_and_start_retry_timer */); + SetWifiSyncHostInDeviceSyncClient(test_devices()[0], false /* enabled */); EXPECT_FALSE(delegate()->IsWifiSyncEnabled()); EXPECT_EQ(test_devices()[0].GetSoftwareFeatureState( multidevice::SoftwareFeature::kWifiSyncHost),
diff --git a/components/BUILD.gn b/components/BUILD.gn index d0b111b..895703a 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -118,7 +118,6 @@ "//components/openscreen_platform:unittests", "//components/os_crypt:unit_tests", "//components/password_manager/core/browser:unit_tests", - "//components/password_manager/core/common:unit_tests", "//components/payments/core:unit_tests", "//components/policy/core/browser:unit_tests", "//components/policy/core/common:unit_tests", @@ -212,6 +211,7 @@ "//components/autofill/ios/form_util:unit_tests", "//components/image_fetcher/ios:unit_tests", "//components/language/ios/browser:unit_tests", + "//components/password_manager/core/common:unit_tests", "//components/password_manager/ios:unit_tests", "//components/safe_browsing/ios:unit_tests", "//components/security_state/ios:unit_tests",
diff --git a/components/OWNERS b/components/OWNERS index 88ce455f..d3c969d 100644 --- a/components/OWNERS +++ b/components/OWNERS
@@ -37,6 +37,7 @@ per-file security_state_strings.grdp=file://components/security_state/OWNERS per-file send_tab_to_self_strings.grdp=file://components/send_tab_to_self/OWNERS per-file ssl_errors_strings.grdp=file://components/ssl_errors/OWNERS +per-file subresource_filter_strings.grdp=file://components/subresource_filter/OWNERS per-file sync_ui_strings.grdp=file://components/sync/OWNERS per-file tab_groups_strings.grdp=file://components/tab_groups/OWNERS per-file translate_strings.grdp=file://components/translate/OWNERS @@ -58,4 +59,4 @@ # Service sandbox specialization must be reviewed by SECURITY_OWNERS per-file service_sandbox_type.h=set noparent -per-file service_sandbox_type.h=file://ipc/SECURITY_OWNERS \ No newline at end of file +per-file service_sandbox_type.h=file://ipc/SECURITY_OWNERS
diff --git a/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.cc b/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.cc index 7267cfd..11885fc 100644 --- a/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.cc +++ b/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.cc
@@ -10,6 +10,7 @@ #include "base/bind_helpers.h" #include "base/feature_list.h" #include "build/build_config.h" +#include "components/autofill/core/common/autofill_features.h" #include "components/autofill/core/common/autofill_prefs.h" #include "components/prefs/pref_service.h" #include "components/sync/driver/sync_auth_util.h" @@ -19,11 +20,6 @@ namespace { -#if defined(OS_ANDROID) -constexpr base::Feature kWalletRequiresFirstSyncSetupComplete{ - "WalletRequiresFirstSyncSetupComplete", base::FEATURE_ENABLED_BY_DEFAULT}; -#endif - } // namespace namespace browser_sync { @@ -102,7 +98,8 @@ pref_service_->GetBoolean(autofill::prefs::kAutofillCreditCardEnabled) && !sync_service_->GetAuthError().IsPersistentError(); #if defined(OS_ANDROID) - if (base::FeatureList::IsEnabled(kWalletRequiresFirstSyncSetupComplete)) { + if (base::FeatureList::IsEnabled( + autofill::features::kWalletRequiresFirstSyncSetupComplete)) { // On Android, it's also required that the initial Sync setup is complete // (i.e. the user has previously opted in to Sync-the-feature, even if it's // not enabled right now).
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc index 50444cf..7bca3e83 100644 --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc
@@ -335,5 +335,13 @@ "AutofillUseUniqueRendererIDsOnIOS", base::FEATURE_DISABLED_BY_DEFAULT}; #endif +#if defined(OS_ANDROID) +// Controls whether the Wallet (GPay) integration requires first-sync-setup to +// be complete. +// TODO(crbug.com/1134564): Clean up after launch. +const base::Feature kWalletRequiresFirstSyncSetupComplete{ + "WalletRequiresFirstSyncSetupComplete", base::FEATURE_ENABLED_BY_DEFAULT}; +#endif + } // namespace features } // namespace autofill
diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h index 1bbf2397..5115b1de3 100644 --- a/components/autofill/core/common/autofill_features.h +++ b/components/autofill/core/common/autofill_features.h
@@ -97,6 +97,10 @@ extern const base::Feature kAutofillUseUniqueRendererIDsOnIOS; #endif // OS_IOS +#if defined(OS_ANDROID) +extern const base::Feature kWalletRequiresFirstSyncSetupComplete; +#endif + } // namespace features } // namespace autofill
diff --git a/components/autofill/ios/browser/autofill_agent.mm b/components/autofill/ios/browser/autofill_agent.mm index 8c03860..1fcafb9 100644 --- a/components/autofill/ios/browser/autofill_agent.mm +++ b/components/autofill/ios/browser/autofill_agent.mm
@@ -429,6 +429,7 @@ frameID:(NSString*)frameID completionHandler:(SuggestionHandledCompletion)completion { [[UIDevice currentDevice] playInputClick]; + DCHECK(completion); _suggestionHandledCompletion = [completion copy]; if (suggestion.identifier > 0) { @@ -453,6 +454,9 @@ web::WebFrame* frame = web::GetWebFrameWithId(_webState, SysNSStringToUTF8(frameID)); __weak AutofillAgent* weakSelf = self; + SuggestionHandledCompletion suggestionHandledCompletionCopy = + [_suggestionHandledCompletion copy]; + _suggestionHandledCompletion = nil; [_jsAutofillManager clearAutofilledFieldsForFormName:formName formUniqueID:uniqueFormID @@ -465,8 +469,7 @@ return; UpdateFieldManagerForClearedIDs( strongSelf->_fieldDataManager, jsonString); - strongSelf->_suggestionHandledCompletion(); - strongSelf->_suggestionHandledCompletion = nil; + suggestionHandledCompletionCopy(); }]; } else if (suggestion.identifier == @@ -915,6 +918,9 @@ DCHECK(_suggestionHandledCompletion); __weak AutofillAgent* weakSelf = self; + SuggestionHandledCompletion suggestionHandledCompletionCopy = + [_suggestionHandledCompletion copy]; + _suggestionHandledCompletion = nil; [_jsAutofillManager fillActiveFormField:std::move(data) inFrame:frame @@ -926,8 +932,7 @@ strongSelf->_fieldDataManager->UpdateFieldDataWithAutofilledValue( uniqueFieldID, value, kAutofilledOnUserTrigger); } - strongSelf->_suggestionHandledCompletion(); - strongSelf->_suggestionHandledCompletion = nil; + suggestionHandledCompletionCopy(); }]; } @@ -935,12 +940,10 @@ - (void)sendData:(std::unique_ptr<base::Value>)data toFrame:(web::WebFrame*)frame { DCHECK(_webState->IsVisible()); - // It is possible that the fill was not initiated by selecting a suggestion. - // In this case we provide an empty callback. - if (!_suggestionHandledCompletion) - _suggestionHandledCompletion = [^{ - } copy]; __weak AutofillAgent* weakSelf = self; + SuggestionHandledCompletion suggestionHandledCompletionCopy = + [_suggestionHandledCompletion copy]; + _suggestionHandledCompletion = nil; [_jsAutofillManager fillForm:std::move(data) forceFillFieldIdentifier:SysUTF16ToNSString(_pendingAutocompleteField) forceFillFieldUniqueID:_pendingAutocompleteFieldID @@ -951,8 +954,10 @@ return; UpdateFieldManagerWithFillingResults( strongSelf->_fieldDataManager, jsonString); - strongSelf->_suggestionHandledCompletion(); - strongSelf->_suggestionHandledCompletion = nil; + // It is possible that the fill was not initiated by selecting + // a suggestion in this case the callback is nil. + if (suggestionHandledCompletionCopy) + suggestionHandledCompletionCopy(); }]; }
diff --git a/components/components_strings.grd b/components/components_strings.grd index b68a758..faad5e4 100644 --- a/components/components_strings.grd +++ b/components/components_strings.grd
@@ -314,6 +314,7 @@ <part file="send_tab_to_self_strings.grdp" /> <part file="sms_strings.grdp" /> <part file="ssl_errors_strings.grdp" /> + <part file="subresource_filter_strings.grdp" /> <part file="sync_ui_strings.grdp" /> <part file="translate_strings.grdp" /> <part file="tab_groups_strings.grdp" /> @@ -349,6 +350,9 @@ <message name="IDS_OK" desc="Used for OK on buttons"> OK </message> + <message name="IDS_RELOAD" desc="Used for Reload on buttons"> + Reload + </message> <message name="IDS_ADD" desc="Used for Add on buttons"> Add </message>
diff --git a/components/favicon/core/large_icon_service_impl.cc b/components/favicon/core/large_icon_service_impl.cc index 3e5399d..f9c23b9 100644 --- a/components/favicon/core/large_icon_service_impl.cc +++ b/components/favicon/core/large_icon_service_impl.cc
@@ -8,11 +8,9 @@ #include <string> #include "base/bind.h" -#include "base/containers/flat_map.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/ref_counted.h" -#include "base/memory/singleton.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" #include "base/strings/stringprintf.h" @@ -25,7 +23,6 @@ #include "components/favicon_base/favicon_util.h" #include "components/image_fetcher/core/request_metadata.h" #include "net/base/network_change_notifier.h" -#include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "skia/ext/image_operations.h" #include "ui/gfx/codec/png_codec.h" #include "ui/gfx/geometry/size.h" @@ -53,8 +50,6 @@ const int kGoogleServerV2MinimumMaxSizeInPixel = 256; -const int kInvalidOrganizationId = -1; - GURL TrimPageUrlForGoogleServer(const GURL& page_url, bool should_trim_page_url_path) { if (!page_url.SchemeIsHTTPOrHTTPS() || page_url.HostIsIPAddress()) @@ -178,77 +173,6 @@ FROM_HERE, base::BindOnce(std::move(callback), status)); } -// Singleton map keyed by organization-identifying domain (excludes registrar -// portion, e.g. final ".com") and a value that represents an ID for the -// organization. -class DomainToOrganizationIdMap { - public: - // Returns singleton instance. - static const DomainToOrganizationIdMap* GetInstance(); - - // Returns a unique ID representing a known organization, or - // |kInvalidOrganizationId| in case the URL is not known. - int GetCanonicalOrganizationId(const GURL& url) const; - - private: - friend struct base::DefaultSingletonTraits<const DomainToOrganizationIdMap>; - - DomainToOrganizationIdMap(); - ~DomainToOrganizationIdMap(); - - // Helper function to populate the data during construction. - static base::flat_map<std::string, int> BuildData(); - - // Actual data. - const base::flat_map<std::string, int> data_; - - DISALLOW_COPY_AND_ASSIGN(DomainToOrganizationIdMap); -}; - -// static -const DomainToOrganizationIdMap* DomainToOrganizationIdMap::GetInstance() { - return base::Singleton<const DomainToOrganizationIdMap>::get(); -} - -int DomainToOrganizationIdMap::GetCanonicalOrganizationId( - const GURL& url) const { - auto it = data_.find(LargeIconServiceImpl::GetOrganizationNameForUma(url)); - return it == data_.end() ? kInvalidOrganizationId : it->second; -} - -DomainToOrganizationIdMap::DomainToOrganizationIdMap() : data_(BuildData()) {} - -DomainToOrganizationIdMap::~DomainToOrganizationIdMap() {} - -// static -base::flat_map<std::string, int> DomainToOrganizationIdMap::BuildData() { - // Each row in the matrix below represents an organization and lists some - // known domains (not necessarily all), for the purpose of logging UMA - // metrics. The idea is that <pageUrl, iconUrl> pairs should not mix different - // rows (otherwise there is likely a bug). - const std::vector<std::vector<std::string>> kOrganizationTable = { - {"amazon", "ssl-images-amazon"}, - {"cnn"}, - {"espn", "espncdn"}, - {"facebook", "fbcdn"}, - {"google", "gstatic"}, - {"live", "gfx"}, - {"nytimes"}, - {"twitter", "twimg"}, - {"washingtonpost"}, - {"wikipedia"}, - {"yahoo", "yimg"}, - {"youtube"}, - }; - base::flat_map<std::string, int> result; - for (int row = 0; row < static_cast<int>(kOrganizationTable.size()); ++row) { - for (const std::string& organization : kOrganizationTable[row]) { - result[organization] = row + 1; - } - } - return result; -} - // Processes the bitmap data returned from the FaviconService as part of a // LargeIconService request. class LargeIconWorker : public base::RefCountedThreadSafe<LargeIconWorker> { @@ -265,7 +189,6 @@ // ProcessIconOnBackgroundThread() so we do not perform complex image // operations on the UI thread. void OnIconLookupComplete( - const GURL& page_url, const favicon_base::FaviconRawBitmapResult& db_result); private: @@ -277,12 +200,6 @@ // Invoked when ProcessIconOnBackgroundThread() is done. void OnIconProcessingComplete(); - // Logs UMA metrics that reflect suspicious page-URL / icon-URL pairs, because - // we know they shouldn't be hosting their favicons in each other. - void LogSuspiciousURLMismatches( - const GURL& page_url, - const favicon_base::FaviconRawBitmapResult& db_result); - int min_source_size_in_pixel_; int desired_size_in_pixel_; favicon_base::LargeIconCallback raw_bitmap_callback_; @@ -318,9 +235,7 @@ LargeIconWorker::~LargeIconWorker() {} void LargeIconWorker::OnIconLookupComplete( - const GURL& page_url_for_uma, const favicon_base::FaviconRawBitmapResult& db_result) { - LogSuspiciousURLMismatches(page_url_for_uma, db_result); tracker_->PostTaskAndReply( background_task_runner_.get(), FROM_HERE, base::BindOnce(&ProcessIconOnBackgroundThread, db_result, @@ -355,26 +270,6 @@ .Run(favicon_base::LargeIconImageResult(fallback_icon_style_.release())); } -void LargeIconWorker::LogSuspiciousURLMismatches( - const GURL& page_url_for_uma, - const favicon_base::FaviconRawBitmapResult& db_result) { - const int page_organization_id = - DomainToOrganizationIdMap::GetInstance()->GetCanonicalOrganizationId( - page_url_for_uma); - - // Ignore trivial cases. - if (!db_result.is_valid() || page_organization_id == kInvalidOrganizationId) - return; - - const int icon_organization_id = - DomainToOrganizationIdMap::GetInstance()->GetCanonicalOrganizationId( - db_result.icon_url); - const bool mismatch_found = page_organization_id != icon_organization_id && - icon_organization_id != kInvalidOrganizationId; - UMA_HISTOGRAM_BOOLEAN("Favicons.LargeIconService.BlacklistedURLMismatch", - mismatch_found); -} - void ReportDownloadedSize(int size) { UMA_HISTOGRAM_COUNTS_1000("Favicons.LargeIconService.DownloadedSize", size); } @@ -502,9 +397,7 @@ std::max(desired_size_in_pixel, min_source_size_in_pixel); return favicon_service_->GetRawFavicon( icon_url, favicon_base::IconType::kFavicon, max_size_in_pixel, - base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker, - /*page_url_for_uma=*/GURL()), - tracker); + base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker), tracker); } base::CancelableTaskTracker::TaskId @@ -522,9 +415,7 @@ return favicon_service_->GetRawFaviconForPageURL( page_url, {favicon_base::IconType::kFavicon}, desired_size_in_pixel, /*fallback_to_host=*/true, - base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker, - /*page_url_for_uma=*/GURL()), - tracker); + base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker), tracker); } void LargeIconServiceImpl:: @@ -595,25 +486,6 @@ server_url_ = server_url_for_testing; } -// static -std::string LargeIconServiceImpl::GetOrganizationNameForUma(const GURL& url) { - const size_t registry_length = - net::registry_controlled_domains::GetRegistryLength( - url, net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES, - net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); - std::string organization = - net::registry_controlled_domains::GetDomainAndRegistry( - url, net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES); - if (registry_length == 0 || registry_length == std::string::npos || - registry_length >= organization.size()) { - return std::string(); - } - - // Strip final registry as well as the preceding dot. - organization.resize(organization.size() - registry_length - 1); - return organization; -} - base::CancelableTaskTracker::TaskId LargeIconServiceImpl::GetLargeIconOrFallbackStyleImpl( const GURL& page_url, @@ -637,8 +509,7 @@ // URL of a large icon is known but its bitmap is not available. return favicon_service_->GetLargestRawFaviconForPageURL( page_url, large_icon_types_, max_size_in_pixel, - base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker, page_url), - tracker); + base::BindOnce(&LargeIconWorker::OnIconLookupComplete, worker), tracker); } void LargeIconServiceImpl::OnCanSetOnDemandFaviconComplete(
diff --git a/components/favicon/core/large_icon_service_impl.h b/components/favicon/core/large_icon_service_impl.h index 16c62903..5c909ec8 100644 --- a/components/favicon/core/large_icon_service_impl.h +++ b/components/favicon/core/large_icon_service_impl.h
@@ -79,11 +79,6 @@ // testing. void SetServerUrlForTesting(const GURL& server_url_for_testing); - // Extracts the organization-identifying domain from |url| which excludes - // registrar portion (e.g. final ".com"). Used for logging UMA metrics. - // Exposed publicly for testing. - static std::string GetOrganizationNameForUma(const GURL& url); - private: base::CancelableTaskTracker::TaskId GetLargeIconOrFallbackStyleImpl( const GURL& page_url,
diff --git a/components/favicon/core/large_icon_service_impl_unittest.cc b/components/favicon/core/large_icon_service_impl_unittest.cc index 32bfa23..76080801 100644 --- a/components/favicon/core/large_icon_service_impl_unittest.cc +++ b/components/favicon/core/large_icon_service_impl_unittest.cc
@@ -42,7 +42,6 @@ using image_fetcher::MockImageFetcher; using testing::_; -using testing::ElementsAre; using testing::Eq; using testing::HasSubstr; using testing::IsEmpty; @@ -96,14 +95,6 @@ return result; } -favicon_base::FaviconRawBitmapResult CreateTestBitmapResultWithIconUrl( - const GURL& icon_url) { - favicon_base::FaviconRawBitmapResult result = - CreateTestBitmapResult(64, 64, kTestColor); - result.icon_url = icon_url; - return result; -} - bool HasBackgroundColor( const favicon_base::FallbackIconStyle& fallback_icon_style, SkColor color) { @@ -584,96 +575,6 @@ 24, /*expected_count=*/1); } -// Tests UMA metric BlacklistedURLMismatch ignores unknown page URLs. -TEST_P(LargeIconServiceGetterTest, - ShouldNotRecordUrlMismatchesForUnknownPages) { - const std::string kUmaMetricName = - "Favicons.LargeIconService.BlacklistedURLMismatch"; - const GURL kUnknownPageUrl1("http://www.foo.com/path"); - const GURL kUnknownPageUrl2("http://www.bar.com/path"); - const GURL kUnknownPageUrl3("http://com/path"); - const GURL kUnknownIconUrl1("http://www.foo.com/favicon.ico"); - const GURL kUnknownIconUrl2("http://www.bar.com/favicon.ico"); - const GURL kUnknownIconUrl3("http://com/favicon.ico"); - const GURL kKnownIconUrl("http://www.google.com/favicon.ico"); - - // Only URLs in the list of known organizations contribute to the histogram, - // so neither of the sites below should be logged. - InjectMockResult(kUnknownPageUrl1, - CreateTestBitmapResultWithIconUrl(kUnknownIconUrl1)); - InjectMockResult(kUnknownPageUrl3, - CreateTestBitmapResultWithIconUrl(kUnknownIconUrl3)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kUnknownPageUrl1, 1, 0); - GetLargeIconOrFallbackStyleAndWaitForCallback(kUnknownPageUrl3, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), IsEmpty()); - - // Even if there is a mismatch, it's irrelevant if none of the URLs are known. - InjectMockResult(kUnknownPageUrl1, - CreateTestBitmapResultWithIconUrl(kUnknownIconUrl2)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kUnknownPageUrl1, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), IsEmpty()); - - // If a unknown site uses a known icon, it's still ignored. - InjectMockResult(kUnknownPageUrl1, - CreateTestBitmapResultWithIconUrl(kKnownIconUrl)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kUnknownPageUrl1, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), IsEmpty()); -} - -// Tests UMA metric BlacklistedURLMismatch emits records for known page URLs. -TEST_P(LargeIconServiceGetterTest, ShouldRecordUrlMismatchesForKnownPages) { - const std::string kUmaMetricName = - "Favicons.LargeIconService.BlacklistedURLMismatch"; - const GURL kKnownPageUrl1("http://www.google.com/path"); - const GURL kKnownPageUrl2("http://www.youtube.com/path"); - const GURL kKnownIconUrl1("http://www.google.com/favicon.ico"); - const GURL kKnownIconUrl2("http://www.youtube.com/favicon.ico"); - const GURL kUnknownIconUrl("http://www.foo.com/favicon.ico"); - - // Mismatch between a known organization and an unknown one should contribute - // to bucket 0, although we're unsure if it's legit (false positives ok). - InjectMockResult(kKnownPageUrl1, - CreateTestBitmapResultWithIconUrl(kUnknownIconUrl)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kKnownPageUrl1, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), - ElementsAre(base::Bucket(/*min=*/0, /*count=*/1))); - - // Matching pairs within known organizations should contribute to bucket 0. - InjectMockResult(kKnownPageUrl1, - CreateTestBitmapResultWithIconUrl(kKnownIconUrl1)); - InjectMockResult(kKnownPageUrl2, - CreateTestBitmapResultWithIconUrl(kKnownIconUrl2)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kKnownPageUrl1, 1, 0); - GetLargeIconOrFallbackStyleAndWaitForCallback(kKnownPageUrl2, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), - ElementsAre(base::Bucket(/*min=*/0, /*count=*/3))); - - // Mismatch between a known organization and another known one should - // contribute to bucket 1. - InjectMockResult(kKnownPageUrl1, - CreateTestBitmapResultWithIconUrl(kKnownIconUrl2)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kKnownPageUrl1, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), - ElementsAre(base::Bucket(/*min=*/0, /*count=*/3), - base::Bucket(/*min=*/1, /*count=*/1))); -} - -// Tests UMA metric BlacklistedURLMismatch treats different URLs corresponding -// to the same organization as matches. -TEST_P(LargeIconServiceGetterTest, ShouldRecordMatchesDespiteDifferentUrls) { - const std::string kUmaMetricName = - "Favicons.LargeIconService.BlacklistedURLMismatch"; - const GURL kKnownPageUrl("http://www.google.de/path"); - const GURL kKnownIconUrl("http://www.google.com/favicon.ico"); - - // Matching pairs within known organizations should contribute to bucket 0. - InjectMockResult(kKnownPageUrl, - CreateTestBitmapResultWithIconUrl(kKnownIconUrl)); - GetLargeIconOrFallbackStyleAndWaitForCallback(kKnownPageUrl, 1, 0); - EXPECT_THAT(histogram_tester_.GetAllSamples(kUmaMetricName), - ElementsAre(base::Bucket(/*min=*/0, /*count=*/1))); -} - // Every test will appear with suffix /0 (param false) and /1 (param true), e.g. // LargeIconServiceGetterTest.FallbackSinceTooPicky/0: get image. // LargeIconServiceGetterTest.FallbackSinceTooPicky/1: get raw bitmap. @@ -681,22 +582,5 @@ LargeIconServiceGetterTest, ::testing::Values(false, true)); -TEST(LargeIconServiceOrganizationNameTest, ShouldGetOrganizationNameForUma) { - EXPECT_EQ("", LargeIconServiceImpl::GetOrganizationNameForUma(GURL())); - EXPECT_EQ("", - LargeIconServiceImpl::GetOrganizationNameForUma(GURL("http://"))); - EXPECT_EQ("", LargeIconServiceImpl::GetOrganizationNameForUma(GURL("com"))); - EXPECT_EQ( - "", LargeIconServiceImpl::GetOrganizationNameForUma(GURL("http://com"))); - EXPECT_EQ("", LargeIconServiceImpl::GetOrganizationNameForUma( - GURL("http://google"))); - EXPECT_EQ("google", LargeIconServiceImpl::GetOrganizationNameForUma( - GURL("http://google.com"))); - EXPECT_EQ("google", LargeIconServiceImpl::GetOrganizationNameForUma( - GURL("http://google.de"))); - EXPECT_EQ("google", LargeIconServiceImpl::GetOrganizationNameForUma( - GURL("http://foo.google.com"))); -} - } // namespace } // namespace favicon
diff --git a/components/language/core/common/language_experiments.cc b/components/language/core/common/language_experiments.cc index ad4827b..263aa35 100644 --- a/components/language/core/common/language_experiments.cc +++ b/components/language/core/common/language_experiments.cc
@@ -32,6 +32,8 @@ "NotifySyncOnLanguageDetermined", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kDetailedLanguageSettings{ "DetailedLanguageSettings", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kTranslateIntent{"TranslateIntent", + base::FEATURE_DISABLED_BY_DEFAULT}; // Params: const char kBackoffThresholdKey[] = "backoff_threshold";
diff --git a/components/language/core/common/language_experiments.h b/components/language/core/common/language_experiments.h index 283be88..74ed64a 100644 --- a/components/language/core/common/language_experiments.h +++ b/components/language/core/common/language_experiments.h
@@ -39,6 +39,9 @@ // This feature enables setting the application language on Android. extern const base::Feature kDetailedLanguageSettings; +// This feature enables an intent that starts translating the foreground tab. +extern const base::Feature kTranslateIntent; + enum class OverrideLanguageModel { DEFAULT, FLUENT,
diff --git a/components/omnibox/browser/autocomplete_match.cc b/components/omnibox/browser/autocomplete_match.cc index b7a2bf5..58132b9e 100644 --- a/components/omnibox/browser/autocomplete_match.cc +++ b/components/omnibox/browser/autocomplete_match.cc
@@ -28,8 +28,8 @@ #include "components/omnibox/browser/omnibox_pedal.h" #include "components/omnibox/browser/suggestion_answer.h" #include "components/omnibox/common/omnibox_features.h" +#include "components/search_engines/search_engine_utils.h" #include "components/search_engines/template_url.h" -#include "components/search_engines/template_url_prepopulate_data.h" #include "components/search_engines/template_url_service.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "ui/gfx/vector_icon_types.h" @@ -842,7 +842,7 @@ if (template_url) { SearchEngineType search_engine_type = match.destination_url.is_valid() - ? TemplateURLPrepopulateData::GetEngineType(match.destination_url) + ? SearchEngineUtils::GetEngineType(match.destination_url) : SEARCH_ENGINE_OTHER; UMA_HISTOGRAM_ENUMERATION("Omnibox.SearchEngineType", search_engine_type, SEARCH_ENGINE_MAX);
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc index 4e689bc1..bf7c34ae 100644 --- a/components/omnibox/browser/zero_suggest_provider.cc +++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -725,11 +725,10 @@ if (base::Contains(field_trial_variants, kMostVisitedVariant)) return MOST_VISITED; -#if !defined(OS_IOS) - // For Desktop and Android, default to REMOTE_NO_URL on the NTP, if allowed. + // For Desktop, Android, and iOS, default to REMOTE_NO_URL on the NTP, if + // allowed. if (IsNTPPage(current_page_classification) && remote_no_url_allowed) return REMOTE_NO_URL; -#endif #if defined(OS_ANDROID) || defined(OS_IOS) // For Android and iOS, default to MOST_VISITED everywhere except on the SERP.
diff --git a/components/omnibox/browser/zero_suggest_provider_unittest.cc b/components/omnibox/browser/zero_suggest_provider_unittest.cc index f8f0f5b..5c4b2bb 100644 --- a/components/omnibox/browser/zero_suggest_provider_unittest.cc +++ b/components/omnibox/browser/zero_suggest_provider_unittest.cc
@@ -279,7 +279,7 @@ ? ZeroSuggestProvider::ResultType::REMOTE_NO_URL : ZeroSuggestProvider::ResultType::NONE, result_type); -#elif !defined(OS_IOS) // Android +#else // Android and iOS EXPECT_EQ(BaseSearchProvider::IsNTPPage(current_page_classification) && remote_no_url_allowed ? ZeroSuggestProvider::ResultType::REMOTE_NO_URL @@ -288,12 +288,6 @@ ? ZeroSuggestProvider::ResultType::MOST_VISITED : ZeroSuggestProvider::ResultType::NONE, result_type); -#else // iOS - EXPECT_EQ(!BaseSearchProvider::IsSearchResultsPage( - current_page_classification) - ? ZeroSuggestProvider::ResultType::MOST_VISITED - : ZeroSuggestProvider::ResultType::NONE, - result_type); #endif };
diff --git a/components/page_load_metrics/browser/observers/use_counter/ukm_features.cc b/components/page_load_metrics/browser/observers/use_counter/ukm_features.cc index 0103427..3e6b31c5 100644 --- a/components/page_load_metrics/browser/observers/use_counter/ukm_features.cc +++ b/components/page_load_metrics/browser/observers/use_counter/ukm_features.cc
@@ -178,6 +178,11 @@ WebFeature::kAddressSpacePrivateEmbeddedInPublicNonSecureContext, WebFeature::kAddressSpacePrivateEmbeddedInUnknownSecureContext, WebFeature::kAddressSpacePrivateEmbeddedInUnknownNonSecureContext, + WebFeature::kFileSystemPickerMethod, + WebFeature::kV8Window_ShowOpenFilePicker_Method, + WebFeature::kV8Window_ShowSaveFilePicker_Method, + WebFeature::kV8Window_ShowDirectoryPicker_Method, + WebFeature::kV8StorageManager_GetDirectory_Method, })); return *opt_in_features; }
diff --git a/components/password_manager/content/browser/bad_message.cc b/components/password_manager/content/browser/bad_message.cc index 73b6e36..5f876d5 100644 --- a/components/password_manager/content/browser/bad_message.cc +++ b/components/password_manager/content/browser/bad_message.cc
@@ -7,7 +7,7 @@ #include "base/logging.h" #include "base/metrics/histogram_functions.h" #include "base/syslog_logging.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" @@ -55,10 +55,9 @@ return true; } -bool CheckChildProcessSecurityPolicy( - content::RenderFrameHost* frame, - const autofill::PasswordForm& password_form, - BadMessageReason reason) { +bool CheckChildProcessSecurityPolicy(content::RenderFrameHost* frame, + const PasswordForm& password_form, + BadMessageReason reason) { return CheckChildProcessSecurityPolicyForURL(frame, password_form.url, reason) && CheckChildProcessSecurityPolicyForURL( @@ -67,10 +66,9 @@ frame, password_form.form_data.url, reason); } -bool CheckChildProcessSecurityPolicy( - content::RenderFrameHost* frame, - const std::vector<autofill::PasswordForm>& forms, - BadMessageReason reason) { +bool CheckChildProcessSecurityPolicy(content::RenderFrameHost* frame, + const std::vector<PasswordForm>& forms, + BadMessageReason reason) { for (const auto& form : forms) { if (!bad_message::CheckChildProcessSecurityPolicy(frame, form, reason)) return false;
diff --git a/components/password_manager/content/browser/bad_message.h b/components/password_manager/content/browser/bad_message.h index 5d1a692f..8a3c6dd 100644 --- a/components/password_manager/content/browser/bad_message.h +++ b/components/password_manager/content/browser/bad_message.h
@@ -7,10 +7,7 @@ #include <vector> #include "components/autofill/core/common/form_data.h" - -namespace autofill { -struct PasswordForm; -} +#include "components/password_manager/core/browser/password_form_forward.h" namespace content { class RenderFrameHost; @@ -61,17 +58,15 @@ // on |password_form|. If the origin mismatches, the process for |frame| is // terminated and the function returns false. // TODO: Delete this signature after transferring all driver calls to FormData -bool CheckChildProcessSecurityPolicy( - content::RenderFrameHost* frame, - const autofill::PasswordForm& password_form, - BadMessageReason reason); +bool CheckChildProcessSecurityPolicy(content::RenderFrameHost* frame, + const PasswordForm& password_form, + BadMessageReason reason); // Same as above but checks every form in |forms|. // TODO: Delete this signature after transferring all driver calls to FormData -bool CheckChildProcessSecurityPolicy( - content::RenderFrameHost* frame, - const std::vector<autofill::PasswordForm>& forms, - BadMessageReason reason); +bool CheckChildProcessSecurityPolicy(content::RenderFrameHost* frame, + const std::vector<PasswordForm>& forms, + BadMessageReason reason); bool CheckChildProcessSecurityPolicy( content::RenderFrameHost* frame,
diff --git a/components/password_manager/content/browser/content_password_manager_driver.cc b/components/password_manager/content/browser/content_password_manager_driver.cc index 3a015aa..41a3f2b1 100644 --- a/components/password_manager/content/browser/content_password_manager_driver.cc +++ b/components/password_manager/content/browser/content_password_manager_driver.cc
@@ -11,7 +11,6 @@ #include "components/autofill/content/browser/content_autofill_driver.h" #include "components/autofill/core/browser/logging/log_manager.h" #include "components/autofill/core/common/form_data.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/content/browser/bad_message.h" #include "components/password_manager/content/browser/content_password_manager_driver_factory.h" #include "components/password_manager/core/browser/password_manager.h"
diff --git a/components/password_manager/content/browser/content_password_manager_driver_factory.cc b/components/password_manager/content/browser/content_password_manager_driver_factory.cc index 1d309b2..e49c1ea 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_factory.cc +++ b/components/password_manager/content/browser/content_password_manager_driver_factory.cc
@@ -12,7 +12,6 @@ #include "components/autofill/content/browser/content_autofill_driver.h" #include "components/autofill/content/browser/content_autofill_driver_factory.h" #include "components/autofill/core/common/form_data.h" -#include "components/autofill/core/common/password_form.h" #include "components/password_manager/content/browser/content_password_manager_driver.h" #include "components/password_manager/content/browser/form_submission_tracker_util.h" #include "components/password_manager/core/browser/password_manager_client.h"
diff --git a/components/password_manager/content/browser/content_password_manager_driver_unittest.cc b/components/password_manager/content/browser/content_password_manager_driver_unittest.cc index 66ca88b..18b697f 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_unittest.cc +++ b/components/password_manager/content/browser/content_password_manager_driver_unittest.cc
@@ -29,7 +29,6 @@ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" using autofill::ParsingResult; -using autofill::PasswordForm; using autofill::PasswordFormFillData; using base::ASCIIToUTF16; using testing::_;
diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn index e3a66b10..173b882d1 100644 --- a/components/password_manager/core/browser/BUILD.gn +++ b/components/password_manager/core/browser/BUILD.gn
@@ -79,6 +79,8 @@ "credential_manager_pending_prevent_silent_access_task.h", "credential_manager_pending_request_task.cc", "credential_manager_pending_request_task.h", + "credential_manager_utils.cc", + "credential_manager_utils.h", "credentials_cleaner.cc", "credentials_cleaner.h", "credentials_cleaner_runner.cc", @@ -211,6 +213,8 @@ "site_affiliation/affiliation_service_impl.h", "site_affiliation/asset_link_data.cc", "site_affiliation/asset_link_data.h", + "site_affiliation/hash_affiliation_fetcher.cc", + "site_affiliation/hash_affiliation_fetcher.h", "sql_table_builder.cc", "sql_table_builder.h", "statistics_table.cc", @@ -598,6 +602,7 @@ "credential_manager_password_form_manager_unittest.cc", "credential_manager_pending_prevent_silent_access_task_unittest.cc", "credential_manager_pending_request_task_unittest.cc", + "credential_manager_utils_unittest.cc", "credentials_cleaner_runner_unittest.cc", "credentials_cleaner_unittest.cc", "export/csv_writer_unittest.cc", @@ -648,6 +653,7 @@ "psl_matching_helper_unittest.cc", "site_affiliation/affiliation_service_impl_unittest.cc", "site_affiliation/asset_link_data_unittest.cc", + "site_affiliation/hash_affiliation_fetcher_unittest.cc", "sql_table_builder_unittest.cc", "statistics_table_unittest.cc", "store_metrics_reporter_unittest.cc",
diff --git a/components/password_manager/core/browser/credential_manager_impl.cc b/components/password_manager/core/browser/credential_manager_impl.cc index aa5957b..8c0af636 100644 --- a/components/password_manager/core/browser/credential_manager_impl.cc +++ b/components/password_manager/core/browser/credential_manager_impl.cc
@@ -10,6 +10,8 @@ #include "base/bind.h" #include "base/metrics/user_metrics.h" #include "components/password_manager/core/browser/credential_manager_logger.h" +#include "components/password_manager/core/browser/credential_manager_pending_request_task.h" +#include "components/password_manager/core/browser/credential_manager_utils.h" #include "components/password_manager/core/browser/form_fetcher_impl.h" #include "components/password_manager/core/browser/form_saver.h" #include "components/password_manager/core/browser/password_manager_util.h" @@ -197,11 +199,7 @@ const PasswordForm* form) { CredentialInfo info; if (form) { - password_manager::CredentialType type_to_return = - form->federation_origin.opaque() - ? CredentialType::CREDENTIAL_TYPE_PASSWORD - : CredentialType::CREDENTIAL_TYPE_FEDERATED; - info = CredentialInfo(*form, type_to_return); + info = PasswordFormToCredentialInfo(*form); PasswordStore* store = form->IsUsingAccountStore() ? GetAccountPasswordStore() : GetProfilePasswordStore();
diff --git a/components/password_manager/core/browser/credential_manager_impl_unittest.cc b/components/password_manager/core/browser/credential_manager_impl_unittest.cc index 70540be1..06078d1 100644 --- a/components/password_manager/core/browser/credential_manager_impl_unittest.cc +++ b/components/password_manager/core/browser/credential_manager_impl_unittest.cc
@@ -22,6 +22,8 @@ #include "base/test/task_environment.h" #include "build/build_config.h" #include "components/password_manager/core/browser/android_affiliation/mock_affiliated_match_helper.h" +#include "components/password_manager/core/browser/credential_manager_pending_request_task.h" +#include "components/password_manager/core/browser/credential_manager_utils.h" #include "components/password_manager/core/browser/leak_detection/leak_detection_check.h" #include "components/password_manager/core/browser/leak_detection/leak_detection_check_factory.h" #include "components/password_manager/core/browser/leak_detection/mock_leak_detection_check_factory.h" @@ -410,7 +412,7 @@ } TEST_P(CredentialManagerImplTest, CredentialManagerOnStore) { - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)) .Times(testing::Exactly(1)); EXPECT_CALL(*client_, NotifyStorePasswordCalled()); @@ -445,7 +447,7 @@ form_.federation_origin = url::Origin::Create(GURL("https://google.com/")); form_.password_value = base::string16(); form_.signon_realm = "federation://example.com/google.com"; - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(form_); CallStore(info, base::BindOnce(&RespondCallback, &called)); // Allow the PasswordFormManager to talk to the password store, determine @@ -476,7 +478,7 @@ federated.federation_origin = url::Origin::Create(GURL("https://google.com/")); federated.signon_realm = "federation://example.com/google.com"; - CredentialInfo info(federated, CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(federated); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)); EXPECT_CALL(*client_, NotifyStorePasswordCalled()); @@ -513,7 +515,7 @@ // Calling 'Store' with a credential that matches |form_| should update // the password without prompting the user. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); info.password = base::ASCIIToUTF16("Totally new password."); info.name = base::ASCIIToUTF16("New Name"); info.icon = GURL("https://example.com/icon.png"); @@ -551,7 +553,7 @@ // Calling 'Store' with a new credential that is a PSL match for an existing // credential with identical username and password should result in a silent // save without prompting the user. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)) .Times(testing::Exactly(0)); EXPECT_CALL(*client_, NotifyStorePasswordCalled()); @@ -578,7 +580,7 @@ // Calling 'Store' with a new credential that is a PSL match for an existing // credential but has a different username should prompt the user and not // result in a silent save. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)) .Times(testing::Exactly(1)); EXPECT_CALL(*client_, NotifyStorePasswordCalled()); @@ -610,7 +612,7 @@ // Calling 'Store' with a new credential that is a PSL match for an existing // credential but has a different password should prompt the user and not // result in a silent save. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)) .Times(testing::Exactly(1)); EXPECT_CALL(*client_, NotifyStorePasswordCalled()); @@ -638,7 +640,7 @@ // Calling 'Store' with a credential that matches |form_| should update // the credential without prompting the user. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; EXPECT_CALL(*client_, NotifyStorePasswordCalled()); CallStore(info, base::BindOnce(&RespondCallback, &called)); @@ -663,7 +665,7 @@ // Calling 'Store' with a credential that matches |form_| should update // the credential without prompting the user. - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; EXPECT_CALL(*client_, NotifyStorePasswordCalled()); CallStore(info, base::BindOnce(&RespondCallback, &called)); @@ -712,7 +714,7 @@ TEST_P(CredentialManagerImplTest, CredentialManagerSignInWithSavingDisabledForCurrentPage) { - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); EXPECT_CALL(*client_, IsSavingAndFillingEnabled(form_.url)) .WillRepeatedly(testing::Return(false)); EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)) @@ -1650,7 +1652,7 @@ TEST_P(CredentialManagerImplTest, BlockedPasswordCredential) { EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)); - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; CallStore(info, base::BindOnce(&RespondCallback, &called)); // Allow the PasswordFormManager to talk to the password store @@ -1678,7 +1680,7 @@ form_.signon_realm = "federation://example.com/example.com"; EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)); - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; CallStore(info, base::BindOnce(&RespondCallback, &called)); // Allow the PasswordFormManager to talk to the password store @@ -1709,7 +1711,7 @@ blocked_form.signon_realm = blocked_form.url.spec(); store_->AddLogin(blocked_form); - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_PASSWORD); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)); CallStore(info, base::BindOnce(&RespondCallback, &called)); @@ -1730,7 +1732,7 @@ form_.federation_origin = url::Origin::Create(GURL("https://example.com/")); form_.password_value = base::string16(); form_.signon_realm = "federation://example.com/example.com"; - CredentialInfo info(form_, CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(form_); bool called = false; EXPECT_CALL(*client_, PromptUserToSavePasswordPtr(_)); CallStore(info, base::BindOnce(&RespondCallback, &called)); @@ -1783,8 +1785,7 @@ form_.federation_origin = url::Origin::Create(GURL("https://example.com/")); form_.password_value = base::string16(); form_.signon_realm = "federation://example.com/example.com"; - CallStore({form_, CredentialType::CREDENTIAL_TYPE_FEDERATED}, - base::DoNothing()); + CallStore(PasswordFormToCredentialInfo(form_), base::DoNothing()); RunAllPendingTasks(); } @@ -1802,8 +1803,7 @@ Start(form_.url, form_.username_value, form_.password_value)); EXPECT_CALL(*weak_factory, TryCreateLeakCheck) .WillOnce(testing::Return(testing::ByMove(std::move(check_instance)))); - CallStore({form_, CredentialType::CREDENTIAL_TYPE_PASSWORD}, - base::DoNothing()); + CallStore(PasswordFormToCredentialInfo(form_), base::DoNothing()); RunAllPendingTasks(); }
diff --git a/components/password_manager/core/browser/credential_manager_pending_request_task.cc b/components/password_manager/core/browser/credential_manager_pending_request_task.cc index 22dc475..dc9a51e 100644 --- a/components/password_manager/core/browser/credential_manager_pending_request_task.cc +++ b/components/password_manager/core/browser/credential_manager_pending_request_task.cc
@@ -17,6 +17,7 @@ #include "base/metrics/user_metrics.h" #include "base/stl_util.h" #include "components/password_manager/core/browser/android_affiliation/affiliated_match_helper.h" +#include "components/password_manager/core/browser/credential_manager_utils.h" #include "components/password_manager/core/browser/password_bubble_experiment.h" #include "components/password_manager/core/browser/password_form.h" #include "components/password_manager/core/browser/password_manager_client.h" @@ -241,10 +242,7 @@ if (can_use_autosignin && !local_results[0]->skip_zero_click && !password_bubble_experiment::ShouldShowAutoSignInPromptFirstRunExperience( delegate_->client()->GetPrefs())) { - CredentialInfo info(*local_results[0], - local_results[0]->federation_origin.opaque() - ? CredentialType::CREDENTIAL_TYPE_PASSWORD - : CredentialType::CREDENTIAL_TYPE_FEDERATED); + auto info = PasswordFormToCredentialInfo(*local_results[0]); delegate_->client()->NotifyUserAutoSignin(std::move(local_results), origin_); base::RecordAction(base::UserMetricsAction("CredentialManager_Autosignin"));
diff --git a/components/password_manager/core/browser/credential_manager_utils.cc b/components/password_manager/core/browser/credential_manager_utils.cc new file mode 100644 index 0000000..b121266 --- /dev/null +++ b/components/password_manager/core/browser/credential_manager_utils.cc
@@ -0,0 +1,50 @@ +// Copyright 2020 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/password_manager/core/browser/credential_manager_utils.h" + +#include <memory> + +#include "base/optional.h" +#include "base/strings/string16.h" +#include "components/password_manager/core/browser/password_form.h" +#include "components/password_manager/core/common/credential_manager_types.h" +#include "url/gurl.h" +#include "url/origin.h" + +namespace password_manager { + +std::unique_ptr<PasswordForm> CreatePasswordFormFromCredentialInfo( + const CredentialInfo& info, + const url::Origin& origin) { + std::unique_ptr<PasswordForm> form; + if (info.type == CredentialType::CREDENTIAL_TYPE_EMPTY) + return form; + + form = std::make_unique<PasswordForm>(); + form->icon_url = info.icon; + form->display_name = info.name.value_or(base::string16()); + form->federation_origin = info.federation; + form->url = origin.GetURL(); + form->password_value = info.password.value_or(base::string16()); + form->username_value = info.id.value_or(base::string16()); + form->scheme = PasswordForm::Scheme::kHtml; + form->type = PasswordForm::Type::kApi; + + form->signon_realm = + info.type == CredentialType::CREDENTIAL_TYPE_PASSWORD + ? form->url.spec() + : "federation://" + origin.host() + "/" + info.federation.host(); + return form; +} + +CredentialInfo PasswordFormToCredentialInfo(const PasswordForm& form) { + return CredentialInfo(form.federation_origin.opaque() + ? CredentialType::CREDENTIAL_TYPE_PASSWORD + : CredentialType::CREDENTIAL_TYPE_FEDERATED, + form.username_value, form.display_name, form.icon_url, + form.password_value, form.federation_origin); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/credential_manager_utils.h b/components/password_manager/core/browser/credential_manager_utils.h new file mode 100644 index 0000000..ceef61f --- /dev/null +++ b/components/password_manager/core/browser/credential_manager_utils.h
@@ -0,0 +1,32 @@ +// Copyright 2020 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_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_UTILS_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_UTILS_H_ + +#include <memory> + +#include "components/password_manager/core/browser/password_form_forward.h" + +namespace url { +class Origin; +} // namespace url + +namespace password_manager { + +struct CredentialInfo; + +// Create a new PasswordForm object based on |info|, valid in the +// context of |origin|. Returns an empty std::unique_ptr for +// CREDENTIAL_TYPE_EMPTY. +std::unique_ptr<PasswordForm> CreatePasswordFormFromCredentialInfo( + const CredentialInfo& info, + const url::Origin& origin); + +// Creates a CredentialInfo object from `form`. +CredentialInfo PasswordFormToCredentialInfo(const PasswordForm& form); + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_CREDENTIAL_MANAGER_UTILS_H_
diff --git a/components/password_manager/core/common/credential_manager_types_unittest.cc b/components/password_manager/core/browser/credential_manager_utils_unittest.cc similarity index 67% rename from components/password_manager/core/common/credential_manager_types_unittest.cc rename to components/password_manager/core/browser/credential_manager_utils_unittest.cc index 169faef..a772aef 100644 --- a/components/password_manager/core/common/credential_manager_types_unittest.cc +++ b/components/password_manager/core/browser/credential_manager_utils_unittest.cc
@@ -1,43 +1,41 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. +// Copyright 2020 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/password_manager/core/common/credential_manager_types.h" +#include "components/password_manager/core/browser/credential_manager_utils.h" + +#include <memory> #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" -#include "components/autofill/core/common/password_form.h" +#include "components/password_manager/core/browser/password_form.h" +#include "components/password_manager/core/common/credential_manager_types.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" #include "url/origin.h" namespace password_manager { -class CredentialManagerTypesTest : public testing::Test { - public: - CredentialManagerTypesTest() - : origin_(url::Origin::Create(GURL("https://example.test/"))), - icon_(GURL("https://fast-cdn.test/icon.png")), - federation_(url::Origin::Create(GURL("https://federation.test/"))) {} - +class CredentialManagerUtilsTest : public testing::Test { protected: - url::Origin origin_; - GURL icon_; - url::Origin federation_; + url::Origin origin_{url::Origin::Create(GURL("https://example.test/"))}; + GURL icon_{"https://fast-cdn.test/icon.png"}; + url::Origin federation_{ + url::Origin::Create(GURL("https://federation.test/"))}; }; -TEST_F(CredentialManagerTypesTest, CreatePasswordFormEmpty) { +TEST_F(CredentialManagerUtilsTest, CreatePasswordFormEmpty) { CredentialInfo info; - std::unique_ptr<autofill::PasswordForm> form; + std::unique_ptr<PasswordForm> form; // Empty CredentialInfo -> nullptr. form = CreatePasswordFormFromCredentialInfo(info, origin_); EXPECT_EQ(nullptr, form.get()); } -TEST_F(CredentialManagerTypesTest, CreatePasswordFormFederation) { +TEST_F(CredentialManagerUtilsTest, CreatePasswordFormFederation) { CredentialInfo info; - std::unique_ptr<autofill::PasswordForm> form; + std::unique_ptr<PasswordForm> form; info.id = base::ASCIIToUTF16("id"); info.name = base::ASCIIToUTF16("name"); @@ -48,11 +46,11 @@ form = CreatePasswordFormFromCredentialInfo(info, origin_); ASSERT_NE(nullptr, form.get()); - EXPECT_EQ(autofill::PasswordForm::Type::kApi, form->type); + EXPECT_EQ(PasswordForm::Type::kApi, form->type); EXPECT_EQ(info.icon, form->icon_url); EXPECT_EQ(info.name, form->display_name); EXPECT_EQ(origin_.GetURL(), form->url); - EXPECT_EQ(autofill::PasswordForm::Scheme::kHtml, form->scheme); + EXPECT_EQ(PasswordForm::Scheme::kHtml, form->scheme); // Federated credentials have empty passwords, non-empty federation_origins, // and funky signon realms. @@ -61,9 +59,9 @@ EXPECT_EQ("federation://example.test/federation.test", form->signon_realm); } -TEST_F(CredentialManagerTypesTest, CreatePasswordFormLocal) { +TEST_F(CredentialManagerUtilsTest, CreatePasswordFormLocal) { CredentialInfo info; - std::unique_ptr<autofill::PasswordForm> form; + std::unique_ptr<PasswordForm> form; info.id = base::ASCIIToUTF16("id"); info.name = base::ASCIIToUTF16("name"); @@ -77,7 +75,7 @@ EXPECT_EQ(info.icon, form->icon_url); EXPECT_EQ(info.name, form->display_name); EXPECT_EQ(origin_.GetURL().spec(), form->url); - EXPECT_EQ(autofill::PasswordForm::Scheme::kHtml, form->scheme); + EXPECT_EQ(PasswordForm::Scheme::kHtml, form->scheme); // Local credentials have empty federation_origins, non-empty passwords, and // a signon realm that matches the origin.
diff --git a/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.cc b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.cc new file mode 100644 index 0000000..4352c4412 --- /dev/null +++ b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.cc
@@ -0,0 +1,41 @@ +// Copyright 2020 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/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.h" + +#include <memory> + +#include "components/password_manager/core/browser/android_affiliation/affiliation_utils.h" +#include "google_apis/google_api_keys.h" +#include "net/base/url_util.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "url/gurl.h" + +namespace password_manager { + +HashAffiliationFetcher::HashAffiliationFetcher( + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, + AffiliationFetcherDelegate* delegate) + : AffiliationFetcherBase(std::move(url_loader_factory), delegate) {} + +HashAffiliationFetcher::~HashAffiliationFetcher() = default; + +// TODO: Add an implementation. +void HashAffiliationFetcher::StartRequest( + const std::vector<FacetURI>& facet_uris, + RequestInfo request_info) {} + +const std::vector<FacetURI>& HashAffiliationFetcher::GetRequestedFacetURIs() + const { + return requested_facet_uris_; +} +// static +GURL HashAffiliationFetcher::BuildQueryURL() { + return net::AppendQueryParameter( + GURL("https://www.googleapis.com/affiliation/v1/" + "affiliation:lookupByHashPrefix"), + "key", google_apis::GetAPIKey()); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.h b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.h new file mode 100644 index 0000000..1539395 --- /dev/null +++ b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.h
@@ -0,0 +1,38 @@ +// Copyright 2020 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_PASSWORD_MANAGER_CORE_BROWSER_SITE_AFFILIATION_HASH_AFFILIATION_FETCHER_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_SITE_AFFILIATION_HASH_AFFILIATION_FETCHER_H_ + +#include "components/password_manager/core/browser/site_affiliation/affiliation_fetcher_base.h" + +namespace password_manager { + +// Fetches authoritative information about facets' affiliations with additional +// privacy layer. It uses SHA-256 to hash facet URLs and sends only a specified +// amount of hash prefixes to eventually retrieve a larger group of affiliations +// including those actually required. +class HashAffiliationFetcher : public AffiliationFetcherBase { + public: + HashAffiliationFetcher( + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, + AffiliationFetcherDelegate* delegate); + ~HashAffiliationFetcher() override; + + void StartRequest(const std::vector<FacetURI>& facet_uris, + RequestInfo request_info) override; + + // AffiliationFetcherInterface + const std::vector<FacetURI>& GetRequestedFacetURIs() const override; + + // Builds the URL for the Affiliation API's lookup method. + static GURL BuildQueryURL(); + + private: + std::vector<FacetURI> requested_facet_uris_; +}; + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_SITE_AFFILIATION_HASH_AFFILIATION_FETCHER_H_
diff --git a/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher_unittest.cc b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher_unittest.cc new file mode 100644 index 0000000..7d5171c --- /dev/null +++ b/components/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher_unittest.cc
@@ -0,0 +1,37 @@ +// Copyright 2020 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/password_manager/core/browser/site_affiliation/hash_affiliation_fetcher.h" + +#include "components/password_manager/core/browser/android_affiliation/mock_affiliation_fetcher_delegate.h" +#include "net/base/url_util.h" +#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" +#include "services/network/test/test_url_loader_factory.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "url/gurl.h" + +namespace password_manager { + +class HashAffiliationFetcherTest : public testing::Test { + public: + HashAffiliationFetcherTest() = default; + ~HashAffiliationFetcherTest() override = default; +}; + +TEST_F(HashAffiliationFetcherTest, BuildQueryURL) { + network::TestURLLoaderFactory test_url_loader_factory; + scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory = + base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( + &test_url_loader_factory); + MockAffiliationFetcherDelegate mock_delegate; + + HashAffiliationFetcher fetcher(test_shared_loader_factory, &mock_delegate); + GURL query_url = fetcher.BuildQueryURL(); + + EXPECT_EQ("https", query_url.scheme()); + EXPECT_EQ("www.googleapis.com", query_url.host()); + EXPECT_EQ("/affiliation/v1/affiliation:lookupByHashPrefix", query_url.path()); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/common/BUILD.gn b/components/password_manager/core/common/BUILD.gn index 62282fc..f636d815 100644 --- a/components/password_manager/core/common/BUILD.gn +++ b/components/password_manager/core/common/BUILD.gn
@@ -28,21 +28,19 @@ ] } -source_set("unit_tests") { - testonly = true - sources = [ "credential_manager_types_unittest.cc" ] +if (is_ios) { + source_set("unit_tests") { + testonly = true + sources = [ "passwords_directory_util_ios_unittest.cc" ] - if (is_ios) { - sources += [ "passwords_directory_util_ios_unittest.cc" ] + deps = [ + ":common", + "//base", + "//base/test:test_support", + "//components/autofill/core/common", + "//sql", + "//testing/gtest", + "//url", + ] } - - deps = [ - ":common", - "//base", - "//base/test:test_support", - "//components/autofill/core/common", - "//sql", - "//testing/gtest", - "//url", - ] }
diff --git a/components/password_manager/core/common/credential_manager_types.cc b/components/password_manager/core/common/credential_manager_types.cc index ff5a5da..dd7f47b 100644 --- a/components/password_manager/core/common/credential_manager_types.cc +++ b/components/password_manager/core/common/credential_manager_types.cc
@@ -7,7 +7,6 @@ #include <memory> #include "base/strings/string_number_conversions.h" -#include "components/autofill/core/common/password_form.h" namespace password_manager { @@ -31,15 +30,19 @@ CredentialInfo::CredentialInfo() : type(CredentialType::CREDENTIAL_TYPE_EMPTY) { } -CredentialInfo::CredentialInfo(const autofill::PasswordForm& form, - CredentialType form_type) - : type(form_type), - id(form.username_value), - name(form.display_name), - icon(form.icon_url), - password(form.password_value), - federation(form.federation_origin) { - switch (form_type) { +CredentialInfo::CredentialInfo(CredentialType type, + base::Optional<base::string16> id, + base::Optional<base::string16> name, + GURL icon, + base::Optional<base::string16> password, + url::Origin federation) + : type(type), + id(std::move(id)), + name(std::move(name)), + icon(std::move(icon)), + password(std::move(password)), + federation(std::move(federation)) { + switch (type) { case CredentialType::CREDENTIAL_TYPE_EMPTY: password = base::string16(); federation = url::Origin(); @@ -63,28 +66,4 @@ federation.Serialize() == rhs.federation.Serialize()); } -std::unique_ptr<autofill::PasswordForm> CreatePasswordFormFromCredentialInfo( - const CredentialInfo& info, - const url::Origin& origin) { - std::unique_ptr<autofill::PasswordForm> form; - if (info.type == CredentialType::CREDENTIAL_TYPE_EMPTY) - return form; - - form = std::make_unique<autofill::PasswordForm>(); - form->icon_url = info.icon; - form->display_name = info.name.value_or(base::string16()); - form->federation_origin = info.federation; - form->url = origin.GetURL(); - form->password_value = info.password.value_or(base::string16()); - form->username_value = info.id.value_or(base::string16()); - form->scheme = autofill::PasswordForm::Scheme::kHtml; - form->type = autofill::PasswordForm::Type::kApi; - - form->signon_realm = - info.type == CredentialType::CREDENTIAL_TYPE_PASSWORD - ? form->url.spec() - : "federation://" + origin.host() + "/" + info.federation.host(); - return form; -} - } // namespace password_manager
diff --git a/components/password_manager/core/common/credential_manager_types.h b/components/password_manager/core/common/credential_manager_types.h index b4fd4e9..3887e35d 100644 --- a/components/password_manager/core/common/credential_manager_types.h +++ b/components/password_manager/core/common/credential_manager_types.h
@@ -17,10 +17,6 @@ #include "url/gurl.h" #include "url/origin.h" -namespace autofill { -struct PasswordForm; -} - namespace password_manager { // Limit the size of the federations array that we pass to the browser to @@ -48,7 +44,13 @@ struct CredentialInfo { CredentialInfo(); - CredentialInfo(const autofill::PasswordForm& form, CredentialType form_type); + CredentialInfo(CredentialType type, + base::Optional<base::string16> id, + base::Optional<base::string16> name, + GURL icon, + base::Optional<base::string16> password, + url::Origin federation); + CredentialInfo(const CredentialInfo& other); ~CredentialInfo(); @@ -75,13 +77,6 @@ url::Origin federation; }; -// Create a new autofill::PasswordForm object based on |info|, valid in the -// context of |origin|. Returns an empty std::unique_ptr for -// CREDENTIAL_TYPE_EMPTY. -std::unique_ptr<autofill::PasswordForm> CreatePasswordFormFromCredentialInfo( - const CredentialInfo& info, - const url::Origin& origin); - } // namespace password_manager #endif // COMPONENTS_PASSWORD_MANAGER_CORE_COMMON_CREDENTIAL_MANAGER_TYPES_H_
diff --git a/components/password_manager/ios/password_form_helper_unittest.mm b/components/password_manager/ios/password_form_helper_unittest.mm index 956f721..c52f823 100644 --- a/components/password_manager/ios/password_form_helper_unittest.mm +++ b/components/password_manager/ios/password_form_helper_unittest.mm
@@ -32,7 +32,6 @@ using autofill::FieldRendererId; using autofill::FormData; using autofill::FormRendererId; -using autofill::PasswordForm; using autofill::PasswordFormFillData; using base::test::ios::kWaitForJSCompletionTimeout; using base::test::ios::WaitUntilConditionOrTimeout;
diff --git a/components/password_manager/ios/shared_password_controller.mm b/components/password_manager/ios/shared_password_controller.mm index d973e40..c077077 100644 --- a/components/password_manager/ios/shared_password_controller.mm +++ b/components/password_manager/ios/shared_password_controller.mm
@@ -22,7 +22,6 @@ #include "components/autofill/core/browser/ui/popup_item_ids.h" #include "components/autofill/core/common/autofill_features.h" #include "components/autofill/core/common/form_data.h" -#include "components/autofill/core/common/password_form.h" #include "components/autofill/core/common/password_form_fill_data.h" #include "components/autofill/core/common/password_form_generation_data.h" #include "components/autofill/core/common/renderer_id.h" @@ -56,7 +55,6 @@ using autofill::FormActivityObserverBridge; using autofill::FormData; using autofill::PasswordFormGenerationData; -using autofill::PasswordForm; using autofill::FormRendererId; using autofill::FieldRendererId; using base::SysNSStringToUTF16;
diff --git a/components/performance_manager/BUILD.gn b/components/performance_manager/BUILD.gn index c368f26..0f2b767 100644 --- a/components/performance_manager/BUILD.gn +++ b/components/performance_manager/BUILD.gn
@@ -133,8 +133,12 @@ "service_worker_context_adapter.h", "tab_helper_frame_node_source.cc", "tab_helper_frame_node_source.h", + "v8_memory/v8_context_tracker.cc", + "v8_memory/v8_context_tracker.h", "v8_memory/v8_context_tracker_helpers.cc", "v8_memory/v8_context_tracker_helpers.h", + "v8_memory/v8_context_tracker_internal.cc", + "v8_memory/v8_context_tracker_internal.h", "v8_memory/v8_context_tracker_types.cc", "v8_memory/v8_context_tracker_types.h", "v8_memory/v8_per_frame_memory_decorator.cc", @@ -228,6 +232,7 @@ "performance_manager_unittest.cc", "registered_objects_unittest.cc", "v8_memory/v8_context_tracker_helpers_unittest.cc", + "v8_memory/v8_context_tracker_internal_unittest.cc", "v8_memory/v8_per_frame_memory_decorator_unittest.cc", "web_contents_proxy_unittest.cc", "worker_watcher_unittest.cc",
diff --git a/components/performance_manager/execution_context/execution_context_registry_impl.cc b/components/performance_manager/execution_context/execution_context_registry_impl.cc index d3e2a70..0225fc5b 100644 --- a/components/performance_manager/execution_context/execution_context_registry_impl.cc +++ b/components/performance_manager/execution_context/execution_context_registry_impl.cc
@@ -93,6 +93,12 @@ observers_.AddObserver(observer); } +bool ExecutionContextRegistryImpl::HasObserver( + ExecutionContextObserver* observer) const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + return observers_.HasObserver(observer); +} + void ExecutionContextRegistryImpl::RemoveObserver( ExecutionContextObserver* observer) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/components/performance_manager/execution_context/execution_context_registry_impl.h b/components/performance_manager/execution_context/execution_context_registry_impl.h index 838877d..bd61f73d 100644 --- a/components/performance_manager/execution_context/execution_context_registry_impl.h +++ b/components/performance_manager/execution_context/execution_context_registry_impl.h
@@ -38,6 +38,7 @@ // ExecutionContextRegistry implementation: void AddObserver(ExecutionContextObserver* observer) override; + bool HasObserver(ExecutionContextObserver* observer) const override; void RemoveObserver(ExecutionContextObserver* observer) override; const ExecutionContext* GetExecutionContextByToken( const blink::ExecutionContextToken& token) override;
diff --git a/components/performance_manager/execution_context/execution_context_registry_impl_unittest.cc b/components/performance_manager/execution_context/execution_context_registry_impl_unittest.cc index 1dcb9f1..bd13581 100644 --- a/components/performance_manager/execution_context/execution_context_registry_impl_unittest.cc +++ b/components/performance_manager/execution_context/execution_context_registry_impl_unittest.cc
@@ -72,7 +72,9 @@ // Create an observer. MockExecutionContextObserver obs; + EXPECT_FALSE(registry_->HasObserver(&obs)); registry_->AddObserver(&obs); + EXPECT_TRUE(registry_->HasObserver(&obs)); // Create some mock nodes. This creates a graph with 1 page containing 2 // frames in 1 process.
diff --git a/components/performance_manager/public/execution_context/execution_context_registry.h b/components/performance_manager/public/execution_context/execution_context_registry.h index a92bb9e..faae92c 100644 --- a/components/performance_manager/public/execution_context/execution_context_registry.h +++ b/components/performance_manager/public/execution_context/execution_context_registry.h
@@ -37,6 +37,9 @@ // the registry is torn down. virtual void AddObserver(ExecutionContextObserver* observer) = 0; + // Determines if an observer is in the registry. + virtual bool HasObserver(ExecutionContextObserver* observer) const = 0; + // Removes an observer from the registry. virtual void RemoveObserver(ExecutionContextObserver* observer) = 0;
diff --git a/components/performance_manager/service_worker_context_adapter.cc b/components/performance_manager/service_worker_context_adapter.cc index 154fff74..05ba743 100644 --- a/components/performance_manager/service_worker_context_adapter.cc +++ b/components/performance_manager/service_worker_context_adapter.cc
@@ -5,6 +5,7 @@ #include "components/performance_manager/service_worker_context_adapter.h" #include "base/check_op.h" +#include "base/debug/dump_without_crashing.h" #include "base/notreached.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host_observer.h" @@ -276,7 +277,7 @@ bool inserted = service_worker_clients_[version_id].insert(client_uuid).second; if (!inserted) { - NOTREACHED(); + base::debug::DumpWithoutCrashing(); return; } @@ -291,13 +292,13 @@ // notification is dropped. auto it = service_worker_clients_.find(version_id); if (it == service_worker_clients_.end()) { - NOTREACHED(); + base::debug::DumpWithoutCrashing(); return; } size_t removed = it->second.erase(client_uuid); if (!removed) { - NOTREACHED(); + base::debug::DumpWithoutCrashing(); return; } @@ -324,12 +325,12 @@ // not already a client of |version_id|. auto it = service_worker_clients_.find(version_id); if (it == service_worker_clients_.end()) { - NOTREACHED(); + base::debug::DumpWithoutCrashing(); return; } if (it->second.find(client_uuid) == it->second.end()) { - NOTREACHED(); + base::debug::DumpWithoutCrashing(); return; }
diff --git a/components/performance_manager/v8_memory/v8_context_tracker.cc b/components/performance_manager/v8_memory/v8_context_tracker.cc new file mode 100644 index 0000000..26aae898 --- /dev/null +++ b/components/performance_manager/v8_memory/v8_context_tracker.cc
@@ -0,0 +1,122 @@ +// Copyright 2020 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/performance_manager/v8_memory/v8_context_tracker.h" + +#include "base/values.h" +#include "components/performance_manager/public/execution_context/execution_context_registry.h" +#include "components/performance_manager/public/graph/node_data_describer_registry.h" +#include "components/performance_manager/v8_memory/v8_context_tracker_internal.h" + +namespace performance_manager { +namespace v8_memory { + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextTracker::ExecutionContextState implementation: + +V8ContextTracker::ExecutionContextState::ExecutionContextState( + const blink::ExecutionContextToken& token, + const base::Optional<IframeAttributionData>& iframe_attribution_data) + : token(token), iframe_attribution_data(iframe_attribution_data) {} + +V8ContextTracker::ExecutionContextState::~ExecutionContextState() = default; + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextTracker::V8ContextState implementation: + +V8ContextTracker::V8ContextState::V8ContextState( + const V8ContextDescription& description, + ExecutionContextState* execution_context_state) + : description(description), + execution_context_state(execution_context_state) {} + +V8ContextTracker::V8ContextState::~V8ContextState() = default; + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextTracker implementation: + +V8ContextTracker::V8ContextTracker() + : data_store_(std::make_unique<DataStore>()) {} + +V8ContextTracker::~V8ContextTracker() = default; + +void V8ContextTracker::OnBeforeExecutionContextRemoved( + const execution_context::ExecutionContext* ec) { + DCHECK_ON_GRAPH_SEQUENCE(ec->GetGraph()); + // TODO(chrisha): Implement me. +} + +void V8ContextTracker::OnBeforeGraphDestroyed(Graph* graph) { + DCHECK_ON_GRAPH_SEQUENCE(graph); + // Remove ourselves from the execution context registry observer list here as + // it may get torn down before our OnTakenFromGraph is called. This is also + // called from "OnTakenFromGraph", so it is resistant to the + // ExecutionContextRegistry no longer existing. + auto* registry = + execution_context::ExecutionContextRegistry::GetFromGraph(graph); + if (registry && registry->HasObserver(this)) + registry->RemoveObserver(this); +} + +void V8ContextTracker::OnPassedToGraph(Graph* graph) { + DCHECK_ON_GRAPH_SEQUENCE(graph); + + graph->AddGraphObserver(this); + graph->AddProcessNodeObserver(this); + graph->RegisterObject(this); + graph->GetNodeDataDescriberRegistry()->RegisterDescriber(this, + "V8ContextTracker"); + auto* registry = + execution_context::ExecutionContextRegistry::GetFromGraph(graph); + // We expect the registry to exist before we are passed to the graph. + DCHECK(registry); + registry->AddObserver(this); +} + +void V8ContextTracker::OnTakenFromGraph(Graph* graph) { + DCHECK_ON_GRAPH_SEQUENCE(graph); + + // Call OnBeforeGraphDestroyed as well. This unregisters us from the + // ExecutionContextRegistry in case we're being removed from the graph + // prior to its destruction. + OnBeforeGraphDestroyed(graph); + + graph->GetNodeDataDescriberRegistry()->UnregisterDescriber(this); + graph->UnregisterObject(this); + graph->RemoveProcessNodeObserver(this); + graph->RemoveGraphObserver(this); +} + +base::Value V8ContextTracker::DescribeFrameNodeData( + const FrameNode* node) const { + DCHECK_ON_GRAPH_SEQUENCE(node->GetGraph()); + base::Value dict(base::Value::Type::DICTIONARY); + // TODO(chrisha): Implement me. + return dict; +} + +base::Value V8ContextTracker::DescribeProcessNodeData( + const ProcessNode* node) const { + DCHECK_ON_GRAPH_SEQUENCE(node->GetGraph()); + base::Value dict(base::Value::Type::DICTIONARY); + // TODO(chrisha): Implement me. + return dict; +} + +base::Value V8ContextTracker::DescribeWorkerNodeData( + const WorkerNode* node) const { + DCHECK_ON_GRAPH_SEQUENCE(node->GetGraph()); + base::Value dict(base::Value::Type::DICTIONARY); + // TODO(chrisha): Implement me. + return dict; +} + +void V8ContextTracker::OnBeforeProcessNodeRemoved(const ProcessNode* node) { + DCHECK_ON_GRAPH_SEQUENCE(node->GetGraph()); + // TODO(chrisha): Implement me by deleting all knowledge of execution contexts + // and v8 contexts in this process! +} + +} // namespace v8_memory +} // namespace performance_manager
diff --git a/components/performance_manager/v8_memory/v8_context_tracker.h b/components/performance_manager/v8_memory/v8_context_tracker.h new file mode 100644 index 0000000..3a3113a --- /dev/null +++ b/components/performance_manager/v8_memory/v8_context_tracker.h
@@ -0,0 +1,148 @@ +// Copyright 2020 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_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_H_ +#define COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_H_ + +#include <memory> + +#include "base/optional.h" +#include "components/performance_manager/public/execution_context/execution_context.h" +#include "components/performance_manager/public/graph/graph.h" +#include "components/performance_manager/public/graph/graph_registered.h" +#include "components/performance_manager/public/graph/node_data_describer.h" +#include "components/performance_manager/public/graph/process_node.h" +#include "components/performance_manager/v8_memory/v8_context_tracker_types.h" +#include "third_party/blink/public/common/tokens/tokens.h" + +namespace performance_manager { +namespace v8_memory { + +// Forward declaration. +namespace internal { +class V8ContextTrackerDataStore; +} // namespace internal + +// A class that tracks individual V8Contexts in renderers as they go through +// their lifecycle. This tracks information such as detached (leaked) contexts +// and remote frame attribution, for surfacing in the performance.measureMemory +// API. This information is tracked per-process in ProcessNode-attached data. +// The tracker lets you query a V8ContextToken and retrieve information about +// that context, including its iframe attributes and associated +// ExecutionContext. +// +// Note that this component relies on the ExecutionContextRegistry having been +// added to the Graph. +class V8ContextTracker + : public execution_context::ExecutionContextObserverDefaultImpl, + public GraphObserver, + public GraphOwned, + public GraphRegisteredImpl<V8ContextTracker>, + public NodeDataDescriberDefaultImpl, + public ProcessNode::ObserverDefaultImpl { + public: + using DataStore = internal::V8ContextTrackerDataStore; + + // Data about an individual ExecutionContext. Note that this information can + // outlive the ExecutionContext itself, and in that case it stores information + // about the last known state of the ExecutionContext prior to it being + // torn down in a renderer. + struct ExecutionContextState { + ExecutionContextState() = delete; + ExecutionContextState( + const blink::ExecutionContextToken& token, + const base::Optional<IframeAttributionData>& iframe_attribution_data); + ExecutionContextState(const ExecutionContextState&) = delete; + ExecutionContextState& operator=(const ExecutionContextState&) = delete; + virtual ~ExecutionContextState(); + + // Returns the associated execution_context::ExecutionContext (which wraps + // the underlying FrameNode or WorkerNode associated with this context) *if* + // the node is available. + const execution_context::ExecutionContext* GetExecutionContext() const; + + // The token identifying this context. + const blink::ExecutionContextToken token; + + // The iframe attribution data most recently associated with this context. + // This is sometimes only available asynchronously so is optional. Note that + // this value can change over time, but will generally reflect the most up + // to date data (with some lag). + base::Optional<IframeAttributionData> iframe_attribution_data; + + // Whether or not the corresponding blink::ExecutionContext has been + // destroyed. This occurs when the main V8Context associated with this + // execution context has itself become detached. This starts as false and + // can transition to true exactly once. + bool destroyed = false; + }; + + struct V8ContextState { + V8ContextState() = delete; + V8ContextState(const V8ContextDescription& description, + ExecutionContextState* execution_context_state); + V8ContextState(const V8ContextState&) = delete; + V8ContextState& operator=(const V8ContextState&) = delete; + virtual ~V8ContextState(); + + // The full description of this context. + const V8ContextDescription description; + + // A pointer to the upstream ExecutionContextState that this V8Context is + // associated with. Note that this can be nullptr for V8Contexts that are + // not associated with an ExecutionContext. + ExecutionContextState* const execution_context_state; + + // Whether or not this context is detached. A context becomes detached + // when the blink::ExecutionContext it was associated with is torn down. + // When a V8Context remains detached for a long time (is not collected by + // GC) it is effectively a leak (it is being kept alive by a stray + // cross-context reference). This starts as false and can transition to + // true exactly once. + bool detached = false; + }; + + V8ContextTracker(); + ~V8ContextTracker() final; + + DataStore* data_store() const { return data_store_.get(); } + + // Returns the ExecutionContextState for the given token, nullptr if none + // exists. + const ExecutionContextState* GetExecutionContextState( + const blink::ExecutionContextToken& token) const; + + // Returns V8ContextState for the given token, nullptr if none exists. + const V8ContextState* GetV8ContextState( + const blink::V8ContextToken& token) const; + + private: + // Implementation of execution_context::ExecutionContextObserverDefaultImpl. + void OnBeforeExecutionContextRemoved( + const execution_context::ExecutionContext* ec) final; + + // Implementation of GraphObserver. + void OnBeforeGraphDestroyed(Graph* graph) final; + + // Implementation of GraphOwned. + void OnPassedToGraph(Graph* graph) final; + void OnTakenFromGraph(Graph* graph) final; + + // Implementation of NodeDataDescriber. We have things to say about + // execution contexts (frames and workers), as well as processes. + base::Value DescribeFrameNodeData(const FrameNode* node) const final; + base::Value DescribeProcessNodeData(const ProcessNode* node) const final; + base::Value DescribeWorkerNodeData(const WorkerNode* node) const final; + + // Implementation of ProcessNode::ObserverDefaultImpl. + void OnBeforeProcessNodeRemoved(const ProcessNode* node) final; + + // Stores Chrome-wide data store used by the tracking. + std::unique_ptr<DataStore> data_store_; +}; + +} // namespace v8_memory +} // namespace performance_manager + +#endif // COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_H_
diff --git a/components/performance_manager/v8_memory/v8_context_tracker_internal.cc b/components/performance_manager/v8_memory/v8_context_tracker_internal.cc new file mode 100644 index 0000000..7c61b04 --- /dev/null +++ b/components/performance_manager/v8_memory/v8_context_tracker_internal.cc
@@ -0,0 +1,311 @@ +// Copyright 2020 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/performance_manager/v8_memory/v8_context_tracker_internal.h" + +#include "base/check.h" + +namespace performance_manager { +namespace v8_memory { +namespace internal { + +//////////////////////////////////////////////////////////////////////////////// +// ExecutionContextData implementation: + +ExecutionContextData::ExecutionContextData( + ProcessData* process_data, + const blink::ExecutionContextToken& token, + const base::Optional<IframeAttributionData> iframe_attribution_data) + : ExecutionContextState(token, iframe_attribution_data), + process_data_(process_data) {} + +ExecutionContextData::~ExecutionContextData() { + DCHECK(!IsTracked()); + DCHECK(ShouldDestroy()); +} + +bool ExecutionContextData::IsTracked() const { + return previous() || next(); +} + +bool ExecutionContextData::ShouldDestroy() const { + return v8_context_count_ == 0 && !remote_frame_data_; +} + +void ExecutionContextData::SetRemoteFrameData( + util::PassKey<RemoteFrameData>, + RemoteFrameData* remote_frame_data) { + DCHECK(!remote_frame_data_); + DCHECK(remote_frame_data); + remote_frame_data_ = remote_frame_data; +} + +bool ExecutionContextData::ClearRemoteFrameData( + util::PassKey<RemoteFrameData>) { + DCHECK(remote_frame_data_); + remote_frame_data_ = nullptr; + return ShouldDestroy(); +} + +void ExecutionContextData::IncrementV8ContextCount( + util::PassKey<V8ContextData>) { + ++v8_context_count_; +} + +bool ExecutionContextData::DecrementV8ContextCount( + util::PassKey<V8ContextData>) { + DCHECK_LT(0u, v8_context_count_); + --v8_context_count_; + return ShouldDestroy(); +} + +//////////////////////////////////////////////////////////////////////////////// +// RemoteFrameData implementation: + +RemoteFrameData::RemoteFrameData(ProcessData* process_data, + const blink::RemoteFrameToken& token, + ExecutionContextData* execution_context_data) + : process_data_(process_data), + token_(token), + execution_context_data_(execution_context_data) { + DCHECK(process_data); + DCHECK(execution_context_data); + // This and the ExecutionContext *must* be cross-process. + DCHECK_NE(process_data, execution_context_data->process_data()); + execution_context_data->SetRemoteFrameData(PassKey(), this); +} + +RemoteFrameData::~RemoteFrameData() { + DCHECK(!IsTracked()); + + // If this is the last reference keeping alive a tracked ExecutionContextData, + // then clean it up as well. Untracked ExecutionContextDatas will go out of + // scope on their own. + if (execution_context_data_->ClearRemoteFrameData(PassKey()) && + execution_context_data_->IsTracked()) { + process_data_->data_store()->Destroy(execution_context_data_->GetToken()); + } +} + +bool RemoteFrameData::IsTracked() const { + return previous() || next(); +} + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextData implementation: + +V8ContextData::V8ContextData(ProcessData* process_data, + const V8ContextDescription& description, + ExecutionContextData* execution_context_data) + : V8ContextState(description, execution_context_data), + process_data_(process_data) { + DCHECK(process_data); + if (execution_context_data) { + // These must be same process. + DCHECK_EQ(process_data, execution_context_data->process_data()); + execution_context_data->IncrementV8ContextCount(PassKey()); + } +} + +V8ContextData::~V8ContextData() { + DCHECK(!IsTracked()); + + // If this is the last reference keeping alive a tracked ExecutionContextData, + // then clean it up as well. Untracked ExecutionContextDatas will go out of + // scope on their own. + if (auto* ecd = GetExecutionContextData()) { + if (ecd->DecrementV8ContextCount(PassKey()) && ecd->IsTracked()) + process_data_->data_store()->Destroy(ecd->GetToken()); + } +} + +bool V8ContextData::IsTracked() const { + return previous() || next(); +} + +ExecutionContextData* V8ContextData::GetExecutionContextData() const { + return static_cast<ExecutionContextData*>(execution_context_state); +} + +//////////////////////////////////////////////////////////////////////////////// +// ProcessData implementation: + +ProcessData::ProcessData(const ProcessNodeImpl* process_node) + : data_store_(GetDataStore(process_node)) {} + +ProcessData::~ProcessData() { + DCHECK(execution_context_datas_.empty()); + DCHECK(remote_frame_datas_.empty()); + DCHECK(v8_context_datas_.empty()); +} + +void ProcessData::TearDown() { + // First, remove any RemoteFrameData references owned by this ProcessData + // that are keeping alive ExecutionContextDatas in other ProcessDatas. This + // can cause ExecutionContextDatas to be torn down. + while (!remote_frame_datas_.empty()) { + auto* node = remote_frame_datas_.head(); + data_store_->Destroy(node->value()->GetToken()); + } + + // Drain the list of V8ContextTokens. This will also indirectly clean up and + // ExecutionContextDatas that are only being kept alive by V8ContextData + // references. + while (!v8_context_datas_.empty()) { + auto* node = v8_context_datas_.head(); + data_store_->Destroy(node->value()->GetToken()); + } + + // Any ExecutionContextDatas still alive are only being kept alive because of + // RemoteFrameData references from another ProcessData. Clean those up. + while (!execution_context_datas_.empty()) { + auto* node = execution_context_datas_.head(); + auto* ec_data = node->value(); + auto* rfd = ec_data->remote_frame_data(); + DCHECK(rfd); + DCHECK_EQ(0u, ec_data->v8_context_count()); + data_store_->Destroy(rfd->GetToken()); + } + + // We now expect everything to have been cleaned up. + DCHECK(execution_context_datas_.empty()); + DCHECK(remote_frame_datas_.empty()); + DCHECK(v8_context_datas_.empty()); +} + +void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>, + ExecutionContextData* ec_data) { + DCHECK(ec_data); + DCHECK_EQ(this, ec_data->process_data()); + DCHECK(!ec_data->ShouldDestroy()); + DCHECK(!ec_data->IsTracked()); + execution_context_datas_.Append(ec_data); +} + +void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>, + RemoteFrameData* rf_data) { + DCHECK(rf_data); + DCHECK_EQ(this, rf_data->process_data()); + DCHECK(!rf_data->IsTracked()); + remote_frame_datas_.Append(rf_data); +} + +void ProcessData::Add(util::PassKey<V8ContextTrackerDataStore>, + V8ContextData* v8_data) { + DCHECK(v8_data); + DCHECK_EQ(this, v8_data->process_data()); + DCHECK(!v8_data->IsTracked()); + v8_context_datas_.Append(v8_data); +} + +void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>, + ExecutionContextData* ec_data) { + DCHECK(ec_data); + DCHECK_EQ(this, ec_data->process_data()); + DCHECK(ec_data->IsTracked()); + DCHECK(ec_data->ShouldDestroy()); + ec_data->RemoveFromList(); +} + +void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>, + RemoteFrameData* rf_data) { + DCHECK(rf_data); + DCHECK_EQ(this, rf_data->process_data()); + DCHECK(rf_data->IsTracked()); + rf_data->RemoveFromList(); +} + +void ProcessData::Remove(util::PassKey<V8ContextTrackerDataStore>, + V8ContextData* v8_data) { + DCHECK(v8_data); + DCHECK_EQ(this, v8_data->process_data()); + DCHECK(v8_data->IsTracked()); + v8_data->RemoveFromList(); +} + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextTrackerDataStore implementation: + +V8ContextTrackerDataStore::V8ContextTrackerDataStore() = default; + +V8ContextTrackerDataStore::~V8ContextTrackerDataStore() { + DCHECK(global_execution_context_datas_.empty()); + DCHECK(global_remote_frame_datas_.empty()); + DCHECK(global_v8_context_datas_.empty()); +} + +void V8ContextTrackerDataStore::Pass( + std::unique_ptr<ExecutionContextData> ec_data) { + DCHECK(ec_data.get()); + ec_data->process_data()->Add(PassKey(), ec_data.get()); + auto result = global_execution_context_datas_.insert(std::move(ec_data)); + DCHECK(result.second); +} + +void V8ContextTrackerDataStore::Pass(std::unique_ptr<RemoteFrameData> rf_data) { + DCHECK(rf_data.get()); + rf_data->process_data()->Add(PassKey(), rf_data.get()); + auto result = global_remote_frame_datas_.insert(std::move(rf_data)); + DCHECK(result.second); +} + +void V8ContextTrackerDataStore::Pass(std::unique_ptr<V8ContextData> v8_data) { + DCHECK(v8_data.get()); + v8_data->process_data()->Add(PassKey(), v8_data.get()); + auto result = global_v8_context_datas_.insert(std::move(v8_data)); + DCHECK(result.second); +} + +ExecutionContextData* V8ContextTrackerDataStore::Get( + const blink::ExecutionContextToken& token) { + auto it = global_execution_context_datas_.find(token); + if (it == global_execution_context_datas_.end()) + return nullptr; + return it->get(); +} + +RemoteFrameData* V8ContextTrackerDataStore::Get( + const blink::RemoteFrameToken& token) { + auto it = global_remote_frame_datas_.find(token); + if (it == global_remote_frame_datas_.end()) + return nullptr; + return it->get(); +} + +V8ContextData* V8ContextTrackerDataStore::Get( + const blink::V8ContextToken& token) { + auto it = global_v8_context_datas_.find(token); + if (it == global_v8_context_datas_.end()) + return nullptr; + return it->get(); +} + +void V8ContextTrackerDataStore::Destroy( + const blink::ExecutionContextToken& token) { + auto it = global_execution_context_datas_.find(token); + DCHECK(it != global_execution_context_datas_.end()); + auto* ec_data = it->get(); + ec_data->process_data()->Remove(PassKey(), ec_data); + global_execution_context_datas_.erase(it); +} + +void V8ContextTrackerDataStore::Destroy(const blink::RemoteFrameToken& token) { + auto it = global_remote_frame_datas_.find(token); + DCHECK(it != global_remote_frame_datas_.end()); + auto* rf_data = it->get(); + rf_data->process_data()->Remove(PassKey(), rf_data); + global_remote_frame_datas_.erase(it); +} + +void V8ContextTrackerDataStore::Destroy(const blink::V8ContextToken& token) { + auto it = global_v8_context_datas_.find(token); + DCHECK(it != global_v8_context_datas_.end()); + auto* v8_data = it->get(); + v8_data->process_data()->Remove(PassKey(), v8_data); + global_v8_context_datas_.erase(it); +} + +} // namespace internal +} // namespace v8_memory +} // namespace performance_manager
diff --git a/components/performance_manager/v8_memory/v8_context_tracker_internal.h b/components/performance_manager/v8_memory/v8_context_tracker_internal.h new file mode 100644 index 0000000..30adf6a --- /dev/null +++ b/components/performance_manager/v8_memory/v8_context_tracker_internal.h
@@ -0,0 +1,300 @@ +// Copyright 2020 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. + +// Internal data structures used by V8ContextTracker. These are only exposed in +// a header for testing. Everything in this header lives in an "internal" +// namespace so as not to pollute the "v8_memory", which houses the actual +// consumer API. + +#ifndef COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_INTERNAL_H_ +#define COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_INTERNAL_H_ + +#include <memory> +#include <set> + +#include "base/compiler_specific.h" +#include "base/containers/linked_list.h" +#include "base/optional.h" +#include "base/util/type_safety/pass_key.h" +#include "components/performance_manager/graph/node_attached_data_impl.h" +#include "components/performance_manager/graph/process_node_impl.h" +#include "components/performance_manager/v8_memory/v8_context_tracker.h" +#include "components/performance_manager/v8_memory/v8_context_tracker_types.h" +#include "third_party/blink/public/common/tokens/tokens.h" + +namespace performance_manager { +namespace v8_memory { +namespace internal { + +using ExecutionContextState = V8ContextTracker::ExecutionContextState; +using V8ContextState = V8ContextTracker::V8ContextState; + +// Forward declarations. +class ExecutionContextData; +class ProcessData; +class RemoteFrameData; +class V8ContextData; + +// A comparator for "Data" objects that compares by token. +template <typename DataType, typename TokenType> +struct TokenComparator { + using is_transparent = int; + static const TokenType& GetToken(const TokenType& token) { return token; } + static const TokenType& GetToken(const std::unique_ptr<DataType>& data) { + return data->GetToken(); + } + template <typename Type1, typename Type2> + bool operator()(const Type1& obj1, const Type2& obj2) const { + return GetToken(obj1) < GetToken(obj2); + } +}; + +//////////////////////////////////////////////////////////////////////////////// +// ExecutionContextData declaration: + +// Internal wrapper of ExecutionContextState. Augments with additional data +// needed for the implementation. Since these objects also need to be tracked +// per-process, they are kept in a process-associated doubly-linked list. +class ExecutionContextData : public base::LinkNode<ExecutionContextData>, + public ExecutionContextState { + public: + using Comparator = + TokenComparator<ExecutionContextData, blink::ExecutionContextToken>; + + ExecutionContextData() = delete; + ExecutionContextData(const ExecutionContextData&) = delete; + ExecutionContextData( + ProcessData* process_data, + const blink::ExecutionContextToken& token, + const base::Optional<IframeAttributionData> iframe_attribution_data); + ExecutionContextData& operator=(const ExecutionContextData&) = delete; + ~ExecutionContextData() override; + + // Simple accessors. + ProcessData* process_data() const { return process_data_; } + RemoteFrameData* remote_frame_data() { return remote_frame_data_; } + size_t v8_context_count() const { return v8_context_count_; } + + // For consistency, all Data objects have a GetToken() function. + const blink::ExecutionContextToken& GetToken() const { return token; } + + // Returns true if this object is currently being tracked (it is in + // ProcessData::execution_context_datas_, and + // V8ContextTrackerDataStore::global_execution_context_datas_). + WARN_UNUSED_RESULT bool IsTracked() const; + + // Returns true if this object *should* be destroyed (there are no references + // to it keeping it alive). + WARN_UNUSED_RESULT bool ShouldDestroy() const; + + // Manages remote frame data associated with this ExecutionContextData. + void SetRemoteFrameData(util::PassKey<RemoteFrameData>, + RemoteFrameData* remote_frame_data); + WARN_UNUSED_RESULT bool ClearRemoteFrameData(util::PassKey<RemoteFrameData>); + + // Increments |v8_context_count_|. + void IncrementV8ContextCount(util::PassKey<V8ContextData>); + + // Decrements |v8_context_count_|, and returns true if the object has + // transitioned to "ShouldDestroy". + WARN_UNUSED_RESULT bool DecrementV8ContextCount(util::PassKey<V8ContextData>); + + private: + ProcessData* const process_data_; + + RemoteFrameData* remote_frame_data_ = nullptr; + + // The count of V8ContextDatas keeping this object alive. + size_t v8_context_count_ = 0; +}; + +//////////////////////////////////////////////////////////////////////////////// +// RemoteFrameData declaration: + +// Represents data about an ExecutionCOntext from the point of view of the +// parent frame that owns it. +class RemoteFrameData : public base::LinkNode<RemoteFrameData> { + public: + using Comparator = TokenComparator<RemoteFrameData, blink::RemoteFrameToken>; + using PassKey = util::PassKey<RemoteFrameData>; + + RemoteFrameData() = delete; + RemoteFrameData(ProcessData* process_data, + const blink::RemoteFrameToken& token, + ExecutionContextData* execution_context_data); + RemoteFrameData(const RemoteFrameData&) = delete; + RemoteFrameData& operator=(const RemoteFrameData&) = delete; + ~RemoteFrameData(); + + // Simple accessors. + ProcessData* process_data() const { return process_data_; } + ExecutionContextData* execution_context_data() const { + return execution_context_data_; + } + + // For consistency, all Data objects have a GetToken() function. + const blink::RemoteFrameToken& GetToken() const { return token_; } + + // Returns true if this object is currently being tracked (it is in + // ProcessData::remote_frame_datas_, and + // V8ContextTrackerDataStore::global_remote_frame_datas_). + WARN_UNUSED_RESULT bool IsTracked() const; + + private: + ProcessData* const process_data_; + const blink::RemoteFrameToken token_; + ExecutionContextData* const execution_context_data_; +}; + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextData declaration: + +// Internal wrapper of V8ContextState. Augments with additional data needed for +// the implementation. +class V8ContextData : public base::LinkNode<V8ContextData>, + public V8ContextState { + public: + using Comparator = TokenComparator<V8ContextData, blink::V8ContextToken>; + using PassKey = util::PassKey<V8ContextData>; + + V8ContextData() = delete; + V8ContextData(ProcessData* process_data, + const V8ContextDescription& description, + ExecutionContextData* execution_context_data); + V8ContextData(const V8ContextData&) = delete; + V8ContextData& operator=(const V8ContextData&) = delete; + ~V8ContextData() override; + + // Simple accessors. + ProcessData* process_data() const { return process_data_; } + + // For consistency, all Data objects have a GetToken() function. + const blink::V8ContextToken& GetToken() const { return description.token; } + + // Returns true if this object is currently being tracked (its in + // ProcessData::v8_context_datas_, and + // V8ContextTrackerDataStore::global_v8_context_datas_). + WARN_UNUSED_RESULT bool IsTracked() const; + + // Returns the ExecutionContextData associated with this V8ContextData. + ExecutionContextData* GetExecutionContextData() const; + + private: + ProcessData* const process_data_; +}; + +//////////////////////////////////////////////////////////////////////////////// +// ProcessData declaration: + +class ProcessData : public NodeAttachedDataImpl<ProcessData> { + public: + struct Traits : public NodeAttachedDataInMap<ProcessNodeImpl> {}; + + explicit ProcessData(const ProcessNodeImpl* process_node); + ~ProcessData() override; + + // Simple accessors. + V8ContextTrackerDataStore* data_store() const { return data_store_; } + + // Tears down this ProcessData by ensuring that all associated + // ExecutionContextDatas and V8ContextDatas are cleaned up. This must be + // called *prior* to the destructor being invoked. + void TearDown(); + + // Adds the provided object to the list of process-associated objects. The + // object must not be part of a list, its process data must match this one, + // and it must return false for "ShouldDestroy" (if applicable). For removal, + // the object must be part of a list, the process data must match this one and + // "ShouldDestroy" must return false. + void Add(util::PassKey<V8ContextTrackerDataStore>, + ExecutionContextData* ec_data); + void Add(util::PassKey<V8ContextTrackerDataStore>, RemoteFrameData* rf_data); + void Add(util::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data); + void Remove(util::PassKey<V8ContextTrackerDataStore>, + ExecutionContextData* ec_data); + void Remove(util::PassKey<V8ContextTrackerDataStore>, + RemoteFrameData* rf_data); + void Remove(util::PassKey<V8ContextTrackerDataStore>, V8ContextData* v8_data); + + private: + // Used to initialize |data_store_| at construction. + static V8ContextTrackerDataStore* GetDataStore( + const ProcessNodeImpl* process_node) { + return V8ContextTracker::GetFromGraph(process_node->graph())->data_store(); + } + + // Pointer to the DataStore that implicitly owns us. + V8ContextTrackerDataStore* const data_store_; + + // List of ExecutionContextDatas associated with this process. + base::LinkedList<ExecutionContextData> execution_context_datas_; + + // List of RemoteFrameDatas associated with this process. + base::LinkedList<RemoteFrameData> remote_frame_datas_; + + // List of V8ContextDatas associated with this process. + base::LinkedList<V8ContextData> v8_context_datas_; +}; + +//////////////////////////////////////////////////////////////////////////////// +// V8ContextTrackerDataStore declaration: + +// This class acts as the owner of all tracked objects. Objects are created +// in isolation, and ownership passed to this object. Management of all +// per-process lists is centralized through this object. +class V8ContextTrackerDataStore { + public: + using PassKey = util::PassKey<V8ContextTrackerDataStore>; + + V8ContextTrackerDataStore(); + ~V8ContextTrackerDataStore(); + + // Passes ownership of an object. An object with the same token must not + // already exist ("Get" should return nullptr). Note that when passing an + // |ec_data| to the impl that "ShouldDestroy" should return false. + void Pass(std::unique_ptr<ExecutionContextData> ec_data); + void Pass(std::unique_ptr<RemoteFrameData> rf_data); + void Pass(std::unique_ptr<V8ContextData> v8_data); + + // Looks up owned objects by token. + ExecutionContextData* Get(const blink::ExecutionContextToken& token); + RemoteFrameData* Get(const blink::RemoteFrameToken& token); + V8ContextData* Get(const blink::V8ContextToken& token); + + // Destroys objects by token. They must exist ("Get" should return non + // nullptr). + void Destroy(const blink::ExecutionContextToken& token); + void Destroy(const blink::RemoteFrameToken& token); + void Destroy(const blink::V8ContextToken& token); + + size_t GetExecutionContextDataCount() const { + return global_execution_context_datas_.size(); + } + size_t GetRemoteFrameDataCount() const { + return global_remote_frame_datas_.size(); + } + size_t GetV8ContextDataCount() const { + return global_v8_context_datas_.size(); + } + + private: + // Browser wide registry of ExecutionContextData objects. + std::set<std::unique_ptr<ExecutionContextData>, + ExecutionContextData::Comparator> + global_execution_context_datas_; + + // Browser-wide registry of RemoteFrameData objects. + std::set<std::unique_ptr<RemoteFrameData>, RemoteFrameData::Comparator> + global_remote_frame_datas_; + + // Browser wide registry of V8ContextData objects. + std::set<std::unique_ptr<V8ContextData>, V8ContextData::Comparator> + global_v8_context_datas_; +}; + +} // namespace internal +} // namespace v8_memory +} // namespace performance_manager + +#endif // COMPONENTS_PERFORMANCE_MANAGER_V8_MEMORY_V8_CONTEXT_TRACKER_INTERNAL_H_
diff --git a/components/performance_manager/v8_memory/v8_context_tracker_internal_unittest.cc b/components/performance_manager/v8_memory/v8_context_tracker_internal_unittest.cc new file mode 100644 index 0000000..7af3f748 --- /dev/null +++ b/components/performance_manager/v8_memory/v8_context_tracker_internal_unittest.cc
@@ -0,0 +1,309 @@ +// Copyright 2020 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/performance_manager/v8_memory/v8_context_tracker_internal.h" + +#include <memory> + +#include "base/optional.h" +#include "base/test/gtest_util.h" +#include "components/performance_manager/execution_context/execution_context_registry_impl.h" +#include "components/performance_manager/test_support/graph_test_harness.h" +#include "components/performance_manager/test_support/mock_graphs.h" +#include "components/performance_manager/v8_memory/v8_context_tracker.h" +#include "components/performance_manager/v8_memory/v8_context_tracker_types.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/tokens/tokens.h" + +namespace performance_manager { +namespace v8_memory { +namespace internal { + +namespace { + +class V8ContextTrackerInternalTest : public GraphTestHarness { + public: + V8ContextTrackerInternalTest() + : registry_(graph()->PassToGraph( + std::make_unique< + execution_context::ExecutionContextRegistryImpl>())), + tracker_(graph()->PassToGraph(std::make_unique<V8ContextTracker>())), + mock_graph_(graph()) {} + + ~V8ContextTrackerInternalTest() override = default; + + V8ContextTrackerDataStore* data_store() const { + return tracker_->data_store(); + } + + execution_context::ExecutionContextRegistry* const registry_ = nullptr; + V8ContextTracker* const tracker_ = nullptr; + MockSinglePageWithMultipleProcessesGraph mock_graph_; +}; + +using V8ContextTrackerInternalDeathTest = V8ContextTrackerInternalTest; + +} // namespace + +TEST_F(V8ContextTrackerInternalDeathTest, + PassingUnreferencedExecutionContextDataFails) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + EXPECT_TRUE(ec_data->ShouldDestroy()); + EXPECT_DCHECK_DEATH(data_store()->Pass(std::move(ec_data))); +} + +TEST_F(V8ContextTrackerInternalDeathTest, SameProcessRemoteFrameDataExplodes) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + std::unique_ptr<RemoteFrameData> rf_data; + EXPECT_DCHECK_DEATH( + rf_data = std::make_unique<RemoteFrameData>( + process_data, blink::RemoteFrameToken(), ec_data.get())); +} + +TEST_F(V8ContextTrackerInternalDeathTest, CrossProcessV8ContextDataExplodes) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + auto* other_process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.other_process.get())); + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + std::unique_ptr<V8ContextData> v8_data; + EXPECT_DCHECK_DEATH( + v8_data = std::make_unique<V8ContextData>( + other_process_data, V8ContextDescription(), ec_data.get())); +} + +TEST_F(V8ContextTrackerInternalTest, ExecutionContextDataShouldDestroy) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + + // With no references "ShouldDestroy" should return true. + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + EXPECT_FALSE(ec_data->remote_frame_data()); + EXPECT_EQ(0u, ec_data->v8_context_count()); + EXPECT_TRUE(ec_data->ShouldDestroy()); + + // Adding a RemoteFrameData reference should mark "ShouldDestroy" as false. + auto* other_process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.other_process.get())); + std::unique_ptr<RemoteFrameData> rf_data = std::make_unique<RemoteFrameData>( + other_process_data, blink::RemoteFrameToken(), ec_data.get()); + EXPECT_TRUE(ec_data->remote_frame_data()); + EXPECT_EQ(0u, ec_data->v8_context_count()); + EXPECT_FALSE(ec_data->ShouldDestroy()); + + // Adding a V8ContextData should also keep the object alive. + std::unique_ptr<V8ContextData> v8_data1 = std::make_unique<V8ContextData>( + process_data, V8ContextDescription(), ec_data.get()); + EXPECT_TRUE(ec_data->remote_frame_data()); + EXPECT_EQ(1u, ec_data->v8_context_count()); + EXPECT_FALSE(ec_data->ShouldDestroy()); + + // Add another V8ContextData. + std::unique_ptr<V8ContextData> v8_data2 = std::make_unique<V8ContextData>( + process_data, V8ContextDescription(), ec_data.get()); + EXPECT_TRUE(ec_data->remote_frame_data()); + EXPECT_EQ(2u, ec_data->v8_context_count()); + EXPECT_FALSE(ec_data->ShouldDestroy()); + + // Destroy one of the V8ContextDatas. + v8_data1.reset(); + EXPECT_TRUE(ec_data->remote_frame_data()); + EXPECT_EQ(1u, ec_data->v8_context_count()); + EXPECT_FALSE(ec_data->ShouldDestroy()); + + // Destroy the RemoteFrameData. + rf_data.reset(); + EXPECT_FALSE(ec_data->remote_frame_data()); + EXPECT_EQ(1u, ec_data->v8_context_count()); + EXPECT_FALSE(ec_data->ShouldDestroy()); + + // Destroy the last V8COntextData. + v8_data2.reset(); + EXPECT_FALSE(ec_data->remote_frame_data()); + EXPECT_EQ(0u, ec_data->v8_context_count()); + EXPECT_TRUE(ec_data->ShouldDestroy()); +} + +TEST_F(V8ContextTrackerInternalTest, + ExecutionContextDataTornDownByRemoteFrameData) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + + // Create an ExecutionContextData. + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + auto* raw_ec_data = ec_data.get(); + EXPECT_FALSE(ec_data->IsTracked()); + + // Create a RemoteFrameData. + auto* other_process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.other_process.get())); + std::unique_ptr<RemoteFrameData> rf_data = std::make_unique<RemoteFrameData>( + other_process_data, blink::RemoteFrameToken(), ec_data.get()); + auto* raw_rf_data = rf_data.get(); + EXPECT_FALSE(rf_data->IsTracked()); + + // Pass both of these to the Impl. + data_store()->Pass(std::move(ec_data)); + data_store()->Pass(std::move(rf_data)); + EXPECT_TRUE(raw_ec_data->IsTracked()); + EXPECT_TRUE(raw_rf_data->IsTracked()); + EXPECT_EQ(1u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(1u, data_store()->GetRemoteFrameDataCount()); + + // Ensure that lookup works. + auto ec_token = raw_ec_data->GetToken(); + auto rf_token = raw_rf_data->GetToken(); + EXPECT_EQ(raw_ec_data, data_store()->Get(ec_token)); + EXPECT_EQ(raw_rf_data, data_store()->Get(rf_token)); + + // Delete the RemoteFrameData, and also expect the ExecutionContextData to + // have been cleaned up. + data_store()->Destroy(rf_token); + EXPECT_EQ(nullptr, data_store()->Get(ec_token)); + EXPECT_EQ(nullptr, data_store()->Get(rf_token)); + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); +} + +TEST_F(V8ContextTrackerInternalTest, + ExecutionContextDataTornDownByV8ContextData) { + auto* process_data = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + + // Create an ExecutionContextData. + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data, mock_graph_.frame->frame_token(), base::nullopt); + auto* raw_ec_data = ec_data.get(); + EXPECT_FALSE(ec_data->IsTracked()); + + // Create a V8ContextData. + std::unique_ptr<V8ContextData> v8_data = std::make_unique<V8ContextData>( + process_data, V8ContextDescription(), ec_data.get()); + auto* raw_v8_data = v8_data.get(); + EXPECT_FALSE(v8_data->IsTracked()); + + // Pass both of these to the Impl. + data_store()->Pass(std::move(ec_data)); + data_store()->Pass(std::move(v8_data)); + EXPECT_TRUE(raw_ec_data->IsTracked()); + EXPECT_TRUE(raw_v8_data->IsTracked()); + EXPECT_EQ(1u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(1u, data_store()->GetV8ContextDataCount()); + + // Ensure that lookup works. + auto ec_token = raw_ec_data->GetToken(); + auto v8_token = raw_v8_data->GetToken(); + EXPECT_EQ(raw_ec_data, data_store()->Get(ec_token)); + EXPECT_EQ(raw_v8_data, data_store()->Get(v8_token)); + + // Delete the V8ContextData, and also expect the ExecutionContextData to + // have been cleaned up. + data_store()->Destroy(v8_token); + EXPECT_EQ(nullptr, data_store()->Get(ec_token)); + EXPECT_EQ(nullptr, data_store()->Get(v8_token)); + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetV8ContextDataCount()); +} + +namespace { + +class V8ContextTrackerInternalTearDownOrderTest + : public V8ContextTrackerInternalTest { + public: + using Super = V8ContextTrackerInternalTest; + + void SetUp() override { + Super::SetUp(); + + process_data_ = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.process.get())); + other_process_data_ = ProcessData::GetOrCreate( + static_cast<ProcessNodeImpl*>(mock_graph_.other_process.get())); + + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(0u, data_store()->GetV8ContextDataCount()); + + // Create an ExecutionContextData. + std::unique_ptr<ExecutionContextData> ec_data = + std::make_unique<ExecutionContextData>( + process_data_, mock_graph_.frame->frame_token(), base::nullopt); + ec_data_ = ec_data.get(); + + // Create a RemoteFrameData. + std::unique_ptr<RemoteFrameData> rf_data = + std::make_unique<RemoteFrameData>(other_process_data_, + blink::RemoteFrameToken(), ec_data_); + + // Pass these to the tracker_. + data_store()->Pass(std::move(ec_data)); + data_store()->Pass(std::move(rf_data)); + + // Create a couple V8ContextDatas. + std::unique_ptr<V8ContextData> v8_data = std::make_unique<V8ContextData>( + process_data_, V8ContextDescription(), ec_data_); + data_store()->Pass(std::move(v8_data)); + v8_data = std::make_unique<V8ContextData>(process_data_, + V8ContextDescription(), ec_data_); + data_store()->Pass(std::move(v8_data)); + + EXPECT_EQ(1u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(1u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(2u, data_store()->GetV8ContextDataCount()); + } + + ProcessData* process_data_ = nullptr; + ProcessData* other_process_data_ = nullptr; + ExecutionContextData* ec_data_ = nullptr; +}; + +} // namespace + +TEST_F(V8ContextTrackerInternalTearDownOrderTest, RemoteBeforeLocal) { + // Tear down the |other_process| which has "RemoteFrame" entries. + other_process_data_->TearDown(); + EXPECT_EQ(1u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(2u, data_store()->GetV8ContextDataCount()); + EXPECT_FALSE(ec_data_->remote_frame_data()); + + // Now tear down the main |process|. + process_data_->TearDown(); + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(0u, data_store()->GetV8ContextDataCount()); +} + +TEST_F(V8ContextTrackerInternalTearDownOrderTest, LocalBeforeRemote) { + // Tear down the main |process|. This should tear down everything. + process_data_->TearDown(); + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(0u, data_store()->GetV8ContextDataCount()); + + // Tearing down the |other_process| should do nothing. + other_process_data_->TearDown(); + EXPECT_EQ(0u, data_store()->GetExecutionContextDataCount()); + EXPECT_EQ(0u, data_store()->GetRemoteFrameDataCount()); + EXPECT_EQ(0u, data_store()->GetV8ContextDataCount()); +} + +} // namespace internal +} // namespace v8_memory +} // namespace performance_manager
diff --git a/components/search_engines/BUILD.gn b/components/search_engines/BUILD.gn index 1f7e2e69..eb66a2d9 100644 --- a/components/search_engines/BUILD.gn +++ b/components/search_engines/BUILD.gn
@@ -52,6 +52,7 @@ public_deps = [ ":prepopulated_engines", ":search_engine_type", + ":search_engine_utils", "//base", "//components/google/core/common", "//components/keyed_service/core", @@ -100,6 +101,28 @@ } } +source_set("search_engine_utils") { + sources = [ + "search_engine_utils.cc", + "search_engine_utils.h", + ] + + public_deps = [ + ":prepopulated_engines", + ":search_engine_type", + "//components/google/core/common", + ] + + deps = [ "//url" ] + + if (is_android) { + deps += [ + "//components/search_engines/android:jni_headers", + "//url:gurl_android", + ] + } +} + source_set("search_engine_type") { sources = [ "search_engine_type.h" ] }
diff --git a/components/search_engines/search_engine_utils.cc b/components/search_engines/search_engine_utils.cc new file mode 100644 index 0000000..ecbd1561 --- /dev/null +++ b/components/search_engines/search_engine_utils.cc
@@ -0,0 +1,60 @@ +// Copyright 2020 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/search_engines/search_engine_utils.h" + +#include "components/google/core/common/google_util.h" +#include "components/search_engines/prepopulated_engines.h" +#include "net/base/registry_controlled_domains/registry_controlled_domain.h" +#include "url/gurl.h" + +namespace SearchEngineUtils { + +namespace { + +bool SameDomain(const GURL& given_url, const GURL& prepopulated_url) { + return prepopulated_url.is_valid() && + net::registry_controlled_domains::SameDomainOrHost( + given_url, prepopulated_url, + net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); +} + +} // namespace + +// Global functions ----------------------------------------------------------- + +SearchEngineType GetEngineType(const GURL& url) { + DCHECK(url.is_valid()); + + // Check using TLD+1s, in order to more aggressively match search engine types + // for data imported from other browsers. + // + // First special-case Google, because the prepopulate URL for it will not + // convert to a GURL and thus won't have an origin. Instead see if the + // incoming URL's host is "[*.]google.<TLD>". + if (google_util::IsGoogleHostname(url.host(), + google_util::DISALLOW_SUBDOMAIN)) + return TemplateURLPrepopulateData::google.type; + + // Now check the rest of the prepopulate data. + for (size_t i = 0; i < TemplateURLPrepopulateData::kAllEnginesLength; ++i) { + // First check the main search URL. + if (SameDomain( + url, GURL(TemplateURLPrepopulateData::kAllEngines[i]->search_url))) + return TemplateURLPrepopulateData::kAllEngines[i]->type; + + // Then check the alternate URLs. + for (size_t j = 0; + j < TemplateURLPrepopulateData::kAllEngines[i]->alternate_urls_size; + ++j) { + if (SameDomain(url, GURL(TemplateURLPrepopulateData::kAllEngines[i] + ->alternate_urls[j]))) + return TemplateURLPrepopulateData::kAllEngines[i]->type; + } + } + + return SEARCH_ENGINE_OTHER; +} + +} // namespace SearchEngineUtils
diff --git a/components/search_engines/search_engine_utils.h b/components/search_engines/search_engine_utils.h new file mode 100644 index 0000000..83e0dd4 --- /dev/null +++ b/components/search_engines/search_engine_utils.h
@@ -0,0 +1,20 @@ +// Copyright 2020 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_SEARCH_ENGINES_SEARCH_ENGINE_UTILS_H_ +#define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_UTILS_H_ + +#include "components/search_engines/search_engine_type.h" + +class GURL; + +namespace SearchEngineUtils { + +// Like the above, but takes a GURL which is expected to represent a search URL. +// This may be called on any thread. +SearchEngineType GetEngineType(const GURL& url); + +} // namespace SearchEngineUtils + +#endif // COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_UTILS_H_
diff --git a/components/search_engines/template_url.cc b/components/search_engines/template_url.cc index e881a98..2a4c441 100644 --- a/components/search_engines/template_url.cc +++ b/components/search_engines/template_url.cc
@@ -26,9 +26,9 @@ #include "base/trace_event/memory_usage_estimator.h" #include "build/build_config.h" #include "components/google/core/common/google_util.h" +#include "components/search_engines/search_engine_utils.h" #include "components/search_engines/search_engines_switches.h" #include "components/search_engines/search_terms_data.h" -#include "components/search_engines/template_url_prepopulate_data.h" #include "components/url_formatter/url_formatter.h" #include "google_apis/google_api_keys.h" #include "net/base/escape.h" @@ -1410,8 +1410,8 @@ const SearchTermsData& search_terms_data) const { if (engine_type_ == SEARCH_ENGINE_UNKNOWN) { const GURL url = GenerateSearchURL(search_terms_data); - engine_type_ = url.is_valid() ? - TemplateURLPrepopulateData::GetEngineType(url) : SEARCH_ENGINE_OTHER; + engine_type_ = url.is_valid() ? SearchEngineUtils::GetEngineType(url) + : SEARCH_ENGINE_OTHER; DCHECK_NE(SEARCH_ENGINE_UNKNOWN, engine_type_); } return engine_type_;
diff --git a/components/search_engines/template_url_prepopulate_data.cc b/components/search_engines/template_url_prepopulate_data.cc index 60c60a4d..c1368c6 100644 --- a/components/search_engines/template_url_prepopulate_data.cc +++ b/components/search_engines/template_url_prepopulate_data.cc
@@ -8,15 +8,12 @@ #include "base/stl_util.h" #include "build/build_config.h" #include "components/country_codes/country_codes.h" -#include "components/google/core/common/google_util.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" #include "components/search_engines/prepopulated_engines.h" #include "components/search_engines/search_engines_pref_names.h" #include "components/search_engines/template_url_data.h" #include "components/search_engines/template_url_data_util.h" -#include "net/base/registry_controlled_domains/registry_controlled_domain.h" -#include "url/gurl.h" namespace TemplateURLPrepopulateData { @@ -1356,13 +1353,6 @@ return t_urls; } -bool SameDomain(const GURL& given_url, const GURL& prepopulated_url) { - return prepopulated_url.is_valid() && - net::registry_controlled_domains::SameDomainOrHost( - given_url, prepopulated_url, - net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); -} - } // namespace // Global functions ----------------------------------------------------------- @@ -1452,33 +1442,4 @@ : nullptr; } -SearchEngineType GetEngineType(const GURL& url) { - DCHECK(url.is_valid()); - - // Check using TLD+1s, in order to more aggressively match search engine types - // for data imported from other browsers. - // - // First special-case Google, because the prepopulate URL for it will not - // convert to a GURL and thus won't have an origin. Instead see if the - // incoming URL's host is "[*.]google.<TLD>". - if (google_util::IsGoogleHostname(url.host(), - google_util::DISALLOW_SUBDOMAIN)) - return google.type; - - // Now check the rest of the prepopulate data. - for (size_t i = 0; i < kAllEnginesLength; ++i) { - // First check the main search URL. - if (SameDomain(url, GURL(kAllEngines[i]->search_url))) - return kAllEngines[i]->type; - - // Then check the alternate URLs. - for (size_t j = 0; j < kAllEngines[i]->alternate_urls_size; ++j) { - if (SameDomain(url, GURL(kAllEngines[i]->alternate_urls[j]))) - return kAllEngines[i]->type; - } - } - - return SEARCH_ENGINE_OTHER; -} - } // namespace TemplateURLPrepopulateData
diff --git a/components/search_engines/template_url_prepopulate_data.h b/components/search_engines/template_url_prepopulate_data.h index 159263ac..682060b 100644 --- a/components/search_engines/template_url_prepopulate_data.h +++ b/components/search_engines/template_url_prepopulate_data.h
@@ -11,9 +11,6 @@ #include <string> #include <vector> -#include "components/search_engines/search_engine_type.h" - -class GURL; class PrefService; struct TemplateURLData; @@ -65,10 +62,6 @@ std::unique_ptr<TemplateURLData> GetPrepopulatedDefaultSearch( PrefService* prefs); -// Like the above, but takes a GURL which is expected to represent a search URL. -// This may be called on any thread. -SearchEngineType GetEngineType(const GURL& url); - } // namespace TemplateURLPrepopulateData #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_PREPOPULATE_DATA_H_
diff --git a/components/subresource_filter_strings.grdp b/components/subresource_filter_strings.grdp new file mode 100644 index 0000000..86d6ab3 --- /dev/null +++ b/components/subresource_filter_strings.grdp
@@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<grit-part> + <message name="IDS_ALWAYS_ALLOW_ADS" desc="Explanation associated with a toggle to allow ads after ads have been blocked on the page. To be used on pages where the ad blocking UI is governed by a persistent permissions-based allowlist."> + Always allow ads on this site + </message> + <message name="IDS_BLOCKED_ADS_PROMPT_TITLE" desc="Title of the prompt shown to users in the omnibox or infobar when Chrome has blocked ads on the site because the site tends to show intrusive ads. The title will stand alone next to an icon so there is no need for a period." formatter_data="android_java"> + Ads blocked + </message> + <message name="IDS_BLOCKED_ADS_PROMPT_EXPLANATION" desc="A warning that a site has, in the past, shown intrusive or misleading ads. To be shown in an expanded infobar / bubble"> + This site shows intrusive or misleading ads. + </message> + + <if expr="is_android"> + <message name="IDS_BLOCKED_ADS_INFOBAR_MESSAGE" desc="The mini infobar message shown to users on Android when Chrome has blocked ads on the site because the site tends to show intrusive ads. Will be presented as a sentence, next to a Details link to expand the infobar."> + Ads blocked. + </message> + </if> +</grit-part>
diff --git a/components/sync/driver/glue/sync_engine_impl.cc b/components/sync/driver/glue/sync_engine_impl.cc index b5f0f89..b5e0ccb 100644 --- a/components/sync/driver/glue/sync_engine_impl.cc +++ b/components/sync/driver/glue/sync_engine_impl.cc
@@ -53,21 +53,6 @@ #endif backend_ = base::MakeRefCounted<SyncEngineBackend>( name_, sync_data_folder, weak_ptr_factory_.GetWeakPtr()); - - // If the new invalidations system (SyncInvalidationsService) is fully - // enabled, then the SyncService doesn't need to communicate with the old - // InvalidationService anymore. - if (invalidator_ && - base::FeatureList::IsEnabled(switches::kSyncSendInterestedDataTypes) && - base::FeatureList::IsEnabled(switches::kUseSyncInvalidations) && - base::FeatureList::IsEnabled( - switches::kUseSyncInvalidationsForWalletAndOffer)) { - invalidator_->RegisterInvalidationHandler(this); - bool success = invalidator_->UpdateInterestedTopics(this, /*topics=*/{}); - DCHECK(success); - invalidator_->UnregisterInvalidationHandler(this); - invalidator_ = nullptr; - } } SyncEngineImpl::~SyncEngineImpl() { @@ -87,6 +72,22 @@ sync_task_runner_->PostTask( FROM_HERE, base::BindOnce(&SyncEngineBackend::DoInitialize, backend_, std::move(params))); + + // If the new invalidations system (SyncInvalidationsService) is fully + // enabled, then the SyncService doesn't need to communicate with the old + // InvalidationService anymore. + if (invalidator_ && + base::FeatureList::IsEnabled(switches::kSyncSendInterestedDataTypes) && + base::FeatureList::IsEnabled(switches::kUseSyncInvalidations) && + base::FeatureList::IsEnabled( + switches::kUseSyncInvalidationsForWalletAndOffer)) { + DCHECK(!invalidation_handler_registered_); + invalidator_->RegisterInvalidationHandler(this); + bool success = invalidator_->UpdateInterestedTopics(this, /*topics=*/{}); + DCHECK(success); + invalidator_->UnregisterInvalidationHandler(this); + invalidator_ = nullptr; + } } bool SyncEngineImpl::IsInitialized() const {
diff --git a/components/sync/driver/glue/sync_engine_impl_unittest.cc b/components/sync/driver/glue/sync_engine_impl_unittest.cc index 63d3da0..af879bd 100644 --- a/components/sync/driver/glue/sync_engine_impl_unittest.cc +++ b/components/sync/driver/glue/sync_engine_impl_unittest.cc
@@ -199,6 +199,10 @@ sync_thread_.StartAndWaitForTesting(); ON_CALL(invalidator_, UpdateInterestedTopics(_, _)) .WillByDefault(testing::Return(true)); + backend_ = std::make_unique<SyncEngineImpl>( + "dummyDebugName", &invalidator_, GetSyncInvalidationsService(), + sync_prefs_->AsWeakPtr(), + temp_dir_.GetPath().Append(base::FilePath(kTestSyncDir))); fake_manager_factory_ = std::make_unique<FakeSyncManagerFactory>( &fake_manager_, network::TestNetworkConnectionTracker::GetInstance()); @@ -226,19 +230,8 @@ base::RunLoop().RunUntilIdle(); } - void CreateBackend() { - backend_ = std::make_unique<SyncEngineImpl>( - "dummyDebugName", &invalidator_, GetSyncInvalidationsService(), - sync_prefs_->AsWeakPtr(), - temp_dir_.GetPath().Append(base::FilePath(kTestSyncDir))); - } - // Synchronously initializes the backend. void InitializeBackend(bool expect_success) { - if (!backend_) { - CreateBackend(); - } - host_.SetExpectSuccess(expect_success); SyncEngine::InitParams params; @@ -683,7 +676,6 @@ TEST_F(SyncEngineImplWithSyncInvalidationsTest, ShouldInvalidateDataTypesOnIncomingInvalidation) { - CreateBackend(); EXPECT_CALL(mock_instance_id_driver_, AddListener(backend_.get())); InitializeBackend(/*expect_success=*/true); @@ -724,12 +716,11 @@ // Since the old invalidations system is not being used anymore (based on the // enabled feature flags), SyncEngine should call the (old) invalidator with - // an empty TopicSet upon construction. + // an empty TopicSet upon initialization. EXPECT_CALL(invalidator_, UpdateInterestedTopics(_, TopicSet())); - CreateBackend(); + InitializeBackend(/*expect_success=*/true); EXPECT_CALL(invalidator_, UpdateInterestedTopics(_, _)).Times(0); - InitializeBackend(/*expect_success=*/true); ConfigureDataTypes(); }
diff --git a/components/sync/trusted_vault/standalone_trusted_vault_backend.cc b/components/sync/trusted_vault/standalone_trusted_vault_backend.cc index 5c569c3..504ed93e 100644 --- a/components/sync/trusted_vault/standalone_trusted_vault_backend.cc +++ b/components/sync/trusted_vault/standalone_trusted_vault_backend.cc
@@ -251,7 +251,7 @@ // Cancel existing callbacks passed to |connection_| to ensure there is only // one ongoing request. AbandonConnectionRequest(); - connection_->RegisterDevice( + connection_->RegisterAuthenticationFactor( *primary_account_, last_key_bytes, per_user_vault->last_vault_key_version(), key_pair->public_key(), base::BindOnce(&StandaloneTrustedVaultBackend::OnDeviceRegistered,
diff --git a/components/sync/trusted_vault/standalone_trusted_vault_backend_unittest.cc b/components/sync/trusted_vault/standalone_trusted_vault_backend_unittest.cc index 5948ed4..a05eb78 100644 --- a/components/sync/trusted_vault/standalone_trusted_vault_backend_unittest.cc +++ b/components/sync/trusted_vault/standalone_trusted_vault_backend_unittest.cc
@@ -50,12 +50,12 @@ MockTrustedVaultConnection() = default; ~MockTrustedVaultConnection() override = default; - MOCK_METHOD5(RegisterDevice, + MOCK_METHOD5(RegisterAuthenticationFactor, void(const CoreAccountInfo&, const std::vector<uint8_t>&, int, const SecureBoxPublicKey&, - RegisterDeviceCallback)); + RegisterAuthenticationFactorCallback)); MOCK_METHOD5(DownloadKeys, void(const CoreAccountInfo&, const std::vector<uint8_t>&, @@ -99,16 +99,19 @@ CoreAccountInfo account_info) { DCHECK(!vault_keys.empty()); backend_->StoreKeys(account_info.gaia, vault_keys, last_vault_key_version); - TrustedVaultConnection::RegisterDeviceCallback device_registration_callback; + TrustedVaultConnection::RegisterAuthenticationFactorCallback + device_registration_callback; - EXPECT_CALL(*connection_, - RegisterDevice(Eq(account_info), Eq(vault_keys.back()), - Eq(last_vault_key_version), _, _)) - .WillOnce([&](const CoreAccountInfo&, const std::vector<uint8_t>&, int, - const SecureBoxPublicKey& device_public_key, - TrustedVaultConnection::RegisterDeviceCallback callback) { - device_registration_callback = std::move(callback); - }); + EXPECT_CALL(*connection_, RegisterAuthenticationFactor( + Eq(account_info), Eq(vault_keys.back()), + Eq(last_vault_key_version), _, _)) + .WillOnce( + [&](const CoreAccountInfo&, const std::vector<uint8_t>&, int, + const SecureBoxPublicKey& device_public_key, + TrustedVaultConnection::RegisterAuthenticationFactorCallback + callback) { + device_registration_callback = std::move(callback); + }); // Setting the primary account will trigger device registration. backend()->SetPrimaryAccount(account_info); EXPECT_FALSE(device_registration_callback.is_null()); @@ -277,13 +280,16 @@ backend()->StoreKeys(account_info.gaia, {kVaultKey}, kLastKeyVersion); - TrustedVaultConnection::RegisterDeviceCallback device_registration_callback; + TrustedVaultConnection::RegisterAuthenticationFactorCallback + device_registration_callback; std::vector<uint8_t> serialized_public_device_key; - EXPECT_CALL(*connection(), RegisterDevice(Eq(account_info), Eq(kVaultKey), - Eq(kLastKeyVersion), _, _)) + EXPECT_CALL(*connection(), + RegisterAuthenticationFactor(Eq(account_info), Eq(kVaultKey), + Eq(kLastKeyVersion), _, _)) .WillOnce([&](const CoreAccountInfo&, const std::vector<uint8_t>&, int, const SecureBoxPublicKey& device_public_key, - TrustedVaultConnection::RegisterDeviceCallback callback) { + TrustedVaultConnection::RegisterAuthenticationFactorCallback + callback) { serialized_public_device_key = device_public_key.ExportToBytes(); device_registration_callback = std::move(callback); });
diff --git a/components/sync/trusted_vault/trusted_vault_connection.h b/components/sync/trusted_vault/trusted_vault_connection.h index 629208aa..9907768 100644 --- a/components/sync/trusted_vault/trusted_vault_connection.h +++ b/components/sync/trusted_vault/trusted_vault_connection.h
@@ -31,7 +31,7 @@ // vault backend sequence. class TrustedVaultConnection { public: - using RegisterDeviceCallback = + using RegisterAuthenticationFactorCallback = base::OnceCallback<void(TrustedVaultRequestStatus)>; using DownloadKeysCallback = base::OnceCallback<void(TrustedVaultRequestStatus, @@ -44,14 +44,15 @@ delete; virtual ~TrustedVaultConnection() = default; - // Asynchronously attempts to register the device on the trusted vault server - // to allow further DownloadKeys(). Calls |callback| upon completion. - virtual void RegisterDevice( + // Asynchronously attempts to register the authentication factor on the + // trusted vault server to allow further vault server API calls using this + // authentication factor. Calls |callback| upon completion. + virtual void RegisterAuthenticationFactor( const CoreAccountInfo& account_info, const std::vector<uint8_t>& last_trusted_vault_key, int last_trusted_vault_key_version, - const SecureBoxPublicKey& device_public_key, - RegisterDeviceCallback callback) = 0; + const SecureBoxPublicKey& authentication_factor_public_key, + RegisterAuthenticationFactorCallback callback) = 0; // Asynchronously attempts to download new vault keys from the trusted vault // server.
diff --git a/components/sync/trusted_vault/trusted_vault_connection_impl.cc b/components/sync/trusted_vault/trusted_vault_connection_impl.cc index 3909261c..e03f0798 100644 --- a/components/sync/trusted_vault/trusted_vault_connection_impl.cc +++ b/components/sync/trusted_vault/trusted_vault_connection_impl.cc
@@ -16,12 +16,12 @@ NOTIMPLEMENTED(); } -void TrustedVaultConnectionImpl::RegisterDevice( +void TrustedVaultConnectionImpl::RegisterAuthenticationFactor( const CoreAccountInfo& account_info, const std::vector<uint8_t>& last_trusted_vault_key, int last_trusted_vault_key_version, - const SecureBoxPublicKey& device_key_pair, - RegisterDeviceCallback callback) { + const SecureBoxPublicKey& authentication_factor_public_key, + RegisterAuthenticationFactorCallback callback) { NOTIMPLEMENTED(); }
diff --git a/components/sync/trusted_vault/trusted_vault_connection_impl.h b/components/sync/trusted_vault/trusted_vault_connection_impl.h index 2af1964..ec828ac3 100644 --- a/components/sync/trusted_vault/trusted_vault_connection_impl.h +++ b/components/sync/trusted_vault/trusted_vault_connection_impl.h
@@ -32,11 +32,12 @@ const TrustedVaultConnectionImpl& other) = delete; ~TrustedVaultConnectionImpl() override = default; - void RegisterDevice(const CoreAccountInfo& account_info, - const std::vector<uint8_t>& last_trusted_vault_key, - int last_trusted_vault_key_version, - const SecureBoxPublicKey& device_key_pair, - RegisterDeviceCallback callback) override; + void RegisterAuthenticationFactor( + const CoreAccountInfo& account_info, + const std::vector<uint8_t>& last_trusted_vault_key, + int last_trusted_vault_key_version, + const SecureBoxPublicKey& authentication_factor_public_key, + RegisterAuthenticationFactorCallback callback) override; void DownloadKeys(const CoreAccountInfo& account_info, const std::vector<uint8_t>& last_trusted_vault_key,
diff --git a/components/sync_device_info/device_info_sync_bridge.cc b/components/sync_device_info/device_info_sync_bridge.cc index f6ca59e..8a8777d 100644 --- a/components/sync_device_info/device_info_sync_bridge.cc +++ b/components/sync_device_info/device_info_sync_bridge.cc
@@ -230,7 +230,11 @@ device_info_synced_callback_list_.push_back(std::move(callback)); } - SendLocalData(); + // Device info cannot be synced if the provider is not initialized. When it + // gets initialized, local device info will be sent. + if (local_device_info_provider_->GetLocalDeviceInfo()) { + SendLocalData(); + } } void DeviceInfoSyncBridge::OnSyncStarting(
diff --git a/components/translate/core/browser/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc index d1e90334..029db66 100644 --- a/components/translate/core/browser/translate_infobar_delegate.cc +++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -106,6 +106,7 @@ if (old_delegate) { old_delegate->step_ = step; for (auto& observer : old_delegate->observers_) { + observer.OnTargetLanguageChanged(target_language); observer.OnTranslateStepChanged(step, error_type); } return; @@ -117,10 +118,7 @@ base::WrapUnique(new TranslateInfoBarDelegate( translate_manager, is_off_the_record, step, original_language, target_language, error_type, triggered_from_menu)))); - if (old_delegate) - infobar_manager->ReplaceInfoBar(old_infobar, std::move(infobar)); - else - infobar_manager->AddInfoBar(std::move(infobar)); + infobar_manager->AddInfoBar(std::move(infobar)); } size_t TranslateInfoBarDelegate::num_languages() const {
diff --git a/components/translate/core/browser/translate_infobar_delegate.h b/components/translate/core/browser/translate_infobar_delegate.h index 8d39cbb..5023e75 100644 --- a/components/translate/core/browser/translate_infobar_delegate.h +++ b/components/translate/core/browser/translate_infobar_delegate.h
@@ -49,6 +49,9 @@ // Handles UI changes on the translate step given. virtual void OnTranslateStepChanged(translate::TranslateStep step, TranslateErrors::Type error_type) = 0; + // Handles UI changes when the target language is updated. + virtual void OnTargetLanguageChanged( + const std::string& target_language_code) = 0; // Return whether user declined translate service. virtual bool IsDeclinedByUser() = 0; // Called when the TranslateInfoBarDelegate instance is destroyed.
diff --git a/components/translate/core/browser/translate_manager.h b/components/translate/core/browser/translate_manager.h index 886d939..c6223f5 100644 --- a/components/translate/core/browser/translate_manager.h +++ b/components/translate/core/browser/translate_manager.h
@@ -179,6 +179,12 @@ // See https://github.com/dtapuska/html-translate static bool IsAvailable(const TranslatePrefs* prefs); + // Check whether there is specified target, the source and the target are both + // supported, and the source and target don't match. + static bool IsTranslatableLanguagePair( + const std::string& page_language_code, + const std::string& target_language_code); + // Returns true if the decision should be overridden and logs the event // appropriately. |event_type| must be one of the // values defined by metrics::TranslateEventProto::EventType. @@ -266,11 +272,6 @@ TranslatePrefs* translate_prefs, const std::string& page_language_code); - // Check whether there is specified target, the source and - // the target are both supported, and the source and target don't match. - bool IsTranslatableLanguagePair(const std::string& page_language_code, - const std::string& target_language_code); - // Enables or disables the translate omnibox icon depending on |decision|. The // icon is always shown if translate UI is shown, auto-translation happens, or // the UI is suppressed by ranker.
diff --git a/content/BUILD.gn b/content/BUILD.gn index dee3250..0e25d7a 100644 --- a/content/BUILD.gn +++ b/content/BUILD.gn
@@ -6,13 +6,6 @@ import("//ppapi/buildflags/buildflags.gni") import("//tools/grit/grit_rule.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - # Applied by targets internal to content. config("content_implementation") { defines = [ "CONTENT_IMPLEMENTATION" ] @@ -93,7 +86,6 @@ } } else if (is_nacl_nonsfi) { source_set("content") { - set_sources_assignment_filter([]) sources = [ "//sandbox/policy/linux/sandbox_seccomp_bpf_linux.cc", "common/sandbox_init_linux.cc", @@ -101,7 +93,6 @@ "public/common/content_switches.cc", "public/common/content_switches.h", ] - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) deps = [ "//base", "//media:media_buildflags",
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc index 057747f..bfaac8c 100644 --- a/content/browser/back_forward_cache_browsertest.cc +++ b/content/browser/back_forward_cache_browsertest.cc
@@ -7750,4 +7750,134 @@ EXPECT_EQ(EvalJs(root, "pageshowLength").ExtractInt(), 2); } +// This observer keeps tracks whether a given RenderViewHost is deleted or not +// to avoid accessing it and causing use-after-free condition. +class RenderViewHostDeletedObserver : public WebContentsObserver { + public: + explicit RenderViewHostDeletedObserver(RenderViewHost* rvh) + : WebContentsObserver(WebContents::FromRenderViewHost(rvh)), + render_view_host_(rvh), + deleted_(false) {} + + void RenderViewDeleted(RenderViewHost* render_view_host) override { + if (render_view_host_ == render_view_host) + deleted_ = true; + } + + bool deleted() const { return deleted_; } + + private: + RenderViewHost* render_view_host_; + bool deleted_; +}; + +// Tests that RenderViewHost is deleted on eviction along with +// RenderProcessHost. +IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, + RenderViewHostDeletedOnEviction) { + ASSERT_TRUE(embedded_test_server()->Start()); + GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html")); + GURL url_b(embedded_test_server()->GetURL("b.com", "/title1.html")); + + NavigationControllerImpl& controller = web_contents()->GetController(); + BackForwardCacheImpl& cache = controller.GetBackForwardCache(); + + // 1) Navigate to A. + EXPECT_TRUE(NavigateToURL(shell(), url_a)); + RenderFrameHostImpl* rfh_a = current_frame_host(); + RenderFrameDeletedObserver delete_observer_rfh_a(rfh_a); + RenderViewHostDeletedObserver delete_observer_rvh_a( + rfh_a->GetRenderViewHost()); + + RenderProcessHost* process = rfh_a->GetProcess(); + RenderProcessHostWatcher destruction_observer( + process, RenderProcessHostWatcher::WATCH_FOR_HOST_DESTRUCTION); + cache.Flush(); + + // 2) Navigate to B. A should be stored in cache, count of entries should + // be 1. + EXPECT_TRUE(NavigateToURL(shell(), url_b)); + EXPECT_TRUE(rfh_a->IsInBackForwardCache()); + EXPECT_EQ(1u, cache.GetEntries().size()); + + // 3) Initiate eviction of rfh_a from BackForwardCache. Entries should be 0. + // RenderViewHost, RenderProcessHost and RenderFrameHost should all be + // deleted. + EXPECT_TRUE(rfh_a->IsInactiveAndDisallowReactivation()); + destruction_observer.Wait(); + ASSERT_TRUE(delete_observer_rvh_a.deleted()); + delete_observer_rfh_a.WaitUntilDeleted(); + EXPECT_EQ(0u, cache.GetEntries().size()); +} + +// Tests that cross-process sub-frame's RenderViewHost is deleted on root +// RenderFrameHost eviction from BackForwardCache along with its +// RenderProcessHost. +IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, + CrossProcessSubFrameRenderViewHostDeletedOnEviction) { + ASSERT_TRUE(embedded_test_server()->Start()); + GURL url_a(embedded_test_server()->GetURL( + "a.com", "/cross_site_iframe_factory.html?a(b)")); + GURL url_b(embedded_test_server()->GetURL("b.com", "/title1.html")); + + // 1) Navigate to A. + EXPECT_TRUE(NavigateToURL(shell(), url_a)); + RenderFrameHostImpl* a1 = current_frame_host(); + RenderFrameHostImpl* b1 = a1->child_at(0)->current_frame_host(); + RenderFrameDeletedObserver delete_observer_rfh_b1(b1); + + RenderViewHostDeletedObserver delete_observer_rvh_b1(b1->GetRenderViewHost()); + + RenderProcessHost* process = b1->GetProcess(); + RenderProcessHostWatcher destruction_observer( + process, RenderProcessHostWatcher::WATCH_FOR_HOST_DESTRUCTION); + + // 2) Navigate to URL B. + EXPECT_TRUE(NavigateToURL(shell(), url_b)); + EXPECT_TRUE(a1->IsInBackForwardCache()); + + // 3) Initiate eviction of rfh a1 from BackForwardCache. RenderViewHost, + // RenderProcessHost and RenderFrameHost of sub-frame b1 should all be deleted + // on eviction. + EXPECT_TRUE(a1->IsInactiveAndDisallowReactivation()); + destruction_observer.Wait(); + ASSERT_TRUE(delete_observer_rvh_b1.deleted()); + delete_observer_rfh_b1.WaitUntilDeleted(); +} + +// Tests that same-process sub-frame's RenderViewHost is deleted on root +// RenderFrameHost eviction from BackForwardCache along with its +// RenderProcessHost. +IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, + SameProcessSubFrameRenderViewHostDeletedOnEviction) { + ASSERT_TRUE(embedded_test_server()->Start()); + GURL url_a(embedded_test_server()->GetURL( + "a.com", "/cross_site_iframe_factory.html?a(a)")); + GURL url_b(embedded_test_server()->GetURL("b.com", "/title1.html")); + + // 1) Navigate to A. + EXPECT_TRUE(NavigateToURL(shell(), url_a)); + RenderFrameHostImpl* a1 = current_frame_host(); + RenderFrameHostImpl* a2 = a1->child_at(0)->current_frame_host(); + RenderFrameDeletedObserver delete_observer_rfh_a2(a2); + + RenderViewHostDeletedObserver delete_observer_rvh_a2(a2->GetRenderViewHost()); + + RenderProcessHost* process = a2->GetProcess(); + RenderProcessHostWatcher destruction_observer( + process, RenderProcessHostWatcher::WATCH_FOR_HOST_DESTRUCTION); + + // 2) Navigate to URL B. + EXPECT_TRUE(NavigateToURL(shell(), url_b)); + EXPECT_TRUE(a1->IsInBackForwardCache()); + + // 3) Initiate eviction of rfh a1 from BackForwardCache. RenderViewHost, + // RenderProcessHost and RenderFrameHost of sub-frame a2 should all be + // deleted. + EXPECT_TRUE(a1->IsInactiveAndDisallowReactivation()); + destruction_observer.Wait(); + ASSERT_TRUE(delete_observer_rvh_a2.deleted()); + delete_observer_rfh_a2.WaitUntilDeleted(); +} + } // namespace content
diff --git a/content/browser/devtools/protocol/webauthn_handler.cc b/content/browser/devtools/protocol/webauthn_handler.cc index c7a3f95..fd69a47 100644 --- a/content/browser/devtools/protocol/webauthn_handler.cc +++ b/content/browser/devtools/protocol/webauthn_handler.cc
@@ -155,7 +155,8 @@ ? device::AuthenticatorAttachment::kPlatform : device::AuthenticatorAttachment::kCrossPlatform, options->GetHasResidentKey(/*default=*/false), - options->GetHasUserVerification(/*default=*/false)); + options->GetHasUserVerification(/*default=*/false), + options->GetHasLargeBlob(/*default=*/false)); break; case device::ProtocolVersion::kUnknown: NOTREACHED();
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc index 0c57f10..94799eb 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -1124,6 +1124,20 @@ // progress; otherwise, it is advanced directly to // LifeCycleState::kReadyToBeDeleted. // + // For BackForwardCache case: + // + // Deleting the BackForwardCache::Entry deletes immediately all the + // Render{View,Frame,FrameProxy}Host. This will destroy the main RenderFrame + // eventually as part of path #1 above: + // + // - The RenderFrameHost/RenderFrameProxyHost of the main frame are owned by + // the BackForwardCache::Entry. + // - RenderFrameHost/RenderFrameProxyHost for sub-frames are owned by their + // parent RenderFrameHost. + // - The RenderViewHost(s) are refcounted by the + // RenderFrameHost/RenderFrameProxyHost of the page. They are guaranteed not + // to be referenced by any other pages. + // // The browser side gives the renderer a small timeout to finish processing // unload / detach messages. When the timeout expires, the RFH will be // removed regardless of whether or not the renderer acknowledged that it
diff --git a/content/browser/service_worker/service_worker_context_core.cc b/content/browser/service_worker/service_worker_context_core.cc index 248da7d..7496c57 100644 --- a/content/browser/service_worker/service_worker_context_core.cc +++ b/content/browser/service_worker/service_worker_context_core.cc
@@ -821,7 +821,9 @@ base::BindOnce( [](std::unique_ptr<ServiceWorkerOfflineCapabilityChecker> checker, ServiceWorkerContext::CheckOfflineCapabilityCallback callback, - OfflineCapability result) { std::move(callback).Run(result); }, + OfflineCapability result, int64_t registration_id) { + std::move(callback).Run(result, registration_id); + }, std::move(checker), std::move(callback))); }
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc index 24242fd..b4b10d6 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.cc +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -735,7 +735,8 @@ if (!context_core_) { GetUIThreadTaskRunner({})->PostTask( FROM_HERE, - base::BindOnce(std::move(callback), OfflineCapability::kUnsupported)); + base::BindOnce(std::move(callback), OfflineCapability::kUnsupported, + blink::mojom::kInvalidServiceWorkerRegistrationId)); return; } context()->CheckOfflineCapability( @@ -1727,10 +1728,12 @@ void ServiceWorkerContextWrapper::DidCheckOfflineCapability( CheckOfflineCapabilityCallback callback, - OfflineCapability capability) { + OfflineCapability capability, + int64_t registration_id) { DCHECK_CURRENTLY_ON(GetCoreThreadId()); GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), capability)); + FROM_HERE, + base::BindOnce(std::move(callback), capability, registration_id)); } void ServiceWorkerContextWrapper::DidFindRegistrationForUpdate(
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h index b739fcd..139e5ff 100644 --- a/content/browser/service_worker/service_worker_context_wrapper.h +++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -431,7 +431,8 @@ void DidCheckHasServiceWorker(CheckHasServiceWorkerCallback callback, content::ServiceWorkerCapability status); void DidCheckOfflineCapability(CheckOfflineCapabilityCallback callback, - content::OfflineCapability status); + content::OfflineCapability status, + int64_t registration_id); void DidFindRegistrationForUpdate( blink::ServiceWorkerStatusCode status,
diff --git a/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc b/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc index 47a4733..85e3fbd 100644 --- a/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc +++ b/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc
@@ -277,15 +277,21 @@ base::Optional<OfflineCapability> out_offline_capability; RunOrPostTaskOnThread( FROM_HERE, ServiceWorkerContext::GetCoreThreadId(), - base::BindOnce(&ServiceWorkerOfflineCapabilityCheckBrowserTest:: - CheckOfflineCapabilityOnCoreThread, - base::Unretained(this), path, - base::BindLambdaForTesting( - [&out_offline_capability, &fetch_run_loop]( - OfflineCapability offline_capability) { - out_offline_capability = offline_capability; - fetch_run_loop.Quit(); - }))); + base::BindOnce( + &ServiceWorkerOfflineCapabilityCheckBrowserTest:: + CheckOfflineCapabilityOnCoreThread, + base::Unretained(this), path, + base::BindLambdaForTesting([&out_offline_capability, + &fetch_run_loop]( + OfflineCapability offline_capability, + int64_t registration_id) { + out_offline_capability = offline_capability; + if (offline_capability == OfflineCapability::kSupported) { + EXPECT_NE(registration_id, + blink::mojom::kInvalidServiceWorkerRegistrationId); + } + fetch_run_loop.Quit(); + }))); fetch_run_loop.Run(); DCHECK(out_offline_capability.has_value()); return *out_offline_capability;
diff --git a/content/browser/service_worker/service_worker_offline_capability_checker.cc b/content/browser/service_worker/service_worker_offline_capability_checker.cc index 52304d4..410e488 100644 --- a/content/browser/service_worker/service_worker_offline_capability_checker.cc +++ b/content/browser/service_worker/service_worker_offline_capability_checker.cc
@@ -12,6 +12,7 @@ #include "content/browser/service_worker/service_worker_version.h" #include "content/browser/storage_partition_impl.h" #include "content/common/fetch/fetch_request_type_converters.h" +#include "third_party/blink/public/mojom/service_worker/service_worker_database.mojom.h" #include "url/gurl.h" namespace content { @@ -41,12 +42,14 @@ blink::ServiceWorkerStatusCode status, scoped_refptr<ServiceWorkerRegistration> registration) { if (status != blink::ServiceWorkerStatusCode::kOk) { - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + blink::mojom::kInvalidServiceWorkerRegistrationId); return; } if (registration->is_uninstalling() || registration->is_uninstalled()) { - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + blink::mojom::kInvalidServiceWorkerRegistrationId); return; } @@ -56,7 +59,8 @@ preferred_version = registration->waiting_version(); } if (!preferred_version) { - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + blink::mojom::kInvalidServiceWorkerRegistrationId); return; } @@ -66,7 +70,8 @@ DCHECK_NE(existence, ServiceWorkerVersion::FetchHandlerExistence::UNKNOWN); if (existence != ServiceWorkerVersion::FetchHandlerExistence::EXISTS) { - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + preferred_version->registration_id()); return; } @@ -79,7 +84,8 @@ // TODO(hayato): We can do a bit better, such as 1) trigger the activation // and wait, or 2) return a value to indicate the service worker is // installed but not yet activated. - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + preferred_version->registration_id()); return; } @@ -95,7 +101,8 @@ base::WeakPtr<ServiceWorkerContextCore> context = preferred_version->context(); if (!context) { - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + preferred_version->registration_id()); return; } @@ -121,18 +128,20 @@ blink::mojom::FetchAPIResponsePtr response, blink::mojom::ServiceWorkerStreamHandlePtr /* stream */, blink::mojom::ServiceWorkerFetchEventTimingPtr /* timing */, - scoped_refptr<ServiceWorkerVersion>) { + scoped_refptr<ServiceWorkerVersion> version) { if (status == blink::ServiceWorkerStatusCode::kOk && result == ServiceWorkerFetchDispatcher::FetchEventResult::kGotResponse && // TODO(hayato): Investigate whether any 2xx should be accepted or not. response->status_code == 200) { - std::move(callback_).Run(OfflineCapability::kSupported); + std::move(callback_).Run(OfflineCapability::kSupported, + version->registration_id()); } else { // TODO(hayato): At present, we return kUnsupported even if the detection // failed due to internal errors (disk fialures, timeout, etc). In the // future, we might want to return another enum value so that the callside // can know whether internal errors happened or not. - std::move(callback_).Run(OfflineCapability::kUnsupported); + std::move(callback_).Run(OfflineCapability::kUnsupported, + version->registration_id()); } }
diff --git a/content/browser/webauth/authenticator_common.cc b/content/browser/webauth/authenticator_common.cc index f096ba4..253291d 100644 --- a/content/browser/webauth/authenticator_common.cc +++ b/content/browser/webauth/authenticator_common.cc
@@ -77,6 +77,7 @@ kHMACSecret, kPRF, kCredProps, + kLargeBlob, }; namespace client_data { @@ -388,6 +389,11 @@ response->cred_props_rk = *response_data.is_resident_key; } break; + case RequestExtension::kLargeBlob: + response->echo_large_blob = true; + response->supports_large_blob = + response_data.large_blob_key().has_value(); + break; case RequestExtension::kAppID: NOTREACHED(); break; @@ -478,6 +484,7 @@ } case RequestExtension::kHMACSecret: case RequestExtension::kCredProps: + case RequestExtension::kLargeBlob: NOTREACHED(); break; } @@ -941,21 +948,16 @@ if (options->cred_props) { requested_extensions_.insert(RequestExtension::kCredProps); } + if (options->large_blob_enable != device::LargeBlobSupport::kNotRequested) { + requested_extensions_.insert(RequestExtension::kLargeBlob); + } + make_credential_options_->large_blob_support = options->large_blob_enable; ctap_make_credential_request_->app_id = std::move(appid_exclude); ctap_make_credential_request_->is_incognito_mode = browser_context()->IsOffTheRecord(); // On dual protocol CTAP2/U2F devices, force credential creation over U2F. ctap_make_credential_request_->is_u2f_only = origin_is_crypto_token_extension; - if (make_credential_options_->resident_key == - device::ResidentKeyRequirement::kRequired && - caller_origin.scheme() == "chrome-extension") { - // The large blob key extension is set for every request since we cannot - // know in advance if the RP will attempt storing a blob on a future - // GetAssertion request. - ctap_make_credential_request_->large_blob_key = true; - } - if (base::FeatureList::IsEnabled(device::kWebAuthPhoneSupport) && !origin_is_crypto_token_extension && !is_cross_origin) { // Send the unhashed origin and challenge to caBLEv2 authenticators, because @@ -1271,6 +1273,13 @@ kAuthenticatorMissingUserVerification, blink::mojom::AuthenticatorStatus::NOT_ALLOWED_ERROR); return; + case device::MakeCredentialStatus::kAuthenticatorMissingLargeBlob: + SignalFailureToRequestDelegate( + authenticator, + AuthenticatorRequestClientDelegate::InterestingFailureReason:: + kAuthenticatorMissingLargeBlob, + blink::mojom::AuthenticatorStatus::NOT_ALLOWED_ERROR); + return; case device::MakeCredentialStatus::kNoCommonAlgorithms: SignalFailureToRequestDelegate( authenticator,
diff --git a/content/browser/webauth/authenticator_impl_unittest.cc b/content/browser/webauth/authenticator_impl_unittest.cc index ff8f5a9..4512f3f 100644 --- a/content/browser/webauth/authenticator_impl_unittest.cc +++ b/content/browser/webauth/authenticator_impl_unittest.cc
@@ -57,6 +57,7 @@ #include "device/fido/fido_authenticator.h" #include "device/fido/fido_constants.h" #include "device/fido/fido_test_data.h" +#include "device/fido/fido_types.h" #include "device/fido/hid/fake_hid_impl_for_testing.h" #include "device/fido/mock_fido_device.h" #include "device/fido/public_key.h" @@ -1638,45 +1639,6 @@ } } -// Tests that registering a resident credential on a capable authenticator also -// registers a large blob key when called from an extension. -TEST_F(ExtensionAuthenticatorTest, MakeCredentialLargeBlobKeyExtension) { - base::Optional<device::PublicKeyCredentialDescriptor> credential; - device::VirtualCtap2Device::Config config; - config.internal_uv_support = true; - virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; - config.resident_key_support = true; - - for (bool rk_enabled : {false, true}) { - SCOPED_TRACE(::testing::Message() << "rk=" << rk_enabled); - for (bool large_blob_supported : {false, true}) { - SCOPED_TRACE(::testing::Message() - << "largeBlob=" << large_blob_supported); - config.large_blob_support = large_blob_supported; - virtual_device_factory_->SetCtap2Config(config); - PublicKeyCredentialCreationOptionsPtr options = - GetTestPublicKeyCredentialCreationOptions(); - if (rk_enabled) { - options->authenticator_selection->SetResidentKeyForTesting( - device::ResidentKeyRequirement::kRequired); - } - options->user.id = {1, 2, 3, 4}; - options->user.name = "name"; - options->user.display_name = "displayName"; - - MakeCredentialResult make_credential_result = - AuthenticatorMakeCredential(std::move(options)); - EXPECT_EQ(make_credential_result.status, AuthenticatorStatus::SUCCESS); - - auto& registration = - *virtual_device_factory_->mutable_state()->registrations.begin(); - EXPECT_EQ(rk_enabled && large_blob_supported, - registration.second.large_blob_key.has_value()); - virtual_device_factory_->mutable_state()->registrations.clear(); - } - } -} - enum class EnterprisePolicy { LISTED, NOT_LISTED, @@ -4958,6 +4920,88 @@ EXPECT_TRUE(HasUV(result.response)); } +static const char* BlobSupportDescription(device::LargeBlobSupport support) { + switch (support) { + case device::LargeBlobSupport::kNotRequested: + return "Blob not requested"; + case device::LargeBlobSupport::kPreferred: + return "Blob preferred"; + case device::LargeBlobSupport::kRequired: + return "Blob required"; + } +} + +TEST_F(ResidentKeyAuthenticatorImplTest, MakeCredentialLargeBlob) { + const auto BlobRequired = device::LargeBlobSupport::kRequired; + const auto BlobPreferred = device::LargeBlobSupport::kPreferred; + const auto BlobNotRequested = device::LargeBlobSupport::kNotRequested; + + constexpr struct { + bool large_blob_support; + bool rk_required; + device::LargeBlobSupport large_blob_enable; + bool request_success; + bool did_create_large_blob; + } kLargeBlobTestCases[] = { + // clang-format off + // support, rk, enabled, success, did create + { true, true, BlobRequired, true, true}, + { true, true, BlobPreferred, true, true}, + { true, true, BlobNotRequested, true, false}, + { true, false, BlobRequired, false, false}, + { true, false, BlobPreferred, true, false}, + { true, true, BlobNotRequested, true, false}, + { false, true, BlobRequired, false, false}, + { false, true, BlobPreferred, true, false}, + { true, true, BlobNotRequested, true, false}, + // clang-format on + }; + for (auto& test : kLargeBlobTestCases) { + SCOPED_TRACE(::testing::Message() << "support=" << test.large_blob_support); + SCOPED_TRACE(::testing::Message() << "rk_required=" << test.rk_required); + SCOPED_TRACE(::testing::Message() + << "enabled=" + << BlobSupportDescription(test.large_blob_enable)); + SCOPED_TRACE(::testing::Message() << "success=" << test.request_success); + SCOPED_TRACE(::testing::Message() + << "did create=" << test.did_create_large_blob); + + device::VirtualCtap2Device::Config config; + config.pin_support = true; + config.resident_key_support = true; + config.large_blob_support = test.large_blob_support; + virtual_device_factory_->SetCtap2Config(config); + + PublicKeyCredentialCreationOptionsPtr options = make_credential_options( + test.rk_required ? device::ResidentKeyRequirement::kRequired + : device::ResidentKeyRequirement::kDiscouraged); + options->large_blob_enable = test.large_blob_enable; + MakeCredentialResult result = + AuthenticatorMakeCredential(std::move(options)); + + if (test.request_success) { + ASSERT_EQ(AuthenticatorStatus::SUCCESS, result.status); + ASSERT_EQ(1u, + virtual_device_factory_->mutable_state()->registrations.size()); + const device::VirtualFidoDevice::RegistrationData& registration = + virtual_device_factory_->mutable_state() + ->registrations.begin() + ->second; + EXPECT_EQ(test.did_create_large_blob, + registration.large_blob_key.has_value()); + EXPECT_EQ(test.large_blob_enable != BlobNotRequested, + result.response->echo_large_blob); + EXPECT_EQ(test.did_create_large_blob, + result.response->supports_large_blob); + } else { + ASSERT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, result.status); + ASSERT_EQ(0u, + virtual_device_factory_->mutable_state()->registrations.size()); + } + virtual_device_factory_->mutable_state()->registrations.clear(); + } +} + static const char* ProtectionPolicyDescription( blink::mojom::ProtectionPolicy p) { switch (p) { @@ -5408,104 +5452,132 @@ const std::vector<uint8_t> salt1(32, 1); const std::vector<uint8_t> salt2(32, 2); + std::vector<uint8_t> salt1_eval; + std::vector<uint8_t> salt2_eval; - auto prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt1; - std::vector<blink::mojom::PRFValuesPtr> inputs; - inputs.emplace_back(std::move(prf_value)); - auto result = assertion(std::move(inputs)); - const std::vector<uint8_t> salt1_eval = std::move(result->first); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->first = salt1; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs)); + salt1_eval = std::move(result->first); + } // The result should be consistent - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt1; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs)); - ASSERT_EQ(result->first, salt1_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->first = salt1; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs)); + ASSERT_EQ(result->first, salt1_eval); + } // Should be able to evaluate two points at once. - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt1; - prf_value->second = salt2; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs)); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_TRUE(result->second); - const std::vector<uint8_t> salt2_eval = std::move(*result->second); - ASSERT_NE(salt1_eval, salt2_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->first = salt1; + prf_value->second = salt2; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs)); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_TRUE(result->second); + salt2_eval = std::move(*result->second); + ASSERT_NE(salt1_eval, salt2_eval); + } // Should be consistent if swapped. - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt2; - prf_value->second = salt1; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs)); - ASSERT_EQ(result->first, salt2_eval); - ASSERT_TRUE(result->second); - ASSERT_EQ(*result->second, salt1_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->first = salt2; + prf_value->second = salt1; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs)); + ASSERT_EQ(result->first, salt2_eval); + ASSERT_TRUE(result->second); + ASSERT_EQ(*result->second, salt1_eval); + } // Should still trigger if the credential ID is specified - prf_value = blink::mojom::PRFValues::New(); - prf_value->id.emplace(credential->id()); - prf_value->first = salt1; - prf_value->second = salt2; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs)); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_TRUE(result->second); - ASSERT_EQ(*result->second, salt2_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->id.emplace(credential->id()); + prf_value->first = salt1; + prf_value->second = salt2; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs)); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_TRUE(result->second); + ASSERT_EQ(*result->second, salt2_eval); + } // And the specified credential ID should override any default inputs. - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = std::vector<uint8_t>(32, 3); - inputs.emplace_back(std::move(prf_value)); - prf_value = blink::mojom::PRFValues::New(); - prf_value->id.emplace(credential->id()); - prf_value->first = salt1; - prf_value->second = salt2; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs)); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_TRUE(result->second); - ASSERT_EQ(*result->second, salt2_eval); + { + auto prf_value1 = blink::mojom::PRFValues::New(); + prf_value1->first = std::vector<uint8_t>(32, 3); + auto prf_value2 = blink::mojom::PRFValues::New(); + prf_value2->id.emplace(credential->id()); + prf_value2->first = salt1; + prf_value2->second = salt2; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value1)); + inputs.emplace_back(std::move(prf_value2)); + auto result = assertion(std::move(inputs)); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_TRUE(result->second); + ASSERT_EQ(*result->second, salt2_eval); + } // ... and that should still be true if there there are lots of dummy entries // in the allowlist. Note that the virtual authenticator was configured such // that this will cause multiple batches. - prf_value = blink::mojom::PRFValues::New(); - prf_value->id.emplace(credential->id()); - prf_value->first = salt1; - prf_value->second = salt2; - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs), /*allowlist_size=*/20); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_TRUE(result->second); - ASSERT_EQ(*result->second, salt2_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->id.emplace(credential->id()); + prf_value->first = salt1; + prf_value->second = salt2; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs), /*allowlist_size=*/20); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_TRUE(result->second); + ASSERT_EQ(*result->second, salt2_eval); + } // Default PRF values should be passed down when the allowlist is empty. - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt1; - prf_value->second = salt2; - inputs.emplace_back(std::move(prf_value)); - test_client_.expected_accounts = "01020304:name:displayName"; - test_client_.selected_user_id = {1, 2, 3, 4}; - result = assertion(std::move(inputs), /*allowlist_size=*/0); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_TRUE(result->second); - ASSERT_EQ(*result->second, salt2_eval); + { + auto prf_value = blink::mojom::PRFValues::New(); + prf_value->first = salt1; + prf_value->second = salt2; + test_client_.expected_accounts = "01020304:name:displayName"; + test_client_.selected_user_id = {1, 2, 3, 4}; + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value)); + auto result = assertion(std::move(inputs), /*allowlist_size=*/0); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_TRUE(result->second); + ASSERT_EQ(*result->second, salt2_eval); + } // And the default PRF values should be used if none of the specific values // match. - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = salt1; - inputs.emplace_back(std::move(prf_value)); - prf_value = blink::mojom::PRFValues::New(); - prf_value->first = std::vector<uint8_t>(32, 3); - prf_value->id = std::vector<uint8_t>(32, 4); - inputs.emplace_back(std::move(prf_value)); - result = assertion(std::move(inputs), /*allowlist_size=*/20); - ASSERT_EQ(result->first, salt1_eval); - ASSERT_FALSE(result->second); + { + auto prf_value1 = blink::mojom::PRFValues::New(); + prf_value1->first = salt1; + auto prf_value2 = blink::mojom::PRFValues::New(); + prf_value2->first = std::vector<uint8_t>(32, 3); + prf_value2->id = std::vector<uint8_t>(32, 4); + std::vector<blink::mojom::PRFValuesPtr> inputs; + inputs.emplace_back(std::move(prf_value1)); + inputs.emplace_back(std::move(prf_value2)); + auto result = assertion(std::move(inputs), /*allowlist_size=*/20); + ASSERT_EQ(result->first, salt1_eval); + ASSERT_FALSE(result->second); + } } class InternalAuthenticatorImplTest : public AuthenticatorTestBase {
diff --git a/content/browser/webauth/authenticator_mojom_traits.cc b/content/browser/webauth/authenticator_mojom_traits.cc index 029e94f..e4d78b8 100644 --- a/content/browser/webauth/authenticator_mojom_traits.cc +++ b/content/browser/webauth/authenticator_mojom_traits.cc
@@ -225,6 +225,41 @@ } // static +blink::mojom::LargeBlobSupport +EnumTraits<blink::mojom::LargeBlobSupport, device::LargeBlobSupport>::ToMojom( + device::LargeBlobSupport input) { + switch (input) { + case ::device::LargeBlobSupport::kNotRequested: + return blink::mojom::LargeBlobSupport::NOT_REQUESTED; + case ::device::LargeBlobSupport::kRequired: + return blink::mojom::LargeBlobSupport::REQUIRED; + case ::device::LargeBlobSupport::kPreferred: + return blink::mojom::LargeBlobSupport::PREFERRED; + } + NOTREACHED(); + return blink::mojom::LargeBlobSupport::NOT_REQUESTED; +} + +// static +bool EnumTraits<blink::mojom::LargeBlobSupport, device::LargeBlobSupport>:: + FromMojom(blink::mojom::LargeBlobSupport input, + device::LargeBlobSupport* output) { + switch (input) { + case blink::mojom::LargeBlobSupport::NOT_REQUESTED: + *output = ::device::LargeBlobSupport::kNotRequested; + return true; + case blink::mojom::LargeBlobSupport::REQUIRED: + *output = ::device::LargeBlobSupport::kRequired; + return true; + case blink::mojom::LargeBlobSupport::PREFERRED: + *output = ::device::LargeBlobSupport::kPreferred; + return true; + } + NOTREACHED(); + return false; +} + +// static bool StructTraits<blink::mojom::AuthenticatorSelectionCriteriaDataView, device::AuthenticatorSelectionCriteria>:: Read(blink::mojom::AuthenticatorSelectionCriteriaDataView data,
diff --git a/content/browser/webauth/authenticator_mojom_traits.h b/content/browser/webauth/authenticator_mojom_traits.h index 4db2fa9b..f22a501 100644 --- a/content/browser/webauth/authenticator_mojom_traits.h +++ b/content/browser/webauth/authenticator_mojom_traits.h
@@ -119,6 +119,14 @@ template <> struct BLINK_COMMON_EXPORT + EnumTraits<blink::mojom::LargeBlobSupport, device::LargeBlobSupport> { + static blink::mojom::LargeBlobSupport ToMojom(device::LargeBlobSupport input); + static bool FromMojom(blink::mojom::LargeBlobSupport input, + device::LargeBlobSupport* output); +}; + +template <> +struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::AuthenticatorSelectionCriteriaDataView, device::AuthenticatorSelectionCriteria> { static device::AuthenticatorAttachment authenticator_attachment(
diff --git a/content/browser/webauth/virtual_authenticator.cc b/content/browser/webauth/virtual_authenticator.cc index 16f0d461..a461e3c 100644 --- a/content/browser/webauth/virtual_authenticator.cc +++ b/content/browser/webauth/virtual_authenticator.cc
@@ -23,12 +23,14 @@ device::FidoTransportProtocol transport, device::AuthenticatorAttachment attachment, bool has_resident_key, - bool has_user_verification) + bool has_user_verification, + bool has_large_blob) : protocol_(protocol), ctap2_version_(ctap2_version), attachment_(attachment), has_resident_key_(has_resident_key), has_user_verification_(has_user_verification), + has_large_blob_(has_large_blob), unique_id_(base::GenerateGUID()), state_(base::MakeRefCounted<device::VirtualFidoDevice::State>()) { state_->transport = transport; @@ -119,6 +121,7 @@ break; } config.resident_key_support = has_resident_key_; + config.large_blob_support = has_large_blob_; config.internal_uv_support = has_user_verification_; config.is_platform_authenticator = attachment_ == device::AuthenticatorAttachment::kPlatform;
diff --git a/content/browser/webauth/virtual_authenticator.h b/content/browser/webauth/virtual_authenticator.h index 4c9a9a6..53756ae 100644 --- a/content/browser/webauth/virtual_authenticator.h +++ b/content/browser/webauth/virtual_authenticator.h
@@ -33,7 +33,8 @@ device::FidoTransportProtocol transport, device::AuthenticatorAttachment attachment, bool has_resident_key, - bool has_user_verification); + bool has_user_verification, + bool has_large_blob); ~VirtualAuthenticator() override; void AddReceiver( @@ -114,6 +115,7 @@ const device::AuthenticatorAttachment attachment_; const bool has_resident_key_; const bool has_user_verification_; + const bool has_large_blob_; bool is_user_verified_ = true; const std::string unique_id_; bool is_user_present_;
diff --git a/content/browser/webauth/virtual_authenticator_manager_impl.cc b/content/browser/webauth/virtual_authenticator_manager_impl.cc index 17d7a310..b004c36 100644 --- a/content/browser/webauth/virtual_authenticator_manager_impl.cc +++ b/content/browser/webauth/virtual_authenticator_manager_impl.cc
@@ -53,7 +53,7 @@ device::ProtocolVersion::kU2f, /*ignored*/ device::Ctap2Version::kCtap2_0, transport, device::AuthenticatorAttachment::kCrossPlatform, /*has_resident_key=*/false, - /*has_user_verification=*/false)); + /*has_user_verification=*/false, /*has_large_blob=*/false)); } VirtualAuthenticator* VirtualAuthenticatorManagerImpl::CreateCTAP2Authenticator( @@ -61,10 +61,11 @@ device::FidoTransportProtocol transport, device::AuthenticatorAttachment attachment, bool has_resident_key, - bool has_user_verification) { + bool has_user_verification, + bool has_large_blob) { return AddAuthenticator(std::make_unique<VirtualAuthenticator>( device::ProtocolVersion::kCtap2, ctap2_version, transport, attachment, - has_resident_key, has_user_verification)); + has_resident_key, has_user_verification, has_large_blob)); } VirtualAuthenticator* VirtualAuthenticatorManagerImpl::GetAuthenticator( @@ -123,7 +124,8 @@ case device::ProtocolVersion::kCtap2: authenticator = CreateCTAP2Authenticator( options->ctap2_version, options->transport, options->attachment, - options->has_resident_key, options->has_user_verification); + options->has_resident_key, options->has_user_verification, + options->has_large_blob); break; case device::ProtocolVersion::kUnknown: break;
diff --git a/content/browser/webauth/virtual_authenticator_manager_impl.h b/content/browser/webauth/virtual_authenticator_manager_impl.h index 5338b60f..ee43cc4 100644 --- a/content/browser/webauth/virtual_authenticator_manager_impl.h +++ b/content/browser/webauth/virtual_authenticator_manager_impl.h
@@ -62,7 +62,8 @@ device::FidoTransportProtocol transport, device::AuthenticatorAttachment attachment, bool has_resident_key, - bool has_user_verification); + bool has_user_verification, + bool has_large_blob); // Returns the authenticator with the given |id|. Returns nullptr if no // authenticator matches the ID.
diff --git a/content/browser/webauth/webauth_browsertest.cc b/content/browser/webauth/webauth_browsertest.cc index 08159488..51a261e9 100644 --- a/content/browser/webauth/webauth_browsertest.cc +++ b/content/browser/webauth/webauth_browsertest.cc
@@ -4,6 +4,7 @@ #include <stdint.h> +#include <memory> #include <vector> #include "base/bind.h" @@ -41,12 +42,14 @@ #include "device/fido/features.h" #include "device/fido/fido_discovery_factory.h" #include "device/fido/fido_test_data.h" +#include "device/fido/fido_types.h" #include "device/fido/hid/fake_hid_impl_for_testing.h" #include "device/fido/mock_fido_device.h" #include "device/fido/test_callback_receiver.h" #include "device/fido/virtual_fido_device_factory.h" #include "mojo/public/cpp/bindings/remote.h" #include "net/dns/mock_host_resolver.h" +#include "net/test/embedded_test_server/embedded_test_server.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h" @@ -400,8 +403,7 @@ // Test fixture base class for common tasks. class WebAuthBrowserTestBase : public content::ContentBrowserTest { protected: - WebAuthBrowserTestBase() - : https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {} + WebAuthBrowserTestBase() = default; virtual std::vector<base::Feature> GetFeaturesToEnable() { return {}; } @@ -412,8 +414,8 @@ https_server().ServeFilesFromSourceDirectory(GetTestDataFilePath()); ASSERT_TRUE(https_server().Start()); - test_client_.reset( - new WebAuthBrowserTestContentBrowserClient(&test_state_)); + test_client_ = + std::make_unique<WebAuthBrowserTestContentBrowserClient>(&test_state_); old_client_ = SetBrowserClientForTesting(test_client_.get()); EXPECT_TRUE( @@ -453,7 +455,7 @@ } base::test::ScopedFeatureList scoped_feature_list_; - net::EmbeddedTestServer https_server_; + net::EmbeddedTestServer https_server_{net::EmbeddedTestServer::TYPE_HTTPS}; std::unique_ptr<WebAuthBrowserTestContentBrowserClient> test_client_; WebAuthBrowserTestState test_state_; ContentBrowserClient* old_client_ = nullptr; @@ -519,7 +521,7 @@ /*hmac_create_secret=*/false, /*prf_enable=*/false, blink::mojom::ProtectionPolicy::UNSPECIFIED, /*enforce_protection_policy=*/false, /*appid_exclude=*/base::nullopt, - /*cred_props=*/false); + /*cred_props=*/false, device::LargeBlobSupport::kNotRequested); return mojo_options; } @@ -541,7 +543,8 @@ kTestChallenge, base::TimeDelta::FromSeconds(30), "acme.com", std::move(credentials), device::UserVerificationRequirement::kPreferred, base::nullopt, std::vector<device::CableDiscoveryData>(), /*prf=*/false, - /*prf_inputs=*/std::vector<blink::mojom::PRFValuesPtr>()); + /*prf_inputs=*/std::vector<blink::mojom::PRFValuesPtr>(), + /*large_blob_read=*/false, /*large_blob_write=*/base::nullopt); return mojo_options; }
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 9ab080e..ff3e49c 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -357,7 +357,6 @@ {"LayoutNG", blink::features::kLayoutNG}, {"LayoutNGFieldset", blink::features::kLayoutNGFieldset}, {"LayoutNGFragmentItem", blink::features::kFragmentItem}, - {"LayoutNGRuby", blink::features::kLayoutNGRuby}, {"LegacyWindowsDWriteFontFallback", features::kLegacyWindowsDWriteFontFallback}, {"LinkDisabledNewSpecBehavior",
diff --git a/content/public/browser/authenticator_request_client_delegate.h b/content/public/browser/authenticator_request_client_delegate.h index c711491..18e7963 100644 --- a/content/public/browser/authenticator_request_client_delegate.h +++ b/content/public/browser/authenticator_request_client_delegate.h
@@ -52,6 +52,7 @@ kAuthenticatorRemovedDuringPINEntry, kAuthenticatorMissingResidentKeys, kAuthenticatorMissingUserVerification, + kAuthenticatorMissingLargeBlob, kNoCommonAlgorithms, // kStorageFull indicates that a resident credential could not be created // because the authenticator has insufficient storage.
diff --git a/content/public/browser/service_worker_context.h b/content/public/browser/service_worker_context.h index 866196d2..557fe427 100644 --- a/content/public/browser/service_worker_context.h +++ b/content/public/browser/service_worker_context.h
@@ -77,7 +77,8 @@ base::OnceCallback<void(ServiceWorkerCapability capability)>; using CheckOfflineCapabilityCallback = - base::OnceCallback<void(OfflineCapability capability)>; + base::OnceCallback<void(OfflineCapability capability, + int64_t registration_id)>; using CountExternalRequestsCallback = base::OnceCallback<void(size_t external_request_count)>; @@ -208,8 +209,8 @@ CheckHasServiceWorkerCallback callback) = 0; // Simulates a navigation request in the offline state and dispatches a fetch - // event. Returns OfflineCapability::kSupported if the response's status code - // is 200. + // event. Returns OfflineCapability::kSupported and the registration id if + // the response's status code is 200. // // This function can be called from any thread, but the callback will always // be called on the UI thread.
diff --git a/content/public/test/test_utils.h b/content/public/test/test_utils.h index b6e221d..b55ad04c 100644 --- a/content/public/test/test_utils.h +++ b/content/public/test/test_utils.h
@@ -311,8 +311,8 @@ DISALLOW_COPY_AND_ASSIGN(InProcessUtilityThreadHelper); }; -// This observer keeps track of the last deleted RenderFrame to avoid -// accessing it and causing use-after-free condition. +// This observer keeps tracks of whether a given RenderFrameHost is deleted or +// not to avoid accessing it and causing use-after-free condition. class RenderFrameDeletedObserver : public WebContentsObserver { public: RenderFrameDeletedObserver(RenderFrameHost* rfh);
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index 055c091..265cefa 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc
@@ -2544,7 +2544,15 @@ } }; -TEST_F(RenderViewImplTextInputMessageOrder, MessageOrderInDidChangeSelection) { +// Failing on Windows; see https://crbug.com/1134571. +#if defined(OS_WIN) +#define MAYBE_MessageOrderInDidChangeSelection \ + DISABLED_MessageOrderInDidChangeSelection +#else +#define MAYBE_MessageOrderInDidChangeSelection MessageOrderInDidChangeSelection +#endif +TEST_F(RenderViewImplTextInputMessageOrder, + MAYBE_MessageOrderInDidChangeSelection) { LoadHTML("<textarea id=\"test\"></textarea>"); // TextInputStateChanged should be called earlier than TextSelectionChanged.
diff --git a/content/test/data/accessibility/aria/annotation-roles.html b/content/test/data/accessibility/aria/annotation-roles.html index b24d1694..9c74da57 100644 --- a/content/test/data/accessibility/aria/annotation-roles.html +++ b/content/test/data/accessibility/aria/annotation-roles.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @WIN-DENY:level* @AURALINUX-ALLOW:xml-roles*
diff --git a/content/test/data/accessibility/aria/aria-activedescendant.html b/content/test/data/accessibility/aria/aria-activedescendant.html index e809c09..a862104 100644 --- a/content/test/data/accessibility/aria/aria-activedescendant.html +++ b/content/test/data/accessibility/aria/aria-activedescendant.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXFocus* +@MAC-ALLOW:AXFocus @BLINK-ALLOW:active* --> <html>
diff --git a/content/test/data/accessibility/aria/aria-alertdialog.html b/content/test/data/accessibility/aria/aria-alertdialog.html index c72ab5bc..0710307e 100644 --- a/content/test/data/accessibility/aria/aria-alertdialog.html +++ b/content/test/data/accessibility/aria/aria-alertdialog.html
@@ -1,8 +1,8 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXARIALive* -@MAC-ALLOW:AXARIABusy* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXARIALive +@MAC-ALLOW:AXARIABusy @WIN-ALLOW:xml-roles* @WIN-ALLOW:*live* @WIN-ALLOW:*busy*
diff --git a/content/test/data/accessibility/aria/aria-application.html b/content/test/data/accessibility/aria/aria-application.html index 445ab95..7382ffb 100644 --- a/content/test/data/accessibility/aria/aria-application.html +++ b/content/test/data/accessibility/aria/aria-application.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription='application' -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <html> <body role="application" id="testAriaApplication">
diff --git a/content/test/data/accessibility/aria/aria-article.html b/content/test/data/accessibility/aria/aria-article.html index 7e226d8..96e7d8f 100644 --- a/content/test/data/accessibility/aria/aria-article.html +++ b/content/test/data/accessibility/aria/aria-article.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription @MAC-ALLOW:AXSubrole=AXDocumentArticle -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle @WIN-ALLOW:xml-roles:article --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/aria/aria-banner.html b/content/test/data/accessibility/aria/aria-banner.html index b9969e7..fc23c2a 100644 --- a/content/test/data/accessibility/aria/aria-banner.html +++ b/content/test/data/accessibility/aria/aria-banner.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles:* -->
diff --git a/content/test/data/accessibility/aria/aria-busy.html b/content/test/data/accessibility/aria/aria-busy.html index 5b7c7a0..846eae7 100644 --- a/content/test/data/accessibility/aria/aria-busy.html +++ b/content/test/data/accessibility/aria/aria-busy.html
@@ -1,7 +1,7 @@ <!-- -@MAC-ALLOW:AXARIABusy* +@MAC-ALLOW:AXARIABusy @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:BUSY* @BLINK-ALLOW:liveBusy* @BLINK-ALLOW:containerLiveBusy*
diff --git a/content/test/data/accessibility/aria/aria-button.html b/content/test/data/accessibility/aria/aria-button.html index 0edbcdf..e860b03 100644 --- a/content/test/data/accessibility/aria/aria-button.html +++ b/content/test/data/accessibility/aria/aria-button.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:checkable* @WIN-ALLOW:HASPOPUP @WIN-ALLOW:haspopup*
diff --git a/content/test/data/accessibility/aria/aria-combobox-uneditable.html b/content/test/data/accessibility/aria/aria-combobox-uneditable.html index 51921d05..75e3f5b 100644 --- a/content/test/data/accessibility/aria/aria-combobox-uneditable.html +++ b/content/test/data/accessibility/aria/aria-combobox-uneditable.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXFocused=1 -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] -@MAC-ALLOW:AXTitleUIElement* +@MAC-ALLOW:AXTitleUIElement @WIN-DENY:description* @WIN-ALLOW:FOCUS* @WIN-ALLOW:haspopup*
diff --git a/content/test/data/accessibility/aria/aria-combobox.html b/content/test/data/accessibility/aria/aria-combobox.html index 8d119cf9..8074754 100644 --- a/content/test/data/accessibility/aria/aria-combobox.html +++ b/content/test/data/accessibility/aria/aria-combobox.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXFocused=1 -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] -@MAC-ALLOW:AXTitleUIElement* +@MAC-ALLOW:AXTitleUIElement @WIN-DENY:description* @WIN-ALLOW:FOCUS* @WIN-ALLOW:haspopup*
diff --git a/content/test/data/accessibility/aria/aria-controls.html b/content/test/data/accessibility/aria/aria-controls.html index 5bd1cd6..15b933c 100644 --- a/content/test/data/accessibility/aria/aria-controls.html +++ b/content/test/data/accessibility/aria/aria-controls.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXDescription='File' -@MAC-DENY:AXValue* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-DENY:AXValue +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @WIN-ALLOW:n_relations* -->
diff --git a/content/test/data/accessibility/aria/aria-definition.html b/content/test/data/accessibility/aria/aria-definition.html index 034c03c..53890ba 100644 --- a/content/test/data/accessibility/aria/aria-definition.html +++ b/content/test/data/accessibility/aria/aria-definition.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles:* -->
diff --git a/content/test/data/accessibility/aria/aria-describedby-updates.html b/content/test/data/accessibility/aria/aria-describedby-updates.html index e90961e..45a63f3 100644 --- a/content/test/data/accessibility/aria/aria-describedby-updates.html +++ b/content/test/data/accessibility/aria/aria-describedby-updates.html
@@ -2,7 +2,7 @@ @WAIT-FOR:oranges @BLINK-ALLOW:description=* @WIN-ALLOW:description=* -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @BLINK-DENY:descriptionFrom* --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/aria/aria-describedby.html b/content/test/data/accessibility/aria/aria-describedby.html index 7253db4..7cd25e2 100644 --- a/content/test/data/accessibility/aria/aria-describedby.html +++ b/content/test/data/accessibility/aria/aria-describedby.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @WIN-DENY:name* @AURALINUX-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/aria/aria-dialog.html b/content/test/data/accessibility/aria/aria-dialog.html index 1303d00..53c688b9 100644 --- a/content/test/data/accessibility/aria/aria-dialog.html +++ b/content/test/data/accessibility/aria/aria-dialog.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/aria/aria-directory.html b/content/test/data/accessibility/aria/aria-directory.html index d9e1e73..3e754c2 100644 --- a/content/test/data/accessibility/aria/aria-directory.html +++ b/content/test/data/accessibility/aria/aria-directory.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @WIN-DENY:name* @AURALINUX-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/aria/aria-disabled.html b/content/test/data/accessibility/aria/aria-disabled.html index c6e2e34..3141976 100644 --- a/content/test/data/accessibility/aria/aria-disabled.html +++ b/content/test/data/accessibility/aria/aria-disabled.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXEnabled* +@MAC-ALLOW:AXEnabled @WIN-ALLOW:UNAVAILABLE* @BLINK-ALLOW:disabled* @AURALINUX-ALLOW:editable
diff --git a/content/test/data/accessibility/aria/aria-document.html b/content/test/data/accessibility/aria/aria-document.html index 33c32f6f..654bc21 100644 --- a/content/test/data/accessibility/aria/aria-document.html +++ b/content/test/data/accessibility/aria/aria-document.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/aria-dropeffect.html b/content/test/data/accessibility/aria/aria-dropeffect.html index 881c72e..4c3bc30 100644 --- a/content/test/data/accessibility/aria/aria-dropeffect.html +++ b/content/test/data/accessibility/aria/aria-dropeffect.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXDropEffects* +@MAC-ALLOW:AXDropEffects @WIN-ALLOW:dropeffect* @AURALINUX-ALLOW:dropeffect* @BLINK-ALLOW:dropeffect*
diff --git a/content/test/data/accessibility/aria/aria-expanded.html b/content/test/data/accessibility/aria/aria-expanded.html index 3115f04..d482a1c 100644 --- a/content/test/data/accessibility/aria/aria-expanded.html +++ b/content/test/data/accessibility/aria/aria-expanded.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXExpanded* +@MAC-ALLOW:AXExpanded @WIN-ALLOW:EXPANDED* @WIN-ALLOW:COLLAPSED* @WIN-ALLOW:HASPOPUP*
diff --git a/content/test/data/accessibility/aria/aria-flowto.html b/content/test/data/accessibility/aria/aria-flowto.html index 56e9945..00a8ca6 100644 --- a/content/test/data/accessibility/aria/aria-flowto.html +++ b/content/test/data/accessibility/aria/aria-flowto.html
@@ -1,8 +1,8 @@ <!-- -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] -@MAC-ALLOW:AXRoleDescription* -@MAC-DENY:AXDescription* +@MAC-ALLOW:AXRoleDescription +@MAC-DENY:AXDescription --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-form.html b/content/test/data/accessibility/aria/aria-form.html index fa6775c5..e2e51ab80 100644 --- a/content/test/data/accessibility/aria/aria-form.html +++ b/content/test/data/accessibility/aria/aria-form.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/aria-grabbed.html b/content/test/data/accessibility/aria/aria-grabbed.html index 40861c7..0d02738 100644 --- a/content/test/data/accessibility/aria/aria-grabbed.html +++ b/content/test/data/accessibility/aria/aria-grabbed.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXGrabbed* +@MAC-ALLOW:AXGrabbed @WIN-ALLOW:grabbed* @AURALINUX-ALLOW:grabbed* -->
diff --git a/content/test/data/accessibility/aria/aria-haspopup.html b/content/test/data/accessibility/aria/aria-haspopup.html index 026397c4..59dcb3c9 100644 --- a/content/test/data/accessibility/aria/aria-haspopup.html +++ b/content/test/data/accessibility/aria/aria-haspopup.html
@@ -1,7 +1,7 @@ <!-- -@MAC-ALLOW:AXExpanded* -@MAC-ALLOW:AXShowMenu* -@MAC-ALLOW:AXPress* +@MAC-ALLOW:AXExpanded +@MAC-ALLOW:AXShowMenu +@MAC-ALLOW:AXPress @MAC-ALLOW:AXHasPopup @MAC-ALLOW:AXHasPopupValue @WIN-ALLOW:EXPANDED*
diff --git a/content/test/data/accessibility/aria/aria-hidden.html b/content/test/data/accessibility/aria/aria-hidden.html index c26d549f..47a793a 100644 --- a/content/test/data/accessibility/aria/aria-hidden.html +++ b/content/test/data/accessibility/aria/aria-hidden.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXValue* +@MAC-ALLOW:AXValue @WIN-ALLOW:hidden* @AURALINUX-ALLOW:hidden* @BLINK-ALLOW:isLineBreakingObject*
diff --git a/content/test/data/accessibility/aria/aria-label.html b/content/test/data/accessibility/aria/aria-label.html index 6434d29..8e80142 100644 --- a/content/test/data/accessibility/aria/aria-label.html +++ b/content/test/data/accessibility/aria/aria-label.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @WIN-ALLOW:IA2_STATE_CHECKABLE @WIN-ALLOW:xml-roles* @WIN-ALLOW:checkable*
diff --git a/content/test/data/accessibility/aria/aria-labelledby-heading.html b/content/test/data/accessibility/aria/aria-labelledby-heading.html index ee97c09f..7dd57a5 100644 --- a/content/test/data/accessibility/aria/aria-labelledby-heading.html +++ b/content/test/data/accessibility/aria/aria-labelledby-heading.html
@@ -1,6 +1,6 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* -@MAC-ALLOW:AXTitleUIElement* +@MAC-ALLOW:AXTitleUIElement --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/aria/aria-level.html b/content/test/data/accessibility/aria/aria-level.html index 9c499ed..930ed590 100644 --- a/content/test/data/accessibility/aria/aria-level.html +++ b/content/test/data/accessibility/aria/aria-level.html
@@ -1,8 +1,8 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* @MAC-ALLOW:AXSubrole=AXOutlineRow -@MAC-ALLOW:AXDisclosing* -@MAC-ALLOW:AXDisclosureLevel* +@MAC-ALLOW:AXDisclosing +@MAC-ALLOW:AXDisclosureLevel @WIN-ALLOW:level:* @WIN-ALLOW:EXPANDED @WIN-DENY:name=''
diff --git a/content/test/data/accessibility/aria/aria-list.html b/content/test/data/accessibility/aria/aria-list.html index 2dad514..b4935565 100644 --- a/content/test/data/accessibility/aria/aria-list.html +++ b/content/test/data/accessibility/aria/aria-list.html
@@ -1,7 +1,7 @@ <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXSelectedChildren* -@MAC-ALLOW:AXVisibleChildren* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXSelectedChildren +@MAC-ALLOW:AXVisibleChildren --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-listbox-activedescendant.html b/content/test/data/accessibility/aria/aria-listbox-activedescendant.html index 7a5c23054..00505b2 100644 --- a/content/test/data/accessibility/aria/aria-listbox-activedescendant.html +++ b/content/test/data/accessibility/aria/aria-listbox-activedescendant.html
@@ -1,8 +1,8 @@ <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXOrientation* -@MAC-ALLOW:AXSelectedChildren* -@MAC-ALLOW:AXVisibleChildren* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXOrientation +@MAC-ALLOW:AXSelectedChildren +@MAC-ALLOW:AXVisibleChildren --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-listbox-aria-selected.html b/content/test/data/accessibility/aria/aria-listbox-aria-selected.html index bb229299..96c6ef1 100644 --- a/content/test/data/accessibility/aria/aria-listbox-aria-selected.html +++ b/content/test/data/accessibility/aria/aria-listbox-aria-selected.html
@@ -1,11 +1,11 @@ <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXFocusable* -@MAC-ALLOW:AXTitle* -@MAC-ALLOW:AXOrientation* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXFocusable +@MAC-ALLOW:AXTitle +@MAC-ALLOW:AXOrientation @MAC-ALLOW:AXSelected=* @MAC-ALLOW:AXSelectedChildren=* -@MAC-ALLOW:AXVisibleChildren* +@MAC-ALLOW:AXVisibleChildren @WIN-ALLOW:ia2_hypertext=* --> <html>
diff --git a/content/test/data/accessibility/aria/aria-listbox-childfocus.html b/content/test/data/accessibility/aria/aria-listbox-childfocus.html index c05497e..72959c7 100644 --- a/content/test/data/accessibility/aria/aria-listbox-childfocus.html +++ b/content/test/data/accessibility/aria/aria-listbox-childfocus.html
@@ -1,8 +1,8 @@ <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXOrientation* -@MAC-ALLOW:AXSelectedChildren* -@MAC-ALLOW:AXVisibleChildren* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXOrientation +@MAC-ALLOW:AXSelectedChildren +@MAC-ALLOW:AXVisibleChildren --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-listitem.html b/content/test/data/accessibility/aria/aria-listitem.html index c0a1b3c..2592318 100644 --- a/content/test/data/accessibility/aria/aria-listitem.html +++ b/content/test/data/accessibility/aria/aria-listitem.html
@@ -1,8 +1,8 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXSelectedChildren* -@MAC-ALLOW:AXVisibleChildren* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXSelectedChildren +@MAC-ALLOW:AXVisibleChildren --> <html> <body>
diff --git a/content/test/data/accessibility/aria/aria-live-with-content.html b/content/test/data/accessibility/aria/aria-live-with-content.html index 7122ad4..1f465ac 100644 --- a/content/test/data/accessibility/aria/aria-live-with-content.html +++ b/content/test/data/accessibility/aria/aria-live-with-content.html
@@ -1,6 +1,6 @@ <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW-EMPTY:AXARIALive* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW-EMPTY:AXARIALive @WIN-ALLOW:live* @WIN-ALLOW:container* @WIN-ALLOW:BUSY*
diff --git a/content/test/data/accessibility/aria/aria-live.html b/content/test/data/accessibility/aria/aria-live.html index dddb9843..46e06c8 100644 --- a/content/test/data/accessibility/aria/aria-live.html +++ b/content/test/data/accessibility/aria/aria-live.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXSubrole* -@MAC-ALLOW:AXARIALive* +@MAC-ALLOW:AXSubrole +@MAC-ALLOW:AXARIALive @WIN-ALLOW:live* @WIN-ALLOW:container* @WIN-ALLOW:BUSY*
diff --git a/content/test/data/accessibility/aria/aria-main.html b/content/test/data/accessibility/aria/aria-main.html index 64d5194..2a14a44 100644 --- a/content/test/data/accessibility/aria/aria-main.html +++ b/content/test/data/accessibility/aria/aria-main.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles:* -->
diff --git a/content/test/data/accessibility/aria/aria-marquee.html b/content/test/data/accessibility/aria/aria-marquee.html index 910a376c1..4529d24d8 100644 --- a/content/test/data/accessibility/aria/aria-marquee.html +++ b/content/test/data/accessibility/aria/aria-marquee.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXSubrole=* @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXARIALive* +@MAC-ALLOW:AXARIALive @WIN-ALLOW:xml-roles:* @WIN-ALLOW:live* @WIN-ALLOW:container*
diff --git a/content/test/data/accessibility/aria/aria-math.html b/content/test/data/accessibility/aria/aria-math.html index d68265b..805d479 100644 --- a/content/test/data/accessibility/aria/aria-math.html +++ b/content/test/data/accessibility/aria/aria-math.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles* --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/aria/aria-menu.html b/content/test/data/accessibility/aria/aria-menu.html index 86672d6..00409c0 100644 --- a/content/test/data/accessibility/aria/aria-menu.html +++ b/content/test/data/accessibility/aria/aria-menu.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXDescription='File' -@MAC-DENY:AXValue* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-DENY:AXValue +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @WIN-DENY:description='' -->
diff --git a/content/test/data/accessibility/aria/aria-menubar.html b/content/test/data/accessibility/aria/aria-menubar.html index 75ff785..98e1520 100644 --- a/content/test/data/accessibility/aria/aria-menubar.html +++ b/content/test/data/accessibility/aria/aria-menubar.html
@@ -1,6 +1,6 @@ <!-- -@MAC-DENY:AXValue* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-DENY:AXValue +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @WIN-DENY:description='' -->
diff --git a/content/test/data/accessibility/aria/aria-menuitemcheckbox.html b/content/test/data/accessibility/aria/aria-menuitemcheckbox.html index 9eefc6b..1eabefd 100644 --- a/content/test/data/accessibility/aria/aria-menuitemcheckbox.html +++ b/content/test/data/accessibility/aria/aria-menuitemcheckbox.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXValue* +@MAC-ALLOW:AXValue @WIN-ALLOW:checkable:* @WIN-ALLOW:CHECKED* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/aria/aria-menuitemradio.html b/content/test/data/accessibility/aria/aria-menuitemradio.html index 3f62ee5d..3d75596 100644 --- a/content/test/data/accessibility/aria/aria-menuitemradio.html +++ b/content/test/data/accessibility/aria/aria-menuitemradio.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXValue* +@MAC-ALLOW:AXValue @WIN-ALLOW:checkable:* @WIN-ALLOW:CHECKED* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/aria/aria-radiogroup.html b/content/test/data/accessibility/aria/aria-radiogroup.html index 326b78f1..d1fd5f8 100644 --- a/content/test/data/accessibility/aria/aria-radiogroup.html +++ b/content/test/data/accessibility/aria/aria-radiogroup.html
@@ -1,6 +1,6 @@ <!-- @BLINK-ALLOW:radioGroupIds=* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @MAC-ALLOW:AXRoleDescription @WIN-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/aria/aria-region.html b/content/test/data/accessibility/aria/aria-region.html index a255156..ef058b8c 100644 --- a/content/test/data/accessibility/aria/aria-region.html +++ b/content/test/data/accessibility/aria/aria-region.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles:* -->
diff --git a/content/test/data/accessibility/aria/aria-relevant.html b/content/test/data/accessibility/aria/aria-relevant.html index 80a1969d..296b846 100644 --- a/content/test/data/accessibility/aria/aria-relevant.html +++ b/content/test/data/accessibility/aria/aria-relevant.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXSubrole=* -@MAC-ALLOW:AXARIARelevant* +@MAC-ALLOW:AXARIARelevant @WIN-ALLOW:relevant:* @WIN-ALLOW:container-relevant:* @BLINK-ALLOW:liveRelevant*
diff --git a/content/test/data/accessibility/aria/aria-required.html b/content/test/data/accessibility/aria/aria-required.html index 6f453ec..758257dd 100644 --- a/content/test/data/accessibility/aria/aria-required.html +++ b/content/test/data/accessibility/aria/aria-required.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXRequired* +@MAC-ALLOW:AXRequired @WIN-ALLOW:IA2_STATE_REQUIRED @AURALINUX-ALLOW:required @AURALINUX-ALLOW:xml-roles*
diff --git a/content/test/data/accessibility/aria/aria-roledescription.html b/content/test/data/accessibility/aria/aria-roledescription.html index a3137474..b414a757 100644 --- a/content/test/data/accessibility/aria/aria-roledescription.html +++ b/content/test/data/accessibility/aria/aria-roledescription.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXRoleDescription* +@MAC-ALLOW:AXRoleDescription @WIN-ALLOW:localized_extended_role* @AURALINUX-ALLOW:roledescription* -->
diff --git a/content/test/data/accessibility/aria/aria-search.html b/content/test/data/accessibility/aria/aria-search.html index 95c1811..42b573d 100644 --- a/content/test/data/accessibility/aria/aria-search.html +++ b/content/test/data/accessibility/aria/aria-search.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/aria-searchbox-with-rich-text.html b/content/test/data/accessibility/aria/aria-searchbox-with-rich-text.html index 2828a618..3e107a2 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-with-rich-text.html +++ b/content/test/data/accessibility/aria/aria-searchbox-with-rich-text.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-DENY:description* @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/aria/aria-searchbox-with-selection.html b/content/test/data/accessibility/aria/aria-searchbox-with-selection.html index 1d2ce01..9dd20f68 100644 --- a/content/test/data/accessibility/aria/aria-searchbox-with-selection.html +++ b/content/test/data/accessibility/aria/aria-searchbox-with-selection.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=* @WIN-ALLOW:n_selections*
diff --git a/content/test/data/accessibility/aria/aria-searchbox.html b/content/test/data/accessibility/aria/aria-searchbox.html index 2f11f54..c21efcd 100644 --- a/content/test/data/accessibility/aria/aria-searchbox.html +++ b/content/test/data/accessibility/aria/aria-searchbox.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-DENY:description* @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/aria/aria-selected.html b/content/test/data/accessibility/aria/aria-selected.html index 67e3cda7..9fa7711 100644 --- a/content/test/data/accessibility/aria/aria-selected.html +++ b/content/test/data/accessibility/aria/aria-selected.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXSelected=* @MAC-ALLOW:AXSelectedChildren=* -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:SELECTED @AURALINUX-ALLOW:select* -->
diff --git a/content/test/data/accessibility/aria/aria-sort-aria-grid.html b/content/test/data/accessibility/aria/aria-sort-aria-grid.html index f7419d6..4f56c28f 100644 --- a/content/test/data/accessibility/aria/aria-sort-aria-grid.html +++ b/content/test/data/accessibility/aria/aria-sort-aria-grid.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXSortDirection* +@MAC-ALLOW:AXSortDirection @WIN-ALLOW:sort:* @AURALINUX-ALLOW:sort:* -->
diff --git a/content/test/data/accessibility/aria/aria-sort-html-table.html b/content/test/data/accessibility/aria/aria-sort-html-table.html index 15d1b7a8..5c84217d 100644 --- a/content/test/data/accessibility/aria/aria-sort-html-table.html +++ b/content/test/data/accessibility/aria/aria-sort-html-table.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXSortDirection* +@MAC-ALLOW:AXSortDirection @WIN-ALLOW:sort:* @AURALINUX-ALLOW:sort:* -->
diff --git a/content/test/data/accessibility/aria/aria-status.html b/content/test/data/accessibility/aria/aria-status.html index b0f09ae..c4fa318 100644 --- a/content/test/data/accessibility/aria/aria-status.html +++ b/content/test/data/accessibility/aria/aria-status.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:atomic:* @WIN-ALLOW:container-atomic:* @WIN-ALLOW:*live*
diff --git a/content/test/data/accessibility/aria/aria-switch.html b/content/test/data/accessibility/aria/aria-switch.html index 4086101..96f4283 100644 --- a/content/test/data/accessibility/aria/aria-switch.html +++ b/content/test/data/accessibility/aria/aria-switch.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:checkable:* @WIN-ALLOW:CHECKED* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/aria/aria-tab-nested-in-lists.html b/content/test/data/accessibility/aria/aria-tab-nested-in-lists.html index 2a37db8..d45dbac 100644 --- a/content/test/data/accessibility/aria/aria-tab-nested-in-lists.html +++ b/content/test/data/accessibility/aria/aria-tab-nested-in-lists.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXARIASetSize* -@MAC-ALLOW:AXARIAPosInSet* +@MAC-ALLOW:AXARIASetSize +@MAC-ALLOW:AXARIAPosInSet @MAC-DENY:AXARIASetSize=0 @MAC-DENY:AXARIAPosInSet=0 @WIN-ALLOW:xml-roles*
diff --git a/content/test/data/accessibility/aria/aria-tabpanel.html b/content/test/data/accessibility/aria/aria-tabpanel.html index 803496d..e739351 100644 --- a/content/test/data/accessibility/aria/aria-tabpanel.html +++ b/content/test/data/accessibility/aria/aria-tabpanel.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles* @AURALINUX-ALLOW:horizontal @AURALINUX-ALLOW:vertical
diff --git a/content/test/data/accessibility/aria/aria-term.html b/content/test/data/accessibility/aria/aria-term.html index 0dc0d35..c70f4658 100644 --- a/content/test/data/accessibility/aria/aria-term.html +++ b/content/test/data/accessibility/aria/aria-term.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription @MAC-ALLOW:AXSubrole=AXTerm -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle @WIN-ALLOW:xml-roles* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/aria-tooltip.html b/content/test/data/accessibility/aria/aria-tooltip.html index 7b31bfa..c4fb751 100644 --- a/content/test/data/accessibility/aria/aria-tooltip.html +++ b/content/test/data/accessibility/aria/aria-tooltip.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @WIN-DENY:name* -->
diff --git a/content/test/data/accessibility/aria/aria-treegrid.html b/content/test/data/accessibility/aria/aria-treegrid.html index f8aefe16..0566552 100644 --- a/content/test/data/accessibility/aria/aria-treegrid.html +++ b/content/test/data/accessibility/aria/aria-treegrid.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* @MAC-ALLOW:AXRole=* -@MAC-ALLOW:AXDisclosureLevel* +@MAC-ALLOW:AXDisclosureLevel @WIN-ALLOW:xml-roles:* @WIN-ALLOW:level* @AURALINUX-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists.html b/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists.html index f3794bba..0386d93 100644 --- a/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists.html +++ b/content/test/data/accessibility/aria/aria-treeitem-nested-in-lists.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXARIASetSize* -@MAC-ALLOW:AXARIAPosInSet* +@MAC-ALLOW:AXARIASetSize +@MAC-ALLOW:AXARIAPosInSet @MAC-DENY:AXARIASetSize=0 @MAC-DENY:AXARIAPosInSet=0 @WIN-ALLOW:xml-roles*
diff --git a/content/test/data/accessibility/aria/aria-valuemax.html b/content/test/data/accessibility/aria/aria-valuemax.html index 12c2078..2e87abff 100644 --- a/content/test/data/accessibility/aria/aria-valuemax.html +++ b/content/test/data/accessibility/aria/aria-valuemax.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXMaxValue=* -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle @WIN-ALLOW:maximumValue=* @WIN-DENY:description='' -->
diff --git a/content/test/data/accessibility/aria/aria-valuemin.html b/content/test/data/accessibility/aria/aria-valuemin.html index 883ed77d..f7a8ca0 100644 --- a/content/test/data/accessibility/aria/aria-valuemin.html +++ b/content/test/data/accessibility/aria/aria-valuemin.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXMinValue=* -@MAC-DENY:AXTitle* -@MAC-DENY:AXValue* +@MAC-DENY:AXTitle +@MAC-DENY:AXValue @WIN-ALLOW:minimumValue=* @WIN-DENY:description='' -->
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox.html b/content/test/data/accessibility/aria/aria1.1-combobox.html index ab95e034..1ae69f7 100644 --- a/content/test/data/accessibility/aria/aria1.1-combobox.html +++ b/content/test/data/accessibility/aria/aria1.1-combobox.html
@@ -1,9 +1,9 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXFocused=1 -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] -@MAC-ALLOW:AXTitleUIElement* +@MAC-ALLOW:AXTitleUIElement @WIN-DENY:description* @WIN-ALLOW:FOCUS* @WIN-ALLOW:haspopup*
diff --git a/content/test/data/accessibility/aria/dpub-roles.html b/content/test/data/accessibility/aria/dpub-roles.html index 2b3011a..a6112f1 100644 --- a/content/test/data/accessibility/aria/dpub-roles.html +++ b/content/test/data/accessibility/aria/dpub-roles.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/graphics-roles.html b/content/test/data/accessibility/aria/graphics-roles.html index ff3aa31..d6fd846 100644 --- a/content/test/data/accessibility/aria/graphics-roles.html +++ b/content/test/data/accessibility/aria/graphics-roles.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:xml-roles:* @AURALINUX-ALLOW:xml-roles* -->
diff --git a/content/test/data/accessibility/aria/input-text-aria-placeholder.html b/content/test/data/accessibility/aria/input-text-aria-placeholder.html index aed1d02..32b1ef4a 100644 --- a/content/test/data/accessibility/aria/input-text-aria-placeholder.html +++ b/content/test/data/accessibility/aria/input-text-aria-placeholder.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @MAC-ALLOW:AXPlaceholderValue @WIN-ALLOW:placeholder* @WIN-ALLOW:description*
diff --git a/content/test/data/accessibility/event/aria-disabled-changed.html b/content/test/data/accessibility/event/aria-disabled-changed.html index 6b6debd..edcaaba 100644 --- a/content/test/data/accessibility/event/aria-disabled-changed.html +++ b/content/test/data/accessibility/event/aria-disabled-changed.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXEnabled* +@MAC-ALLOW:AXEnabled @WIN-ALLOW:UNAVAILABLE --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/event/aria-required-changed.html b/content/test/data/accessibility/event/aria-required-changed.html index 9a03a48..2936bad 100644 --- a/content/test/data/accessibility/event/aria-required-changed.html +++ b/content/test/data/accessibility/event/aria-required-changed.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXRequired* +@MAC-ALLOW:AXRequired @WIN-ALLOW:IA2_STATE_REQUIRED --> <form>
diff --git a/content/test/data/accessibility/event/description-change-indirect.html b/content/test/data/accessibility/event/description-change-indirect.html index 1a723cd..65d8c3a0 100644 --- a/content/test/data/accessibility/event/description-change-indirect.html +++ b/content/test/data/accessibility/event/description-change-indirect.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:description=* @WIN-ALLOW:description=* @UIA-WIN-DENY:Text_TextChanged* -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription Due to a bug in Windows (fixed in Windows 10 19H1), events are raised exactly twice for any in-proc off-thread event listeners.
diff --git a/content/test/data/accessibility/event/form-disabled-changed.html b/content/test/data/accessibility/event/form-disabled-changed.html index ffdbed8..f681201 100644 --- a/content/test/data/accessibility/event/form-disabled-changed.html +++ b/content/test/data/accessibility/event/form-disabled-changed.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXEnabled* +@MAC-ALLOW:AXEnabled @WIN-ALLOW:UNAVAILABLE --> <form>
diff --git a/content/test/data/accessibility/event/form-required-changed.html b/content/test/data/accessibility/event/form-required-changed.html index 31ca159c..25f4ffe1 100644 --- a/content/test/data/accessibility/event/form-required-changed.html +++ b/content/test/data/accessibility/event/form-required-changed.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXRequired* +@MAC-ALLOW:AXRequired @WIN-ALLOW:IA2_STATE_REQUIRED @UIA-WIN-DENY:* @UIA-WIN-ALLOW:IsRequiredForForm*
diff --git a/content/test/data/accessibility/event/report-validity-invalid-field.html b/content/test/data/accessibility/event/report-validity-invalid-field.html index df2dce39..1f7393b8 100644 --- a/content/test/data/accessibility/event/report-validity-invalid-field.html +++ b/content/test/data/accessibility/event/report-validity-invalid-field.html
@@ -6,9 +6,9 @@ @UIA-WIN-DENY:* @UIA-WIN-ALLOW:AutomationFocusChanged* @MAC-DENY:* -@MAC-ALLOW:AXFocusedUIElementChanged* -@MAC-ALLOW:AXFocusedUIElementChanged* -@MAC-ALLOW:AXLiveRegion* +@MAC-ALLOW:AXFocusedUIElementChanged +@MAC-ALLOW:AXFocusedUIElementChanged +@MAC-ALLOW:AXLiveRegion --> <!DOCTYPE html> <form>
diff --git a/content/test/data/accessibility/html/a-name-calc.html b/content/test/data/accessibility/html/a-name-calc.html index 2229720..b953748 100644 --- a/content/test/data/accessibility/html/a-name-calc.html +++ b/content/test/data/accessibility/html/a-name-calc.html
@@ -2,9 +2,9 @@ @WIN-ALLOW:description* @WIN-ALLOW:explicit-name* @UIA-WIN-ALLOW:FullDescription* -@MAC-ALLOW:AXDescription* -@MAC-ALLOW:AXHelp* -@MAC-DENY:AXValue* +@MAC-ALLOW:AXDescription +@MAC-ALLOW:AXHelp +@MAC-DENY:AXValue @BLINK-ALLOW:nameFrom* @AURALINUX-ALLOW:description* @AURALINUX-ALLOW:explicit-name*
diff --git a/content/test/data/accessibility/html/a-with-img.html b/content/test/data/accessibility/html/a-with-img.html index 32b7a5a..27ac858 100644 --- a/content/test/data/accessibility/html/a-with-img.html +++ b/content/test/data/accessibility/html/a-with-img.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @BLINK-ALLOW:linked --> <html>
diff --git a/content/test/data/accessibility/html/area.html b/content/test/data/accessibility/html/area.html index 7cf56912..b81997e 100644 --- a/content/test/data/accessibility/html/area.html +++ b/content/test/data/accessibility/html/area.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @WIN-ALLOW:LINKED --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/html/article.html b/content/test/data/accessibility/html/article.html index f5da6e1..af405911 100644 --- a/content/test/data/accessibility/html/article.html +++ b/content/test/data/accessibility/html/article.html
@@ -1,7 +1,7 @@ <!-- @MAC-ALLOW:AXRoleDescription @MAC-ALLOW:AXSubrole=AXDocumentArticle -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle @UIA-WIN-ALLOW:ControlType='UIA_GroupControlTypeId' @UIA-WIN-ALLOW:LocalizedControlType='article' @WIN-ALLOW:xml-roles:article
diff --git a/content/test/data/accessibility/html/blockquote-levels.html b/content/test/data/accessibility/html/blockquote-levels.html index a7e7f394..38e046c 100644 --- a/content/test/data/accessibility/html/blockquote-levels.html +++ b/content/test/data/accessibility/html/blockquote-levels.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXBlockQuoteLevel* +@MAC-ALLOW:AXBlockQuoteLevel --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/button-name-calc.html b/content/test/data/accessibility/html/button-name-calc.html index d38caf82..090b0e2 100644 --- a/content/test/data/accessibility/html/button-name-calc.html +++ b/content/test/data/accessibility/html/button-name-calc.html
@@ -4,9 +4,9 @@ @UIA-WIN-ALLOW:FullDescription* @AURALINUX-ALLOW:description* @AURALINUX-ALLOW:explicit-name* -@MAC-ALLOW:AXDescription* -@MAC-ALLOW:AXHelp* -@MAC-DENY:AXValue* +@MAC-ALLOW:AXDescription +@MAC-ALLOW:AXHelp +@MAC-DENY:AXValue --> <html> <body>
diff --git a/content/test/data/accessibility/html/checkbox-name-calc.html b/content/test/data/accessibility/html/checkbox-name-calc.html index 7d78725..77b6cc5 100644 --- a/content/test/data/accessibility/html/checkbox-name-calc.html +++ b/content/test/data/accessibility/html/checkbox-name-calc.html
@@ -5,9 +5,9 @@ @AURALINUX-ALLOW:explicit-name* @AURALINUX-DENY:checkable @AURALINUX-DENY:last-defined -@MAC-ALLOW:AXDescription* -@MAC-ALLOW:AXHelp* -@MAC-DENY:AXValue* +@MAC-ALLOW:AXDescription +@MAC-ALLOW:AXHelp +@MAC-DENY:AXValue --> <html> <body>
diff --git a/content/test/data/accessibility/html/contenteditable-descendants.html b/content/test/data/accessibility/html/contenteditable-descendants.html index 9ee48d6..97da7cc 100644 --- a/content/test/data/accessibility/html/contenteditable-descendants.html +++ b/content/test/data/accessibility/html/contenteditable-descendants.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXEditableAncestor* -@MAC-ALLOW:AXHighestEditableAncestor* +@MAC-ALLOW:AXEditableAncestor +@MAC-ALLOW:AXHighestEditableAncestor @WIN-ALLOW:caret_offset* @WIN-ALLOW:IA2_STATE_EDITABLE @WIN-ALLOW:IA2_STATE_MULTI_LINE
diff --git a/content/test/data/accessibility/html/dd.html b/content/test/data/accessibility/html/dd.html index 9c4200c28..0367fdc 100644 --- a/content/test/data/accessibility/html/dd.html +++ b/content/test/data/accessibility/html/dd.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/dl.html b/content/test/data/accessibility/html/dl.html index 6cfd4bb..3ce0bbd 100644 --- a/content/test/data/accessibility/html/dl.html +++ b/content/test/data/accessibility/html/dl.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/dt.html b/content/test/data/accessibility/html/dt.html index 9c4200c28..0367fdc 100644 --- a/content/test/data/accessibility/html/dt.html +++ b/content/test/data/accessibility/html/dt.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/footer-inside-other-section.html b/content/test/data/accessibility/html/footer-inside-other-section.html index fb9147f8..9cb41ee 100644 --- a/content/test/data/accessibility/html/footer-inside-other-section.html +++ b/content/test/data/accessibility/html/footer-inside-other-section.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:LocalizedControlType='footer' @WIN-ALLOW:localized_extended_role='footer' @WIN-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/html/footer.html b/content/test/data/accessibility/html/footer.html index 72aa57e..bdd3d4a 100644 --- a/content/test/data/accessibility/html/footer.html +++ b/content/test/data/accessibility/html/footer.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:LocalizedControlType='footer' @UIA-WIN-ALLOW:LocalizedLandmarkType='content information' @WIN-ALLOW:localized_extended_role='footer'
diff --git a/content/test/data/accessibility/html/form.html b/content/test/data/accessibility/html/form.html index 4a92ffc..32c1b89 100644 --- a/content/test/data/accessibility/html/form.html +++ b/content/test/data/accessibility/html/form.html
@@ -3,7 +3,7 @@ @AURALINUX-ALLOW:default @WIN-ALLOW:DEFAULT @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <!DOCTYPE html> <html>
diff --git a/content/test/data/accessibility/html/header-inside-other-section.html b/content/test/data/accessibility/html/header-inside-other-section.html index 3516426..84a1290d 100644 --- a/content/test/data/accessibility/html/header-inside-other-section.html +++ b/content/test/data/accessibility/html/header-inside-other-section.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:LocalizedControlType='header' @WIN-ALLOW:localized_extended_role='header' @WIN-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/html/header.html b/content/test/data/accessibility/html/header.html index a6db9775..c9ab642 100644 --- a/content/test/data/accessibility/html/header.html +++ b/content/test/data/accessibility/html/header.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:LocalizedControlType='header' @WIN-ALLOW:localized_extended_role='header' @WIN-ALLOW:xml-roles:*
diff --git a/content/test/data/accessibility/html/hr.html b/content/test/data/accessibility/html/hr.html index ffb7527..8491465 100644 --- a/content/test/data/accessibility/html/hr.html +++ b/content/test/data/accessibility/html/hr.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXDescription* +@MAC-ALLOW:AXDescription @AURALINUX-ALLOW:horizontal @AURALINUX-ALLOW:vertical -->
diff --git a/content/test/data/accessibility/html/id.html b/content/test/data/accessibility/html/id.html index 578f4bdd..5cdaa35 100644 --- a/content/test/data/accessibility/html/id.html +++ b/content/test/data/accessibility/html/id.html
@@ -1,6 +1,6 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXDOMIdentifier* +@MAC-ALLOW:AXDOMIdentifier --> <html> <body>
diff --git a/content/test/data/accessibility/html/iframe-coordinates-cross-process.html b/content/test/data/accessibility/html/iframe-coordinates-cross-process.html index 3279f55..ce07e220 100644 --- a/content/test/data/accessibility/html/iframe-coordinates-cross-process.html +++ b/content/test/data/accessibility/html/iframe-coordinates-cross-process.html
@@ -1,6 +1,6 @@ <!-- -@MAC-DENY:AXTitle* -@MAC-DENY:AXValue* +@MAC-DENY:AXTitle +@MAC-DENY:AXValue @MAC-ALLOW:position* @MAC-ALLOW:size*
diff --git a/content/test/data/accessibility/html/iframe-coordinates.html b/content/test/data/accessibility/html/iframe-coordinates.html index 9a8ae0a..aefb22d0 100644 --- a/content/test/data/accessibility/html/iframe-coordinates.html +++ b/content/test/data/accessibility/html/iframe-coordinates.html
@@ -1,6 +1,6 @@ <!-- -@MAC-DENY:AXTitle* -@MAC-DENY:AXValue* +@MAC-DENY:AXTitle +@MAC-DENY:AXValue @MAC-ALLOW:position* @MAC-ALLOW:size*
diff --git a/content/test/data/accessibility/html/in-page-links.html b/content/test/data/accessibility/html/in-page-links.html index 6e177440..80955c4 100644 --- a/content/test/data/accessibility/html/in-page-links.html +++ b/content/test/data/accessibility/html/in-page-links.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- @BLINK-ALLOW:inPageLinkTargetId=* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @WIN-ALLOW:LINKED -->
diff --git a/content/test/data/accessibility/html/input-color.html b/content/test/data/accessibility/html/input-color.html index 94a71024..d528db8 100644 --- a/content/test/data/accessibility/html/input-color.html +++ b/content/test/data/accessibility/html/input-color.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:inputType=* @MAC-ALLOW:AXRoleDescription -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle @UIA-WIN-ALLOW:LocalizedControlType='color picker' @WIN-ALLOW:localized_extended_role=* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/html/input-password.html b/content/test/data/accessibility/html/input-password.html index feb4efd..636aa03 100644 --- a/content/test/data/accessibility/html/input-password.html +++ b/content/test/data/accessibility/html/input-password.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:inputType=* @BLINK-ALLOW:textSel* @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:PROTECTED @WIN-ALLOW:IA2_STATE* @WIN-ALLOW:text-input-type*
diff --git a/content/test/data/accessibility/html/input-radio.html b/content/test/data/accessibility/html/input-radio.html index 0f9bbff9a..ea143ab 100644 --- a/content/test/data/accessibility/html/input-radio.html +++ b/content/test/data/accessibility/html/input-radio.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:inputType=* @BLINK-ALLOW:radioGroupIds=* -@MAC-ALLOW:AXLinkedUIElements* +@MAC-ALLOW:AXLinkedUIElements @MAC-DENY:AXLinkedUIElements=[] @WIN-ALLOW:MIXED* @WIN-ALLOW:CHECKED*
diff --git a/content/test/data/accessibility/html/input-search.html b/content/test/data/accessibility/html/input-search.html index dfd5c58..c17d2d7 100644 --- a/content/test/data/accessibility/html/input-search.html +++ b/content/test/data/accessibility/html/input-search.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:LocalizedControlType* @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/html/input-text.html b/content/test/data/accessibility/html/input-text.html index ad4212dc2e..e826d98 100644 --- a/content/test/data/accessibility/html/input-text.html +++ b/content/test/data/accessibility/html/input-text.html
@@ -2,8 +2,8 @@ <!-- @BLINK-ALLOW:inputType=* @BLINK-ALLOW:textSel* -@MAC-ALLOW:AXEditableAncestor* -@MAC-ALLOW:AXHighestEditableAncestor* +@MAC-ALLOW:AXEditableAncestor +@MAC-ALLOW:AXHighestEditableAncestor @MAC-ALLOW:AXRoleDescription @MAC-ALLOW:AXPlaceholderValue @WIN-ALLOW:caret_offset*
diff --git a/content/test/data/accessibility/html/legend.html b/content/test/data/accessibility/html/legend.html index 96c06a2..26a2c706 100644 --- a/content/test/data/accessibility/html/legend.html +++ b/content/test/data/accessibility/html/legend.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXTitleUIElement* +@MAC-ALLOW:AXTitleUIElement @AURALINUX-ALLOW:*-line @AURALINUX-ALLOW:editable @AURALINUX-ALLOW:focus*
diff --git a/content/test/data/accessibility/html/li.html b/content/test/data/accessibility/html/li.html index b3c8d2e..53c977a 100644 --- a/content/test/data/accessibility/html/li.html +++ b/content/test/data/accessibility/html/li.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @WIN-ALLOW:display* @AURALINUX-ALLOW:display* @AURALINUX-ALLOW:posinset*
diff --git a/content/test/data/accessibility/html/list-markers.html b/content/test/data/accessibility/html/list-markers.html index c7fd322..264acf8 100644 --- a/content/test/data/accessibility/html/list-markers.html +++ b/content/test/data/accessibility/html/list-markers.html
@@ -1,5 +1,5 @@ <!-- -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <html> <body>
diff --git a/content/test/data/accessibility/html/list.html b/content/test/data/accessibility/html/list.html index f0f5645..200507692 100644 --- a/content/test/data/accessibility/html/list.html +++ b/content/test/data/accessibility/html/list.html
@@ -1,6 +1,6 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <html> <style type="text/css">
diff --git a/content/test/data/accessibility/html/math.html b/content/test/data/accessibility/html/math.html index d8937bc..b3d2b21 100644 --- a/content/test/data/accessibility/html/math.html +++ b/content/test/data/accessibility/html/math.html
@@ -1,7 +1,7 @@ <!-- @WIN-ALLOW:inner_html* @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole FIXME: mi text content is italicized because otherwise we run into crbug.com/750990. -->
diff --git a/content/test/data/accessibility/html/section.html b/content/test/data/accessibility/html/section.html index bf9cc06..7c52f338 100644 --- a/content/test/data/accessibility/html/section.html +++ b/content/test/data/accessibility/html/section.html
@@ -1,6 +1,6 @@ <!-- @MAC-ALLOW:AXRoleDescription -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole @UIA-WIN-ALLOW:ControlType='UIA_GroupControlTypeId' @UIA-WIN-ALLOW:LocalizedControlType='section' @WIN-ALLOW:localized_extended_role='section'
diff --git a/content/test/data/accessibility/html/span.html b/content/test/data/accessibility/html/span.html index 8f98bf52..9b53fae 100644 --- a/content/test/data/accessibility/html/span.html +++ b/content/test/data/accessibility/html/span.html
@@ -1,5 +1,5 @@ <!-- -@MAC-DENY:AXTitle* +@MAC-DENY:AXTitle --> <!doctype html> <html>
diff --git a/content/test/data/accessibility/html/textarea.html b/content/test/data/accessibility/html/textarea.html index 35737c8..b99fdc79 100644 --- a/content/test/data/accessibility/html/textarea.html +++ b/content/test/data/accessibility/html/textarea.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <!-- -@MAC-ALLOW:AXEditableAncestor* -@MAC-ALLOW:AXHighestEditableAncestor* +@MAC-ALLOW:AXEditableAncestor +@MAC-ALLOW:AXHighestEditableAncestor @MAC-ALLOW:AXRoleDescription @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=*
diff --git a/content/test/data/accessibility/html/ul.html b/content/test/data/accessibility/html/ul.html index be1ba417..d76144a 100644 --- a/content/test/data/accessibility/html/ul.html +++ b/content/test/data/accessibility/html/ul.html
@@ -1,6 +1,6 @@ <!-- @BLINK-ALLOW:hierarchicalLevel* -@MAC-ALLOW:AXSubrole* +@MAC-ALLOW:AXSubrole --> <html> <body>
diff --git a/content/test/data/accessibility/language-detection/dynamic-basic.html b/content/test/data/accessibility/language-detection/dynamic-basic.html index b3a4910..84fa143 100644 --- a/content/test/data/accessibility/language-detection/dynamic-basic.html +++ b/content/test/data/accessibility/language-detection/dynamic-basic.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:language=* @BLINK-DENY-NODE:internalRole=inlineTextBox @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage @WAIT-FOR:Ein Bild ist --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/language-detection/dynamic-multiple-inserts.html b/content/test/data/accessibility/language-detection/dynamic-multiple-inserts.html index 70b892b9..8e93ef76 100644 --- a/content/test/data/accessibility/language-detection/dynamic-multiple-inserts.html +++ b/content/test/data/accessibility/language-detection/dynamic-multiple-inserts.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:language=* @BLINK-DENY-NODE:internalRole=inlineTextBox @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage @WAIT-FOR:Dies ist ein --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/language-detection/dynamic-reparenting.html b/content/test/data/accessibility/language-detection/dynamic-reparenting.html index 198524a..97e077c9 100644 --- a/content/test/data/accessibility/language-detection/dynamic-reparenting.html +++ b/content/test/data/accessibility/language-detection/dynamic-reparenting.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:language=* @BLINK-DENY-NODE:internalRole=inlineTextBox @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage @WAIT-FOR:Dies ist ein --> <!DOCTYPE html>
diff --git a/content/test/data/accessibility/language-detection/lang-attribute-nested.html b/content/test/data/accessibility/language-detection/lang-attribute-nested.html index 45e4ff2..ed65192 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute-nested.html +++ b/content/test/data/accessibility/language-detection/lang-attribute-nested.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:language=* @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage --> <!DOCTYPE html> <html lang="en">
diff --git a/content/test/data/accessibility/language-detection/lang-attribute-switching.html b/content/test/data/accessibility/language-detection/lang-attribute-switching.html index ac7b7de..7d9321a 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute-switching.html +++ b/content/test/data/accessibility/language-detection/lang-attribute-switching.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:language=* @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage --> <!DOCTYPE html> <html lang="en">
diff --git a/content/test/data/accessibility/language-detection/lang-attribute.html b/content/test/data/accessibility/language-detection/lang-attribute.html index fe3007b6..20d2f0f0 100644 --- a/content/test/data/accessibility/language-detection/lang-attribute.html +++ b/content/test/data/accessibility/language-detection/lang-attribute.html
@@ -1,7 +1,7 @@ <!-- @BLINK-ALLOW:language=* @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage --> <!DOCTYPE html> <html lang="es-ES">
diff --git a/content/test/data/accessibility/language-detection/static-basic.html b/content/test/data/accessibility/language-detection/static-basic.html index d01ecf2f..38141e7 100644 --- a/content/test/data/accessibility/language-detection/static-basic.html +++ b/content/test/data/accessibility/language-detection/static-basic.html
@@ -2,7 +2,7 @@ @BLINK-ALLOW:language=* @BLINK-DENY-NODE:internalRole=inlineTextBox @WIN-ALLOW:language:* -@MAC-ALLOW:AXLanguage* +@MAC-ALLOW:AXLanguage --> <!DOCTYPE html> <html lang="en-GB">
diff --git a/content/test/gpu/run_gpu_integration_test_fuchsia.py b/content/test/gpu/run_gpu_integration_test_fuchsia.py index 818fe46..d93a11a 100755 --- a/content/test/gpu/run_gpu_integration_test_fuchsia.py +++ b/content/test/gpu/run_gpu_integration_test_fuchsia.py
@@ -56,8 +56,10 @@ with GetDeploymentTargetForArgs(additional_target_args) as target: target.Start() _, fuchsia_ssh_port = target._GetEndpoint() - gpu_script.extend(['--fuchsia-ssh-config-dir', args.out_dir]) - gpu_script.extend(['--fuchsia-ssh-port', str(fuchsia_ssh_port)]) + gpu_script.extend(['--chromium-output-directory', args.out_dir]) + gpu_script.extend(['--fuchsia-ssh-config', target._GetSshConfigPath()]) + if fuchsia_ssh_port: + gpu_script.extend(['--fuchsia-ssh-port', str(fuchsia_ssh_port)]) gpu_script.extend(['--fuchsia-system-log-file', args.system_log_file]) if args.verbose: gpu_script.append('-v')
diff --git a/device/fido/fido_types.h b/device/fido/fido_types.h index c896e80..ff1c5c4 100644 --- a/device/fido/fido_types.h +++ b/device/fido/fido_types.h
@@ -5,6 +5,8 @@ #ifndef DEVICE_FIDO_FIDO_TYPES_H_ #define DEVICE_FIDO_FIDO_TYPES_H_ +#include <cstdint> + // The definitions below are for mojo-mappable types that need to be transferred // from Blink. Types that do not have mojo equivalents are better placed in // fido_constants.h. @@ -70,6 +72,13 @@ kEnterpriseApprovedByBrowser, }; +// https://w3c.github.io/webauthn#enumdef-largeblobsupport +enum class LargeBlobSupport { + kNotRequested, + kRequired, + kPreferred, +}; + } // namespace device #endif // DEVICE_FIDO_FIDO_TYPES_H_
diff --git a/device/fido/make_credential_request_handler.cc b/device/fido/make_credential_request_handler.cc index 19720a5..8dc5bb7 100644 --- a/device/fido/make_credential_request_handler.cc +++ b/device/fido/make_credential_request_handler.cc
@@ -129,6 +129,13 @@ return MakeCredentialStatus::kAuthenticatorMissingUserVerification; } + // The largeBlobs extension only works for resident credentials on CTAP 2.1 + // authenticators. + if (options.large_blob_support == LargeBlobSupport::kRequired && + (!auth_options->supports_large_blobs || !request.resident_key_required)) { + return MakeCredentialStatus::kAuthenticatorMissingLargeBlob; + } + base::Optional<base::span<const int32_t>> supported_algorithms( authenticator->GetAlgorithms()); if (supported_algorithms) { @@ -1025,6 +1032,20 @@ break; } + switch (options_.large_blob_support) { + case LargeBlobSupport::kRequired: + request->large_blob_key = true; + break; + case LargeBlobSupport::kPreferred: + request->large_blob_key = auth_options && + auth_options->supports_large_blobs && + request->resident_key_required; + break; + case LargeBlobSupport::kNotRequested: + request->large_blob_key = false; + break; + } + request->user_verification = request->resident_key_required ? UserVerificationRequirement::kRequired : options_.user_verification;
diff --git a/device/fido/make_credential_request_handler.h b/device/fido/make_credential_request_handler.h index 2d3682b..18d30ead 100644 --- a/device/fido/make_credential_request_handler.h +++ b/device/fido/make_credential_request_handler.h
@@ -24,6 +24,7 @@ #include "device/fido/fido_constants.h" #include "device/fido/fido_request_handler_base.h" #include "device/fido/fido_transport_protocol.h" +#include "device/fido/fido_types.h" #include "device/fido/pin.h" namespace base { @@ -55,6 +56,7 @@ // there's no UI support for collecting a PIN. This could // be clearer. kAuthenticatorMissingUserVerification, + kAuthenticatorMissingLargeBlob, kNoCommonAlgorithms, kStorageFull, kWinInvalidStateError, @@ -112,6 +114,14 @@ // android_client_data_ext is a compatibility hack to support the Clank // caBLEv2 authenticator. base::Optional<AndroidClientDataExtensionInput> android_client_data_ext; + + // large_blob_support indicates whether the request should select for + // authenticators supporting the largeBlobs extension (kRequired), merely + // indicate support on the response (kPreferred), or ignore it + // (kNotRequested). + // Values other than kNotRequested will attempt to initialize the large blob + // on the authenticator. + LargeBlobSupport large_blob_support = LargeBlobSupport::kNotRequested; }; MakeCredentialRequestHandler(
diff --git a/docs/win_cross.md b/docs/win_cross.md index 7b3d3af6..5319576 100644 --- a/docs/win_cross.md +++ b/docs/win_cross.md
@@ -82,6 +82,10 @@ ## Goma +*** note +**Warning:** This is unsupported and known to not work at times. +*** + For now, one needs to use the rbe backend, not the borg backend (default for Googlers). Use cloud backend instead.
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn index edfacf36..388b2fa 100644 --- a/extensions/browser/BUILD.gn +++ b/extensions/browser/BUILD.gn
@@ -5,13 +5,6 @@ import("//build/config/features.gni") import("//extensions/buildflags/buildflags.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - assert(enable_extensions) group("browser") { @@ -638,8 +631,6 @@ "api/file_handlers/directory_util_unittest.cc", "api/file_handlers/mime_util_unittest.cc", "api/idle/idle_api_unittest.cc", - "api/networking_config/networking_config_service_chromeos_unittest.cc", - "api/networking_private/networking_private_chromeos_unittest.cc", "api/power/power_api_unittest.cc", "api/runtime/restart_after_delay_api_unittest.cc", "api/socket/mojo_data_pump_unittest.cc", @@ -768,6 +759,8 @@ "api/lock_screen_data/lock_screen_value_store_migrator_impl_unittest.cc", "api/media_perception_private/conversion_utils_unittest.cc", "api/media_perception_private/media_perception_api_manager_unittest.cc", + "api/networking_config/networking_config_service_chromeos_unittest.cc", + "api/networking_private/networking_private_chromeos_unittest.cc", "api/system_power_source/system_power_source_api_unittest.cc", "api/virtual_keyboard_private/virtual_keyboard_private_api_unittest.cc", "api/webcam_private/visca_webcam_unittest.cc",
diff --git a/extensions/browser/api/system_cpu/BUILD.gn b/extensions/browser/api/system_cpu/BUILD.gn index f5da1c9..866ea58e 100644 --- a/extensions/browser/api/system_cpu/BUILD.gn +++ b/extensions/browser/api/system_cpu/BUILD.gn
@@ -4,13 +4,6 @@ import("//extensions/buildflags/buildflags.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - assert(enable_extensions, "Cannot depend on extensions because enable_extensions=false.") @@ -18,15 +11,24 @@ sources = [ "cpu_info_provider.cc", "cpu_info_provider.h", - "cpu_info_provider_linux.cc", - "cpu_info_provider_mac.cc", - "cpu_info_provider_win.cc", "system_cpu_api.cc", "system_cpu_api.h", ] deps = [ "//extensions/common/api" ] + if (is_mac) { + sources += [ "cpu_info_provider_mac.cc" ] + } + + if (is_linux || is_chromeos) { + sources += [ "cpu_info_provider_linux.cc" ] + } + + if (is_win) { + sources += [ "cpu_info_provider_win.cc" ] + } + if (is_chromeos) { deps += [ "//chromeos/system" ] }
diff --git a/extensions/browser/guest_view/app_view/app_view_apitest.cc b/extensions/browser/guest_view/app_view/app_view_apitest.cc index 15febc9..9e3e42d 100644 --- a/extensions/browser/guest_view/app_view/app_view_apitest.cc +++ b/extensions/browser/guest_view/app_view/app_view_apitest.cc
@@ -35,8 +35,8 @@ class MockShellAppDelegate : public extensions::ShellAppDelegate { public: - MockShellAppDelegate() : requested_(false) { - DCHECK(instance_ == nullptr); + MockShellAppDelegate() { + EXPECT_EQ(instance_, nullptr); instance_ = this; } ~MockShellAppDelegate() override { instance_ = nullptr; } @@ -46,23 +46,25 @@ const content::MediaStreamRequest& request, content::MediaResponseCallback callback, const extensions::Extension* extension) override { - requested_ = true; - if (request_message_loop_runner_.get()) - request_message_loop_runner_->Quit(); + media_access_requested_ = true; + if (media_access_request_quit_closure_) + std::move(media_access_request_quit_closure_).Run(); } void WaitForRequestMediaPermission() { - if (requested_) + if (media_access_requested_) return; - request_message_loop_runner_ = new content::MessageLoopRunner; - request_message_loop_runner_->Run(); + base::RunLoop run_loop; + media_access_request_quit_closure_ = run_loop.QuitClosure(); + run_loop.Run(); } static MockShellAppDelegate* Get() { return instance_; } private: - bool requested_; - scoped_refptr<content::MessageLoopRunner> request_message_loop_runner_; + bool media_access_requested_ = false; + base::OnceClosure media_access_request_quit_closure_; + static MockShellAppDelegate* instance_; }; @@ -71,7 +73,7 @@ class MockShellAppViewGuestDelegate : public extensions::ShellAppViewGuestDelegate { public: - MockShellAppViewGuestDelegate() {} + MockShellAppViewGuestDelegate() = default; extensions::AppDelegate* CreateAppDelegate() override { return new MockShellAppDelegate(); @@ -80,7 +82,7 @@ class MockExtensionsAPIClient : public extensions::ShellExtensionsAPIClient { public: - MockExtensionsAPIClient() {} + MockExtensionsAPIClient() = default; extensions::AppViewGuestDelegate* CreateAppViewGuestDelegate() const override { @@ -105,7 +107,7 @@ content::WebContents* GetFirstAppWindowWebContents() { const AppWindowRegistry::AppWindowList& app_window_list = AppWindowRegistry::Get(browser_context_)->app_windows(); - DCHECK(app_window_list.size() == 1); + EXPECT_EQ(1U, app_window_list.size()); return (*app_window_list.begin())->web_contents(); } @@ -143,6 +145,7 @@ ASSERT_TRUE(done_listener.WaitUntilSatisfied()); } + private: content::WebContents* embedder_web_contents_; TestGuestViewManagerFactory factory_; }; @@ -198,4 +201,9 @@ "app_view/apitest/skeleton"); } +IN_PROC_BROWSER_TEST_F(AppViewTest, TestAppViewNoEmbedRequestListener) { + RunTest("testAppViewNoEmbedRequestListener", "app_view/apitest", + "app_view/apitest/no_embed_request_listener"); +} + } // namespace extensions
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc index 3053d1f6..9cc6c96 100644 --- a/extensions/browser/guest_view/app_view/app_view_guest.cc +++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
@@ -55,8 +55,8 @@ }; using PendingResponseMap = std::map<int, std::unique_ptr<ResponseInfo>>; -static base::LazyInstance<PendingResponseMap>::DestructorAtExit - pending_response_map = LAZY_INSTANCE_INITIALIZER; +base::LazyInstance<PendingResponseMap>::DestructorAtExit + g_pending_response_map = LAZY_INSTANCE_INITIALIZER; } // namespace @@ -70,7 +70,7 @@ int guest_instance_id, const std::string& guest_extension_id, content::RenderProcessHost* guest_render_process_host) { - PendingResponseMap* response_map = pending_response_map.Pointer(); + PendingResponseMap* response_map = g_pending_response_map.Pointer(); auto it = response_map->find(guest_instance_id); // Kill the requesting process if it is not the real guest. if (it == response_map->end()) { @@ -190,11 +190,6 @@ return; } - pending_response_map.Get().insert(std::make_pair( - guest_instance_id(), std::make_unique<ResponseInfo>( - guest_extension, weak_ptr_factory_.GetWeakPtr(), - std::move(callback)))); - const LazyContextId context_id(browser_context(), guest_extension->id()); LazyContextTaskQueue* queue = context_id.GetTaskQueue(); if (queue->ShouldEnqueueTask(browser_context(), guest_extension)) { @@ -267,15 +262,21 @@ return; } + const Extension* const extension = + extensions::ExtensionRegistry::Get(context_info->browser_context) + ->enabled_extensions() + .GetByID(context_info->extension_id); + + g_pending_response_map.Get().insert(std::make_pair( + guest_instance_id(), + std::make_unique<ResponseInfo>(extension, weak_ptr_factory_.GetWeakPtr(), + std::move(callback)))); + std::unique_ptr<base::DictionaryValue> embed_request( new base::DictionaryValue()); embed_request->SetInteger(appview::kGuestInstanceID, guest_instance_id()); embed_request->SetString(appview::kEmbedderID, owner_host()); embed_request->Set(appview::kData, std::move(data)); - const Extension* const extension = - extensions::ExtensionRegistry::Get(context_info->browser_context) - ->enabled_extensions() - .GetByID(context_info->extension_id); AppRuntimeEventRouter::DispatchOnEmbedRequestedEvent( browser_context(), std::move(embed_request), extension); } @@ -286,7 +287,7 @@ std::vector<int> AppViewGuest::GetAllRegisteredInstanceIdsForTesting() { std::vector<int> instances; - for (const auto& key_value : pending_response_map.Get()) { + for (const auto& key_value : g_pending_response_map.Get()) { instances.push_back(key_value.first); } return instances;
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn index f912641..0e6bd51 100644 --- a/extensions/shell/BUILD.gn +++ b/extensions/shell/BUILD.gn
@@ -16,13 +16,6 @@ import("//build/linux/extract_symbols.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - assert(enable_extensions) grit("resources") { @@ -93,7 +86,6 @@ sources = [ "app/shell_main_delegate.cc", "app/shell_main_delegate.h", - "app/shell_main_delegate_mac.mm", "browser/api/feedback_private/shell_feedback_private_delegate.cc", "browser/api/feedback_private/shell_feedback_private_delegate.h", "browser/api/identity/identity_api.cc", @@ -112,9 +104,6 @@ "browser/shell_app_view_guest_delegate.h", "browser/shell_app_window_client.cc", "browser/shell_app_window_client.h", - "browser/shell_app_window_client_mac.mm", - "browser/shell_audio_controller_chromeos.cc", - "browser/shell_audio_controller_chromeos.h", "browser/shell_browser_context.cc", "browser/shell_browser_context.h", "browser/shell_browser_context_keyed_service_factories.cc", @@ -124,8 +113,6 @@ "browser/shell_browser_main_parts.h", "browser/shell_content_browser_client.cc", "browser/shell_content_browser_client.h", - "browser/shell_desktop_controller_mac.h", - "browser/shell_desktop_controller_mac.mm", "browser/shell_display_info_provider.cc", "browser/shell_display_info_provider.h", "browser/shell_extension_host_delegate.cc", @@ -148,12 +135,8 @@ "browser/shell_keep_alive_requester.h", "browser/shell_native_app_window.cc", "browser/shell_native_app_window.h", - "browser/shell_native_app_window_mac.h", - "browser/shell_native_app_window_mac.mm", "browser/shell_navigation_ui_data.cc", "browser/shell_navigation_ui_data.h", - "browser/shell_network_controller_chromeos.cc", - "browser/shell_network_controller_chromeos.h", "browser/shell_prefs.cc", "browser/shell_prefs.h", "browser/shell_special_storage_policy.cc", @@ -180,6 +163,26 @@ "renderer/shell_extensions_renderer_client.h", ] + if (is_mac) { + sources += [ + "app/shell_main_delegate_mac.mm", + "browser/shell_app_window_client_mac.mm", + "browser/shell_desktop_controller_mac.h", + "browser/shell_desktop_controller_mac.mm", + "browser/shell_native_app_window_mac.h", + "browser/shell_native_app_window_mac.mm", + ] + } + + if (is_chromeos) { + sources += [ + "browser/shell_audio_controller_chromeos.cc", + "browser/shell_audio_controller_chromeos.h", + "browser/shell_network_controller_chromeos.cc", + "browser/shell_network_controller_chromeos.h", + ] + } + if (use_aura) { sources += [ "browser/root_window_controller.cc",
diff --git a/extensions/test/data/app_view/OWNERS b/extensions/test/data/app_view/OWNERS new file mode 100644 index 0000000..74d34105 --- /dev/null +++ b/extensions/test/data/app_view/OWNERS
@@ -0,0 +1,3 @@ +file://components/guest_view/OWNERS + +# COMPONENT: Platform>Apps>BrowserTag
diff --git a/extensions/test/data/app_view/apitest/main.js b/extensions/test/data/app_view/apitest/main.js index 7899787..f431853 100644 --- a/extensions/test/data/app_view/apitest/main.js +++ b/extensions/test/data/app_view/apitest/main.js
@@ -132,12 +132,29 @@ }); }; +function testAppViewNoEmbedRequestListener(appToEmbed) { + var appview = new AppView(); + LOG('appToEmbed ' + appToEmbed); + document.body.appendChild(appview); + LOG('Attempting to connect to app that does not listen for embed requests.'); + appview.connect(appToEmbed, null, (success) => { + if (success) { + LOG('Should not have connected.'); + embedder.test.fail(); + } else { + LOG('Connection was correctly rejected.'); + embedder.test.succeed(); + } + }); +}; + embedder.test.testList = { 'testAppViewGoodDataShouldSucceed': testAppViewGoodDataShouldSucceed, 'testAppViewMediaRequest': testAppViewMediaRequest, 'testAppViewRefusedDataShouldFail': testAppViewRefusedDataShouldFail, 'testAppViewWithUndefinedDataShouldSucceed': - testAppViewWithUndefinedDataShouldSucceed + testAppViewWithUndefinedDataShouldSucceed, + 'testAppViewNoEmbedRequestListener': testAppViewNoEmbedRequestListener }; onload = function() {
diff --git a/extensions/test/data/app_view/apitest/no_embed_request_listener/background.js b/extensions/test/data/app_view/apitest/no_embed_request_listener/background.js new file mode 100644 index 0000000..f8bf7f0 --- /dev/null +++ b/extensions/test/data/app_view/apitest/no_embed_request_listener/background.js
@@ -0,0 +1,9 @@ +// Copyright 2020 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. + +// Intentionally not listening for onEmbedRequested. + +chrome.app.runtime.onLaunched.addListener(function() { + chrome.app.window.create('main.html', {}, function () {}); +});
diff --git a/extensions/test/data/app_view/apitest/no_embed_request_listener/main.html b/extensions/test/data/app_view/apitest/no_embed_request_listener/main.html new file mode 100644 index 0000000..46783c8 --- /dev/null +++ b/extensions/test/data/app_view/apitest/no_embed_request_listener/main.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<!-- + * Copyright 2020 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. +--> +<html> + <body> + <p>Hello</p> + </body> +</html>
diff --git a/extensions/test/data/app_view/apitest/no_embed_request_listener/manifest.json b/extensions/test/data/app_view/apitest/no_embed_request_listener/manifest.json new file mode 100644 index 0000000..1476590 --- /dev/null +++ b/extensions/test/data/app_view/apitest/no_embed_request_listener/manifest.json
@@ -0,0 +1,11 @@ +{ + "name": "No embed request listener", + "description": "An app that does not listen for onEmbedRequested", + "manifest_version": 2, + "version": "1.0", + "app": { + "background": { + "scripts": ["background.js"] + } + } +}
diff --git a/google_apis/BUILD.gn b/google_apis/BUILD.gn index 75fe851..64896b1 100644 --- a/google_apis/BUILD.gn +++ b/google_apis/BUILD.gn
@@ -8,13 +8,6 @@ import("//testing/test.gni") import("//third_party/protobuf/proto_library.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - declare_args() { # You can set the variable 'use_official_google_api_keys' to true # to use the Google-internal file containing official API keys @@ -161,13 +154,10 @@ } if (is_apple) { - set_sources_assignment_filter([]) sources += [ "google_api_keys_mac.h", "google_api_keys_mac.mm", ] - set_sources_assignment_filter( - deprecated_default_sources_assignment_filter) frameworks = [ "Foundation.framework" ] } @@ -261,9 +251,7 @@ } if (is_apple) { - set_sources_assignment_filter([]) sources += [ "google_api_keys_mac_unittest.mm" ] - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) deps += [ "//third_party/ocmock" ] }
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index f640f16..2c913fd 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn
@@ -8,13 +8,6 @@ import("//third_party/protobuf/proto_library.gni") import("//ui/gl/features.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - config("gpu_implementation") { defines = [ "GPU_IMPLEMENTATION" ] configs = [ @@ -350,7 +343,6 @@ "command_buffer/tests/gl_texture_storage_unittest.cc", "command_buffer/tests/gl_unallocated_texture_unittest.cc", "command_buffer/tests/gl_unittest.cc", - "command_buffer/tests/gl_unittests_android.cc", "command_buffer/tests/gl_virtual_contexts_ext_window_rectangles_unittest.cc", "command_buffer/tests/gl_virtual_contexts_unittest.cc", "command_buffer/tests/gl_webgl_multi_draw_test.cc", @@ -362,6 +354,10 @@ "ipc/client/raster_in_process_context_tests.cc", ] + if (is_android) { + sources += [ "command_buffer/tests/gl_unittests_android.cc" ] + } + if (use_dawn) { sources += [ "command_buffer/service/webgpu_decoder_unittest.cc",
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn index 134306e..b149bff 100644 --- a/gpu/config/BUILD.gn +++ b/gpu/config/BUILD.gn
@@ -11,13 +11,6 @@ import("//build/config/android/rules.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - group("config") { if (is_component_build) { public_deps = [ "//gpu" ] @@ -139,7 +132,6 @@ "gpu_driver_bug_workaround_type.h", "gpu_driver_bug_workarounds.cc", "gpu_driver_bug_workarounds.h", - "gpu_dx_diagnostics_win.cc", "gpu_extra_info.cc", "gpu_extra_info.h", "gpu_feature_info.cc", @@ -151,10 +143,6 @@ "gpu_info.h", "gpu_info_collector.cc", "gpu_info_collector.h", - "gpu_info_collector_android.cc", - "gpu_info_collector_linux.cc", - "gpu_info_collector_mac.mm", - "gpu_info_collector_win.cc", "gpu_mode.h", "gpu_preferences.cc", "gpu_preferences.h", @@ -210,7 +198,14 @@ # Prefer mesa GL headers to system headers, which cause problems on Win. include_dirs = [ "//third_party/mesa_headers" ] + if (is_android) { + sources += [ "gpu_info_collector_android.cc" ] + } if (is_win) { + sources += [ + "gpu_dx_diagnostics_win.cc", + "gpu_info_collector_win.cc", + ] libs = [ "dxgi.lib", "dxguid.lib", @@ -224,8 +219,12 @@ } } if (is_mac) { + sources += [ "gpu_info_collector_mac.mm" ] frameworks = [ "OpenGL.framework" ] } + if (is_linux || is_chromeos) { + sources += [ "gpu_info_collector_linux.cc" ] + } if (is_linux || is_chromeos || is_mac) { deps += [ "//third_party/angle:angle_gpu_info_util" ] }
diff --git a/gpu/vulkan/BUILD.gn b/gpu/vulkan/BUILD.gn index 28ee623..390e2f8 100644 --- a/gpu/vulkan/BUILD.gn +++ b/gpu/vulkan/BUILD.gn
@@ -9,13 +9,6 @@ import("//ui/ozone/ozone.gni") import("features.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - # Generate a buildflag header for compile-time checking of Vulkan support. buildflag_header("buildflags") { header = "buildflags.h" @@ -131,10 +124,11 @@ data_deps = [] if (is_posix) { - sources += [ - "vulkan_image_linux.cc", - "vulkan_util_posix.cc", - ] + sources += [ "vulkan_util_posix.cc" ] + + if (is_linux || is_chromeos) { + sources += [ "vulkan_image_linux.cc" ] + } } if (is_android) {
diff --git a/ios/chrome/app/application_delegate/user_activity_handler.mm b/ios/chrome/app/application_delegate/user_activity_handler.mm index 2cfbfdf..adcdc90 100644 --- a/ios/chrome/app/application_delegate/user_activity_handler.mm +++ b/ios/chrome/app/application_delegate/user_activity_handler.mm
@@ -170,10 +170,10 @@ base::mac::ObjCCastStrict<SearchInChromeIntent>( userActivity.interaction.intent); - NSString* searchPhrase = intent.searchPhrase; - - if ([searchPhrase length]) { - startupParams.textQuery = searchPhrase; + if (intent && + [intent respondsToSelector:NSSelectorFromString(@"searchPhrase")] && + intent.searchPhrase && [intent.searchPhrase length]) { + startupParams.textQuery = intent.searchPhrase; } else { startupParams.postOpeningAction = FOCUS_OMNIBOX; } @@ -188,11 +188,27 @@ OpenInChromeIntent* intent = base::mac::ObjCCastStrict<OpenInChromeIntent>( userActivity.interaction.intent); - if (!intent.url || intent.url.count == 0) { + if (!intent.url) { return NO; } - std::vector<GURL> URLs = createGURLVectorFromIntentURLs(intent.url); + std::vector<GURL> URLs; + + if ([intent.url isKindOfClass:[NSURL class]]) { + // Old intent version where |url| is of type NSURL rather than an array. + GURL webpageGURL( + net::GURLWithNSURL(base::mac::ObjCCastStrict<NSURL>(intent.url))); + if (!webpageGURL.is_valid()) + return NO; + URLs.push_back(webpageGURL); + } else if ([intent.url isKindOfClass:[NSArray class]] && + intent.url.count > 0) { + URLs = createGURLVectorFromIntentURLs(intent.url); + } else { + // Unknown or invalid intent object. + return NO; + } + AppStartupParameters* startupParams = [[AppStartupParameters alloc] initWithURLs:URLs];
diff --git a/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.h b/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.h index 58d4472b..3dae119 100644 --- a/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.h +++ b/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.h
@@ -5,6 +5,8 @@ #ifndef IOS_CHROME_BROWSER_INFOBARS_OVERLAYS_TRANSLATE_OVERLAY_TAB_HELPER_H_ #define IOS_CHROME_BROWSER_INFOBARS_OVERLAYS_TRANSLATE_OVERLAY_TAB_HELPER_H_ +#include <string> + #include "base/observer_list.h" #include "base/observer_list_types.h" #include "base/scoped_observer.h" @@ -65,6 +67,8 @@ void OnTranslateStepChanged( translate::TranslateStep step, translate::TranslateErrors::Type error_type) override; + void OnTargetLanguageChanged( + const std::string& target_language_code) override; bool IsDeclinedByUser() override; void OnTranslateInfoBarDelegateDestroyed( translate::TranslateInfoBarDelegate* delegate) override;
diff --git a/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.mm b/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.mm index 840c2c39..e0312a6 100644 --- a/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.mm +++ b/ios/chrome/browser/infobars/overlays/translate_overlay_tab_helper.mm
@@ -148,6 +148,16 @@ } } +void TranslateOverlayTabHelper::TranslateStepObserver::OnTargetLanguageChanged( + const std::string& target_language_code) { + // Unimplemented on iOS as target language changes are initiated solely by the + // UI. This method should always be a no-op. + DCHECK_EQ(translate_infobar_->delegate() + ->AsTranslateInfoBarDelegate() + ->target_language_code(), + target_language_code); +} + bool TranslateOverlayTabHelper::TranslateStepObserver::IsDeclinedByUser() { return false; }
diff --git a/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h b/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h index 6cf8800f..f80218e 100644 --- a/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h +++ b/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.h
@@ -34,6 +34,8 @@ void OnTranslateStepChanged( translate::TranslateStep step, translate::TranslateErrors::Type error_type) override; + void OnTargetLanguageChanged( + const std::string& target_language_code) override; bool IsDeclinedByUser() override; void OnTranslateInfoBarDelegateDestroyed( translate::TranslateInfoBarDelegate* delegate) override;
diff --git a/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.mm b/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.mm index 4967d5c6..26aba318 100644 --- a/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.mm +++ b/ios/chrome/browser/translate/translate_infobar_delegate_observer_bridge.mm
@@ -32,6 +32,14 @@ withErrorType:error_type]; } +void TranslateInfobarDelegateObserverBridge::OnTargetLanguageChanged( + const std::string& target_language_code) { + // Unimplemented on iOS as target language changes are initiated solely by the + // UI. This method should always be a no-op. + DCHECK_EQ(translate_infobar_delegate_->target_language_code(), + target_language_code); +} + bool TranslateInfobarDelegateObserverBridge::IsDeclinedByUser() { return [owner_ translateInfoBarDelegateDidDismissWithoutInteraction: translate_infobar_delegate_];
diff --git a/ios/chrome/browser/ui/tab_grid/grid/tab_switcher_layout.mm b/ios/chrome/browser/ui/tab_grid/grid/tab_switcher_layout.mm index 5d08fa0a..73d9b6fc7 100644 --- a/ios/chrome/browser/ui/tab_grid/grid/tab_switcher_layout.mm +++ b/ios/chrome/browser/ui/tab_grid/grid/tab_switcher_layout.mm
@@ -117,6 +117,7 @@ - (void)finalizeCollectionViewUpdates { self.indexPathsOfDeletingItems = @[]; self.indexPathsOfInsertingItems = @[]; + [super finalizeCollectionViewUpdates]; } @end
diff --git a/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm b/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm index e41cdef..634c645 100644 --- a/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm +++ b/ios/chrome/browser/ui/tab_grid/tab_grid_coordinator.mm
@@ -436,6 +436,13 @@ message:nil rect:self.baseViewController.view.frame view:self.baseViewController.view]; + + NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter]; + [defaultCenter addObserver:self + selector:@selector(applicationDidEnterBackground:) + name:UIApplicationDidEnterBackgroundNotification + object:nil]; + self.actionSheetCoordinator.popoverArrowDirection = 0; self.actionSheetCoordinator.alertStyle = IsIPadIdiom() ? UIAlertControllerStyleAlert @@ -488,6 +495,12 @@ focusOmnibox:NO]; } +#pragma mark - Notification callback + +- (void)applicationDidEnterBackground:(NSNotification*)notification { + [self.actionSheetCoordinator stop]; +} + #pragma mark - HistoryPresentationDelegate - (void)showActiveRegularTabFromHistory {
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 index 33d9253f..b63e4af5 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -68775dfd54630dd364f7e98b6974338afcd64043 \ No newline at end of file +da7529a46aaee5d308318f4c2d547f4ed0c57828 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 index f559416..2ffcf2c4 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -9ef4f9cadd30d0dacd828c211370bdc1dfeb78f3 \ No newline at end of file +1e6d311a54ccce8ed20ca202c291224ab89fe712 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 index 83ee88c4..ae9ff52 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -2a3cb9135403d5e1d655d93902aba5e015e85797 \ No newline at end of file +caa7b7d5e3da1afe4f2bc8f3ee6b771d418b4617 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 index 36f2e3c..1dde484 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -6cb0755f4e0e08b394786cfbaa8e9496a74c3977 \ No newline at end of file +857e5f8b9b4e3ba9d7306eac0bf9d435d6099ef9 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 index efa2d26e..414f4bd 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -a42793b45e3d5d673371269eaa24ab9fc7dfa04c \ No newline at end of file +fff6e252283b9f694118d2c4c822d8ff874aec47 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 index 2c9a548..2aa78f4 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -2db7856df9e03e2722ab78cd54f47ce72969e4c1 \ No newline at end of file +50b62a31164cc775a5c8a162474bf591fcc6f72a \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 index c883d42ab..8d9b872 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -b7497dae84ed6e529a084186cc48b9531839fbaa \ No newline at end of file +54392562f423e30fe1e2ac459b086ec0b83decf4 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 index d41f4d2ec..919c658 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.arm64.zip.sha1
@@ -1 +1 @@ -62f865aa96a2884729c128b63688231e96888337 \ No newline at end of file +b253260088f74f333adf06c2dbfeb4c6ba08d26b \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 index 20757b8..f272377 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.x64.zip.sha1
@@ -1 +1 @@ -eb3d542aa17349de9f7b07f6bf39243dc82a6466 \ No newline at end of file +aea76798dc627f9ba55afe4e8cc8567dde31d187 \ No newline at end of file
diff --git a/media/base/mac/BUILD.gn b/media/base/mac/BUILD.gn index 7b16b98..8336767 100644 --- a/media/base/mac/BUILD.gn +++ b/media/base/mac/BUILD.gn
@@ -2,13 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - assert(is_apple) source_set("mac") { @@ -18,7 +11,6 @@ # run-time. visibility = [ "//media" ] - set_sources_assignment_filter([]) sources = [ "video_frame_mac.cc", "video_frame_mac.h", @@ -33,7 +25,6 @@ "VideoToolbox.framework", ] } - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) configs += [ "//media:subcomponent_config" ] deps = [
diff --git a/media/base/win/BUILD.gn b/media/base/win/BUILD.gn index b3b33bd..b4a7cb7 100644 --- a/media/base/win/BUILD.gn +++ b/media/base/win/BUILD.gn
@@ -2,13 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - assert(is_win) config("delay_load_mf") { @@ -21,7 +14,6 @@ component("media_foundation_util") { defines = [ "MF_INITIALIZER_IMPLEMENTATION" ] - set_sources_assignment_filter([]) sources = [ "mf_helpers.cc", "mf_helpers.h", @@ -29,7 +21,6 @@ "mf_initializer.h", "mf_initializer_export.h", ] - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) configs += [ # TODO(crbug.com/167187): Fix size_t to int truncations. "//build/config/compiler:no_size_t_to_int_warning",
diff --git a/media/capture/BUILD.gn b/media/capture/BUILD.gn index 0a27e9d..508b0176 100644 --- a/media/capture/BUILD.gn +++ b/media/capture/BUILD.gn
@@ -7,13 +7,6 @@ import("//media/media_options.gni") import("//testing/test.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - group("capture") { public_deps = [ ":capture_lib", @@ -251,8 +244,6 @@ # these sources into linux, chromeos, and common. if (is_linux || is_chromeos) { sources += [ - "video/linux/camera_config_chromeos.cc", - "video/linux/camera_config_chromeos.h", "video/linux/scoped_v4l2_device_fd.cc", "video/linux/scoped_v4l2_device_fd.h", "video/linux/v4l2_capture_delegate.cc", @@ -260,8 +251,6 @@ "video/linux/v4l2_capture_device.h", "video/linux/v4l2_capture_device_impl.cc", "video/linux/v4l2_capture_device_impl.h", - "video/linux/video_capture_device_chromeos.cc", - "video/linux/video_capture_device_chromeos.h", "video/linux/video_capture_device_factory_linux.cc", "video/linux/video_capture_device_factory_linux.h", "video/linux/video_capture_device_linux.cc", @@ -317,6 +306,10 @@ "video/chromeos/video_capture_jpeg_decoder.h", "video/chromeos/video_capture_jpeg_decoder_impl.cc", "video/chromeos/video_capture_jpeg_decoder_impl.h", + "video/linux/camera_config_chromeos.cc", + "video/linux/camera_config_chromeos.h", + "video/linux/video_capture_device_chromeos.cc", + "video/linux/video_capture_device_chromeos.h", ] public_deps += [ "//media/capture/video/chromeos/public" ] deps += [ @@ -350,10 +343,6 @@ testonly = true sources = [ - "video/linux/fake_device_provider.cc", - "video/linux/fake_device_provider.h", - "video/linux/fake_v4l2_impl.cc", - "video/linux/fake_v4l2_impl.h", "video/mock_device.cc", "video/mock_device.h", "video/mock_device_factory.cc", @@ -378,6 +367,15 @@ "//ui/gfx:test_support", ] + if (is_linux || is_chromeos) { + sources += [ + "video/linux/fake_device_provider.cc", + "video/linux/fake_device_provider.h", + "video/linux/fake_v4l2_impl.cc", + "video/linux/fake_v4l2_impl.h", + ] + } + if (is_chromeos) { sources += [ "video/chromeos/mock_camera_module.cc", @@ -407,17 +405,6 @@ "run_all_unittests.cc", "video/fake_video_capture_device_unittest.cc", "video/file_video_capture_device_unittest.cc", - "video/linux/camera_config_chromeos_unittest.cc", - "video/linux/v4l2_capture_delegate_unittest.cc", - "video/linux/video_capture_device_factory_linux_unittest.cc", - "video/mac/pixel_buffer_pool_mac_unittest.mm", - "video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.h", - "video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.mm", - "video/mac/test/video_capture_test_utils_mac.h", - "video/mac/test/video_capture_test_utils_mac.mm", - "video/mac/video_capture_device_avfoundation_mac_unittest.mm", - "video/mac/video_capture_device_factory_mac_unittest.mm", - "video/mac/video_capture_device_mac_unittest.mm", "video/video_capture_device_client_unittest.cc", "video/video_capture_device_unittest.cc", "video_capture_types_unittest.cc", @@ -439,6 +426,17 @@ "//ui/gfx:test_support", ] + if (is_linux || is_chromeos) { + sources += [ + "video/linux/v4l2_capture_delegate_unittest.cc", + "video/linux/video_capture_device_factory_linux_unittest.cc", + ] + } + + if (is_chromeos) { + sources += [ "video/linux/camera_config_chromeos_unittest.cc" ] + } + if (is_android) { deps += [ "//media/capture/video/android", @@ -460,6 +458,16 @@ } if (is_mac) { + sources += [ + "video/mac/pixel_buffer_pool_mac_unittest.mm", + "video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.h", + "video/mac/test/mock_video_capture_device_avfoundation_frame_receiver_mac.mm", + "video/mac/test/video_capture_test_utils_mac.h", + "video/mac/test/video_capture_test_utils_mac.mm", + "video/mac/video_capture_device_avfoundation_mac_unittest.mm", + "video/mac/video_capture_device_factory_mac_unittest.mm", + "video/mac/video_capture_device_mac_unittest.mm", + ] frameworks = [ "AVFoundation.framework", "CoreMedia.framework",
diff --git a/media/device_monitors/BUILD.gn b/media/device_monitors/BUILD.gn index 6762121..9345776 100644 --- a/media/device_monitors/BUILD.gn +++ b/media/device_monitors/BUILD.gn
@@ -4,25 +4,13 @@ import("//media/media_options.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - source_set("device_monitors") { # Do not expand the visibility here without double-checking with OWNERS, this # is a roll-up target which is part of the //media component. Most other DEPs # should be using //media and not directly DEP this roll-up target. visibility = [ "//media" ] - sources = [ - "device_monitor_mac.h", - "device_monitor_mac.mm", - "system_message_window_win.cc", - "system_message_window_win.h", - ] + sources = [] configs += [ "//media:subcomponent_config" ] @@ -41,13 +29,24 @@ } if (is_mac) { + sources += [ + "device_monitor_mac.h", + "device_monitor_mac.mm", + ] frameworks = [ "Foundation.framework" ] } + + if (is_win) { + sources += [ + "system_message_window_win.cc", + "system_message_window_win.h", + ] + } } source_set("unit_tests") { testonly = true - sources = [ "system_message_window_win_unittest.cc" ] + sources = [] deps = [ "//base", @@ -56,4 +55,8 @@ "//testing/gmock", "//testing/gtest", ] + + if (is_win) { + sources += [ "system_message_window_win_unittest.cc" ] + } }
diff --git a/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc b/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc index f959ec6..25f77a7 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc
@@ -258,12 +258,19 @@ DVLOGF(3); const v4l2_memory mem_type = output_queue_->GetMemoryType(); - while (base::Optional<V4L2WritableBufferRef> buffer = - output_queue_->GetFreeBuffer()) { + while (true) { bool ret = false; + bool no_buffer = false; + base::Optional<V4L2WritableBufferRef> buffer; switch (mem_type) { case V4L2_MEMORY_MMAP: + buffer = output_queue_->GetFreeBuffer(); + if (!buffer) { + no_buffer = true; + break; + } + ret = std::move(*buffer).QueueMMap(); break; case V4L2_MEMORY_DMABUF: { @@ -272,6 +279,12 @@ // once frames are available. if (!video_frame) return; + buffer = output_queue_->GetFreeBufferForFrame(*video_frame); + if (!buffer) { + no_buffer = true; + break; + } + ret = std::move(*buffer).QueueDMABuf(std::move(video_frame)); break; } @@ -279,6 +292,11 @@ NOTREACHED(); } + // Running out of V4L2 buffers is not an error, so just exit the loop + // gracefully. + if (no_buffer) + break; + if (!ret) client_->OnBackendError(); }
diff --git a/media/midi/BUILD.gn b/media/midi/BUILD.gn index 6c34560f..12cadac 100644 --- a/media/midi/BUILD.gn +++ b/media/midi/BUILD.gn
@@ -15,13 +15,6 @@ import("//build/config/android/rules.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - # Common configuration for targets in the media/midi directory. config("midi_config") { if (use_alsa && use_udev) { @@ -89,8 +82,6 @@ "midi_export.h", "midi_manager.cc", "midi_manager.h", - "midi_manager_mac.cc", - "midi_manager_mac.h", "midi_message_queue.cc", "midi_message_queue.h", "midi_service.cc", @@ -137,6 +128,10 @@ } if (is_mac) { + sources += [ + "midi_manager_mac.cc", + "midi_manager_mac.h", + ] frameworks = [ "CoreAudio.framework", "CoreFoundation.framework",
diff --git a/mojo/core/BUILD.gn b/mojo/core/BUILD.gn index db6af19..5eb85a7 100644 --- a/mojo/core/BUILD.gn +++ b/mojo/core/BUILD.gn
@@ -12,13 +12,6 @@ import("//third_party/protobuf/proto_library.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - component("embedder_internal") { output_name = "mojo_core_embedder_internal" public_deps = [ ":impl_for_embedder" ] @@ -81,9 +74,7 @@ sources = [ "atomic_flag.h", "broker.h", - "broker_win.cc", "channel.cc", - "channel_win.cc", "configuration.cc", "connection_params.cc", "core.cc", @@ -163,6 +154,10 @@ } if (is_win) { + sources += [ + "broker_win.cc", + "channel_win.cc", + ] cflags = [ "/wd4324" ] # Structure was padded due to __declspec(align()), # which is uninteresting. }
diff --git a/mojo/core/embedder_unittest.cc b/mojo/core/embedder_unittest.cc index 5d85b36..99a4adf0 100644 --- a/mojo/core/embedder_unittest.cc +++ b/mojo/core/embedder_unittest.cc
@@ -47,7 +47,7 @@ scoped_refptr<SharedBufferDispatcher> buffer; MojoResult result = SharedBufferDispatcher::CreateFromPlatformSharedMemoryRegion( - T::TakeHandleForSerialization(std::move(region)), &buffer); + T::TakeHandleForSerialization(std::forward<T>(region)), &buffer); if (result != MOJO_RESULT_OK) return result;
diff --git a/mojo/core/test/BUILD.gn b/mojo/core/test/BUILD.gn index 9d0d150..d3025e4 100644 --- a/mojo/core/test/BUILD.gn +++ b/mojo/core/test/BUILD.gn
@@ -4,13 +4,6 @@ import("//third_party/protobuf/proto_library.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - static_library("test_support") { testonly = true sources = [ @@ -19,7 +12,6 @@ "mojo_test_base.cc", "mojo_test_base.h", "test_utils.h", - "test_utils_win.cc", ] if (!is_ios) { @@ -29,6 +21,10 @@ ] } + if (is_win) { + sources += [ "test_utils_win.cc" ] + } + if (is_fuchsia || is_posix) { sources += [ "test_utils.cc" ] }
diff --git a/mojo/public/cpp/bindings/README.md b/mojo/public/cpp/bindings/README.md index a15cf13..9eff612 100644 --- a/mojo/public/cpp/bindings/README.md +++ b/mojo/public/cpp/bindings/README.md
@@ -168,7 +168,7 @@ ``` cpp mojo::Remote<sample::mojom::Logger> logger; -auto receiver = logger.BindNewPipeAndPassReceiver()); +auto receiver = logger.BindNewPipeAndPassReceiver(); ``` This second snippet is equivalent to the first one.
diff --git a/mojo/public/cpp/bindings/pending_receiver.h b/mojo/public/cpp/bindings/pending_receiver.h index 07d300f..1df56ce9 100644 --- a/mojo/public/cpp/bindings/pending_receiver.h +++ b/mojo/public/cpp/bindings/pending_receiver.h
@@ -74,7 +74,7 @@ Interface>)(T&&)>>::value>* = nullptr> PendingReceiver(T&& other) : PendingReceiver(PendingReceiverConverter<T>::template To<Interface>( - std::move(other))) {} + std::forward<T>(other))) {} #endif // !defined(OS_NACL) ~PendingReceiver() = default;
diff --git a/mojo/public/cpp/platform/BUILD.gn b/mojo/public/cpp/platform/BUILD.gn index 9f17405..6cd73552 100644 --- a/mojo/public/cpp/platform/BUILD.gn +++ b/mojo/public/cpp/platform/BUILD.gn
@@ -4,13 +4,6 @@ import("//build/config/nacl/config.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - component("platform") { output_name = "mojo_cpp_platform" @@ -22,7 +15,6 @@ ] sources = [ - "named_platform_channel_win.cc", "platform_channel.cc", "platform_channel_endpoint.cc", "platform_channel_server_endpoint.cc", @@ -47,14 +39,16 @@ sources += [ "named_platform_channel_mac.cc" ] } + if (is_win) { + sources += [ "named_platform_channel_win.cc" ] + } + if (is_fuchsia) { public_deps += [ "//third_party/fuchsia-sdk/sdk/pkg/fdio", "//third_party/fuchsia-sdk/sdk/pkg/zx", ] - } - - if (!is_fuchsia) { + } else { sources += [ "named_platform_channel.cc" ] public += [ "named_platform_channel.h" ] }
diff --git a/mojo/public/tools/fuzzers/mojolpm.h b/mojo/public/tools/fuzzers/mojolpm.h index ec3746a..58e2ee1 100644 --- a/mojo/public/tools/fuzzers/mojolpm.h +++ b/mojo/public/tools/fuzzers/mojolpm.h
@@ -261,7 +261,7 @@ template <typename T> Context::Storage::Storage(T&& value) { - wrapper_ = std::make_unique<StorageWrapper<T>>(std::move(value)); + wrapper_ = std::make_unique<StorageWrapper<T>>(std::forward<T>(value)); } template <typename T>
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc index b2764de..43b95eb 100644 --- a/net/dns/host_cache.cc +++ b/net/dns/host_cache.cc
@@ -122,14 +122,14 @@ HostCache::Key::Key(const Key& key) = default; HostCache::Key::Key(Key&& key) = default; -HostCache::Entry::Entry(int error, Source source, base::TimeDelta ttl) - : error_(error), source_(source), ttl_(ttl) { - DCHECK_GE(ttl_, base::TimeDelta()); - DCHECK_NE(OK, error_); -} - -HostCache::Entry::Entry(int error, Source source) - : error_(error), source_(source), ttl_(base::TimeDelta::FromSeconds(-1)) { +HostCache::Entry::Entry(int error, + Source source, + base::Optional<base::TimeDelta> ttl) + : error_(error), + source_(source), + ttl_(ttl.value_or(base::TimeDelta::FromSeconds(-1))) { + // If |ttl| has a value, must not be negative. + DCHECK_GE(ttl.value_or(base::TimeDelta()), base::TimeDelta()); DCHECK_NE(OK, error_); }
diff --git a/net/dns/host_cache.h b/net/dns/host_cache.h index 1554e231..e9452e8 100644 --- a/net/dns/host_cache.h +++ b/net/dns/host_cache.h
@@ -127,8 +127,9 @@ : Entry(error, std::forward<T>(results), source, base::nullopt) {} // For errors with no |results|. - Entry(int error, Source source, base::TimeDelta ttl); - Entry(int error, Source source); + Entry(int error, + Source source, + base::Optional<base::TimeDelta> ttl = base::nullopt); Entry(const Entry& entry); Entry(Entry&& entry);
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc index 9a78419..21449c0 100644 --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc
@@ -1658,27 +1658,12 @@ httpssvc_metrics_->SaveNonIntegrityFailure(); DCHECK_NE(OK, net_error); - HostCache::Entry results(net_error, HostCache::Entry::SOURCE_UNKNOWN); + HostCache::Entry results(net_error, HostCache::Entry::SOURCE_UNKNOWN, ttl); net_log_.EndEvent(NetLogEventType::HOST_RESOLVER_IMPL_DNS_TASK, [&] { return NetLogDnsTaskFailedParams(results, parse_result); }); - // If we have a TTL from a previously completed transaction, use it. - base::TimeDelta previous_transaction_ttl; - if (saved_results_ && saved_results_.value().has_ttl() && - saved_results_.value().ttl() < - base::TimeDelta::FromSeconds( - std::numeric_limits<uint32_t>::max())) { - previous_transaction_ttl = saved_results_.value().ttl(); - if (ttl) - results.set_ttl(std::min(ttl.value(), previous_transaction_ttl)); - else - results.set_ttl(previous_transaction_ttl); - } else if (ttl) { - results.set_ttl(ttl.value()); - } - delegate_->OnDnsTaskComplete(task_start_time_, results, secure_); }
diff --git a/net/dns/host_resolver_manager_unittest.cc b/net/dns/host_resolver_manager_unittest.cc index 0846ac9..65206892 100644 --- a/net/dns/host_resolver_manager_unittest.cc +++ b/net/dns/host_resolver_manager_unittest.cc
@@ -6636,6 +6636,29 @@ EXPECT_FALSE(!!cache_result); } +// Test that if one of A and AAAA completes successfully and the other fails, +// the failure is not cached. +TEST_F(HostResolverManagerDnsTest, TtlNotSharedBetweenQtypes) { + CreateResolver(); + set_allow_fallback_to_proctask(false); + ChangeDnsConfig(CreateValidDnsConfig()); + + ResolveHostResponseHelper response(resolver_->CreateRequest( + HostPortPair("4slow_4timeout", 80), NetworkIsolationKey(), + NetLogWithSource(), base::nullopt /* optional_parameters */, + resolve_context_.get(), resolve_context_->host_cache())); + + // Ensure success completes before the timeout result. + base::RunLoop().RunUntilIdle(); + EXPECT_FALSE(response.complete()); + + dns_client_->CompleteDelayedTransactions(); + EXPECT_THAT(response.result_error(), IsError(ERR_DNS_TIMED_OUT)); + + // Expect failure not cached. + EXPECT_EQ(resolve_context_->host_cache()->size(), 0u); +} + TEST_F(HostResolverManagerDnsTest, NoCanonicalName) { MockDnsClientRuleList rules; AddDnsRule(&rules, "alias", dns_protocol::kTypeA, IPAddress::IPv4Localhost(),
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index e99b5e5..b83ceab 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn
@@ -11,13 +11,6 @@ import("//build/config/android/rules.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - declare_args() { compile_suid_client = is_linux || is_chromeos @@ -232,8 +225,6 @@ "bpf_dsl/trap_registry.h", "seccomp-bpf-helpers/baseline_policy.cc", "seccomp-bpf-helpers/baseline_policy.h", - "seccomp-bpf-helpers/baseline_policy_android.cc", - "seccomp-bpf-helpers/baseline_policy_android.h", "seccomp-bpf-helpers/sigsys_handlers.cc", "seccomp-bpf-helpers/sigsys_handlers.h", "seccomp-bpf-helpers/syscall_parameters_restrictions.cc", @@ -262,6 +253,13 @@ "//sandbox:sandbox_buildflags", ] + if (is_android) { + sources += [ + "seccomp-bpf-helpers/baseline_policy_android.cc", + "seccomp-bpf-helpers/baseline_policy_android.h", + ] + } + if (is_nacl_nonsfi) { cflags = [ "-fgnu-inline-asm" ] sources -= [
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 5f8a8dd6..144cdac3 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -4724,25 +4724,6 @@ ], "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04", - "pool": "chrome.tests", - "ssd": "0" - } - ], - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -6206,6 +6187,29 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04", + "pool": "chrome.tests", + "ssd": "0" + } + ], + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 953c650..8ad6e81 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -2108,53 +2108,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "LMY48M|LMY48I", - "device_os_type": "userdebug", - "device_type": "hammerhead", - "os": "Android" - } - ], - "expiration": 10800, - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -4676,6 +4629,32 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "LMY48M|LMY48I", + "device_os_type": "userdebug", + "device_type": "hammerhead", + "os": "Android" + } + ], + "expiration": 10800, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -5776,53 +5755,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "LMY49B", - "device_os_type": "userdebug", - "device_type": "flo", - "os": "Android" - } - ], - "expiration": 21600, - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -8088,6 +8020,32 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "LMY49B", + "device_os_type": "userdebug", + "device_type": "flo", + "os": "Android" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -9133,52 +9091,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -11647,6 +11559,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -12728,53 +12665,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MRA58Z", - "device_os_type": "userdebug", - "device_type": "flo", - "os": "Android" - } - ], - "expiration": 10800, - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -15042,6 +14932,32 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MRA58Z", + "device_os_type": "userdebug", + "device_type": "flo", + "os": "Android" + } + ], + "expiration": 10800, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -17112,52 +17028,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -19625,6 +19495,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -23420,52 +23315,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "LMY48M", - "device_os_type": "userdebug", - "device_type": "hammerhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -25540,6 +25389,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "LMY48M", + "device_os_type": "userdebug", + "device_type": "hammerhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -26251,53 +26125,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "isolate_profile_data": true, - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -28564,6 +28391,32 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -29907,65 +29760,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "cpu": "x86-64", - "device_os": null, - "device_type": null, - "machine_type": "n1-standard-4", - "os": "Ubuntu-16.04", - "pool": "chromium.tests.avd" - } - ], - "named_caches": [ - { - "name": "avd_generic_android23", - "path": ".android" - }, - { - "name": "system_images_android_23_google_apis_x86", - "path": ".emulator_sdk" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices", - "--avd-config=../../tools/android/avd/proto/generic_android23.textpb" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -33135,6 +32929,44 @@ }, { "args": [ + "standalone_angle_unittests", + "-v", + "--avd-config=../../tools/android/avd/proto/generic_android23.textpb" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "machine_type": "n1-standard-4", + "os": "Ubuntu-16.04", + "pool": "chromium.tests.avd" + } + ], + "named_caches": [ + { + "name": "avd_generic_android23", + "path": ".android" + }, + { + "name": "system_images_android_23_google_apis_x86", + "path": ".emulator_sdk" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices", "--avd-config=../../tools/android/avd/proto/generic_android23.textpb" @@ -34186,52 +34018,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "NJH47F", - "device_os_type": "userdebug", - "device_type": "sailfish", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -36595,6 +36381,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "NJH47F", + "device_os_type": "userdebug", + "device_type": "sailfish", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -38882,65 +38693,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "cpu": "x86-64", - "device_os": null, - "device_type": null, - "machine_type": "n1-standard-8", - "os": "Ubuntu-16.04", - "pool": "chromium.tests.avd" - } - ], - "named_caches": [ - { - "name": "avd_generic_android28", - "path": ".android" - }, - { - "name": "system_images_android_28_google_apis_x86", - "path": ".emulator_sdk" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices", - "--avd-config=../../tools/android/avd/proto/generic_android28.textpb" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -42165,6 +41917,44 @@ }, { "args": [ + "standalone_angle_unittests", + "-v", + "--avd-config=../../tools/android/avd/proto/generic_android28.textpb" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "device_os": null, + "device_type": null, + "machine_type": "n1-standard-8", + "os": "Ubuntu-16.04", + "pool": "chromium.tests.avd" + } + ], + "named_caches": [ + { + "name": "avd_generic_android28", + "path": ".android" + }, + { + "name": "system_images_android_28_google_apis_x86", + "path": ".emulator_sdk" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices", "--avd-config=../../tools/android/avd/proto/generic_android28.textpb"
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index afdf55d..d350e48 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -934,23 +934,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -2255,6 +2238,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2552,24 +2556,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -3949,6 +3935,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -4352,18 +4360,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -5185,6 +5181,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json index 67dc60c..4dcdd0a0 100644 --- a/testing/buildbot/chromium.clang.json +++ b/testing/buildbot/chromium.clang.json
@@ -56,23 +56,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -1223,6 +1206,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -1518,24 +1522,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -2955,6 +2941,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3336,24 +3344,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -4680,6 +4670,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5187,52 +5199,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "LMY48M", - "device_os_type": "userdebug", - "device_type": "hammerhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -7559,6 +7525,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "LMY48M", + "device_os_type": "userdebug", + "device_type": "hammerhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -8538,52 +8529,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -10910,6 +10855,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -11568,23 +11538,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -12817,6 +12770,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -13192,26 +13166,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -14631,6 +14585,28 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -15051,23 +15027,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -16283,6 +16242,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16644,23 +16624,6 @@ ], "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -17893,6 +17856,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -18254,23 +18238,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -19469,6 +19436,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19831,23 +19819,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -21080,6 +21051,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -21441,23 +21433,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -22690,6 +22665,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -23036,18 +23032,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -23827,6 +23811,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -24280,21 +24280,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -25250,6 +25235,23 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -25469,18 +25471,6 @@ "can_use_on_swarming_builders": true, "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -26260,6 +26250,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -26699,18 +26705,6 @@ "can_use_on_swarming_builders": true, "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -27661,6 +27655,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -27968,18 +27978,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -28930,6 +28928,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -29185,18 +29199,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -30147,6 +30149,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -30472,24 +30490,6 @@ ], "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -31890,6 +31890,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -32333,24 +32355,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -33751,6 +33755,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -34194,24 +34220,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -35612,6 +35620,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -36042,18 +36072,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -37004,6 +37022,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -37311,18 +37345,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -38273,6 +38295,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -38580,18 +38618,6 @@ "can_use_on_swarming_builders": true, "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -39542,6 +39568,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -39849,18 +39891,6 @@ "can_use_on_swarming_builders": true, "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -40811,6 +40841,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chrome-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -42582,23 +42628,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -43831,6 +43860,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -44192,23 +44242,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -45497,6 +45530,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 6771fdb1..26dcdb7 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -217,23 +217,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Mac-11.0" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -1333,6 +1316,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Mac-11.0" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2231,17 +2235,6 @@ "swarming": { "can_use_on_swarming_builders": false }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": false - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -3108,6 +3101,21 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": false + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3360,24 +3368,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-17134" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -4796,6 +4786,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-17134" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5575,24 +5587,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-18363" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -7011,6 +7005,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-18363" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -7941,53 +7957,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "isolate_profile_data": true, - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -10507,6 +10476,32 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -11813,54 +11808,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "PQ3A.190801.002", - "device_os_flavor": "google", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "isolate_profile_data": true, - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -13680,6 +13627,33 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "PQ3A.190801.002", + "device_os_flavor": "google", + "device_os_type": "userdebug", + "device_type": "walleye", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -15276,7 +15250,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -16499,7 +16472,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -17668,7 +17640,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -19110,7 +19081,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -36335,23 +36305,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" }, @@ -36939,6 +36892,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -37109,26 +37083,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--enable-features=BlinkHeapConcurrentMarking" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" }, @@ -37820,6 +37774,28 @@ }, { "args": [ + "standalone_angle_unittests", + "--enable-features=BlinkHeapConcurrentMarking" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--enable-features=BlinkHeapConcurrentMarking" ], "merge": { @@ -37973,23 +37949,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" }, @@ -38577,6 +38536,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -38865,24 +38845,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -40261,6 +40223,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -40596,23 +40580,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -41845,6 +41812,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -42602,24 +42590,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -43929,6 +43899,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -44778,23 +44770,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -46027,6 +46002,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -46394,24 +46390,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04", - "ssd": "0" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -47634,6 +47612,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04", + "ssd": "0" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -48096,25 +48096,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11.0", - "pool": "chromium.tests.mac-arm64" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -49285,6 +49266,29 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11.0", + "pool": "chromium.tests.mac-arm64" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -49945,25 +49949,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.13.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -51191,6 +51176,29 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.13.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -51482,25 +51490,6 @@ "expiration": 21600, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-11.0" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -52709,6 +52698,29 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-11.0" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -53749,19 +53761,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -54802,6 +54801,23 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [],
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index ed4be086..94377e7 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -53,23 +53,15 @@ }, { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" + "standalone_angle_unittests", + "-v" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], "containment_type": "AUTO", "dimension_sets": [ { @@ -79,20 +71,11 @@ "os": "Android" } ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -196,32 +179,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -318,6 +275,30 @@ }, "test": "gles2_conform_test", "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:5912-19.0.2", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -417,31 +398,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "trace_test", "--show-stdout", "--browser=release", @@ -640,32 +596,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -762,6 +692,30 @@ }, "test": "gles2_conform_test", "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -861,31 +815,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "trace_test", "--show-stdout", "--browser=release", @@ -1082,30 +1011,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -1191,6 +1096,29 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -1230,30 +1158,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "webgl_conformance", "--show-stdout", "--browser=release", @@ -1447,32 +1351,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -1566,6 +1444,31 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -1607,32 +1510,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "webgl_conformance", "--show-stdout", "--browser=release", @@ -1836,14 +1713,12 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" + "standalone_angle_unittests" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "containment_type": "AUTO", @@ -1857,8 +1732,9 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ] }, @@ -1917,31 +1793,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-24.20.100.6286|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", - "os": "Windows-10", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -2040,6 +1891,30 @@ }, "test": "gles2_conform_test", "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:5912-24.20.100.6286|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -2141,31 +2016,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-24.20.100.6286|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", - "os": "Windows-10", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "webgl_conformance", "--show-stdout", "--browser=release_x64", @@ -2386,31 +2236,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -2509,6 +2334,30 @@ }, "test": "gles2_conform_test", "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -2608,31 +2457,6 @@ }, { "args": [ - "standalone_angle_unittests" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, - { - "args": [ "webgl_conformance", "--show-stdout", "--browser=release_x64", @@ -2888,23 +2712,15 @@ }, { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" + "standalone_angle_unittests", + "-v" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], "containment_type": "AUTO", "dimension_sets": [ { @@ -2915,20 +2731,11 @@ "pool": "chromium.tests.gpu" } ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -2997,34 +2804,6 @@ "service_account": "chrome-gpu-gold@chops-service-accounts.iam.gserviceaccount.com" }, "test_id_prefix": "ninja://third_party/angle/src/tests/restricted_traces:angle_restricted_trace_gold_tests/" - }, - { - "args": [ - "standalone_angle_unittests", - "-v" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "Q", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" } ] }, @@ -3462,23 +3241,15 @@ }, { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" + "standalone_angle_unittests", + "-v" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], "containment_type": "AUTO", "dimension_sets": [ { @@ -3489,20 +3260,11 @@ "pool": "chromium.tests.gpu" } ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -3571,34 +3333,6 @@ "service_account": "chrome-gpu-gold@chops-service-accounts.iam.gserviceaccount.com" }, "test_id_prefix": "ninja://third_party/angle/src/tests/restricted_traces:angle_restricted_trace_gold_tests/" - }, - { - "args": [ - "standalone_angle_unittests", - "-v" - ], - "isolate_name": "standalone_angle_unittests", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "Q", - "device_os_type": "userdebug", - "device_type": "walleye", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" } ] }, @@ -4001,50 +3735,6 @@ }, { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "N", - "device_os_type": "user", - "device_type": "foster", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=validating", "--gs-results-bucket=chromium-result-details", "--recover-devices" @@ -4173,6 +3863,33 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "N", + "device_os_type": "user", + "device_type": "foster", + "os": "Android", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -4569,50 +4286,6 @@ "gtest_tests": [ { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "L", - "device_os_type": "userdebug", - "device_type": "hammerhead", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=validating", "--gs-results-bucket=chromium-result-details", "--recover-devices" @@ -4741,6 +4414,33 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "L", + "device_os_type": "userdebug", + "device_type": "hammerhead", + "os": "Android", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -5679,50 +5379,6 @@ "gtest_tests": [ { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "L", - "device_os_type": "userdebug", - "device_type": "shamu", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=validating", "--gs-results-bucket=chromium-result-details", "--recover-devices" @@ -5851,6 +5507,33 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "L", + "device_os_type": "userdebug", + "device_type": "shamu", + "os": "Android", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -6264,50 +5947,6 @@ }, { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "M", - "device_os_type": "userdebug", - "device_type": "angler", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=validating", "--gs-results-bucket=chromium-result-details", "--recover-devices" @@ -6436,6 +6075,33 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "M", + "device_os_type": "userdebug", + "device_type": "angler", + "os": "Android", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -6800,50 +6466,6 @@ "gtest_tests": [ { "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "containment_type": "AUTO", - "dimension_sets": [ - { - "device_os": "M", - "device_os_type": "userdebug", - "device_type": "flounder", - "os": "Android", - "pool": "chromium.tests.gpu" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=validating", "--gs-results-bucket=chromium-result-details", "--recover-devices" @@ -6972,6 +6594,33 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "M", + "device_os_type": "userdebug", + "device_type": "flounder", + "os": "Android", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -7813,14 +7462,12 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" + "standalone_angle_unittests" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "containment_type": "AUTO", @@ -7833,8 +7480,9 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -8202,14 +7850,12 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" + "standalone_angle_unittests" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "containment_type": "AUTO", @@ -8223,11 +7869,12 @@ "expiration": 21600, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/", + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", "trigger_script": { "script": "//testing/trigger_scripts/chromeos_device_trigger.py" - } + }, + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -8643,32 +8290,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -8793,6 +8414,30 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -9397,33 +9042,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:2184", - "os": "Ubuntu", - "pool": "chromium.tests.gpu.experimental" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -9697,6 +9315,31 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:2184", + "os": "Ubuntu", + "pool": "chromium.tests.gpu.experimental" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -10379,32 +10022,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests", @@ -10504,6 +10121,30 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -10559,15 +10200,12 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" + "standalone_angle_unittests" ], "merge": { "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "containment_type": "AUTO", @@ -10580,8 +10218,9 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ] }, @@ -10589,33 +10228,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Ubuntu", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -10723,6 +10335,31 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6613", + "os": "Ubuntu", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -11341,32 +10978,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -11491,6 +11102,30 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:5912-19.0.2", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -12127,33 +11762,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:3e92-19.0.8", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 14400, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -12283,6 +11891,31 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:3e92-19.0.8", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 14400, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -12936,32 +12569,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0", "--no-xvfb" ], @@ -13086,6 +12693,30 @@ "test_id_prefix": "ninja://gpu/gles2_conform_support:gles2_conform_test/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15079,30 +14710,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -15237,6 +14844,29 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15730,36 +15360,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - }, - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -15962,6 +15562,35 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + }, + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16724,30 +16353,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -16908,6 +16513,29 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -17612,32 +17240,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -17784,6 +17386,31 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -18186,32 +17813,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:0fe9", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -18358,6 +17959,31 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:0fe9", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -18726,32 +18352,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -18926,6 +18526,31 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19672,32 +19297,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:0fe9", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -19872,6 +19471,31 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:0fe9", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -20556,31 +20180,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "cpu": "arm64", - "os": "Mac-11.0", - "pool": "chromium.tests.mac-arm64" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -20748,6 +20347,30 @@ "test_id_prefix": "ninja://services:services_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "cpu": "arm64", + "os": "Mac-11.0", + "pool": "chromium.tests.mac-arm64" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -21587,32 +21210,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:679e", - "os": "Mac-10.12.6", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -21760,6 +21357,31 @@ }, "test": "gpu_unittests", "test_id_prefix": "ninja://gpu:gpu_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:679e", + "os": "Mac-10.12.6", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -25242,31 +24864,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -25433,6 +25030,30 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -25993,32 +25614,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-26.20.100.7870|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", - "os": "Windows-10", - "pool": "chromium.tests.gpu.experimental" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -26220,6 +25815,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:5912-26.20.100.7870|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu.experimental" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -26956,32 +26576,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu.experimental" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -27183,6 +26777,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu.experimental" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -27888,32 +27507,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:699f", - "os": "Windows-10", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -28090,6 +27683,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:699f", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -28640,31 +28258,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-24.20.100.6286|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", - "os": "Windows-10", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -28858,6 +28451,30 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:5912-24.20.100.6286|8086:5912-26.20.100.8141|8086:3e92-26.20.100.8141", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -29573,32 +29190,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:3e92-24.20.100.6286", - "os": "Windows-10", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 14400, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -29800,6 +29391,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:3e92-24.20.100.6286", + "os": "Windows-10", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 14400, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -30534,32 +30150,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:2184", - "os": "Windows-10", - "pool": "chromium.tests.gpu.experimental" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -30761,6 +30351,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:2184", + "os": "Windows-10", + "pool": "chromium.tests.gpu.experimental" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -31405,31 +31020,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -31623,6 +31213,30 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -32959,31 +32573,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -33177,6 +32766,30 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -33865,32 +33478,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Windows-2008ServerR2-SP1", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -33913,20 +33500,15 @@ }, "test": "angle_white_box_tests", "test_id_prefix": "ninja://third_party/angle/src/tests:angle_white_box_tests/" - } - ], - "isolated_scripts": [ + }, { "args": [ "standalone_angle_unittests" ], - "isolate_name": "standalone_angle_unittests", "merge": { "args": [], "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "containment_type": "AUTO", @@ -33940,8 +33522,12 @@ "expiration": 21600, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/" - }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + } + ], + "isolated_scripts": [ { "args": [ "webgl_conformance", @@ -34102,32 +33688,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Windows-2008ServerR2-SP1", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -34301,6 +33861,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6613", + "os": "Windows-2008ServerR2-SP1", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -34761,32 +34346,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6613", - "os": "Windows-2008ServerR2-SP1", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -34988,6 +34547,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6613", + "os": "Windows-2008ServerR2-SP1", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -35516,32 +35100,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-24.21.14.1195", - "os": "Windows-2008ServerR2-SP1", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -35743,6 +35301,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-24.21.14.1195", + "os": "Windows-2008ServerR2-SP1", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -36365,32 +35948,6 @@ }, { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-24.21.14.1195", - "os": "Windows-2008ServerR2-SP1", - "pool": "chromium.tests.gpu" - } - ], - "expiration": 21600, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--test-launcher-retry-limit=0" ], "merge": { @@ -36592,6 +36149,31 @@ "test_id_prefix": "ninja://gpu:gpu_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-24.21.14.1195", + "os": "Windows-2008ServerR2-SP1", + "pool": "chromium.tests.gpu" + } + ], + "expiration": 21600, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index ec90881..434b9e8 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -387,32 +387,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests", @@ -487,6 +461,30 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -1006,32 +1004,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-418.56", - "os": "Ubuntu-19.04", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests", @@ -1106,6 +1078,30 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-418.56", + "os": "Ubuntu-19.04", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -1625,30 +1621,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -1717,6 +1689,29 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -2051,30 +2046,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -2169,6 +2140,29 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -2527,31 +2521,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.15.5" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -2650,6 +2619,30 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.15.5" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -3019,32 +3012,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--use-cmd-decoder=passthrough", "--use-gl=angle", "--use-gpu-in-tests" @@ -3119,6 +3086,31 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -3473,32 +3465,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -3601,6 +3567,31 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -3981,33 +3972,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "1002:6821", - "hidpi": "1", - "os": "Mac-10.14.6", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -4114,6 +4078,32 @@ }, "test": "gl_unittests", "test_id_prefix": "ninja://ui/gl:gl_unittests/" + }, + { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "1002:6821", + "hidpi": "1", + "os": "Mac-10.14.6", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true } ], "isolated_scripts": [ @@ -4505,31 +4495,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -4606,6 +4571,30 @@ }, { "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--ignore-runtime-requirements=*" ], "merge": { @@ -4971,32 +4960,6 @@ "gtest_tests": [ { "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "10de:1cb3-27.21.14.5148", - "os": "Windows-10-18363", - "pool": "chromium.tests.gpu" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ "--enable-gpu", "--test-launcher-bot-mode", "--test-launcher-jobs=1", @@ -5076,6 +5039,31 @@ }, { "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "gpu": "10de:1cb3-27.21.14.5148", + "os": "Windows-10-18363", + "pool": "chromium.tests.gpu" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--ignore-runtime-requirements=*" ], "isolate_profile_data": true,
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json index b1957bf..253ffae 100644 --- a/testing/buildbot/chromium.linux.json +++ b/testing/buildbot/chromium.linux.json
@@ -38,23 +38,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" }, @@ -764,6 +747,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -904,23 +908,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "base_unittests", "test_id_prefix": "ninja://base:base_unittests/" }, @@ -1664,6 +1651,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -2926,7 +2934,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -4334,7 +4341,6 @@ "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, "name": "standalone_angle_unittests", - "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, "dimension_sets": [ @@ -5159,24 +5165,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -6480,6 +6468,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -7282,23 +7292,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -8532,6 +8525,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -9355,23 +9369,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-14.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -10607,6 +10604,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-14.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json index f81a851..04479d41 100644 --- a/testing/buildbot/chromium.mac.json +++ b/testing/buildbot/chromium.mac.json
@@ -81,24 +81,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.10" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -1225,6 +1207,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.10" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -1778,24 +1782,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.11" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -2941,6 +2927,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.11" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3494,24 +3502,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.12.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -4657,6 +4647,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "8086:0a2e", + "os": "Mac-10.12.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5286,24 +5298,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.13.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -6430,6 +6424,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.13.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -7033,24 +7049,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.13.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -8214,6 +8212,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.13.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -8728,25 +8748,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.13.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -9935,6 +9936,29 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "isolate_profile_data": true, + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.13.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "isolate_profile_data": true, "merge": { "args": [], @@ -10567,24 +10591,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "none", - "os": "Mac-10.14.6" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -11730,6 +11736,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "gpu": "none", + "os": "Mac-10.14.6" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -12355,23 +12383,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Mac-10.15" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -13454,6 +13465,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Mac-10.15" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index bdd4e00..45995cc 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -198,52 +198,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -2623,6 +2577,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -3280,27 +3259,6 @@ "os": "Ubuntu-16.04" } ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", - "shards": 10 - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "app_shell_unittests", @@ -4683,6 +4641,29 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", + "shards": 10 + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -5102,23 +5083,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -6294,6 +6258,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -6592,26 +6577,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -8113,6 +8078,28 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -8477,27 +8464,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_list_unittests", "test_id_prefix": "ninja://ash/app_list:app_list_unittests/" }, @@ -10078,6 +10044,29 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -10457,27 +10446,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -11874,6 +11842,29 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -12227,26 +12218,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Ubuntu-16.04" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -13599,6 +13570,28 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Ubuntu-16.04" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -13925,21 +13918,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -14900,6 +14878,23 @@ }, { "args": [ + "standalone_angle_unittests", + "--test-launcher-print-test-stdio=always" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--test-launcher-print-test-stdio=always" ], "merge": { @@ -15386,52 +15381,6 @@ "--bucket", "chromium-result-details", "--test-name", - "angle_unittests" - ], - "script": "//build/android/pylib/results/presentation/test_results_presentation.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "cipd_packages": [ - { - "cipd_package": "infra/tools/luci/logdog/butler/${platform}", - "location": "bin", - "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c" - } - ], - "dimension_sets": [ - { - "device_os": "MMB29Q", - "device_os_type": "userdebug", - "device_type": "bullhead", - "os": "Android" - } - ], - "output_links": [ - { - "link": [ - "https://luci-logdog.appspot.com/v/?s", - "=android%2Fswarming%2Flogcats%2F", - "${TASK_ID}%2F%2B%2Funified_logcats" - ], - "name": "shard #${SHARD_INDEX} logcats" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "args": [ - "--gs-results-bucket=chromium-result-details", - "--recover-devices" - ], - "merge": { - "args": [ - "--bucket", - "chromium-result-details", - "--test-name", "base_unittests" ], "script": "//build/android/pylib/results/presentation/test_results_presentation.py" @@ -17415,6 +17364,31 @@ }, { "args": [ + "standalone_angle_unittests", + "-v" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "device_os": "MMB29Q", + "device_os_type": "userdebug", + "device_type": "bullhead", + "os": "Android" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { + "args": [ "--gs-results-bucket=chromium-result-details", "--recover-devices" ], @@ -18019,23 +17993,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -19377,6 +19334,27 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json index 25588ec..d2d14e0 100644 --- a/testing/buildbot/chromium.win.json +++ b/testing/buildbot/chromium.win.json
@@ -65,18 +65,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -1017,6 +1005,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -1587,24 +1591,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -3150,6 +3136,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -3915,24 +3923,6 @@ ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "cpu": "x86-64", - "os": "Windows-10-15063" - } - ], - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -5338,6 +5328,28 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "cpu": "x86-64", + "os": "Windows-10-15063" + } + ], + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -6054,18 +6066,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -7006,6 +7006,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -7560,18 +7576,6 @@ "can_use_on_swarming_builders": true, "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, - "test": "angle_unittests", - "test_id_prefix": "ninja://third_party/angle/src/tests:angle_unittests/" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, "test": "app_shell_unittests", "test_id_prefix": "ninja://extensions/shell:app_shell_unittests/" }, @@ -8525,6 +8529,22 @@ "test_id_prefix": "ninja://sql:sql_unittests/" }, { + "args": [ + "standalone_angle_unittests" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_isolated_script_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" + }, + "test": "standalone_angle_unittests", + "test_id_prefix": "ninja://third_party/angle/src/tests:standalone_angle_unittests/", + "use_isolated_scripts_api": true + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter b/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter index ebff361..b548e18 100644 --- a/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter +++ b/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter
@@ -42,6 +42,9 @@ # crbug.com/1061214 -org.chromium.chrome.browser.customtabs.CustomTabActivityTest.testHiddenTabAndChangingFragmentDontWait +# crbug.com/1036553 +-org.chromium.chrome.browser.translate.TranslateIntentTest.* + # crbug.com/1041233 -org.chromium.chrome.browser.gesturenav.NavigationHandlerTest.testSwipeNavigateOnNativePage -org.chromium.chrome.browser.gesturenav.NavigationHandlerTest.testSwipeNavigateOnRenderedPage
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 639f600..ecc1bcc 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -92,19 +92,6 @@ 'Linux FYI GPU TSAN Release', # crbug.com/950542 ], }, - 'angle_unittests': { - 'remove_from': [ - # On Android, these are already run on the main waterfall. - 'Android FYI Release (Nexus 5X)', - ], - 'modifications': { - 'Linux ASan LSan Tests (1)': { - 'swarming': { - 'shards': 10, - }, - }, - }, - }, 'angle_white_box_tests': { 'remove_from': [ # https://crbug.com/1035178 @@ -2387,6 +2374,19 @@ } } }, + 'standalone_angle_unittests': { + 'remove_from': [ + # On Android, these are already run on the main waterfall. + 'Android FYI Release (Nexus 5X)', + ], + 'modifications': { + 'Linux ASan LSan Tests (1)': { + 'swarming': { + 'shards': 10, + }, + }, + }, + }, 'storage_service_content_browsertests': { 'modifications': { 'Linux Tests (dbg)(1)': {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 033ed95..35630e8 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -642,7 +642,6 @@ 'chromium_gtests': { 'absl_hardening_tests': {}, - 'angle_unittests': {}, 'base_unittests': {}, 'base_util_unittests': {}, 'blink_common_unittests': {}, @@ -700,6 +699,15 @@ 'shell_dialogs_unittests': {}, 'skia_unittests': {}, 'sql_unittests': {}, + 'standalone_angle_unittests': { + 'args': [ + 'standalone_angle_unittests', + ], + 'android_args': [ + '-v', + ], + 'use_isolated_scripts_api': True, + }, 'storage_unittests': {}, 'ui_base_unittests': {}, 'ui_touch_selection_unittests': {}, @@ -2006,15 +2014,14 @@ }, 'gpu_angle_unit_gtests': { - 'angle_unittests': { - 'desktop_args': [ - '--use-gpu-in-tests', - # ANGLE test retries deliberately disabled to prevent flakiness. - # http://crbug.com/669196 - '--test-launcher-retry-limit=0' + 'standalone_angle_unittests': { + 'args': [ + 'standalone_angle_unittests', ], - 'linux_args': ['--no-xvfb'], - 'should_retry_with_patch': False, + 'android_args': [ + '-v', + ], + 'use_isolated_scripts_api': True, }, }, @@ -2702,23 +2709,10 @@ 'args': [ 'bin/run_standalone_angle_unittests', ], - 'should_retry_with_patch': False, 'mixins': ['fuchsia_runner_logs'], }, }, - 'gpu_standalone_angle_unittests_isolated_scripts': { - 'standalone_angle_unittests': { - 'args': [ - 'standalone_angle_unittests', - ], - 'android_args': [ - '-v', - ], - 'should_retry_with_patch': False, - }, - }, - 'gpu_swiftshader_gtests': { 'swiftshader_unittests': { }, @@ -4963,7 +4957,6 @@ 'gpu_angle_isolated_scripts': [ 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_angle_restricted_trace_gold_isolated_scripts', - 'gpu_standalone_angle_unittests_isolated_scripts', ], 'gpu_angle_linux_gtests': [
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 1032df9..daa49c2 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -3357,7 +3357,6 @@ 'test_suites': { 'gtest_tests': 'gpu_angle_mac_gtests', 'gpu_telemetry_tests': 'gpu_angle_mac_telemetry_tests', - 'isolated_scripts': 'gpu_standalone_angle_unittests_isolated_scripts', }, }, 'ANGLE GPU Mac Retina Release (AMD)': { @@ -3369,7 +3368,6 @@ 'test_suites': { 'gtest_tests': 'gpu_angle_mac_gtests', 'gpu_telemetry_tests': 'gpu_angle_mac_telemetry_tests', - 'isolated_scripts': 'gpu_standalone_angle_unittests_isolated_scripts', }, }, 'ANGLE GPU Mac Retina Release (NVIDIA)': { @@ -4302,7 +4300,6 @@ 'test_suites': { 'gtest_tests': 'gpu_win_angle_amd_gtests', 'gpu_telemetry_tests': 'gpu_win_angle_amd_telemetry_tests', - 'isolated_scripts': 'gpu_standalone_angle_unittests_isolated_scripts', }, }, 'Win7 FYI Debug (AMD)': {
diff --git a/testing/gtest/BUILD.gn b/testing/gtest/BUILD.gn index 4f8489e..18bf2a8d 100644 --- a/testing/gtest/BUILD.gn +++ b/testing/gtest/BUILD.gn
@@ -9,13 +9,6 @@ import("//build/config/ios/ios_sdk.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - config("gtest_direct_config") { visibility = [ ":*" ] defines = [ "UNIT_TEST" ] @@ -63,9 +56,6 @@ } if (is_apple && gtest_include_objc_support) { - if (is_ios) { - set_sources_assignment_filter([]) - } sources += [ "../gtest_mac.h", "../gtest_mac.mm", @@ -73,7 +63,6 @@ if (gtest_include_platform_test) { sources += [ "../platform_test_mac.mm" ] } - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) } if (is_ios && gtest_include_ios_coverage) {
diff --git a/testing/scripts/run_wpt_tests.py b/testing/scripts/run_wpt_tests.py index b3f730a..7f8d53b 100755 --- a/testing/scripts/run_wpt_tests.py +++ b/testing/scripts/run_wpt_tests.py
@@ -26,19 +26,25 @@ # be mutated by wptrunner WPT_CHECKED_IN_MANIFEST = ( "../../third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json") -WPT_WORKING_COPY_MANIFEST = "../../out/Release/MANIFEST.json" +WPT_WORKING_COPY_MANIFEST = "../../out/{}/MANIFEST.json" WPT_CHECKED_IN_METADATA_DIR = "../../third_party/blink/web_tests/external/wpt" -WPT_METADATA_OUTPUT_DIR = "../../out/Release/wpt_expectations_metadata/" +WPT_METADATA_OUTPUT_DIR = "../../out/{}/wpt_expectations_metadata/" WPT_OVERRIDE_EXPECTATIONS_PATH = ( "../../third_party/blink/web_tests/WPTOverrideExpectations") +CHROME_BINARY = "../../out/{}/chrome" +CHROMEDRIVER_BINARY = "../../out/{}/chromedriver" + +MOJO_JS_PATH = "../../out/{}/gen/" + class WPTTestAdapter(wpt_common.BaseWptScriptAdapter): @property def rest_args(self): rest_args = super(WPTTestAdapter, self).rest_args # Here we add all of the arguments required to run WPT tests on Chrome. + target_dir = self.options.target rest_args.extend([ "../../third_party/blink/web_tests/external/wpt/wpt", "--venv=../../", @@ -46,12 +52,12 @@ "run", "chrome" ] + self.options.test_list + [ - "--binary=../../out/Release/chrome", + "--binary=" + CHROME_BINARY.format(target_dir), "--binary-arg=--host-resolver-rules=" "MAP nonexistent.*.test ~NOTFOUND, MAP *.test 127.0.0.1", "--binary-arg=--enable-experimental-web-platform-features", "--binary-arg=--enable-blink-features=MojoJS,MojoJSTest", - "--webdriver-binary=../../out/Release/chromedriver", + "--webdriver-binary=" + CHROMEDRIVER_BINARY.format(target_dir), "--webdriver-arg=--enable-chrome-logs", "--headless", "--no-capture-stdio", @@ -65,8 +71,7 @@ # it uses the exit code to determine which shards to retry (ie: # those that had non-zero exit codes). #"--no-fail-on-unexpected", - "--metadata", - WPT_METADATA_OUTPUT_DIR, + "--metadata", WPT_METADATA_OUTPUT_DIR.format(target_dir), # By specifying metadata above, WPT will try to find manifest in the # metadata directory. So here we point it back to the correct path # for the manifest. @@ -76,8 +81,7 @@ # a lengthy import/export cycle to refresh. So we allow WPT to # update the manifest in cast it's stale. #"--no-manifest-update", - "--manifest", - WPT_WORKING_COPY_MANIFEST, + "--manifest", WPT_WORKING_COPY_MANIFEST.format(target_dir), # (crbug.com/1023835) The flags below are temporary to aid debugging "--log-mach=-", "--log-mach-verbose", @@ -85,24 +89,28 @@ # TODO(lpz): Consider removing --processes and compute automatically # from multiprocessing.cpu_count() #"--processes=5", - "--mojojs-path=../../out/Release/gen/", + "--mojojs-path=" + MOJO_JS_PATH.format(target_dir), ]) return rest_args def add_extra_arguments(self, parser): - parser.add_argument('test_list', nargs="*", + target_help = "Specify the target build subdirectory under src/out/" + parser.add_argument("-t", "--target", dest="target", default="Release", + help=target_help) + parser.add_argument("test_list", nargs="*", help="List of tests or test directories to run") def do_pre_test_run_tasks(self): # Copy the checked-in manifest to the temporary working directory - shutil.copy(WPT_CHECKED_IN_MANIFEST, WPT_WORKING_COPY_MANIFEST) + shutil.copy(WPT_CHECKED_IN_MANIFEST, + WPT_WORKING_COPY_MANIFEST.format(self.options.target)) # Generate WPT metadata files. common.run_command([ sys.executable, os.path.join(wpt_common.BLINK_TOOLS_DIR, 'build_wpt_metadata.py'), "--metadata-output-dir", - WPT_METADATA_OUTPUT_DIR, + WPT_METADATA_OUTPUT_DIR.format(self.options.target), "--additional-expectations", WPT_OVERRIDE_EXPECTATIONS_PATH, "--checked-in-metadata-dir",
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index b4cee57..ee30b40 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -6941,18 +6941,6 @@ ] } ], - "TriggeredResetFieldTrial": [ - { - "platforms": [ - "windows" - ], - "experiments": [ - { - "name": "On" - } - ] - } - ], "TrustTokenOriginTrial": [ { "platforms": [
diff --git a/third_party/abseil-cpp/README.chromium b/third_party/abseil-cpp/README.chromium index cb24fce..fc65cd930 100644 --- a/third_party/abseil-cpp/README.chromium +++ b/third_party/abseil-cpp/README.chromium
@@ -4,7 +4,7 @@ License: Apache 2.0 License File: LICENSE Version: 0 -Revision: d3614de6178018178723ac3b8b4baaf3f1dc7fcb +Revision: 093cc27604df1c4a179b73bc3f00d4d1ce2ce113 Security Critical: yes Description:
diff --git a/third_party/abseil-cpp/absl/algorithm/container.h b/third_party/abseil-cpp/absl/algorithm/container.h index 2457d78b..5c03357 100644 --- a/third_party/abseil-cpp/absl/algorithm/container.h +++ b/third_party/abseil-cpp/absl/algorithm/container.h
@@ -539,12 +539,20 @@ // c_swap_ranges() // // Container-based version of the <algorithm> `std::swap_ranges()` function to -// swap a container's elements with another container's elements. +// swap a container's elements with another container's elements. Swaps the +// first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). template <typename C1, typename C2> container_algorithm_internal::ContainerIter<C2> c_swap_ranges(C1& c1, C2& c2) { - return std::swap_ranges(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2)); + auto first1 = container_algorithm_internal::c_begin(c1); + auto last1 = container_algorithm_internal::c_end(c1); + auto first2 = container_algorithm_internal::c_begin(c2); + auto last2 = container_algorithm_internal::c_end(c2); + + using std::swap; + for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) { + swap(*first1, *first2); + } + return first2; } // c_transform() @@ -562,16 +570,23 @@ } // Overload of c_transform() for performing a transformation using a binary -// predicate. +// predicate. Applies `binary_op` to the first N elements of `c1` and `c2`, +// where N = min(size(c1), size(c2)). template <typename InputSequence1, typename InputSequence2, typename OutputIterator, typename BinaryOp> OutputIterator c_transform(const InputSequence1& input1, const InputSequence2& input2, OutputIterator output, BinaryOp&& binary_op) { - return std::transform(container_algorithm_internal::c_begin(input1), - container_algorithm_internal::c_end(input1), - container_algorithm_internal::c_begin(input2), output, - std::forward<BinaryOp>(binary_op)); + auto first1 = container_algorithm_internal::c_begin(input1); + auto last1 = container_algorithm_internal::c_end(input1); + auto first2 = container_algorithm_internal::c_begin(input2); + auto last2 = container_algorithm_internal::c_end(input2); + for (; first1 != last1 && first2 != last2; + ++first1, (void)++first2, ++output) { + *output = binary_op(*first1, *first2); + } + + return output; } // c_replace()
diff --git a/third_party/abseil-cpp/absl/algorithm/container_test.cc b/third_party/abseil-cpp/absl/algorithm/container_test.cc index 0a4abe9..3abf5ce 100644 --- a/third_party/abseil-cpp/absl/algorithm/container_test.cc +++ b/third_party/abseil-cpp/absl/algorithm/container_test.cc
@@ -676,6 +676,15 @@ absl::c_swap_ranges(odds, evens); EXPECT_THAT(odds, ElementsAre(1, 3, 5)); EXPECT_THAT(evens, ElementsAre(2, 4, 6)); + + odds.pop_back(); + absl::c_swap_ranges(odds, evens); + EXPECT_THAT(odds, ElementsAre(2, 4)); + EXPECT_THAT(evens, ElementsAre(1, 3, 6)); + + absl::c_swap_ranges(evens, odds); + EXPECT_THAT(odds, ElementsAre(1, 3)); + EXPECT_THAT(evens, ElementsAre(2, 4, 6)); } TEST_F(NonMutatingTest, Transform) { @@ -690,6 +699,20 @@ EXPECT_EQ(std::vector<int>({1, 5, 4}), z); *end = 7; EXPECT_EQ(std::vector<int>({1, 5, 4, 7}), z); + + z.clear(); + y.pop_back(); + end = absl::c_transform(x, y, std::back_inserter(z), std::plus<int>()); + EXPECT_EQ(std::vector<int>({1, 5}), z); + *end = 7; + EXPECT_EQ(std::vector<int>({1, 5, 7}), z); + + z.clear(); + std::swap(x, y); + end = absl::c_transform(x, y, std::back_inserter(z), std::plus<int>()); + EXPECT_EQ(std::vector<int>({1, 5}), z); + *end = 7; + EXPECT_EQ(std::vector<int>({1, 5, 7}), z); } TEST(MutatingTest, Replace) {
diff --git a/third_party/abseil-cpp/absl/base/config.h b/third_party/abseil-cpp/absl/base/config.h index c1d0494..3f7f32b9 100644 --- a/third_party/abseil-cpp/absl/base/config.h +++ b/third_party/abseil-cpp/absl/base/config.h
@@ -364,7 +364,7 @@ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ defined(__ros__) || defined(__native_client__) || defined(__asmjs__) || \ defined(__wasm__) || defined(__Fuchsia__) || defined(__sun) || \ - defined(__ASYLO__) + defined(__ASYLO__) || defined(__myriad2__) #define ABSL_HAVE_MMAP 1 #endif
diff --git a/third_party/abseil-cpp/absl/base/log_severity.h b/third_party/abseil-cpp/absl/base/log_severity.h index 65a3b16..045f17f 100644 --- a/third_party/abseil-cpp/absl/base/log_severity.h +++ b/third_party/abseil-cpp/absl/base/log_severity.h
@@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ABSL_BASE_INTERNAL_LOG_SEVERITY_H_ -#define ABSL_BASE_INTERNAL_LOG_SEVERITY_H_ +#ifndef ABSL_BASE_LOG_SEVERITY_H_ +#define ABSL_BASE_LOG_SEVERITY_H_ #include <array> #include <ostream> @@ -118,4 +118,4 @@ ABSL_NAMESPACE_END } // namespace absl -#endif // ABSL_BASE_INTERNAL_LOG_SEVERITY_H_ +#endif // ABSL_BASE_LOG_SEVERITY_H_
diff --git a/third_party/abseil-cpp/absl/container/btree_test.cc b/third_party/abseil-cpp/absl/container/btree_test.cc index 1bfa0c2..b6c11ea 100644 --- a/third_party/abseil-cpp/absl/container/btree_test.cc +++ b/third_party/abseil-cpp/absl/container/btree_test.cc
@@ -55,6 +55,7 @@ using ::testing::IsEmpty; using ::testing::IsNull; using ::testing::Pair; +using ::testing::SizeIs; template <typename T, typename U> void CheckPairEquals(const T &x, const U &y) { @@ -2109,6 +2110,31 @@ Pair(4, 1), Pair(4, 4), Pair(5, 5))); } +TEST(Btree, MergeIntoSetMovableOnly) { + absl::btree_set<MovableOnlyInstance> src; + src.insert(MovableOnlyInstance(1)); + absl::btree_multiset<MovableOnlyInstance> dst1; + dst1.insert(MovableOnlyInstance(2)); + absl::btree_set<MovableOnlyInstance> dst2; + + // Test merge into multiset. + dst1.merge(src); + + EXPECT_TRUE(src.empty()); + // ElementsAre/ElementsAreArray don't work with move-only types. + ASSERT_THAT(dst1, SizeIs(2)); + EXPECT_EQ(*dst1.begin(), MovableOnlyInstance(1)); + EXPECT_EQ(*std::next(dst1.begin()), MovableOnlyInstance(2)); + + // Test merge into set. + dst2.merge(dst1); + + EXPECT_TRUE(dst1.empty()); + ASSERT_THAT(dst2, SizeIs(2)); + EXPECT_EQ(*dst2.begin(), MovableOnlyInstance(1)); + EXPECT_EQ(*std::next(dst2.begin()), MovableOnlyInstance(2)); +} + struct KeyCompareToWeakOrdering { template <typename T> absl::weak_ordering operator()(const T &a, const T &b) const {
diff --git a/third_party/abseil-cpp/absl/container/internal/btree.h b/third_party/abseil-cpp/absl/container/internal/btree.h index 002ccc1..55d6957 100644 --- a/third_party/abseil-cpp/absl/container/internal/btree.h +++ b/third_party/abseil-cpp/absl/container/internal/btree.h
@@ -391,6 +391,9 @@ // useful information. template <typename V> struct SearchResult<V, false> { + explicit SearchResult(V value) : value(value) {} + SearchResult(V value, MatchKind /*match*/) : value(value) {} + V value; static constexpr bool HasMatch() { return false; } @@ -672,7 +675,7 @@ } ++s; } - return {s}; + return SearchResult<int, false>{s}; } // Returns the position of the first value whose key is not less than k using @@ -707,7 +710,7 @@ e = mid; } } - return {s}; + return SearchResult<int, false>{s}; } // Returns the position of the first value whose key is not less than k using @@ -1453,25 +1456,15 @@ static IterType internal_last(IterType iter); // Returns an iterator pointing to the leaf position at which key would - // reside in the tree. We provide 2 versions of internal_locate. The first - // version uses a less-than comparator and is incapable of distinguishing when - // there is an exact match. The second version is for the key-compare-to - // specialization and distinguishes exact matches. The key-compare-to - // specialization allows the caller to avoid a subsequent comparison to - // determine if an exact match was made, which is important for keys with - // expensive comparison, such as strings. + // reside in the tree, unless there is an exact match - in which case, the + // result may not be on a leaf. When there's a three-way comparator, we can + // return whether there was an exact match. This allows the caller to avoid a + // subsequent comparison to determine if an exact match was made, which is + // important for keys with expensive comparison, such as strings. template <typename K> SearchResult<iterator, is_key_compare_to::value> internal_locate( const K &key) const; - template <typename K> - SearchResult<iterator, false> internal_locate_impl( - const K &key, std::false_type /* IsCompareTo */) const; - - template <typename K> - SearchResult<iterator, true> internal_locate_impl( - const K &key, std::true_type /* IsCompareTo */) const; - // Internal routine which implements lower_bound(). template <typename K> iterator internal_lower_bound(const K &key) const; @@ -1934,8 +1927,8 @@ mutable_root() = rightmost_ = new_leaf_root_node(1); } - auto res = internal_locate(key); - iterator &iter = res.value; + SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key); + iterator iter = res.value; if (res.HasMatch()) { if (res.IsEq()) { @@ -2285,11 +2278,11 @@ // inserting at the end of the right node then we bias rebalancing to // fill up the left node. int to_move = (kNodeValues - left->count()) / - (1 + (insert_position < kNodeValues)); + (1 + (insert_position < static_cast<int>(kNodeValues))); to_move = (std::max)(1, to_move); if (insert_position - to_move >= node->start() || - left->count() + to_move < kNodeValues) { + left->count() + to_move < static_cast<int>(kNodeValues)) { left->rebalance_right_to_left(to_move, node, mutable_allocator()); assert(node->max_count() - node->count() == to_move); @@ -2313,12 +2306,12 @@ // We bias rebalancing based on the position being inserted. If we're // inserting at the beginning of the left node then we bias rebalancing // to fill up the right node. - int to_move = (kNodeValues - right->count()) / + int to_move = (static_cast<int>(kNodeValues) - right->count()) / (1 + (insert_position > node->start())); to_move = (std::max)(1, to_move); if (insert_position <= node->finish() - to_move || - right->count() + to_move < kNodeValues) { + right->count() + to_move < static_cast<int>(kNodeValues)) { node->rebalance_left_to_right(to_move, right, mutable_allocator()); if (insert_position > node->finish()) { @@ -2381,7 +2374,7 @@ // Try merging with our left sibling. node_type *left = parent->child(iter->node->position() - 1); assert(left->max_count() == kNodeValues); - if (1 + left->count() + iter->node->count() <= kNodeValues) { + if (1U + left->count() + iter->node->count() <= kNodeValues) { iter->position += 1 + left->count(); merge_nodes(left, iter->node); iter->node = left; @@ -2392,7 +2385,7 @@ // Try merging with our right sibling. node_type *right = parent->child(iter->node->position() + 1); assert(right->max_count() == kNodeValues); - if (1 + iter->node->count() + right->count() <= kNodeValues) { + if (1U + iter->node->count() + right->count() <= kNodeValues) { merge_nodes(iter->node, right); return true; } @@ -2501,46 +2494,25 @@ template <typename K> inline auto btree<P>::internal_locate(const K &key) const -> SearchResult<iterator, is_key_compare_to::value> { - return internal_locate_impl(key, is_key_compare_to()); -} - -template <typename P> -template <typename K> -inline auto btree<P>::internal_locate_impl( - const K &key, std::false_type /* IsCompareTo */) const - -> SearchResult<iterator, false> { iterator iter(const_cast<node_type *>(root())); for (;;) { - iter.position = iter.node->lower_bound(key, key_comp()).value; - // NOTE: we don't need to walk all the way down the tree if the keys are - // equal, but determining equality would require doing an extra comparison - // on each node on the way down, and we will need to go all the way to the - // leaf node in the expected case. - if (iter.node->leaf()) { - break; - } - iter.node = iter.node->child(iter.position); - } - return {iter}; -} - -template <typename P> -template <typename K> -inline auto btree<P>::internal_locate_impl( - const K &key, std::true_type /* IsCompareTo */) const - -> SearchResult<iterator, true> { - iterator iter(const_cast<node_type *>(root())); - for (;;) { - SearchResult<int, true> res = iter.node->lower_bound(key, key_comp()); + SearchResult<int, is_key_compare_to::value> res = + iter.node->lower_bound(key, key_comp()); iter.position = res.value; - if (res.match == MatchKind::kEq) { + if (res.IsEq()) { return {iter, MatchKind::kEq}; } + // Note: in the non-key-compare-to case, we don't need to walk all the way + // down the tree if the keys are equal, but determining equality would + // require doing an extra comparison on each node on the way down, and we + // will need to go all the way to the leaf node in the expected case. if (iter.node->leaf()) { break; } iter.node = iter.node->child(iter.position); } + // Note: in the non-key-compare-to case, the key may actually be equivalent + // here (and the MatchKind::kNe is ignored). return {iter, MatchKind::kNe}; } @@ -2575,7 +2547,7 @@ template <typename P> template <typename K> auto btree<P>::internal_find(const K &key) const -> iterator { - auto res = internal_locate(key); + SearchResult<iterator, is_key_compare_to::value> res = internal_locate(key); if (res.HasMatch()) { if (res.IsEq()) { return res.value;
diff --git a/third_party/abseil-cpp/absl/container/internal/btree_container.h b/third_party/abseil-cpp/absl/container/internal/btree_container.h index 137614f8..279024d 100644 --- a/third_party/abseil-cpp/absl/container/internal/btree_container.h +++ b/third_party/abseil-cpp/absl/container/internal/btree_container.h
@@ -151,7 +151,6 @@ return extract(iterator(position)); } - public: // Utility routines. void clear() { tree_.clear(); } void swap(btree_container &other) { tree_.swap(other.tree_); } @@ -344,7 +343,7 @@ int> = 0> void merge(btree_container<T> &src) { // NOLINT for (auto src_it = src.begin(); src_it != src.end();) { - if (insert(std::move(*src_it)).second) { + if (insert(std::move(params_type::element(src_it.slot()))).second) { src_it = src.erase(src_it); } else { ++src_it; @@ -627,8 +626,9 @@ typename T::params_type::is_map_container>>::value, int> = 0> void merge(btree_container<T> &src) { // NOLINT - insert(std::make_move_iterator(src.begin()), - std::make_move_iterator(src.end())); + for (auto src_it = src.begin(), end = src.end(); src_it != end; ++src_it) { + insert(std::move(params_type::element(src_it.slot()))); + } src.clear(); }
diff --git a/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h b/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h index 02bfd03f..5ebe164 100644 --- a/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +++ b/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h
@@ -257,7 +257,7 @@ template <int I> ElemT<I>& get() & { - return internal_compressed_tuple::Storage<ElemT<I>, I>::get(); + return StorageT<I>::get(); } template <int I>
diff --git a/third_party/abseil-cpp/absl/flags/BUILD.bazel b/third_party/abseil-cpp/absl/flags/BUILD.bazel index 62fb9a8bd..9de9e223 100644 --- a/third_party/abseil-cpp/absl/flags/BUILD.bazel +++ b/third_party/abseil-cpp/absl/flags/BUILD.bazel
@@ -114,7 +114,6 @@ ], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, - visibility = ["//visibility:private"], deps = [ "//absl/base:config", "//absl/base:fast_type_id",
diff --git a/third_party/abseil-cpp/absl/flags/BUILD.gn b/third_party/abseil-cpp/absl/flags/BUILD.gn index 169935b..8fa0603c3 100644 --- a/third_party/abseil-cpp/absl/flags/BUILD.gn +++ b/third_party/abseil-cpp/absl/flags/BUILD.gn
@@ -61,7 +61,6 @@ "//third_party/abseil-cpp/absl/base:config", "//third_party/abseil-cpp/absl/base:fast_type_id", ] - visibility = [ ":*" ] } absl_source_set("commandlineflag") {
diff --git a/third_party/abseil-cpp/absl/status/internal/statusor_internal.h b/third_party/abseil-cpp/absl/status/internal/statusor_internal.h index 96e41da5..7cc7625 100644 --- a/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +++ b/third_party/abseil-cpp/absl/status/internal/statusor_internal.h
@@ -215,7 +215,7 @@ template <typename U, absl::enable_if_t<std::is_constructible<absl::Status, U&&>::value, int> = 0> - explicit StatusOrData(U&& v) : status_(v) { + explicit StatusOrData(U&& v) : status_(std::forward<U>(v)) { EnsureNotOk(); }
diff --git a/third_party/abseil-cpp/absl/status/status.h b/third_party/abseil-cpp/absl/status/status.h index 42f634e..c4d6fce 100644 --- a/third_party/abseil-cpp/absl/status/status.h +++ b/third_party/abseil-cpp/absl/status/status.h
@@ -98,7 +98,7 @@ // StatusCode::kCancelled // - // kCanelled (gRPC code "CANCELLED") indicates the operation was cancelled, + // kCancelled (gRPC code "CANCELLED") indicates the operation was cancelled, // typically by the caller. kCancelled = 1, @@ -198,9 +198,9 @@ // `kAborted`, and `kUnavailable`. kAborted = 10, - // StatusCode::kOutofRange + // StatusCode::kOutOfRange // - // kOutofRange (gRPC code "OUT_OF_RANGE") indicates the operation was + // kOutOfRange (gRPC code "OUT_OF_RANGE") indicates the operation was // attempted past the valid range, such as seeking or reading past an // end-of-file. //
diff --git a/third_party/abseil-cpp/absl/status/statusor_test.cc b/third_party/abseil-cpp/absl/status/statusor_test.cc index 5e4b268..c2e8fb7 100644 --- a/third_party/abseil-cpp/absl/status/statusor_test.cc +++ b/third_party/abseil-cpp/absl/status/statusor_test.cc
@@ -292,6 +292,17 @@ EXPECT_EQ(thing.status().code(), absl::StatusCode::kUnknown); } +TEST(StatusOr, StatusCtorForwards) { + absl::Status status(absl::StatusCode::kInternal, "Some error"); + + EXPECT_EQ(absl::StatusOr<int>(status).status().message(), "Some error"); + EXPECT_EQ(status.message(), "Some error"); + + EXPECT_EQ(absl::StatusOr<int>(std::move(status)).status().message(), + "Some error"); + EXPECT_NE(status.message(), "Some error"); +} + // Define `EXPECT_DEATH_OR_THROW` to test the behavior of `StatusOr::value`, // which either throws `BadStatusOrAccess` or `LOG(FATAL)` based on whether // exceptions are enabled.
diff --git a/third_party/abseil-cpp/absl/strings/cord.cc b/third_party/abseil-cpp/absl/strings/cord.cc index 763dcc4..5092fd1 100644 --- a/third_party/abseil-cpp/absl/strings/cord.cc +++ b/third_party/abseil-cpp/absl/strings/cord.cc
@@ -50,16 +50,10 @@ using ::absl::cord_internal::CordRepExternal; using ::absl::cord_internal::CordRepSubstring; -// Various representations that we allow -enum CordRepKind { - CONCAT = 0, - EXTERNAL = 1, - SUBSTRING = 2, - - // We have different tags for different sized flat arrays, - // starting with FLAT - FLAT = 3, -}; +using ::absl::cord_internal::CONCAT; +using ::absl::cord_internal::EXTERNAL; +using ::absl::cord_internal::FLAT; +using ::absl::cord_internal::SUBSTRING; namespace cord_internal { @@ -447,48 +441,49 @@ bool nullify_tail) { static_assert(kMaxInline == 15, "set_data is hard-coded for a length of 15"); - cord_internal::SmallMemmove(data_, data, n, nullify_tail); - data_[kMaxInline] = static_cast<char>(n); + cord_internal::SmallMemmove(data_.as_chars, data, n, nullify_tail); + set_tagged_size(static_cast<char>(n)); } inline char* Cord::InlineRep::set_data(size_t n) { assert(n <= kMaxInline); - memset(data_, 0, sizeof(data_)); - data_[kMaxInline] = static_cast<char>(n); - return data_; + ResetToEmpty(); + set_tagged_size(static_cast<char>(n)); + return data_.as_chars; } inline CordRep* Cord::InlineRep::force_tree(size_t extra_hint) { - size_t len = data_[kMaxInline]; - CordRep* result; + size_t len = tagged_size(); if (len > kMaxInline) { - memcpy(&result, data_, sizeof(result)); - } else { - result = NewFlat(len + extra_hint); - result->length = len; - memcpy(result->data, data_, len); - set_tree(result); + return data_.as_tree.rep; } + + CordRep* result = NewFlat(len + extra_hint); + result->length = len; + static_assert(kMinFlatLength >= sizeof(data_.as_chars), ""); + memcpy(result->data, data_.as_chars, sizeof(data_.as_chars)); + set_tree(result); return result; } inline void Cord::InlineRep::reduce_size(size_t n) { - size_t tag = data_[kMaxInline]; + size_t tag = tagged_size(); assert(tag <= kMaxInline); assert(tag >= n); tag -= n; - memset(data_ + tag, 0, n); - data_[kMaxInline] = static_cast<char>(tag); + memset(data_.as_chars + tag, 0, n); + set_tagged_size(static_cast<char>(tag)); } inline void Cord::InlineRep::remove_prefix(size_t n) { - cord_internal::SmallMemmove(data_, data_ + n, data_[kMaxInline] - n); + cord_internal::SmallMemmove(data_.as_chars, data_.as_chars + n, + tagged_size() - n); reduce_size(n); } void Cord::InlineRep::AppendTree(CordRep* tree) { if (tree == nullptr) return; - size_t len = data_[kMaxInline]; + size_t len = tagged_size(); if (len == 0) { set_tree(tree); } else { @@ -498,7 +493,7 @@ void Cord::InlineRep::PrependTree(CordRep* tree) { assert(tree != nullptr); - size_t len = data_[kMaxInline]; + size_t len = tagged_size(); if (len == 0) { set_tree(tree); } else { @@ -554,11 +549,11 @@ } // Try to fit in the inline buffer if possible. - size_t inline_length = data_[kMaxInline]; + size_t inline_length = tagged_size(); if (inline_length < kMaxInline && max_length <= kMaxInline - inline_length) { - *region = data_ + inline_length; + *region = data_.as_chars + inline_length; *size = max_length; - data_[kMaxInline] = static_cast<char>(inline_length + max_length); + set_tagged_size(static_cast<char>(inline_length + max_length)); return; } @@ -582,11 +577,11 @@ const size_t max_length = std::numeric_limits<size_t>::max(); // Try to fit in the inline buffer if possible. - size_t inline_length = data_[kMaxInline]; + size_t inline_length = tagged_size(); if (inline_length < kMaxInline) { - *region = data_ + inline_length; + *region = data_.as_chars + inline_length; *size = kMaxInline - inline_length; - data_[kMaxInline] = kMaxInline; + set_tagged_size(kMaxInline); return; } @@ -621,7 +616,7 @@ void Cord::InlineRep::AssignSlow(const Cord::InlineRep& src) { ClearSlow(); - memcpy(data_, src.data_, sizeof(data_)); + data_ = src.data_; if (is_tree()) { Ref(tree()); } @@ -631,7 +626,7 @@ if (is_tree()) { Unref(tree()); } - memset(data_, 0, sizeof(data_)); + ResetToEmpty(); } // -------------------------------------------------------------------- @@ -735,11 +730,11 @@ void Cord::InlineRep::AppendArray(const char* src_data, size_t src_size) { if (src_size == 0) return; // memcpy(_, nullptr, 0) is undefined. // Try to fit in the inline buffer if possible. - size_t inline_length = data_[kMaxInline]; + size_t inline_length = tagged_size(); if (inline_length < kMaxInline && src_size <= kMaxInline - inline_length) { // Append new data to embedded array - data_[kMaxInline] = static_cast<char>(inline_length + src_size); - memcpy(data_ + inline_length, src_data, src_size); + set_tagged_size(static_cast<char>(inline_length + src_size)); + memcpy(data_.as_chars + inline_length, src_data, src_size); return; } @@ -762,7 +757,7 @@ const size_t size2 = inline_length + src_size / 10; root = NewFlat(std::max<size_t>(size1, size2)); appended = std::min(src_size, TagToLength(root->tag) - inline_length); - memcpy(root->data, data_, inline_length); + memcpy(root->data, data_.as_chars, inline_length); memcpy(root->data + inline_length, src_data, appended); root->length = inline_length + appended; set_tree(root); @@ -1071,7 +1066,7 @@ } else if (new_size <= InlineRep::kMaxInline) { Cord::ChunkIterator it = chunk_begin(); it.AdvanceBytes(pos); - char* dest = sub_cord.contents_.data_; + char* dest = sub_cord.contents_.data_.as_chars; size_t remaining_size = new_size; while (remaining_size > it->size()) { cord_internal::SmallMemmove(dest, it->data(), it->size()); @@ -1080,7 +1075,7 @@ ++it; } cord_internal::SmallMemmove(dest, it->data(), remaining_size); - sub_cord.contents_.data_[InlineRep::kMaxInline] = new_size; + sub_cord.contents_.set_tagged_size(new_size); } else { sub_cord.contents_.set_tree(NewSubRange(tree, pos, new_size)); } @@ -1269,9 +1264,9 @@ // Helper routine. Locates the first flat chunk of the Cord without // initializing the iterator. inline absl::string_view Cord::InlineRep::FindFlatStartPiece() const { - size_t n = data_[kMaxInline]; + size_t n = tagged_size(); if (n <= kMaxInline) { - return absl::string_view(data_, n); + return absl::string_view(data_.as_chars, n); } CordRep* node = tree();
diff --git a/third_party/abseil-cpp/absl/strings/cord.h b/third_party/abseil-cpp/absl/strings/cord.h index b8b251b0..653a118 100644 --- a/third_party/abseil-cpp/absl/strings/cord.h +++ b/third_party/abseil-cpp/absl/strings/cord.h
@@ -644,14 +644,12 @@ // InlineRep holds either a tree pointer, or an array of kMaxInline bytes. class InlineRep { public: - static constexpr unsigned char kMaxInline = 15; + static constexpr unsigned char kMaxInline = cord_internal::kMaxInline; static_assert(kMaxInline >= sizeof(absl::cord_internal::CordRep*), ""); - // Tag byte & kMaxInline means we are storing a pointer. - static constexpr unsigned char kTreeFlag = 1 << 4; - // Tag byte & kProfiledFlag means we are profiling the Cord. - static constexpr unsigned char kProfiledFlag = 1 << 5; + static constexpr unsigned char kTreeFlag = cord_internal::kTreeFlag; + static constexpr unsigned char kProfiledFlag = cord_internal::kProfiledFlag; - constexpr InlineRep() : data_{} {} + constexpr InlineRep() : data_() {} InlineRep(const InlineRep& src); InlineRep(InlineRep&& src); InlineRep& operator=(const InlineRep& src); @@ -684,16 +682,16 @@ void GetAppendRegion(char** region, size_t* size, size_t max_length); void GetAppendRegion(char** region, size_t* size); bool IsSame(const InlineRep& other) const { - return memcmp(data_, other.data_, sizeof(data_)) == 0; + return memcmp(&data_, &other.data_, sizeof(data_)) == 0; } int BitwiseCompare(const InlineRep& other) const { uint64_t x, y; - // Use memcpy to avoid anti-aliasing issues. - memcpy(&x, data_, sizeof(x)); - memcpy(&y, other.data_, sizeof(y)); + // Use memcpy to avoid aliasing issues. + memcpy(&x, &data_, sizeof(x)); + memcpy(&y, &other.data_, sizeof(y)); if (x == y) { - memcpy(&x, data_ + 8, sizeof(x)); - memcpy(&y, other.data_ + 8, sizeof(y)); + memcpy(&x, reinterpret_cast<const char*>(&data_) + 8, sizeof(x)); + memcpy(&y, reinterpret_cast<const char*>(&other.data_) + 8, sizeof(y)); if (x == y) return 0; } return absl::big_endian::FromHost64(x) < absl::big_endian::FromHost64(y) @@ -706,16 +704,16 @@ // to 15 bytes does not cause a memory allocation. absl::strings_internal::STLStringResizeUninitialized(dst, sizeof(data_) - 1); - memcpy(&(*dst)[0], data_, sizeof(data_) - 1); + memcpy(&(*dst)[0], &data_, sizeof(data_) - 1); // erase is faster than resize because the logic for memory allocation is // not needed. - dst->erase(data_[kMaxInline]); + dst->erase(tagged_size()); } // Copies the inline contents into `dst`. Assumes the cord is not empty. void CopyToArray(char* dst) const; - bool is_tree() const { return data_[kMaxInline] > kMaxInline; } + bool is_tree() const { return tagged_size() > kMaxInline; } private: friend class Cord; @@ -724,10 +722,18 @@ // Unrefs the tree, stops profiling, and zeroes the contents void ClearSlow(); - // If the data has length <= kMaxInline, we store it in data_[0..len-1], - // and store the length in data_[kMaxInline]. Else we store it in a tree - // and store a pointer to that tree in data_[0..sizeof(CordRep*)-1]. - alignas(absl::cord_internal::CordRep*) char data_[kMaxInline + 1]; + void ResetToEmpty() { data_ = {}; } + + // This uses reinterpret_cast instead of the union to avoid accessing the + // inactive union element. The tagged size is not a common prefix. + void set_tagged_size(char new_tag) { + reinterpret_cast<char*>(&data_)[kMaxInline] = new_tag; + } + char tagged_size() const { + return reinterpret_cast<const char*>(&data_)[kMaxInline]; + } + + cord_internal::InlineData data_; }; InlineRep contents_; @@ -879,12 +885,12 @@ } inline Cord::InlineRep::InlineRep(const Cord::InlineRep& src) { - cord_internal::SmallMemmove(data_, src.data_, sizeof(data_)); + data_ = src.data_; } inline Cord::InlineRep::InlineRep(Cord::InlineRep&& src) { - memcpy(data_, src.data_, sizeof(data_)); - memset(src.data_, 0, sizeof(data_)); + data_ = src.data_; + src.ResetToEmpty(); } inline Cord::InlineRep& Cord::InlineRep::operator=(const Cord::InlineRep& src) { @@ -892,7 +898,7 @@ return *this; } if (!is_tree() && !src.is_tree()) { - cord_internal::SmallMemmove(data_, src.data_, sizeof(data_)); + data_ = src.data_; return *this; } AssignSlow(src); @@ -904,8 +910,8 @@ if (is_tree()) { ClearSlow(); } - memcpy(data_, src.data_, sizeof(data_)); - memset(src.data_, 0, sizeof(data_)); + data_ = src.data_; + src.ResetToEmpty(); return *this; } @@ -914,43 +920,39 @@ return; } - Cord::InlineRep tmp; - cord_internal::SmallMemmove(tmp.data_, data_, sizeof(data_)); - cord_internal::SmallMemmove(data_, rhs->data_, sizeof(data_)); - cord_internal::SmallMemmove(rhs->data_, tmp.data_, sizeof(data_)); + std::swap(data_, rhs->data_); } inline const char* Cord::InlineRep::data() const { - return is_tree() ? nullptr : data_; + return is_tree() ? nullptr : data_.as_chars; } inline absl::cord_internal::CordRep* Cord::InlineRep::tree() const { if (is_tree()) { - absl::cord_internal::CordRep* rep; - memcpy(&rep, data_, sizeof(rep)); - return rep; + return data_.as_tree.rep; } else { return nullptr; } } -inline bool Cord::InlineRep::empty() const { return data_[kMaxInline] == 0; } +inline bool Cord::InlineRep::empty() const { return tagged_size() == 0; } inline size_t Cord::InlineRep::size() const { - const char tag = data_[kMaxInline]; + const char tag = tagged_size(); if (tag <= kMaxInline) return tag; return static_cast<size_t>(tree()->length); } inline void Cord::InlineRep::set_tree(absl::cord_internal::CordRep* rep) { if (rep == nullptr) { - memset(data_, 0, sizeof(data_)); + ResetToEmpty(); } else { bool was_tree = is_tree(); - memcpy(data_, &rep, sizeof(rep)); - memset(data_ + sizeof(rep), 0, sizeof(data_) - sizeof(rep) - 1); + data_.as_tree = {rep, {}, tagged_size()}; if (!was_tree) { - data_[kMaxInline] = kTreeFlag; + // If we were not a tree already, set the tag. + // Otherwise, leave it alone because it might have the profile bit on. + set_tagged_size(kTreeFlag); } } } @@ -961,25 +963,20 @@ set_tree(rep); return; } - memcpy(data_, &rep, sizeof(rep)); - memset(data_ + sizeof(rep), 0, sizeof(data_) - sizeof(rep) - 1); + data_.as_tree = {rep, {}, tagged_size()}; } inline absl::cord_internal::CordRep* Cord::InlineRep::clear() { - const char tag = data_[kMaxInline]; - absl::cord_internal::CordRep* result = nullptr; - if (tag > kMaxInline) { - memcpy(&result, data_, sizeof(result)); - } - memset(data_, 0, sizeof(data_)); // Clear the cord + absl::cord_internal::CordRep* result = tree(); + ResetToEmpty(); return result; } inline void Cord::InlineRep::CopyToArray(char* dst) const { assert(!is_tree()); - size_t n = data_[kMaxInline]; + size_t n = tagged_size(); assert(n != 0); - cord_internal::SmallMemmove(dst, data_, n); + cord_internal::SmallMemmove(dst, data_.as_chars, n); } constexpr inline Cord::Cord() noexcept {}
diff --git a/third_party/abseil-cpp/absl/strings/internal/cord_internal.h b/third_party/abseil-cpp/absl/strings/internal/cord_internal.h index d456eef..00b9baa 100644 --- a/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +++ b/third_party/abseil-cpp/absl/strings/internal/cord_internal.h
@@ -85,6 +85,17 @@ struct CordRepSubstring; struct CordRepExternal; +// Various representations that we allow +enum CordRepKind { + CONCAT = 0, + EXTERNAL = 1, + SUBSTRING = 2, + + // We have different tags for different sized flat arrays, + // starting with FLAT + FLAT = 3, +}; + struct CordRep { // The following three fields have to be less than 32 bytes since // that is the smallest supported flat node size. @@ -167,6 +178,34 @@ } }; +enum { + kMaxInline = 15, + // Tag byte & kMaxInline means we are storing a pointer. + kTreeFlag = 1 << 4, + // Tag byte & kProfiledFlag means we are profiling the Cord. + kProfiledFlag = 1 << 5 +}; + +// If the data has length <= kMaxInline, we store it in `as_chars`, and +// store the size in `tagged_size`. +// Else we store it in a tree and store a pointer to that tree in +// `as_tree.rep` and store a tag in `tagged_size`. +struct AsTree { + absl::cord_internal::CordRep* rep; + char padding[kMaxInline + 1 - sizeof(absl::cord_internal::CordRep*) - 1]; + char tagged_size; +}; +union InlineData { + constexpr InlineData() : as_chars{} {} + explicit constexpr InlineData(AsTree tree) : as_tree(tree) {} + + AsTree as_tree; + char as_chars[kMaxInline + 1]; +}; +static_assert(sizeof(InlineData) == kMaxInline + 1, ""); +static_assert(sizeof(AsTree) == sizeof(InlineData), ""); +static_assert(offsetof(AsTree, tagged_size) == kMaxInline, ""); + } // namespace cord_internal ABSL_NAMESPACE_END } // namespace absl
diff --git a/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h b/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h index 6f5bc09..49ec539 100644 --- a/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +++ b/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h
@@ -336,7 +336,7 @@ Container operator()(const Splitter& splitter) const { Container c; auto it = std::inserter(c, c.end()); - for (const auto sp : splitter) { + for (const auto& sp : splitter) { *it++ = ValueType(sp); } return c; @@ -401,7 +401,7 @@ Container m; typename Container::iterator it; bool insert = true; - for (const auto sp : splitter) { + for (const auto& sp : splitter) { if (insert) { it = Inserter<Container>::Insert(&m, First(sp), Second()); } else {
diff --git a/third_party/abseil-cpp/absl/strings/str_split_test.cc b/third_party/abseil-cpp/absl/strings/str_split_test.cc index b5ce68d..7f7c097 100644 --- a/third_party/abseil-cpp/absl/strings/str_split_test.cc +++ b/third_party/abseil-cpp/absl/strings/str_split_test.cc
@@ -367,7 +367,7 @@ TEST(Splitter, RangeIterators) { auto splitter = absl::StrSplit("a,b,c", ','); std::vector<absl::string_view> output; - for (const absl::string_view p : splitter) { + for (const absl::string_view& p : splitter) { output.push_back(p); } EXPECT_THAT(output, ElementsAre("a", "b", "c"));
diff --git a/third_party/abseil-cpp/absl/synchronization/BUILD.bazel b/third_party/abseil-cpp/absl/synchronization/BUILD.bazel index 4d4d680..b2df413 100644 --- a/third_party/abseil-cpp/absl/synchronization/BUILD.bazel +++ b/third_party/abseil-cpp/absl/synchronization/BUILD.bazel
@@ -73,15 +73,13 @@ "internal/create_thread_identity.cc", "internal/per_thread_sem.cc", "internal/waiter.cc", + "mutex.cc", "notification.cc", - ] + select({ - "//conditions:default": ["mutex.cc"], - }), + ], hdrs = [ "barrier.h", "blocking_counter.h", "internal/create_thread_identity.h", - "internal/mutex_nonprod.inc", "internal/per_thread_sem.h", "internal/waiter.h", "mutex.h",
diff --git a/third_party/abseil-cpp/absl/synchronization/BUILD.gn b/third_party/abseil-cpp/absl/synchronization/BUILD.gn index 37ab3f9..4d26b4fc 100644 --- a/third_party/abseil-cpp/absl/synchronization/BUILD.gn +++ b/third_party/abseil-cpp/absl/synchronization/BUILD.gn
@@ -42,7 +42,6 @@ "barrier.h", "blocking_counter.h", "internal/create_thread_identity.h", - "internal/mutex_nonprod.inc", "internal/per_thread_sem.h", "internal/waiter.h", "mutex.h",
diff --git a/third_party/abseil-cpp/absl/synchronization/CMakeLists.txt b/third_party/abseil-cpp/absl/synchronization/CMakeLists.txt index e5bc52f..c255b03 100644 --- a/third_party/abseil-cpp/absl/synchronization/CMakeLists.txt +++ b/third_party/abseil-cpp/absl/synchronization/CMakeLists.txt
@@ -52,7 +52,6 @@ "barrier.h" "blocking_counter.h" "internal/create_thread_identity.h" - "internal/mutex_nonprod.inc" "internal/per_thread_sem.h" "internal/waiter.h" "mutex.h"
diff --git a/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.cc b/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.cc deleted file mode 100644 index 334c3bc..0000000 --- a/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.cc +++ /dev/null
@@ -1,325 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Implementation of a small subset of Mutex and CondVar functionality -// for platforms where the production implementation hasn't been fully -// ported yet. - -#include "absl/synchronization/mutex.h" - -#if defined(_WIN32) -#include <chrono> // NOLINT(build/c++11) -#else -#include <sys/time.h> -#include <time.h> -#endif - -#include <algorithm> - -#include "absl/base/config.h" -#include "absl/base/internal/raw_logging.h" -#include "absl/time/time.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -void SetMutexDeadlockDetectionMode(OnDeadlockCycle) {} -void EnableMutexInvariantDebugging(bool) {} - -namespace synchronization_internal { - -namespace { - -// Return the current time plus the timeout. -absl::Time DeadlineFromTimeout(absl::Duration timeout) { - return absl::Now() + timeout; -} - -// Limit the deadline to a positive, 32-bit time_t value to accommodate -// implementation restrictions. This also deals with InfinitePast and -// InfiniteFuture. -absl::Time LimitedDeadline(absl::Time deadline) { - deadline = std::max(absl::FromTimeT(0), deadline); - deadline = std::min(deadline, absl::FromTimeT(0x7fffffff)); - return deadline; -} - -} // namespace - -#if defined(_WIN32) - -MutexImpl::MutexImpl() {} - -MutexImpl::~MutexImpl() { - if (locked_) { - std_mutex_.unlock(); - } -} - -void MutexImpl::Lock() { - std_mutex_.lock(); - locked_ = true; -} - -bool MutexImpl::TryLock() { - bool locked = std_mutex_.try_lock(); - if (locked) locked_ = true; - return locked; -} - -void MutexImpl::Unlock() { - locked_ = false; - released_.SignalAll(); - std_mutex_.unlock(); -} - -CondVarImpl::CondVarImpl() {} - -CondVarImpl::~CondVarImpl() {} - -void CondVarImpl::Signal() { std_cv_.notify_one(); } - -void CondVarImpl::SignalAll() { std_cv_.notify_all(); } - -void CondVarImpl::Wait(MutexImpl* mu) { - mu->released_.SignalAll(); - std_cv_.wait(mu->std_mutex_); -} - -bool CondVarImpl::WaitWithDeadline(MutexImpl* mu, absl::Time deadline) { - mu->released_.SignalAll(); - time_t when = ToTimeT(deadline); - int64_t nanos = ToInt64Nanoseconds(deadline - absl::FromTimeT(when)); - std::chrono::system_clock::time_point deadline_tp = - std::chrono::system_clock::from_time_t(when) + - std::chrono::duration_cast<std::chrono::system_clock::duration>( - std::chrono::nanoseconds(nanos)); - auto deadline_since_epoch = - std::chrono::duration_cast<std::chrono::duration<double>>( - deadline_tp - std::chrono::system_clock::from_time_t(0)); - return std_cv_.wait_until(mu->std_mutex_, deadline_tp) == - std::cv_status::timeout; -} - -#else // ! _WIN32 - -MutexImpl::MutexImpl() { - ABSL_RAW_CHECK(pthread_mutex_init(&pthread_mutex_, nullptr) == 0, - "pthread error"); -} - -MutexImpl::~MutexImpl() { - if (locked_) { - ABSL_RAW_CHECK(pthread_mutex_unlock(&pthread_mutex_) == 0, "pthread error"); - } - ABSL_RAW_CHECK(pthread_mutex_destroy(&pthread_mutex_) == 0, "pthread error"); -} - -void MutexImpl::Lock() { - ABSL_RAW_CHECK(pthread_mutex_lock(&pthread_mutex_) == 0, "pthread error"); - locked_ = true; -} - -bool MutexImpl::TryLock() { - bool locked = (0 == pthread_mutex_trylock(&pthread_mutex_)); - if (locked) locked_ = true; - return locked; -} - -void MutexImpl::Unlock() { - locked_ = false; - released_.SignalAll(); - ABSL_RAW_CHECK(pthread_mutex_unlock(&pthread_mutex_) == 0, "pthread error"); -} - -CondVarImpl::CondVarImpl() { - ABSL_RAW_CHECK(pthread_cond_init(&pthread_cv_, nullptr) == 0, - "pthread error"); -} - -CondVarImpl::~CondVarImpl() { - ABSL_RAW_CHECK(pthread_cond_destroy(&pthread_cv_) == 0, "pthread error"); -} - -void CondVarImpl::Signal() { - ABSL_RAW_CHECK(pthread_cond_signal(&pthread_cv_) == 0, "pthread error"); -} - -void CondVarImpl::SignalAll() { - ABSL_RAW_CHECK(pthread_cond_broadcast(&pthread_cv_) == 0, "pthread error"); -} - -void CondVarImpl::Wait(MutexImpl* mu) { - mu->released_.SignalAll(); - ABSL_RAW_CHECK(pthread_cond_wait(&pthread_cv_, &mu->pthread_mutex_) == 0, - "pthread error"); -} - -bool CondVarImpl::WaitWithDeadline(MutexImpl* mu, absl::Time deadline) { - mu->released_.SignalAll(); - struct timespec ts = ToTimespec(deadline); - int rc = pthread_cond_timedwait(&pthread_cv_, &mu->pthread_mutex_, &ts); - if (rc == ETIMEDOUT) return true; - ABSL_RAW_CHECK(rc == 0, "pthread error"); - return false; -} - -#endif // ! _WIN32 - -void MutexImpl::Await(const Condition& cond) { - if (cond.Eval()) return; - released_.SignalAll(); - do { - released_.Wait(this); - } while (!cond.Eval()); -} - -bool MutexImpl::AwaitWithDeadline(const Condition& cond, absl::Time deadline) { - if (cond.Eval()) return true; - released_.SignalAll(); - while (true) { - if (released_.WaitWithDeadline(this, deadline)) return false; - if (cond.Eval()) return true; - } -} - -} // namespace synchronization_internal - -Mutex::Mutex() {} - -Mutex::~Mutex() {} - -void Mutex::Lock() { impl()->Lock(); } - -void Mutex::Unlock() { impl()->Unlock(); } - -bool Mutex::TryLock() { return impl()->TryLock(); } - -void Mutex::ReaderLock() { Lock(); } - -void Mutex::ReaderUnlock() { Unlock(); } - -void Mutex::Await(const Condition& cond) { impl()->Await(cond); } - -void Mutex::LockWhen(const Condition& cond) { - Lock(); - Await(cond); -} - -bool Mutex::AwaitWithDeadline(const Condition& cond, absl::Time deadline) { - return impl()->AwaitWithDeadline( - cond, synchronization_internal::LimitedDeadline(deadline)); -} - -bool Mutex::AwaitWithTimeout(const Condition& cond, absl::Duration timeout) { - return AwaitWithDeadline( - cond, synchronization_internal::DeadlineFromTimeout(timeout)); -} - -bool Mutex::LockWhenWithDeadline(const Condition& cond, absl::Time deadline) { - Lock(); - return AwaitWithDeadline(cond, deadline); -} - -bool Mutex::LockWhenWithTimeout(const Condition& cond, absl::Duration timeout) { - return LockWhenWithDeadline( - cond, synchronization_internal::DeadlineFromTimeout(timeout)); -} - -void Mutex::ReaderLockWhen(const Condition& cond) { - ReaderLock(); - Await(cond); -} - -bool Mutex::ReaderLockWhenWithTimeout(const Condition& cond, - absl::Duration timeout) { - return LockWhenWithTimeout(cond, timeout); -} -bool Mutex::ReaderLockWhenWithDeadline(const Condition& cond, - absl::Time deadline) { - return LockWhenWithDeadline(cond, deadline); -} - -void Mutex::EnableDebugLog(const char*) {} -void Mutex::EnableInvariantDebugging(void (*)(void*), void*) {} -void Mutex::ForgetDeadlockInfo() {} -void Mutex::AssertHeld() const {} -void Mutex::AssertReaderHeld() const {} -void Mutex::AssertNotHeld() const {} - -CondVar::CondVar() {} - -CondVar::~CondVar() {} - -void CondVar::Signal() { impl()->Signal(); } - -void CondVar::SignalAll() { impl()->SignalAll(); } - -void CondVar::Wait(Mutex* mu) { return impl()->Wait(mu->impl()); } - -bool CondVar::WaitWithDeadline(Mutex* mu, absl::Time deadline) { - return impl()->WaitWithDeadline( - mu->impl(), synchronization_internal::LimitedDeadline(deadline)); -} - -bool CondVar::WaitWithTimeout(Mutex* mu, absl::Duration timeout) { - return WaitWithDeadline(mu, absl::Now() + timeout); -} - -void CondVar::EnableDebugLog(const char*) {} - -#ifdef ABSL_HAVE_THREAD_SANITIZER -extern "C" void __tsan_read1(void *addr); -#else -#define __tsan_read1(addr) // do nothing if TSan not enabled -#endif - -// A function that just returns its argument, dereferenced -static bool Dereference(void *arg) { - // ThreadSanitizer does not instrument this file for memory accesses. - // This function dereferences a user variable that can participate - // in a data race, so we need to manually tell TSan about this memory access. - __tsan_read1(arg); - return *(static_cast<bool *>(arg)); -} - -Condition::Condition() {} // null constructor, used for kTrue only -const Condition Condition::kTrue; - -Condition::Condition(bool (*func)(void *), void *arg) - : eval_(&CallVoidPtrFunction), - function_(func), - method_(nullptr), - arg_(arg) {} - -bool Condition::CallVoidPtrFunction(const Condition *c) { - return (*c->function_)(c->arg_); -} - -Condition::Condition(const bool *cond) - : eval_(CallVoidPtrFunction), - function_(Dereference), - method_(nullptr), - // const_cast is safe since Dereference does not modify arg - arg_(const_cast<bool *>(cond)) {} - -bool Condition::Eval() const { - // eval_ == null for kTrue - return (this->eval_ == nullptr) || (*this->eval_)(this); -} - -void RegisterSymbolizer(bool (*)(const void*, char*, int)) {} - -ABSL_NAMESPACE_END -} // namespace absl
diff --git a/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc b/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc deleted file mode 100644 index d83bc8a9..0000000 --- a/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +++ /dev/null
@@ -1,249 +0,0 @@ -// Do not include. This is an implementation detail of base/mutex.h. -// -// Declares three classes: -// -// base::internal::MutexImpl - implementation helper for Mutex -// base::internal::CondVarImpl - implementation helper for CondVar -// base::internal::SynchronizationStorage<T> - implementation helper for -// Mutex, CondVar - -#include <type_traits> - -#if defined(_WIN32) -#include <condition_variable> -#include <mutex> -#else -#include <pthread.h> -#endif - -#include "absl/base/call_once.h" -#include "absl/time/time.h" - -// Declare that Mutex::ReaderLock is actually Lock(). Intended primarily -// for tests, and even then as a last resort. -#ifdef ABSL_MUTEX_READER_LOCK_IS_EXCLUSIVE -#error ABSL_MUTEX_READER_LOCK_IS_EXCLUSIVE cannot be directly set -#else -#define ABSL_MUTEX_READER_LOCK_IS_EXCLUSIVE 1 -#endif - -// Declare that Mutex::EnableInvariantDebugging is not implemented. -// Intended primarily for tests, and even then as a last resort. -#ifdef ABSL_MUTEX_ENABLE_INVARIANT_DEBUGGING_NOT_IMPLEMENTED -#error ABSL_MUTEX_ENABLE_INVARIANT_DEBUGGING_NOT_IMPLEMENTED cannot be directly set -#else -#define ABSL_MUTEX_ENABLE_INVARIANT_DEBUGGING_NOT_IMPLEMENTED 1 -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -class Condition; - -namespace synchronization_internal { - -class MutexImpl; - -// Do not use this implementation detail of CondVar. Provides most of the -// implementation, but should not be placed directly in static storage -// because it will not linker initialize properly. See -// SynchronizationStorage<T> below for what we mean by linker -// initialization. -class CondVarImpl { - public: - CondVarImpl(); - CondVarImpl(const CondVarImpl&) = delete; - CondVarImpl& operator=(const CondVarImpl&) = delete; - ~CondVarImpl(); - - void Signal(); - void SignalAll(); - void Wait(MutexImpl* mutex); - bool WaitWithDeadline(MutexImpl* mutex, absl::Time deadline); - - private: -#if defined(_WIN32) - std::condition_variable_any std_cv_; -#else - pthread_cond_t pthread_cv_; -#endif -}; - -// Do not use this implementation detail of Mutex. Provides most of the -// implementation, but should not be placed directly in static storage -// because it will not linker initialize properly. See -// SynchronizationStorage<T> below for what we mean by linker -// initialization. -class MutexImpl { - public: - MutexImpl(); - MutexImpl(const MutexImpl&) = delete; - MutexImpl& operator=(const MutexImpl&) = delete; - ~MutexImpl(); - - void Lock(); - bool TryLock(); - void Unlock(); - void Await(const Condition& cond); - bool AwaitWithDeadline(const Condition& cond, absl::Time deadline); - - private: - friend class CondVarImpl; - -#if defined(_WIN32) - std::mutex std_mutex_; -#else - pthread_mutex_t pthread_mutex_; -#endif - - // True if the underlying mutex is locked. If the destructor is entered - // while locked_, the underlying mutex is unlocked. Mutex supports - // destruction while locked, but the same is undefined behavior for both - // pthread_mutex_t and std::mutex. - bool locked_ = false; - - // Signaled before releasing the lock, in support of Await. - CondVarImpl released_; -}; - -// Do not use this implementation detail of CondVar and Mutex. A storage -// space for T that supports a LinkerInitialized constructor. T must -// have a default constructor, which is called by the first call to -// get(). T's destructor is never called if the LinkerInitialized -// constructor is called. -// -// Objects constructed with the default constructor are constructed and -// destructed like any other object, and should never be allocated in -// static storage. -// -// Objects constructed with the LinkerInitialized constructor should -// always be in static storage. For such objects, calls to get() are always -// valid, except from signal handlers. -// -// Note that this implementation relies on undefined language behavior that -// are known to hold for the set of supported compilers. An analysis -// follows. -// -// From the C++11 standard: -// -// [basic.life] says an object has non-trivial initialization if it is of -// class type and it is initialized by a constructor other than a trivial -// default constructor. (the LinkerInitialized constructor is -// non-trivial) -// -// [basic.life] says the lifetime of an object with a non-trivial -// constructor begins when the call to the constructor is complete. -// -// [basic.life] says the lifetime of an object with non-trivial destructor -// ends when the call to the destructor begins. -// -// [basic.life] p5 specifies undefined behavior when accessing non-static -// members of an instance outside its -// lifetime. (SynchronizationStorage::get() access non-static members) -// -// So, LinkerInitialized object of SynchronizationStorage uses a -// non-trivial constructor, which is called at some point during dynamic -// initialization, and is therefore subject to order of dynamic -// initialization bugs, where get() is called before the object's -// constructor is, resulting in undefined behavior. -// -// Similarly, a LinkerInitialized SynchronizationStorage object has a -// non-trivial destructor, and so its lifetime ends at some point during -// destruction of objects with static storage duration [basic.start.term] -// p4. There is a window where other exit code could call get() after this -// occurs, resulting in undefined behavior. -// -// Combined, these statements imply that LinkerInitialized instances -// of SynchronizationStorage<T> rely on undefined behavior. -// -// However, in practice, the implementation works on all supported -// compilers. Specifically, we rely on: -// -// a) zero-initialization being sufficient to initialize -// LinkerInitialized instances for the purposes of calling -// get(), regardless of when the constructor is called. This is -// because the is_dynamic_ boolean is correctly zero-initialized to -// false. -// -// b) the LinkerInitialized constructor is a NOP, and immaterial to -// even to concurrent calls to get(). -// -// c) the destructor being a NOP for LinkerInitialized objects -// (guaranteed by a check for !is_dynamic_), and so any concurrent and -// subsequent calls to get() functioning as if the destructor were not -// called, by virtue of the instances' storage remaining valid after the -// destructor runs. -// -// d) That a-c apply transitively when SynchronizationStorage<T> is the -// only member of a class allocated in static storage. -// -// Nothing in the language standard guarantees that a-d hold. In practice, -// these hold in all supported compilers. -// -// Future direction: -// -// Ideally, we would simply use std::mutex or a similar class, which when -// allocated statically would support use immediately after static -// initialization up until static storage is reclaimed (i.e. the properties -// we require of all "linker initialized" instances). -// -// Regarding construction in static storage, std::mutex is required to -// provide a constexpr default constructor [thread.mutex.class], which -// ensures the instance's lifetime begins with static initialization -// [basic.start.init], and so is immune to any problems caused by the order -// of dynamic initialization. However, as of this writing Microsoft's -// Visual Studio does not provide a constexpr constructor for std::mutex. -// See -// https://blogs.msdn.microsoft.com/vcblog/2015/06/02/constexpr-complete-for-vs-2015-rtm-c11-compiler-c17-stl/ -// -// Regarding destruction of instances in static storage, [basic.life] does -// say an object ends when storage in which the occupies is released, in -// the case of non-trivial destructor. However, std::mutex is not specified -// to have a trivial destructor. -// -// So, we would need a class with a constexpr default constructor and a -// trivial destructor. Today, we can achieve neither desired property using -// std::mutex directly. -template <typename T> -class SynchronizationStorage { - public: - // Instances allocated on the heap or on the stack should use the default - // constructor. - SynchronizationStorage() - : destruct_(true), once_() {} - - constexpr explicit SynchronizationStorage(absl::ConstInitType) - : destruct_(false), once_(), space_{{0}} {} - - SynchronizationStorage(SynchronizationStorage&) = delete; - SynchronizationStorage& operator=(SynchronizationStorage&) = delete; - - ~SynchronizationStorage() { - if (destruct_) { - get()->~T(); - } - } - - // Retrieve the object in storage. This is fast and thread safe, but does - // incur the cost of absl::call_once(). - T* get() { - absl::call_once(once_, SynchronizationStorage::Construct, this); - return reinterpret_cast<T*>(&space_); - } - - private: - static void Construct(SynchronizationStorage<T>* self) { - new (&self->space_) T(); - } - - // When true, T's destructor is run when this is destructed. - const bool destruct_; - - absl::once_flag once_; - - // An aligned space for the T. - alignas(T) unsigned char space_[sizeof(T)]; -}; - -} // namespace synchronization_internal -ABSL_NAMESPACE_END -} // namespace absl
diff --git a/third_party/abseil-cpp/absl/synchronization/mutex.h b/third_party/abseil-cpp/absl/synchronization/mutex.h index 52401fe..6340bd63 100644 --- a/third_party/abseil-cpp/absl/synchronization/mutex.h +++ b/third_party/abseil-cpp/absl/synchronization/mutex.h
@@ -72,15 +72,6 @@ #include "absl/synchronization/internal/per_thread_sem.h" #include "absl/time/time.h" -// Decide if we should use the non-production implementation because -// the production implementation hasn't been fully ported yet. -#ifdef ABSL_INTERNAL_USE_NONPROD_MUTEX -#error ABSL_INTERNAL_USE_NONPROD_MUTEX cannot be directly set -#elif defined(ABSL_LOW_LEVEL_ALLOC_MISSING) -#define ABSL_INTERNAL_USE_NONPROD_MUTEX 1 -#include "absl/synchronization/internal/mutex_nonprod.inc" -#endif - namespace absl { ABSL_NAMESPACE_BEGIN @@ -461,15 +452,6 @@ static void InternalAttemptToUseMutexInFatalSignalHandler(); private: -#ifdef ABSL_INTERNAL_USE_NONPROD_MUTEX - friend class CondVar; - - synchronization_internal::MutexImpl *impl() { return impl_.get(); } - - synchronization_internal::SynchronizationStorage< - synchronization_internal::MutexImpl> - impl_; -#else std::atomic<intptr_t> mu_; // The Mutex state. // Post()/Wait() versus associated PerThreadSem; in class for required @@ -504,7 +486,6 @@ void Trans(MuHow how); // used for CondVar->Mutex transfer void Fer( base_internal::PerThreadSynch *w); // used for CondVar->Mutex transfer -#endif // Catch the error of writing Mutex when intending MutexLock. Mutex(const volatile Mutex * /*ignored*/) {} // NOLINT(runtime/explicit) @@ -838,17 +819,10 @@ void EnableDebugLog(const char *name); private: -#ifdef ABSL_INTERNAL_USE_NONPROD_MUTEX - synchronization_internal::CondVarImpl *impl() { return impl_.get(); } - synchronization_internal::SynchronizationStorage< - synchronization_internal::CondVarImpl> - impl_; -#else bool WaitCommon(Mutex *mutex, synchronization_internal::KernelTimeout t); void Remove(base_internal::PerThreadSynch *s); void Wakeup(base_internal::PerThreadSynch *w); std::atomic<intptr_t> cv_; // Condition variable state. -#endif CondVar(const CondVar&) = delete; CondVar& operator=(const CondVar&) = delete; }; @@ -906,12 +880,6 @@ ReleasableMutexLock& operator=(ReleasableMutexLock&&) = delete; }; -#ifdef ABSL_INTERNAL_USE_NONPROD_MUTEX - -inline constexpr Mutex::Mutex(absl::ConstInitType) : impl_(absl::kConstInit) {} - -#else - inline Mutex::Mutex() : mu_(0) { ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static); } @@ -920,8 +888,6 @@ inline CondVar::CondVar() : cv_(0) {} -#endif // ABSL_INTERNAL_USE_NONPROD_MUTEX - // static template <typename T> bool Condition::CastAndCallMethod(const Condition *c) {
diff --git a/third_party/abseil-cpp/absl/synchronization/mutex_test.cc b/third_party/abseil-cpp/absl/synchronization/mutex_test.cc index 16fc9058..66d5f2aa 100644 --- a/third_party/abseil-cpp/absl/synchronization/mutex_test.cc +++ b/third_party/abseil-cpp/absl/synchronization/mutex_test.cc
@@ -1002,9 +1002,6 @@ x.mu0.Unlock(); } -// The deadlock detector is not part of non-prod builds, so do not test it. -#if !defined(ABSL_INTERNAL_USE_NONPROD_MUTEX) - TEST(Mutex, DeadlockDetector) { absl::SetMutexDeadlockDetectionMode(absl::OnDeadlockCycle::kAbort); @@ -1158,7 +1155,6 @@ c.Lock(); c.Unlock(); } -#endif // !defined(ABSL_INTERNAL_USE_NONPROD_MUTEX) // -------------------------------------------------------- // Test for timeouts/deadlines on condition waits that are specified using
diff --git a/third_party/abseil-cpp/absl/time/duration.cc b/third_party/abseil-cpp/absl/time/duration.cc index 952cc09..eca1a6d 100644 --- a/third_party/abseil-cpp/absl/time/duration.cc +++ b/third_party/abseil-cpp/absl/time/duration.cc
@@ -763,7 +763,8 @@ // form "72h3m0.5s". Leading zero units are omitted. As a special // case, durations less than one second format use a smaller unit // (milli-, micro-, or nanoseconds) to ensure that the leading digit -// is non-zero. The zero duration formats as 0, with no unit. +// is non-zero. +// Unlike Go, we format the zero duration as 0, with no unit. std::string FormatDuration(Duration d) { const Duration min_duration = Seconds(kint64min); if (d == min_duration) {
diff --git a/third_party/abseil-cpp/symbols_arm64_dbg.def b/third_party/abseil-cpp/symbols_arm64_dbg.def index d1ca61e..9d7bc72 100644 --- a/third_party/abseil-cpp/symbols_arm64_dbg.def +++ b/third_party/abseil-cpp/symbols_arm64_dbg.def
@@ -936,6 +936,7 @@ ??0HashtablezInfo@container_internal@absl@@QEAA@XZ ??0HashtablezSampler@container_internal@absl@@QEAA@XZ ??0Impl@time_zone@cctz@time_internal@absl@@AEAA@AEBV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@@Z + ??0InlineData@cord_internal@absl@@QEAA@XZ ??0InlineRep@Cord@absl@@QEAA@$$QEAV012@@Z ??0InlineRep@Cord@absl@@QEAA@AEBV012@@Z ??0InlineRep@Cord@absl@@QEAA@XZ @@ -2013,6 +2014,7 @@ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__1@std@@@inlined_vector_internal@absl@@QEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@USubRange@absl@@@__1@std@@@inlined_vector_internal@absl@@QEAAXXZ ?ResetToBuiltinUTC@TimeZoneInfo@cctz@time_internal@absl@@AEAA_NAEBV?$duration@_JV?$ratio@$00$00@__1@std@@@chrono@__1@std@@@Z + ?ResetToEmpty@InlineRep@Cord@absl@@AEAAXXZ ?Resize@?$ResizeUninitializedTraits@V?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@_K@Z ?ResourceExhaustedError@absl@@YA?AVStatus@1@Vstring_view@1@@Z ?Rethrow@variant_internal@absl@@YAXXZ @@ -3020,6 +3022,7 @@ ?set_data@InlineRep@Cord@absl@@QEAAXPEBD_K_N@Z ?set_depth@CordRepConcat@cord_internal@absl@@QEAAXE@Z ?set_from_arg@InputValue@UnboundConversion@str_format_internal@absl@@QEAAXH@Z + ?set_tagged_size@InlineRep@Cord@absl@@AEAAXD@Z ?set_tree@InlineRep@Cord@absl@@QEAAXPEAUCordRep@cord_internal@3@@Z ?set_value@InputValue@UnboundConversion@str_format_internal@absl@@QEAAXH@Z ?shrink_to_fit@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__1@std@@@__1@std@@QEAAXXZ @@ -3066,6 +3069,7 @@ ?substr@string_view@absl@@QEBA?AV12@_K0@Z ?substring@CordRep@cord_internal@absl@@QEAAPEAUCordRepSubstring@23@XZ ?substring@CordRep@cord_internal@absl@@QEBAPEBUCordRepSubstring@23@XZ + ?tagged_size@InlineRep@Cord@absl@@AEBADXZ ?thread_identity@PerThreadSynch@base_internal@absl@@QEAAPEAUThreadIdentity@23@XZ ?throw_bad_optional_access@optional_internal@absl@@YAXXZ ?total_written@BufferRawSink@str_format_internal@absl@@QEBA_KXZ
diff --git a/third_party/abseil-cpp/symbols_x64_dbg.def b/third_party/abseil-cpp/symbols_x64_dbg.def index cfa2bd6..19742f7a 100644 --- a/third_party/abseil-cpp/symbols_x64_dbg.def +++ b/third_party/abseil-cpp/symbols_x64_dbg.def
@@ -938,6 +938,7 @@ ??0HashtablezInfo@container_internal@absl@@QEAA@XZ ??0HashtablezSampler@container_internal@absl@@QEAA@XZ ??0Impl@time_zone@cctz@time_internal@absl@@AEAA@AEBV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@@Z + ??0InlineData@cord_internal@absl@@QEAA@XZ ??0InlineRep@Cord@absl@@QEAA@$$QEAV012@@Z ??0InlineRep@Cord@absl@@QEAA@AEBV012@@Z ??0InlineRep@Cord@absl@@QEAA@XZ @@ -2015,6 +2016,7 @@ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__1@std@@@inlined_vector_internal@absl@@QEAAXXZ ?Reset@?$AllocationTransaction@V?$allocator@USubRange@absl@@@__1@std@@@inlined_vector_internal@absl@@QEAAXXZ ?ResetToBuiltinUTC@TimeZoneInfo@cctz@time_internal@absl@@AEAA_NAEBV?$duration@_JV?$ratio@$00$00@__1@std@@@chrono@__1@std@@@Z + ?ResetToEmpty@InlineRep@Cord@absl@@AEAAXXZ ?Resize@?$ResizeUninitializedTraits@V?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@X@strings_internal@absl@@SAXPEAV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@_K@Z ?ResourceExhaustedError@absl@@YA?AVStatus@1@Vstring_view@1@@Z ?Rethrow@variant_internal@absl@@YAXXZ @@ -3022,6 +3024,7 @@ ?set_data@InlineRep@Cord@absl@@QEAAXPEBD_K_N@Z ?set_depth@CordRepConcat@cord_internal@absl@@QEAAXE@Z ?set_from_arg@InputValue@UnboundConversion@str_format_internal@absl@@QEAAXH@Z + ?set_tagged_size@InlineRep@Cord@absl@@AEAAXD@Z ?set_tree@InlineRep@Cord@absl@@QEAAXPEAUCordRep@cord_internal@3@@Z ?set_value@InputValue@UnboundConversion@str_format_internal@absl@@QEAAXH@Z ?shrink_to_fit@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__1@std@@@__1@std@@QEAAXXZ @@ -3068,6 +3071,7 @@ ?substr@string_view@absl@@QEBA?AV12@_K0@Z ?substring@CordRep@cord_internal@absl@@QEAAPEAUCordRepSubstring@23@XZ ?substring@CordRep@cord_internal@absl@@QEBAPEBUCordRepSubstring@23@XZ + ?tagged_size@InlineRep@Cord@absl@@AEBADXZ ?thread_identity@PerThreadSynch@base_internal@absl@@QEAAPEAUThreadIdentity@23@XZ ?throw_bad_optional_access@optional_internal@absl@@YAXXZ ?total_written@BufferRawSink@str_format_internal@absl@@QEBA_KXZ
diff --git a/third_party/abseil-cpp/symbols_x86_dbg.def b/third_party/abseil-cpp/symbols_x86_dbg.def index 89e4cb4..9fd9c59e 100644 --- a/third_party/abseil-cpp/symbols_x86_dbg.def +++ b/third_party/abseil-cpp/symbols_x86_dbg.def
@@ -936,6 +936,7 @@ ??0HashtablezInfo@container_internal@absl@@QAE@XZ ??0HashtablezSampler@container_internal@absl@@QAE@XZ ??0Impl@time_zone@cctz@time_internal@absl@@AAE@ABV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@@Z + ??0InlineData@cord_internal@absl@@QAE@XZ ??0InlineRep@Cord@absl@@QAE@$$QAV012@@Z ??0InlineRep@Cord@absl@@QAE@ABV012@@Z ??0InlineRep@Cord@absl@@QAE@XZ @@ -2012,6 +2013,7 @@ ?Reset@?$AllocationTransaction@V?$allocator@UPayload@status_internal@absl@@@__1@std@@@inlined_vector_internal@absl@@QAEXXZ ?Reset@?$AllocationTransaction@V?$allocator@USubRange@absl@@@__1@std@@@inlined_vector_internal@absl@@QAEXXZ ?ResetToBuiltinUTC@TimeZoneInfo@cctz@time_internal@absl@@AAE_NABV?$duration@_JV?$ratio@$00$00@__1@std@@@chrono@__1@std@@@Z + ?ResetToEmpty@InlineRep@Cord@absl@@AAEXXZ ?Resize@?$ResizeUninitializedTraits@V?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@X@strings_internal@absl@@SAXPAV?$basic_string@DU?$char_traits@D@__1@std@@V?$allocator@D@23@@__1@std@@I@Z ?ResourceExhaustedError@absl@@YA?AVStatus@1@Vstring_view@1@@Z ?Rethrow@variant_internal@absl@@YAXXZ @@ -3019,6 +3021,7 @@ ?set_data@InlineRep@Cord@absl@@QAEXPBDI_N@Z ?set_depth@CordRepConcat@cord_internal@absl@@QAEXE@Z ?set_from_arg@InputValue@UnboundConversion@str_format_internal@absl@@QAEXH@Z + ?set_tagged_size@InlineRep@Cord@absl@@AAEXD@Z ?set_tree@InlineRep@Cord@absl@@QAEXPAUCordRep@cord_internal@3@@Z ?set_value@InputValue@UnboundConversion@str_format_internal@absl@@QAEXH@Z ?shrink_to_fit@?$vector@UTransition@cctz@time_internal@absl@@V?$allocator@UTransition@cctz@time_internal@absl@@@__1@std@@@__1@std@@QAEXXZ @@ -3065,6 +3068,7 @@ ?substr@string_view@absl@@QBE?AV12@II@Z ?substring@CordRep@cord_internal@absl@@QAEPAUCordRepSubstring@23@XZ ?substring@CordRep@cord_internal@absl@@QBEPBUCordRepSubstring@23@XZ + ?tagged_size@InlineRep@Cord@absl@@ABEDXZ ?thread_identity@PerThreadSynch@base_internal@absl@@QAEPAUThreadIdentity@23@XZ ?throw_bad_optional_access@optional_internal@absl@@YAXXZ ?total_written@BufferRawSink@str_format_internal@absl@@QBEIXZ
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index b2322f5..b1e77d0f 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -83,10 +83,6 @@ const base::Feature kLayoutNGFieldset{"LayoutNGFieldset", base::FEATURE_ENABLED_BY_DEFAULT}; -// Enable LayoutNGRuby by default. This feature is for a kill switch. -const base::Feature kLayoutNGRuby{"LayoutNGRuby", - base::FEATURE_ENABLED_BY_DEFAULT}; - const base::Feature kFragmentItem{"FragmentItem", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h index 7aa09d1d..ed0274a6 100644 --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h
@@ -36,7 +36,6 @@ BLINK_COMMON_EXPORT extern const base::Feature kEditingNG; BLINK_COMMON_EXPORT extern const base::Feature kLayoutNG; BLINK_COMMON_EXPORT extern const base::Feature kLayoutNGFieldset; -BLINK_COMMON_EXPORT extern const base::Feature kLayoutNGRuby; BLINK_COMMON_EXPORT extern const base::Feature kFragmentItem; BLINK_COMMON_EXPORT extern const base::Feature kMixedContentAutoupgrade; BLINK_COMMON_EXPORT extern const base::Feature kNavigationPredictor;
diff --git a/third_party/blink/public/devtools_protocol/browser_protocol.pdl b/third_party/blink/public/devtools_protocol/browser_protocol.pdl index b1e20a0..752de16 100644 --- a/third_party/blink/public/devtools_protocol/browser_protocol.pdl +++ b/third_party/blink/public/devtools_protocol/browser_protocol.pdl
@@ -8193,6 +8193,10 @@ optional boolean hasResidentKey # Defaults to false. optional boolean hasUserVerification + # If set to true, the authenticator will support the largeBlob extension. + # https://w3c.github.io/webauthn#largeBlob + # Defaults to false. + optional boolean hasLargeBlob # If set to true, tests of user presence will succeed immediately. # Otherwise, they will not be resolved. Defaults to true. optional boolean automaticPresenceSimulation
diff --git a/third_party/blink/public/mojom/BUILD.gn b/third_party/blink/public/mojom/BUILD.gn index b51530c..cbb0dbc 100644 --- a/third_party/blink/public/mojom/BUILD.gn +++ b/third_party/blink/public/mojom/BUILD.gn
@@ -733,6 +733,10 @@ mojom = "blink.mojom.AttestationConveyancePreference" cpp = "::device::AttestationConveyancePreference" }, + { + mojom = "blink.mojom.LargeBlobSupport" + cpp = "::device::LargeBlobSupport" + }, ] traits_headers = [ "//content/browser/webauth/authenticator_mojom_traits.h" ]
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 b25b1d4..99ce591a0 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -2541,7 +2541,6 @@ kLegacyLayoutByGrid = 3212, kLegacyLayoutByMultiCol = 3214, kLegacyLayoutByPrinting = 3215, - kLegacyLayoutByRuby = 3216, kLegacyLayoutBySVG = 3217, kLegacyLayoutBySlider = 3218, kLegacyLayoutByTable = 3219, @@ -2868,7 +2867,7 @@ kIdentifiabilityStudyReserved3540 = 3540, kV8WheelEvent_DeltaMode_AttributeGetter = 3541, kV8Touch_Force_AttributeGetter = 3542, - kIdentifiabilityStudyReserved3543 = 3543, + kWebGLRenderingContextMakeXRCompatible = 3543, kIdentifiabilityStudyReserved3544 = 3544, kIdentifiabilityStudyReserved3545 = 3545, kV8BeforeInstallPromptEvent_Platforms_AttributeGetter = 3546,
diff --git a/third_party/blink/public/mojom/webauthn/authenticator.mojom b/third_party/blink/public/mojom/webauthn/authenticator.mojom index a34b781f..fc2d9ec6 100644 --- a/third_party/blink/public/mojom/webauthn/authenticator.mojom +++ b/third_party/blink/public/mojom/webauthn/authenticator.mojom
@@ -125,6 +125,13 @@ bool echo_cred_props; bool has_cred_props_rk; bool cred_props_rk; + + // True if getClientExtensionResults() called on the returned + // PublicKeyCredential instance should contain a `largeBlob` extension output. + // |supports_large_blob| indicates the value the `supported` member in that + // extension output should be. + bool echo_large_blob; + bool supports_large_blob; }; struct GetAssertionAuthenticatorResponse { @@ -292,6 +299,14 @@ // credential ID match. Otherwise all elements must have an |id| member and // must be sorted lexicographically by it. array<PRFValues> prf_inputs; + + // If true, attempt to read the large blob associated to the credential. + // https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-read + bool large_blob_read; + + // If present, large blob to be written on the credential. + // https://w3c.github.io/webauthn/#dom-authenticationextensionslargeblobinputs-write + array<uint8>? large_blob_write; }; // See https://w3c.github.io/webauthn/#enumdef-attestationconveyancepreference @@ -326,6 +341,13 @@ UV_REQUIRED, }; +// https://w3c.github.io/webauthn#enumdef-largeblobsupport +enum LargeBlobSupport { + NOT_REQUESTED, + REQUIRED, + PREFERRED, +}; + // See https://w3c.github.io/webauthn/#dictdef-authenticatorselectioncriteria. struct AuthenticatorSelectionCriteria { // Filter authenticators by attachment type. @@ -407,6 +429,10 @@ // Whether the credProps extension was requested. // https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension bool cred_props; + + // The level of largeBlob support requested by the relying party. + // https://w3c.github.io/webauthn/#sctn-large-blob-extension + LargeBlobSupport large_blob_enable; }; enum PublicKeyCredentialType {
diff --git a/third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom b/third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom index 20e39505..73ebea0 100644 --- a/third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom +++ b/third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom
@@ -32,6 +32,7 @@ bool has_resident_key; bool has_user_verification; bool is_user_present = true; + bool has_large_blob; }; // Encapsulates both public (key handle) and private information associated
diff --git a/third_party/blink/public/web/web_widget.h b/third_party/blink/public/web/web_widget.h index f505206b..b2f9468 100644 --- a/third_party/blink/public/web/web_widget.h +++ b/third_party/blink/public/web/web_widget.h
@@ -161,12 +161,6 @@ // Returns the state of focus for the WebWidget. virtual bool HasFocus() { return false; } - // Returns the anchor and focus bounds of the current selection. - // If the selection range is empty, it returns the caret bounds. - virtual bool SelectionBounds(WebRect& anchor, WebRect& focus) const { - return false; - } - // Calling WebWidgetClient::requestPointerLock() will result in one // return call to didAcquirePointerLock() or didNotAcquirePointerLock(). virtual void DidAcquirePointerLock() {}
diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index e67237d..3f3c2d3 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni
@@ -114,6 +114,8 @@ "//third_party/blink/renderer/modules/cookie_store/window_cookie_store.idl", "//third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.idl", "//third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_outputs.idl", + "//third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_inputs.idl", + "//third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_outputs.idl", "//third_party/blink/renderer/modules/credentialmanager/authenticator_assertion_response.idl", "//third_party/blink/renderer/modules/credentialmanager/authenticator_attestation_response.idl", "//third_party/blink/renderer/modules/credentialmanager/authenticator_response.idl",
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn index 7a14170..725ab7a 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn
@@ -1133,6 +1133,7 @@ "frame/csp/string_list_directive_test.cc", "frame/deprecation_report_body_test.cc", "frame/document_loading_rendering_test.cc", + "frame/document_policy_violation_report_body_test.cc", "frame/dom_timer_test.cc", "frame/find_in_page_test.cc", "frame/frame_overlay_test.cc", @@ -1144,9 +1145,11 @@ "frame/local_frame_test.cc", "frame/local_frame_ukm_aggregator_test.cc", "frame/local_frame_view_test.cc", + "frame/location_report_body_test.cc", "frame/mhtml_archive_test.cc", "frame/mhtml_loading_test.cc", "frame/performance_monitor_test.cc", + "frame/report_test.cc", "frame/reporting_context_test.cc", "frame/root_frame_viewport_test.cc", "frame/rotation_viewport_anchor_test.cc",
diff --git a/third_party/blink/renderer/core/css/style_rule.cc b/third_party/blink/renderer/core/css/style_rule.cc index 517c868..44850be 100644 --- a/third_party/blink/renderer/core/css/style_rule.cc +++ b/third_party/blink/renderer/core/css/style_rule.cc
@@ -332,6 +332,7 @@ StyleRuleProperty::StyleRuleProperty(const StyleRuleProperty& property_rule) : StyleRuleBase(property_rule), + name_(property_rule.name_), properties_(property_rule.properties_->MutableCopy()) {} StyleRuleProperty::~StyleRuleProperty() = default;
diff --git a/third_party/blink/renderer/core/css/style_rule.h b/third_party/blink/renderer/core/css/style_rule.h index 83d81c3..f8f0570 100644 --- a/third_party/blink/renderer/core/css/style_rule.h +++ b/third_party/blink/renderer/core/css/style_rule.h
@@ -188,7 +188,7 @@ CSSSelectorList selector_list_; }; -class StyleRuleProperty : public StyleRuleBase { +class CORE_EXPORT StyleRuleProperty : public StyleRuleBase { public: StyleRuleProperty(const String& name, CSSPropertyValueSet*); StyleRuleProperty(const StyleRuleProperty&);
diff --git a/third_party/blink/renderer/core/css/style_rule_test.cc b/third_party/blink/renderer/core/css/style_rule_test.cc index 92423a3b..11a6ca4a 100644 --- a/third_party/blink/renderer/core/css/style_rule_test.cc +++ b/third_party/blink/renderer/core/css/style_rule_test.cc
@@ -77,4 +77,33 @@ EXPECT_EQ(rule->GetTimeRange(), copy->GetTimeRange()); } +TEST_F(StyleRuleTest, StyleRulePropertyCopy) { + ScopedCSSVariables2AtPropertyForTest scoped_feature(true); + + auto* base_rule = css_test_helpers::ParseRule(GetDocument(), R"CSS( + @property --foo { + syntax: "<length>"; + initial-value: 0px; + inherits: false; + } + )CSS"); + + ASSERT_TRUE(base_rule); + auto* base_copy = base_rule->Copy(); + + EXPECT_NE(base_rule, base_copy); + EXPECT_EQ(base_rule->GetType(), base_copy->GetType()); + + auto* rule = DynamicTo<StyleRuleProperty>(base_rule); + auto* copy = DynamicTo<StyleRuleProperty>(base_copy); + + ASSERT_TRUE(rule); + ASSERT_TRUE(copy); + + EXPECT_EQ(rule->GetName(), copy->GetName()); + EXPECT_EQ(rule->GetSyntax(), copy->GetSyntax()); + EXPECT_EQ(rule->Inherits(), copy->Inherits()); + EXPECT_EQ(rule->GetInitialValue(), copy->GetInitialValue()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/dom/document_test.cc b/third_party/blink/renderer/core/dom/document_test.cc index 5a8b9ce0..d4eb3f5 100644 --- a/third_party/blink/renderer/core/dom/document_test.cc +++ b/third_party/blink/renderer/core/dom/document_test.cc
@@ -59,6 +59,7 @@ #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" +#include "third_party/blink/renderer/core/frame/reporting_context.h" #include "third_party/blink/renderer/core/frame/settings.h" #include "third_party/blink/renderer/core/frame/viewport_data.h" #include "third_party/blink/renderer/core/html/forms/html_input_element.h" @@ -72,6 +73,8 @@ #include "third_party/blink/renderer/core/testing/color_scheme_helper.h" #include "third_party/blink/renderer/core/testing/page_test_base.h" #include "third_party/blink/renderer/core/testing/scoped_mock_overlay_scrollbars.h" +#include "third_party/blink/renderer/core/testing/sim/sim_request.h" +#include "third_party/blink/renderer/core/testing/sim/sim_test.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/heap/heap.h" #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h" @@ -107,6 +110,8 @@ UpdateAllLifecyclePhasesForTest(); } +class DocumentSimTest : public SimTest {}; + namespace { class TestSynchronousMutationObserver @@ -1356,4 +1361,46 @@ second->setAttribute(html_names::kNameAttr, "viewport"); } +namespace { +class MockReportingContext final : public ReportingContext { + public: + explicit MockReportingContext(ExecutionContext& ec) : ReportingContext(ec) {} + + void QueueReport(Report* report, const Vector<String>& endpoint) override { + report_count++; + } + + unsigned report_count = 0; +}; + +} // namespace + +TEST_F(DocumentSimTest, DuplicatedDocumentPolicyViolationsAreIgnored) { + blink::ScopedDocumentPolicyForTest scoped_document_policy(true); + SimRequest::Params params; + params.response_http_headers = { + {"Document-Policy", "lossless-images-max-bpp=1.0"}}; + SimRequest main_resource("https://example.com", "text/html", params); + LoadURL("https://example.com"); + main_resource.Finish(); + + ExecutionContext* execution_context = GetDocument().GetExecutionContext(); + MockReportingContext* mock_reporting_context = + MakeGarbageCollected<MockReportingContext>(*execution_context); + Supplement<ExecutionContext>::ProvideTo(*execution_context, + mock_reporting_context); + + EXPECT_FALSE(execution_context->IsFeatureEnabled( + mojom::blink::DocumentPolicyFeature::kLosslessImagesMaxBpp, + PolicyValue::CreateDecDouble(1.1), ReportOptions::kReportOnFailure)); + + EXPECT_EQ(mock_reporting_context->report_count, 1u); + + EXPECT_FALSE(execution_context->IsFeatureEnabled( + mojom::blink::DocumentPolicyFeature::kLosslessImagesMaxBpp, + PolicyValue::CreateDecDouble(1.1), ReportOptions::kReportOnFailure)); + + EXPECT_EQ(mock_reporting_context->report_count, 1u); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/editing/BUILD.gn b/third_party/blink/renderer/core/editing/BUILD.gn index 928a70e..96ef6b6 100644 --- a/third_party/blink/renderer/core/editing/BUILD.gn +++ b/third_party/blink/renderer/core/editing/BUILD.gn
@@ -4,13 +4,6 @@ import("//third_party/blink/renderer/core/core.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - blink_core_sources("editing") { sources = [ "bidi_adjustment.cc", @@ -316,8 +309,6 @@ "state_machines/state_machine_util.h", "state_machines/text_segmentation_machine_state.cc", "state_machines/text_segmentation_machine_state.h", - "substring_util.h", - "substring_util.mm", "suggestion/text_suggestion_backend_impl.cc", "suggestion/text_suggestion_backend_impl.h", "suggestion/text_suggestion_controller.cc", @@ -348,6 +339,8 @@ sources += [ "commands/smart_replace_cf.cc", "kill_ring_mac.mm", + "substring_util.h", + "substring_util.mm", ] } else { sources += [ "kill_ring_none.cc" ] @@ -435,7 +428,6 @@ "state_machines/state_machine_test_util.cc", "state_machines/state_machine_test_util.h", "state_machines/state_machine_util_test.cc", - "substring_util_test.mm", "suggestion/text_suggestion_controller_test.cc", "surrounding_text_test.cc", "testing/editing_test_base.cc", @@ -454,6 +446,10 @@ "visible_units_word_test.cc", ] + if (is_mac) { + sources += [ "substring_util_test.mm" ] + } + configs += [ "//third_party/blink/renderer/core:blink_core_pch", "//third_party/blink/renderer:config",
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc index ff9f5f9..0aa4d5a 100644 --- a/third_party/blink/renderer/core/exported/web_frame_test.cc +++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -440,12 +440,12 @@ IntRect& element_bounds, IntRect& caret_bounds) { Element* element = helper.GetWebView()->FocusedElement(); - WebRect caret_in_viewport, unused; - helper.GetWebView()->MainFrameWidget()->SelectionBounds(caret_in_viewport, - unused); + gfx::Rect caret_in_viewport, unused; + helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + caret_in_viewport, unused); caret_bounds = helper.GetWebView()->GetPage()->GetVisualViewport().ViewportToRootFrame( - caret_in_viewport); + IntRect(caret_in_viewport)); element_bounds = element->GetDocument().View()->ConvertToRootFrame( PixelSnappedIntRect(element->Node::BoundingBox())); } @@ -3881,11 +3881,12 @@ .To<WebInputElement>() .SetSelectionRange(1000, 1000); SetScaleAndScrollAndLayout(web_view_helper.GetWebView(), gfx::Point(), 1); - WebRect rect, caret; - web_view_helper.GetWebView()->SelectionBounds(caret, rect); + gfx::Rect rect, caret; + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + caret, rect); // Set the page scale to be smaller than the minimal readable scale. - float initial_scale = min_readable_caret_height / caret.height * 0.5f; + float initial_scale = min_readable_caret_height / caret.height() * 0.5f; SetScaleAndScrollAndLayout(web_view_helper.GetWebView(), gfx::Point(), initial_scale); @@ -3905,7 +3906,7 @@ int v_scroll = edit_box_with_text.y - (viewport_height / scale - edit_box_with_text.height) / 2; EXPECT_NEAR(v_scroll, scroll.Y(), 2); - EXPECT_NEAR(min_readable_caret_height / caret.height, scale, 0.1); + EXPECT_NEAR(min_readable_caret_height / caret.height(), scale, 0.1); // The edit box is wider than the viewport when legible. viewport_width = 200; @@ -3921,9 +3922,9 @@ EXPECT_TRUE(need_animation); // The caret should be right aligned since the caret would be offscreen when // the edit box is left aligned. - h_scroll = caret.x + caret.width + caret_padding - viewport_width / scale; + h_scroll = caret.x() + caret.width() + caret_padding - viewport_width / scale; EXPECT_NEAR(h_scroll, scroll.X(), 2); - EXPECT_NEAR(min_readable_caret_height / caret.height, scale, 0.1); + EXPECT_NEAR(min_readable_caret_height / caret.height(), scale, 0.1); SetScaleAndScrollAndLayout(web_view_helper.GetWebView(), gfx::Point(), initial_scale); @@ -3941,7 +3942,7 @@ v_scroll = edit_box_with_no_text.y - (viewport_height / scale - edit_box_with_no_text.height) / 2; EXPECT_NEAR(v_scroll, scroll.Y(), 2); - EXPECT_NEAR(min_readable_caret_height / caret.height, scale, 0.1); + EXPECT_NEAR(min_readable_caret_height / caret.height(), scale, 0.1); // Move focus back to the first edit box. web_view_helper.GetWebView()->AdvanceFocus(true); @@ -3989,11 +3990,12 @@ .To<WebInputElement>() .SetSelectionRange(0, 0); SetScaleAndScrollAndLayout(web_view_helper.GetWebView(), gfx::Point(), 1); - WebRect rect, caret; - web_view_helper.GetWebView()->SelectionBounds(caret, rect); + gfx::Rect rect, caret; + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + caret, rect); // Set the page scale to be twice as large as the minimal readable scale. - float new_scale = kMinReadableCaretHeight / caret.height * 2.0; + float new_scale = kMinReadableCaretHeight / caret.height() * 2.0; SetScaleAndScrollAndLayout(web_view_helper.GetWebView(), gfx::Point(), new_scale); @@ -4099,8 +4101,9 @@ // Select the first textbox. web_view_helper.GetWebView()->AdvanceFocus(true); - WebRect rect, caret; - web_view_helper.GetWebView()->SelectionBounds(caret, rect); + gfx::Rect rect, caret; + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + caret, rect); GetElementAndCaretBoundsForFocusedEditableElement( web_view_helper, element_bounds, caret_bounds); web_view_helper.GetWebView()->ComputeScaleAndScrollForEditableElementRects( @@ -5415,22 +5418,20 @@ EXPECT_EQ(2, find_in_page_client.ActiveIndex()); } -static gfx::Point TopLeft(const WebRect& rect) { - return gfx::Point(rect.x, rect.y); -} - -static gfx::Point BottomRightMinusOne(const WebRect& rect) { +static gfx::Point BottomRightMinusOne(const gfx::Rect& rect) { // FIXME: If we don't subtract 1 from the x- and y-coordinates of the // selection bounds, selectRange() will select the *next* element. That's // strictly correct, as hit-testing checks the pixel to the lower-right of // the input coordinate, but it's a wart on the API. - if (rect.width > 0) - return gfx::Point(rect.x + rect.width - 1, rect.y + rect.height - 1); - return gfx::Point(rect.x + rect.width, rect.y + rect.height - 1); + if (rect.width() > 0) { + return gfx::Point(rect.x() + rect.width() - 1, + rect.y() + rect.height() - 1); + } + return gfx::Point(rect.x() + rect.width(), rect.y() + rect.height() - 1); } -static WebRect ElementBounds(WebLocalFrame* frame, const WebString& id) { - return frame->GetDocument().GetElementById(id).BoundsInViewport(); +static gfx::Rect ElementBounds(WebLocalFrame* frame, const WebString& id) { + return gfx::Rect(frame->GetDocument().GetElementById(id).BoundsInViewport()); } static std::string SelectionAsString(WebFrame* frame) { @@ -5439,8 +5440,8 @@ TEST_F(WebFrameTest, SelectRange) { WebLocalFrame* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("select_range_basic.html"); RegisterMockedHttpURLLoad("select_range_scroll.html"); @@ -5450,12 +5451,11 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("Some test text for testing.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); frame->ExecuteCommand(WebString::FromUTF8("Unselect")); EXPECT_EQ("", SelectionAsString(frame)); - frame->SelectRange(TopLeft(start_web_rect), - BottomRightMinusOne(end_web_rect)); + frame->SelectRange(start_rect.origin(), BottomRightMinusOne(end_rect)); // On some devices, the above bottomRightMinusOne() causes the ending '.' not // selected. std::string selection_string = SelectionAsString(frame); @@ -5466,12 +5466,11 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("Some offscreen test text for testing.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); frame->ExecuteCommand(WebString::FromUTF8("Unselect")); EXPECT_EQ("", SelectionAsString(frame)); - frame->SelectRange(TopLeft(start_web_rect), - BottomRightMinusOne(end_web_rect)); + frame->SelectRange(start_rect.origin(), BottomRightMinusOne(end_rect)); // On some devices, the above bottomRightMinusOne() causes the ending '.' not // selected. selection_string = SelectionAsString(frame); @@ -5552,8 +5551,8 @@ TEST_F(WebFrameTest, SelectRangeInIframe) { WebFrame* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("select_range_iframe.html"); RegisterMockedHttpURLLoad("select_range_basic.html"); @@ -5564,12 +5563,11 @@ frame = web_view_helper.GetWebView()->MainFrame(); WebLocalFrame* subframe = frame->FirstChild()->ToWebLocalFrame(); EXPECT_EQ("Some test text for testing.", SelectionAsString(subframe)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); subframe->ExecuteCommand(WebString::FromUTF8("Unselect")); EXPECT_EQ("", SelectionAsString(subframe)); - subframe->SelectRange(TopLeft(start_web_rect), - BottomRightMinusOne(end_web_rect)); + subframe->SelectRange(start_rect.origin(), BottomRightMinusOne(end_rect)); // On some devices, the above bottomRightMinusOne() causes the ending '.' not // selected. std::string selection_string = SelectionAsString(subframe); @@ -5579,8 +5577,8 @@ TEST_F(WebFrameTest, SelectRangeDivContentEditable) { WebLocalFrame* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("select_range_div_editable.html"); @@ -5592,10 +5590,10 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); - frame->SelectRange(BottomRightMinusOne(end_web_rect), gfx::Point()); + frame->SelectRange(BottomRightMinusOne(end_rect), gfx::Point()); EXPECT_EQ("16-char header. This text is initially selected.", SelectionAsString(frame)); @@ -5604,17 +5602,16 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); - frame->SelectRange(TopLeft(start_web_rect), - BottomRightMinusOne(end_web_rect)); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); + frame->SelectRange(start_rect.origin(), BottomRightMinusOne(end_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); - frame->SelectRange(TopLeft(start_web_rect), gfx::Point(640, 480)); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); + frame->SelectRange(start_rect.origin(), gfx::Point(640, 480)); EXPECT_EQ("This text is initially selected. 16-char footer.", SelectionAsString(frame)); } @@ -5623,8 +5620,8 @@ // http://crbug.com/238334. TEST_F(WebFrameTest, DISABLED_SelectRangeSpanContentEditable) { WebLocalFrame* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("select_range_span_editable.html"); @@ -5637,10 +5634,10 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); - frame->SelectRange(BottomRightMinusOne(end_web_rect), gfx::Point()); + frame->SelectRange(BottomRightMinusOne(end_rect), gfx::Point()); EXPECT_EQ("16-char header. This text is initially selected.", SelectionAsString(frame)); @@ -5649,18 +5646,17 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); - frame->SelectRange(TopLeft(start_web_rect), - BottomRightMinusOne(end_web_rect)); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); + frame->SelectRange(start_rect.origin(), BottomRightMinusOne(end_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); - frame->SelectRange(TopLeft(start_web_rect), gfx::Point(640, 480)); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); + frame->SelectRange(start_rect.origin(), gfx::Point(640, 480)); EXPECT_EQ("This text is initially selected. 16-char footer.", SelectionAsString(frame)); } @@ -5676,7 +5672,7 @@ frame->ExecuteScript(WebScriptSource("selectElement('header_2');")); EXPECT_EQ("Header 2.", SelectionAsString(frame)); frame->SelectRange(BottomRightMinusOne(ElementBounds(frame, "header_2")), - TopLeft(ElementBounds(frame, "header_1"))); + ElementBounds(frame, "header_1").origin()); EXPECT_EQ("Header 1. Header 2.", SelectionAsString(frame)); // We can move the start and end together. @@ -5699,14 +5695,14 @@ frame->ExecuteScript(WebScriptSource("selectElement('footer_2');")); EXPECT_EQ("Footer 2.", SelectionAsString(frame)); frame->SelectRange(BottomRightMinusOne(ElementBounds(frame, "footer_2")), - TopLeft(ElementBounds(frame, "editable_2"))); + ElementBounds(frame, "editable_2").origin()); EXPECT_EQ(" [ Footer 1. Footer 2.", SelectionAsString(frame)); // Can extend the selection completely across editable elements. frame->ExecuteScript(WebScriptSource("selectElement('footer_2');")); EXPECT_EQ("Footer 2.", SelectionAsString(frame)); frame->SelectRange(BottomRightMinusOne(ElementBounds(frame, "footer_2")), - TopLeft(ElementBounds(frame, "header_2"))); + ElementBounds(frame, "header_2").origin()); EXPECT_EQ("Header 2. ] [ Editable 1. Editable 2. ] [ Footer 1. Footer 2.", SelectionAsString(frame)); @@ -5715,7 +5711,7 @@ frame->ExecuteScript(WebScriptSource("selectElement('editable_2');")); EXPECT_EQ("Editable 2.", SelectionAsString(frame)); frame->SelectRange(BottomRightMinusOne(ElementBounds(frame, "editable_2")), - TopLeft(ElementBounds(frame, "header_2"))); + ElementBounds(frame, "header_2").origin()); EXPECT_EQ("[ Editable 1. Editable 2.", SelectionAsString(frame)); } @@ -5729,15 +5725,15 @@ // Select first span. We can move the end to include the second span. frame->ExecuteScript(WebScriptSource("selectElement('header_1');")); EXPECT_EQ("Header 1.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "header_1")), + frame->SelectRange(ElementBounds(frame, "header_1").origin(), BottomRightMinusOne(ElementBounds(frame, "header_2"))); EXPECT_EQ("Header 1. Header 2.", SelectionAsString(frame)); // We can move the start and end together. frame->ExecuteScript(WebScriptSource("selectElement('header_2');")); EXPECT_EQ("Header 2.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "header_2")), - TopLeft(ElementBounds(frame, "header_2"))); + frame->SelectRange(ElementBounds(frame, "header_2").origin(), + ElementBounds(frame, "header_2").origin()); EXPECT_EQ("", SelectionAsString(frame)); // Selection is a caret, not empty. EXPECT_FALSE(frame->SelectionRange().IsNull()); @@ -5745,21 +5741,21 @@ // We can move the end across the start. frame->ExecuteScript(WebScriptSource("selectElement('header_2');")); EXPECT_EQ("Header 2.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "header_2")), - TopLeft(ElementBounds(frame, "header_1"))); + frame->SelectRange(ElementBounds(frame, "header_2").origin(), + ElementBounds(frame, "header_1").origin()); EXPECT_EQ("Header 1. ", SelectionAsString(frame)); // Can't extend the selection part-way into an editable element. frame->ExecuteScript(WebScriptSource("selectElement('header_1');")); EXPECT_EQ("Header 1.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "header_1")), + frame->SelectRange(ElementBounds(frame, "header_1").origin(), BottomRightMinusOne(ElementBounds(frame, "editable_1"))); EXPECT_EQ("Header 1. Header 2. ] ", SelectionAsString(frame)); // Can extend the selection completely across editable elements. frame->ExecuteScript(WebScriptSource("selectElement('header_1');")); EXPECT_EQ("Header 1.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "header_1")), + frame->SelectRange(ElementBounds(frame, "header_1").origin(), BottomRightMinusOne(ElementBounds(frame, "footer_1"))); EXPECT_EQ("Header 1. Header 2. ] [ Editable 1. Editable 2. ] [ Footer 1.", SelectionAsString(frame)); @@ -5768,15 +5764,15 @@ // text. frame->ExecuteScript(WebScriptSource("selectElement('editable_1');")); EXPECT_EQ("Editable 1.", SelectionAsString(frame)); - frame->SelectRange(TopLeft(ElementBounds(frame, "editable_1")), + frame->SelectRange(ElementBounds(frame, "editable_1").origin(), BottomRightMinusOne(ElementBounds(frame, "footer_1"))); EXPECT_EQ("Editable 1. Editable 2. ]", SelectionAsString(frame)); } TEST_F(WebFrameTest, MoveRangeSelectionExtent) { WebLocalFrameImpl* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("move_range_selection_extent.html"); @@ -5785,8 +5781,8 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); frame->MoveRangeSelectionExtent(gfx::Point(640, 480)); EXPECT_EQ("This text is initially selected. 16-char footer.", @@ -5796,8 +5792,7 @@ EXPECT_EQ("16-char header. ", SelectionAsString(frame)); // Reset with swapped base and extent. - frame->SelectRange(TopLeft(end_web_rect), - BottomRightMinusOne(start_web_rect)); + frame->SelectRange(end_rect.origin(), BottomRightMinusOne(start_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); frame->MoveRangeSelectionExtent(gfx::Point(640, 480)); @@ -5813,8 +5808,8 @@ TEST_F(WebFrameTest, MoveRangeSelectionExtentCannotCollapse) { WebLocalFrameImpl* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("move_range_selection_extent.html"); @@ -5823,25 +5818,24 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); - frame->MoveRangeSelectionExtent(BottomRightMinusOne(start_web_rect)); + frame->MoveRangeSelectionExtent(BottomRightMinusOne(start_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); // Reset with swapped base and extent. - frame->SelectRange(TopLeft(end_web_rect), - BottomRightMinusOne(start_web_rect)); + frame->SelectRange(end_rect.origin(), BottomRightMinusOne(start_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); - frame->MoveRangeSelectionExtent(BottomRightMinusOne(end_web_rect)); + frame->MoveRangeSelectionExtent(BottomRightMinusOne(end_rect)); EXPECT_EQ("This text is initially selected.", SelectionAsString(frame)); } TEST_F(WebFrameTest, MoveRangeSelectionExtentScollsInputField) { WebLocalFrameImpl* frame; - WebRect start_web_rect; - WebRect end_web_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; RegisterMockedHttpURLLoad("move_range_selection_extent_input_field.html"); @@ -5851,16 +5845,15 @@ &web_view_helper); frame = web_view_helper.LocalMainFrame(); EXPECT_EQ("Length", SelectionAsString(frame)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( - start_web_rect, end_web_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(0, frame->GetFrame() ->Selection() .ComputeVisibleSelectionInDOMTree() .RootEditableElement() ->scrollLeft()); - frame->MoveRangeSelectionExtent( - gfx::Point(end_web_rect.x + 500, end_web_rect.y)); + frame->MoveRangeSelectionExtent(gfx::Point(end_rect.x() + 500, end_rect.y())); EXPECT_GE(frame->GetFrame() ->Selection() .ComputeVisibleSelectionInDOMTree() @@ -6026,43 +6019,43 @@ &web_view_helper); WebLocalFrameImpl* frame = web_view_helper.LocalMainFrame(); - WebRect initial_start_rect; - WebRect initial_end_rect; - WebRect start_rect; - WebRect end_rect; + gfx::Rect initial_start_rect; + gfx::Rect initial_end_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; frame->ExecuteScript(WebScriptSource("selectRange();")); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( initial_start_rect, initial_end_rect); - gfx::Point moved_start(TopLeft(initial_start_rect)); + gfx::Point moved_start(initial_start_rect.origin()); moved_start.Offset(0, 40); frame->SelectRange(moved_start, BottomRightMinusOne(initial_end_rect)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); moved_start.Offset(0, -80); frame->SelectRange(moved_start, BottomRightMinusOne(initial_end_rect)); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); gfx::Point moved_end(BottomRightMinusOne(initial_end_rect)); moved_end.Offset(0, 40); - frame->SelectRange(TopLeft(initial_start_rect), moved_end); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + frame->SelectRange(initial_start_rect.origin(), moved_end); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); moved_end.Offset(0, -80); - frame->SelectRange(TopLeft(initial_start_rect), moved_end); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + frame->SelectRange(initial_start_rect.origin(), moved_end); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); } @@ -6076,27 +6069,27 @@ &web_view_helper); frame = (WebLocalFrameImpl*)web_view_helper.GetWebView()->MainFrame(); - WebRect initial_start_rect; - WebRect initial_end_rect; - WebRect start_rect; - WebRect end_rect; + gfx::Rect initial_start_rect; + gfx::Rect initial_end_rect; + gfx::Rect start_rect; + gfx::Rect end_rect; frame->ExecuteScript(WebScriptSource("selectCaret();")); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds( + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( initial_start_rect, initial_end_rect); - gfx::Point move_to(TopLeft(initial_start_rect)); + gfx::Point move_to(initial_start_rect.origin()); move_to.Offset(0, 40); frame->MoveCaretSelection(move_to); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); move_to.Offset(0, -80); frame->MoveCaretSelection(move_to); - web_view_helper.GetWebView()->MainFrameWidget()->SelectionBounds(start_rect, - end_rect); + web_view_helper.GetWebView()->MainFrameViewWidget()->CalculateSelectionBounds( + start_rect, end_rect); EXPECT_EQ(start_rect, initial_start_rect); EXPECT_EQ(end_rect, initial_end_rect); }
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc index 2d07ca8..6de841a 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2323,6 +2323,9 @@ return WebInputEventResult::kNotHandled; DCHECK(!WebInputEvent::IsTouchEventType(input_event.GetType())); + WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidgetImpl(); + DCHECK(widget); + GetPage()->GetVisualViewport().StartTrackingPinchStats(); TRACE_EVENT1("input,rail", "WebViewImpl::handleInputEvent", "type", @@ -2330,7 +2333,7 @@ // If a drag-and-drop operation is in progress, ignore input events except // PointerCancel. - if (MainFrameImpl()->FrameWidgetImpl()->DoingDragAndDrop() && + if (widget->DoingDragAndDrop() && input_event.GetType() != WebInputEvent::Type::kPointerCancel) return WebInputEventResult::kHandledSuppressed; @@ -2350,14 +2353,12 @@ UIEventWithKeyState::ClearNewTabModifierSetFromIsolatedWorld(); bool is_pointer_locked = false; - if (WebFrameWidgetBase* widget = MainFrameImpl()->FrameWidgetImpl()) { - if (WebWidgetClient* client = widget->Client()) - is_pointer_locked = client->IsPointerLocked(); - } + if (WebWidgetClient* client = widget->Client()) + is_pointer_locked = client->IsPointerLocked(); if (is_pointer_locked && WebInputEvent::IsMouseEventType(input_event.GetType())) { - MainFrameImpl()->FrameWidgetImpl()->PointerLockMouseEvent(coalesced_event); + widget->PointerLockMouseEvent(coalesced_event); return WebInputEventResult::kHandledSystem; } @@ -2377,16 +2378,12 @@ } } + widget->NotifyInputObservers(coalesced_event); + // Notify the focus frame of the input. Note that the other frames are not // notified as input is only handled by the focused frame. Frame* frame = FocusedCoreFrame(); if (auto* local_frame = DynamicTo<LocalFrame>(frame)) { - if (local_frame->View() && local_frame->View() - ->GetPaintTimingDetector() - .NeedToNotifyInputOrScroll()) { - local_frame->View()->GetPaintTimingDetector().NotifyInputEvent( - input_event.GetType()); - } if (auto* content_capture_manager = local_frame->LocalFrameRoot().GetContentCaptureManager()) { content_capture_manager->NotifyInputEvent(input_event.GetType(), @@ -2535,30 +2532,6 @@ } } -bool WebViewImpl::SelectionBounds(WebRect& anchor_web, - WebRect& focus_web) const { - const Frame* frame = FocusedCoreFrame(); - const auto* local_frame = DynamicTo<LocalFrame>(frame); - if (!local_frame) - return false; - - LocalFrameView* frame_view = local_frame->View(); - if (!frame_view) - return false; - - IntRect anchor; - IntRect focus; - if (!local_frame->Selection().ComputeAbsoluteBounds(anchor, focus)) - return false; - - VisualViewport& visual_viewport = GetPage()->GetVisualViewport(); - anchor_web = visual_viewport.RootFrameToViewport( - frame_view->ConvertToRootFrame(anchor)); - focus_web = visual_viewport.RootFrameToViewport( - frame_view->ConvertToRootFrame(focus)); - return true; -} - // WebView -------------------------------------------------------------------- WebSettingsImpl* WebViewImpl::SettingsImpl() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h index 03a2e10..6a91e9f4 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -508,7 +508,6 @@ void SendScrollEndEventFromImplSide(cc::ElementId scroll_latched_element_id); void MouseCaptureLost(); void SetFocus(bool enable) override; - bool SelectionBounds(WebRect& anchor, WebRect& focus) const; WebURL GetURLForDebugTrace(); // Update the target url locally and tell the browser that the target URL has
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc index 4aa1316..2a6d2de 100644 --- a/third_party/blink/renderer/core/exported/web_view_test.cc +++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -1870,11 +1870,10 @@ web_view->MainFrameImpl()->GetFrame()->SetInitialFocus(false); frame->SetEditableSelectionOffsets(4, 10); EXPECT_TRUE(frame->IsSelectionAnchorFirst()); - WebRect anchor; - WebRect focus; - web_view->MainFrameWidget()->SelectionBounds(anchor, focus); - frame->SelectRange(gfx::Point(focus.x, focus.y), - gfx::Point(anchor.x, anchor.y)); + gfx::Rect anchor; + gfx::Rect focus; + web_view->MainFrameViewWidget()->CalculateSelectionBounds(anchor, focus); + frame->SelectRange(focus.origin(), anchor.origin()); EXPECT_FALSE(frame->IsSelectionAnchorFirst()); }
diff --git a/third_party/blink/renderer/core/frame/document_policy_violation_report_body.cc b/third_party/blink/renderer/core/frame/document_policy_violation_report_body.cc index 0c7de40e..9890fec8 100644 --- a/third_party/blink/renderer/core/frame/document_policy_violation_report_body.cc +++ b/third_party/blink/renderer/core/frame/document_policy_violation_report_body.cc
@@ -3,9 +3,27 @@ // found in the LICENSE file. #include "third_party/blink/renderer/core/frame/document_policy_violation_report_body.h" +#include "third_party/blink/renderer/platform/wtf/hash_functions.h" namespace blink { +DocumentPolicyViolationReportBody::DocumentPolicyViolationReportBody( + const String& feature_id, + const String& message, + const String& disposition, + // URL of the resource that violated the document policy. + const String& resource_url) + : LocationReportBody(resource_url), + feature_id_(feature_id), + message_("Document policy violation: " + + (message.IsEmpty() + ? feature_id + " is not allowed in this document." + : message)), + disposition_(disposition) { + DCHECK(!feature_id.IsEmpty()); + DCHECK(!disposition.IsEmpty()); +} + void DocumentPolicyViolationReportBody::BuildJSONValue( V8ObjectBuilder& builder) const { LocationReportBody::BuildJSONValue(builder); @@ -14,4 +32,12 @@ builder.AddStringOrNull("message", message()); } +unsigned DocumentPolicyViolationReportBody::MatchId() const { + unsigned hash = LocationReportBody::MatchId(); + hash = WTF::HashInts(hash, featureId().Impl()->GetHash()); + hash = WTF::HashInts(hash, disposition().Impl()->GetHash()); + hash = WTF::HashInts(hash, message().Impl()->GetHash()); + return hash; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/document_policy_violation_report_body.h b/third_party/blink/renderer/core/frame/document_policy_violation_report_body.h index e6364be6..4e7ec2a 100644 --- a/third_party/blink/renderer/core/frame/document_policy_violation_report_body.h +++ b/third_party/blink/renderer/core/frame/document_policy_violation_report_body.h
@@ -21,14 +21,7 @@ const String& message, const String& disposition, // URL of the resource that violated the document policy. - const String& resource_url) - : LocationReportBody(resource_url), - feature_id_(feature_id), - message_("Document policy violation: " + - (message.IsEmpty() - ? feature_id + " is not allowed in this document." - : message)), - disposition_(disposition) {} + const String& resource_url); const String& featureId() const { return feature_id_; } const String& disposition() const { return disposition_; } @@ -38,6 +31,8 @@ ~DocumentPolicyViolationReportBody() override = default; + unsigned MatchId() const override; + private: const String feature_id_; const String message_;
diff --git a/third_party/blink/renderer/core/frame/document_policy_violation_report_body_test.cc b/third_party/blink/renderer/core/frame/document_policy_violation_report_body_test.cc new file mode 100644 index 0000000..067e17f --- /dev/null +++ b/third_party/blink/renderer/core/frame/document_policy_violation_report_body_test.cc
@@ -0,0 +1,99 @@ +// Copyright 2020 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 "third_party/blink/renderer/core/frame/document_policy_violation_report_body.h" + +#include <set> +#include <vector> + +#include "testing/gtest/include/gtest/gtest.h" + +namespace blink { +namespace { + +// Test whether DocumentPolicyViolationReportBody::MatchId() is a pure function, +// i.e. same input will give same return value. The input values are randomly +// picked values. +TEST(DocumentPolicyViolationReportBodyMatchIdTest, + SameInputGeneratesSameMatchId) { + String feature_id = "feature_id"; + String message = ""; + String disposition = "enforce"; + String resource_url = ""; + EXPECT_EQ(DocumentPolicyViolationReportBody(feature_id, message, disposition, + resource_url) + .MatchId(), + DocumentPolicyViolationReportBody(feature_id, message, disposition, + resource_url) + .MatchId()); + + feature_id = "unoptimized_images"; + message = "document policy violation"; + disposition = "report"; + resource_url = "resource url"; + EXPECT_EQ(DocumentPolicyViolationReportBody(feature_id, message, disposition, + resource_url) + .MatchId(), + DocumentPolicyViolationReportBody(feature_id, message, disposition, + resource_url) + .MatchId()); +} + +bool AllDistinct(const std::vector<unsigned>& match_ids) { + return match_ids.size() == + std::set<unsigned>(match_ids.begin(), match_ids.end()).size(); +} + +const struct { + const char* feature_id; + const char* message; + const char* disposition; + const char* resource_url; +} kDocumentPolicyViolationReportBodyInputs[] = { + {"a", "", "c", "d"}, + {"a", "b", "c", ""}, + {"a", "b", "c", "d"}, + {"a", "b", "c", "e"}, +}; + +TEST(DocumentPolicyViolationReportBodyMatchIdTest, + DifferentInputsGenerateDifferentMatchId) { + std::vector<unsigned> match_ids; + for (const auto& input : kDocumentPolicyViolationReportBodyInputs) { + match_ids.push_back( + DocumentPolicyViolationReportBody(input.feature_id, input.message, + input.disposition, input.resource_url) + .MatchId()); + } + EXPECT_TRUE(AllDistinct(match_ids)); +} + +TEST(DocumentPolicyViolationReportBodyMatchIdTest, + MatchIdGeneratedShouldNotBeZero) { + std::vector<unsigned> match_ids; + for (const auto& input : kDocumentPolicyViolationReportBodyInputs) { + EXPECT_NE( + DocumentPolicyViolationReportBody(input.feature_id, input.message, + input.disposition, input.resource_url) + .MatchId(), + 0u); + } +} + +// In |DocumentPolicyViolationReportBody|, empty message string and null message +// string are both treated as empty string and a default message will be +// generated. +TEST(DocumentPolicyViolationReportBodyMatchIdTest, + EmptyMessageGenerateSameResult) { + EXPECT_EQ( + DocumentPolicyViolationReportBody("feature_id", "message", "disposition", + g_empty_string) + .MatchId(), + DocumentPolicyViolationReportBody("feature_id", "message", "disposition", + String() /* null string */) + .MatchId()); +} + +} // namespace +} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc index 58c922f8..908aa4d 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -490,6 +490,20 @@ Report* report = MakeGarbageCollected<Report>( ReportType::kDocumentPolicyViolation, Url().GetString(), body); + // Avoids sending duplicate reports, by comparing the generated MatchId. + // The match ids are not guaranteed to be unique. + // There are trade offs on storing full objects and storing match ids. Storing + // full objects takes more memory. Storing match id has the potential of hash + // collision. Since reporting is not a part critical system or have security + // concern, dropping a valid report due to hash collision seems a reasonable + // price to pay for the memory saving. + unsigned report_id = report->MatchId(); + DCHECK(report_id); + + if (document_policy_violation_reports_sent_.Contains(report_id)) + return; + document_policy_violation_reports_sent_.insert(report_id); + // Send the document policy violation report to any ReportingObservers. const base::Optional<std::string> endpoint = relevant_document_policy->GetFeatureEndpoint(feature);
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.h b/third_party/blink/renderer/core/frame/local_dom_window.h index 3f18d75..8afcc7b 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.h +++ b/third_party/blink/renderer/core/frame/local_dom_window.h
@@ -512,6 +512,11 @@ // creation. Remains valid even after the frame is destroyed and the context // is detached. const LocalFrameToken token_; + + // Tracks which document policy violation reports have already been sent in + // this document, to avoid reporting duplicates. The value stored comes + // from |DocumentPolicyViolationReport::MatchId()|. + mutable HashSet<unsigned> document_policy_violation_reports_sent_; }; template <>
diff --git a/third_party/blink/renderer/core/frame/location_report_body.cc b/third_party/blink/renderer/core/frame/location_report_body.cc index 5e37642..35b9921 100644 --- a/third_party/blink/renderer/core/frame/location_report_body.cc +++ b/third_party/blink/renderer/core/frame/location_report_body.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "third_party/blink/renderer/core/frame/location_report_body.h" +#include "third_party/blink/renderer/platform/wtf/hash_functions.h" namespace blink { @@ -38,4 +39,15 @@ } } +unsigned LocationReportBody::MatchId() const { + const base::Optional<uint32_t> line = lineNumber(), column = columnNumber(); + + unsigned hash = sourceFile().IsNull() ? 0 : sourceFile().Impl()->GetHash(); + hash = WTF::HashInts(hash, + line ? DefaultHash<uint32_t>::Hash::GetHash(*line) : 0); + hash = WTF::HashInts( + hash, column ? DefaultHash<uint32_t>::Hash::GetHash(*column) : 0); + return hash; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/location_report_body.h b/third_party/blink/renderer/core/frame/location_report_body.h index 67237e1..fc74e09 100644 --- a/third_party/blink/renderer/core/frame/location_report_body.h +++ b/third_party/blink/renderer/core/frame/location_report_body.h
@@ -56,6 +56,8 @@ void BuildJSONValue(V8ObjectBuilder& builder) const override; + unsigned MatchId() const override; + protected: const String source_file_; const base::Optional<uint32_t> line_number_;
diff --git a/third_party/blink/renderer/core/frame/location_report_body_test.cc b/third_party/blink/renderer/core/frame/location_report_body_test.cc new file mode 100644 index 0000000..d563f84 --- /dev/null +++ b/third_party/blink/renderer/core/frame/location_report_body_test.cc
@@ -0,0 +1,93 @@ +// Copyright 2020 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 "third_party/blink/renderer/core/frame/location_report_body.h" + +#include <set> +#include <vector> + +#include "testing/gtest/include/gtest/gtest.h" + +namespace blink { +namespace { + +class TestLocationReportBody : public LocationReportBody { + public: + explicit TestLocationReportBody( + const String& source_file = g_empty_string, + base::Optional<uint32_t> line_number = base::nullopt, + base::Optional<uint32_t> column_number = base::nullopt) + : LocationReportBody(source_file, line_number, column_number) {} +}; + +// Test whether LocationReportBody::MatchId() is a pure function, i.e. same +// input will give same return value. +TEST(LocationReportBodyMatchIdTest, SameInputGeneratesSameMatchId) { + String url = ""; + base::Optional<uint32_t> line = base::nullopt, column = base::nullopt; + EXPECT_EQ(TestLocationReportBody(url, line, column).MatchId(), + TestLocationReportBody(url, line, column).MatchId()); + + url = "https://example.com"; + line = base::make_optional<uint32_t>(0); + column = base::make_optional<uint32_t>(0); + EXPECT_EQ(TestLocationReportBody(url, line, column).MatchId(), + TestLocationReportBody(url, line, column).MatchId()); +} + +bool AllDistinct(const std::vector<unsigned>& match_ids) { + return match_ids.size() == + std::set<unsigned>(match_ids.begin(), match_ids.end()).size(); +} + +const struct { + const char* url; + const base::Optional<uint32_t> line_number; + const base::Optional<uint32_t> column_number; +} kLocationReportBodyInputs[] = { + {"url", base::nullopt, base::nullopt}, + {"url", 0, base::nullopt}, + {"url", base::nullopt, 0}, + {"url", 0, 0}, + {"url", 1, base::nullopt}, + {"url", base::nullopt, 1}, + {"url", 1, 1}, +}; + +TEST(LocationReportBodyMatchIdTest, DifferentInputsGenerateDifferentMatchId) { + std::vector<unsigned> match_ids; + for (const auto& input : kLocationReportBodyInputs) { + match_ids.push_back(TestLocationReportBody(input.url, input.line_number, + input.column_number) + .MatchId()); + } + EXPECT_TRUE(AllDistinct(match_ids)); +} + +TEST(LocationReportBodyMatchIdTest, MatchIdGeneratedShouldNotBeZero) { + std::vector<unsigned> match_ids; + for (const auto& input : kLocationReportBodyInputs) { + EXPECT_NE(TestLocationReportBody(input.url, input.line_number, + input.column_number) + .MatchId(), + 0u); + } +} + +// When URL is empty, LocationReportBody would call |SourceLocation::Capture()| +// to determine the location, and ignore |line_number| and |column_number| +// specified in constructor params. +TEST(LocationReportBodyMatchIdTest, + EmptyURLGenerateSameMatchIdRegardlessOfOtherParams) { + const unsigned empty_hash = + TestLocationReportBody("", base::nullopt, base::nullopt).MatchId(); + for (const auto& input : kLocationReportBodyInputs) { + EXPECT_EQ(TestLocationReportBody("", input.line_number, input.column_number) + .MatchId(), + empty_hash); + } +} + +} // namespace +} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/report.cc b/third_party/blink/renderer/core/frame/report.cc index dc75628..3d5023b 100644 --- a/third_party/blink/renderer/core/frame/report.cc +++ b/third_party/blink/renderer/core/frame/report.cc
@@ -23,4 +23,11 @@ return builder.GetScriptValue(); } +unsigned Report::MatchId() const { + unsigned hash = body()->MatchId(); + hash = WTF::HashInts(hash, url().IsNull() ? 0 : url().Impl()->GetHash()); + hash = WTF::HashInts(hash, type().Impl()->GetHash()); + return hash; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/report.h b/third_party/blink/renderer/core/frame/report.h index 4049a6b..1bca0e4 100644 --- a/third_party/blink/renderer/core/frame/report.h +++ b/third_party/blink/renderer/core/frame/report.h
@@ -29,7 +29,9 @@ public: Report(const String& type, const String& url, ReportBody* body) - : type_(type), url_(url), body_(body) {} + : type_(type), url_(url), body_(body) { + DCHECK(!type.IsNull()); + } ~Report() override = default; @@ -44,6 +46,10 @@ ScriptValue toJSON(ScriptState* script_state) const; + // Provides a hash-like value for identifying reports with same content. + // Collision of match id is possible. + unsigned MatchId() const; + private: const String type_; const String url_;
diff --git a/third_party/blink/renderer/core/frame/report_body.h b/third_party/blink/renderer/core/frame/report_body.h index b1dfeee..d7f4de3 100644 --- a/third_party/blink/renderer/core/frame/report_body.h +++ b/third_party/blink/renderer/core/frame/report_body.h
@@ -20,6 +20,10 @@ // This function is public for use in Report::toJSON virtual void BuildJSONValue(V8ObjectBuilder& builder) const = 0; + + // Provides a hash-like value for identifying reports with same content. + // Collision of match id is possible. + virtual unsigned MatchId() const { return 0; } }; } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/report_test.cc b/third_party/blink/renderer/core/frame/report_test.cc new file mode 100644 index 0000000..e242dd76 --- /dev/null +++ b/third_party/blink/renderer/core/frame/report_test.cc
@@ -0,0 +1,91 @@ +// Copyright 2020 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 "third_party/blink/renderer/core/frame/report.h" + +#include <vector> + +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/renderer/core/frame/document_policy_violation_report_body.h" +#include "third_party/blink/renderer/core/frame/feature_policy_violation_report_body.h" +#include "third_party/blink/renderer/core/frame/location_report_body.h" + +namespace blink { +namespace { + +// Test whether Report::MatchId() is a pure function, i.e. same input +// will give same return value. +// The input values are randomly picked values. +TEST(ReportMatchIdTest, SameInputGeneratesSameMatchId) { + String type = ReportType::kDocumentPolicyViolation; + String url = ""; + String feature_id = "feature_id"; + String message = ""; + String disposition = "report"; + String resource_url = ""; + ReportBody* body = MakeGarbageCollected<DocumentPolicyViolationReportBody>( + feature_id, message, disposition, resource_url); + EXPECT_EQ(Report(type, url, body).MatchId(), + Report(type, url, body).MatchId()); + + type = ReportType::kDocumentPolicyViolation; + url = "https://example.com"; + feature_id = "font-display-late-swap"; + message = "document policy violation"; + disposition = "enforce"; + resource_url = "https://example.com/resource.png"; + body = MakeGarbageCollected<DocumentPolicyViolationReportBody>( + feature_id, message, disposition, resource_url); + EXPECT_EQ(Report(type, url, body).MatchId(), + Report(type, url, body).MatchId()); +} + +bool AllDistinct(const std::vector<unsigned>& match_ids) { + return match_ids.size() == + std::set<unsigned>(match_ids.begin(), match_ids.end()).size(); +} + +const struct { + const char* feature_id; + const char* message; + const char* disposition; + const char* resource_url; + const char* url; +} kReportInputs[] = { + {"a", "b", "c", "d", ""}, + {"a", "b", "c", "d", "url"}, +}; + +TEST(ReportMatchIdTest, DifferentInputsGenerateDifferentMatchId) { + std::vector<unsigned> match_ids; + for (const auto& input : kReportInputs) { + match_ids.push_back( + Report(ReportType::kDocumentPolicyViolation, input.url, + MakeGarbageCollected<DocumentPolicyViolationReportBody>( + input.feature_id, input.message, input.disposition, + input.resource_url)) + .MatchId()); + match_ids.push_back( + Report(ReportType::kFeaturePolicyViolation, input.url, + MakeGarbageCollected<FeaturePolicyViolationReportBody>( + input.feature_id, input.message, input.disposition)) + .MatchId()); + } + EXPECT_TRUE(AllDistinct(match_ids)); +} + +TEST(ReportMatchIdTest, MatchIdGeneratedShouldNotBeZero) { + std::vector<unsigned> match_ids; + for (const auto& input : kReportInputs) { + EXPECT_NE(Report(ReportType::kDocumentPolicyViolation, input.url, + MakeGarbageCollected<DocumentPolicyViolationReportBody>( + input.feature_id, input.message, input.disposition, + input.resource_url)) + .MatchId(), + 0u); + } +} + +} // namespace +} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/reporting_context.h b/third_party/blink/renderer/core/frame/reporting_context.h index 4e914b6..51bee8b 100644 --- a/third_party/blink/renderer/core/frame/reporting_context.h +++ b/third_party/blink/renderer/core/frame/reporting_context.h
@@ -22,10 +22,9 @@ // ReportingContext processes all reports for an ExecutionContext, and serves as // a container for all active ReportingObservers on that ExecutionContext. -class CORE_EXPORT ReportingContext final - : public GarbageCollected<ReportingContext>, - public mojom::blink::ReportingObserver, - public Supplement<ExecutionContext> { +class CORE_EXPORT ReportingContext : public GarbageCollected<ReportingContext>, + public mojom::blink::ReportingObserver, + public Supplement<ExecutionContext> { public: static const char kSupplementName[]; @@ -40,7 +39,8 @@ void Bind(mojo::PendingReceiver<mojom::blink::ReportingObserver> receiver); // Queues a report for the Reporting API and in all registered observers. - void QueueReport(Report*, const Vector<String>& endpoints = {"default"}); + virtual void QueueReport(Report*, + const Vector<String>& endpoints = {"default"}); void RegisterObserver(blink::ReportingObserver*); void UnregisterObserver(blink::ReportingObserver*);
diff --git a/third_party/blink/renderer/core/frame/visual_viewport_test.cc b/third_party/blink/renderer/core/frame/visual_viewport_test.cc index adec92f..60927e0 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport_test.cc +++ b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
@@ -897,17 +897,17 @@ VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport(); To<LocalFrame>(WebView()->GetPage()->MainFrame())->SetInitialFocus(false); - WebRect original_anchor; - WebRect original_focus; - WebView()->MainFrameViewWidget()->SelectionBounds(original_anchor, - original_focus); + gfx::Rect original_anchor; + gfx::Rect original_focus; + WebView()->MainFrameViewWidget()->CalculateSelectionBounds(original_anchor, + original_focus); WebView()->SetPageScaleFactor(2); visual_viewport.SetLocation(FloatPoint(100, 400)); - WebRect anchor; - WebRect focus; - WebView()->MainFrameViewWidget()->SelectionBounds(anchor, focus); + gfx::Rect anchor; + gfx::Rect focus; + WebView()->MainFrameViewWidget()->CalculateSelectionBounds(anchor, focus); IntPoint expected(IntRect(original_anchor).Location()); expected.MoveBy(-FlooredIntPoint(visual_viewport.VisibleRect().Location())); @@ -1069,29 +1069,30 @@ RegisterMockedHttpURLLoad("move_range.html"); NavigateTo(base_url_ + "move_range.html"); - WebRect base_rect; - WebRect extent_rect; + gfx::Rect base_rect; + gfx::Rect extent_rect; WebView()->SetPageScaleFactor(2); - WebLocalFrame* mainFrame = WebView()->MainFrameImpl(); + WebLocalFrame* main_frame = WebView()->MainFrameImpl(); // Select some text and get the base and extent rects (that's the start of // the range and its end). Do a sanity check that the expected text is // selected - mainFrame->ExecuteScript(WebScriptSource("selectRange();")); - EXPECT_EQ("ir", mainFrame->SelectionAsText().Utf8()); + main_frame->ExecuteScript(WebScriptSource("selectRange();")); + EXPECT_EQ("ir", main_frame->SelectionAsText().Utf8()); - WebView()->MainFrameViewWidget()->SelectionBounds(base_rect, extent_rect); - gfx::Point initialPoint(base_rect.x, base_rect.y); - gfx::Point endPoint(extent_rect.x, extent_rect.y); + WebView()->MainFrameViewWidget()->CalculateSelectionBounds(base_rect, + extent_rect); + gfx::Point initial_point = base_rect.origin(); + gfx::Point end_point = extent_rect.origin(); // Move the visual viewport over and make the selection in the same // screen-space location. The selection should change to two characters to the // right and down one line. VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport(); visual_viewport.Move(ScrollOffset(60, 25)); - mainFrame->MoveRangeSelection(initialPoint, endPoint); - EXPECT_EQ("t ", mainFrame->SelectionAsText().Utf8()); + main_frame->MoveRangeSelection(initial_point, end_point); + EXPECT_EQ("t ", main_frame->SelectionAsText().Utf8()); } // Test that resizing the WebView causes ViewportConstrained objects to
diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_base.cc b/third_party/blink/renderer/core/frame/web_frame_widget_base.cc index b548550..e99bc26 100644 --- a/third_party/blink/renderer/core/frame/web_frame_widget_base.cc +++ b/third_party/blink/renderer/core/frame/web_frame_widget_base.cc
@@ -53,6 +53,7 @@ #include "third_party/blink/renderer/core/page/focus_controller.h" #include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/page/pointer_lock_controller.h" +#include "third_party/blink/renderer/core/paint/paint_timing_detector.h" #include "third_party/blink/renderer/core/scroll/scrollbar_theme.h" #include "third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.h" #include "third_party/blink/renderer/platform/graphics/compositor_mutator_client.h" @@ -151,17 +152,6 @@ } // namespace -// Ensure that the DragOperation enum values stay in sync with the original -// DragOperation constants. -// STATIC_ASSERT_ENUM(kDragOperationNone, kDragOperationNone); -// STATIC_ASSERT_ENUM(kDragOperationCopy, kDragOperationCopy); -// STATIC_ASSERT_ENUM(kDragOperationLink, kDragOperationLink); -// STATIC_ASSERT_ENUM(kDragOperationGeneric, kDragOperationGeneric); -// STATIC_ASSERT_ENUM(kDragOperationPrivate, kDragOperationPrivate); -// STATIC_ASSERT_ENUM(kDragOperationMove, kDragOperationMove); -// STATIC_ASSERT_ENUM(kDragOperationDelete, kDragOperationDelete); -// STATIC_ASSERT_ENUM(kDragOperationEvery, kDragOperationEvery); - bool WebFrameWidgetBase::ignore_input_events_ = false; WebFrameWidgetBase::WebFrameWidgetBase( @@ -1630,13 +1620,13 @@ *anchor = *focus; return true; } - WebRect focus_webrect; - WebRect anchor_webrect; - SelectionBounds(focus_webrect, anchor_webrect); + gfx::Rect focus_root_frame; + gfx::Rect anchor_root_frame; + CalculateSelectionBounds(focus_root_frame, anchor_root_frame); gfx::Rect focus_rect_in_dips = - widget_base_->BlinkSpaceToEnclosedDIPs(gfx::Rect(focus_webrect)); + widget_base_->BlinkSpaceToEnclosedDIPs(gfx::Rect(focus_root_frame)); gfx::Rect anchor_rect_in_dips = - widget_base_->BlinkSpaceToEnclosedDIPs(gfx::Rect(anchor_webrect)); + widget_base_->BlinkSpaceToEnclosedDIPs(gfx::Rect(anchor_root_frame)); // if the bounds are the same return false. if (focus_rect_in_dips == *focus && anchor_rect_in_dips == *anchor) @@ -2310,4 +2300,21 @@ } } +void WebFrameWidgetBase::NotifyInputObservers( + const WebCoalescedInputEvent& coalesced_event) { + LocalFrame* frame = FocusedLocalFrameInWidget(); + if (!frame) + return; + + LocalFrameView* frame_view = frame->View(); + if (!frame_view) + return; + + const WebInputEvent& input_event = coalesced_event.Event(); + auto& paint_timing_detector = frame_view->GetPaintTimingDetector(); + + if (paint_timing_detector.NeedToNotifyInputOrScroll()) + paint_timing_detector.NotifyInputEvent(input_event.GetType()); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_base.h b/third_party/blink/renderer/core/frame/web_frame_widget_base.h index e43d17c..ee995ef 100644 --- a/third_party/blink/renderer/core/frame/web_frame_widget_base.h +++ b/third_party/blink/renderer/core/frame/web_frame_widget_base.h
@@ -554,6 +554,11 @@ virtual void ApplyVisualPropertiesSizing( const VisualProperties& visual_properties) = 0; + // Calculates the selection bounds in the root frame. Returns bounds unchanged + // when there is no focused frame or no selection. + virtual void CalculateSelectionBounds(gfx::Rect& anchor_in_root_frame, + gfx::Rect& focus_in_root_frame) = 0; + // Update the surface allocation information, compositor viewport rect and // screen info on the widget. void UpdateSurfaceAndScreenInfo( @@ -602,6 +607,11 @@ void NotifyPageScaleFactorChanged(float page_scale_factor, bool is_pinch_gesture_active); + // Helper for notifying frame-level objects that care about input events. + // TODO: With some effort, this could be folded into a common implementation + // of WebViewImpl::HandleInputEvent and WebFrameWidgetImpl::HandleInputEvent. + void NotifyInputObservers(const WebCoalescedInputEvent& coalesced_event); + // A copy of the web drop data object we received from the browser. Member<DataObject> current_drag_data_;
diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc index a3602fe..e30bef9 100644 --- a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc +++ b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
@@ -490,6 +490,8 @@ return WebInputEventResult::kHandledSystem; } + NotifyInputObservers(coalesced_event); + if (mouse_capture_element_ && WebInputEvent::IsMouseEventType(input_event.GetType())) { TRACE_EVENT1("input", "captured mouse event", "type", @@ -659,22 +661,21 @@ NOTREACHED(); } -bool WebFrameWidgetImpl::SelectionBounds(WebRect& anchor_web, - WebRect& focus_web) const { +void WebFrameWidgetImpl::CalculateSelectionBounds(gfx::Rect& anchor_root_frame, + gfx::Rect& focus_root_frame) { const LocalFrame* local_frame = FocusedLocalFrameInWidget(); if (!local_frame) - return false; + return; IntRect anchor; IntRect focus; if (!local_frame->Selection().ComputeAbsoluteBounds(anchor, focus)) - return false; + return; // FIXME: This doesn't apply page scale. This should probably be contents to // viewport. crbug.com/459293. - anchor_web = local_frame->View()->ConvertToRootFrame(anchor); - focus_web = local_frame->View()->ConvertToRootFrame(focus); - return true; + anchor_root_frame = local_frame->View()->ConvertToRootFrame(anchor); + focus_root_frame = local_frame->View()->ConvertToRootFrame(focus); } void WebFrameWidgetImpl::SetRemoteViewportIntersection(
diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_impl.h b/third_party/blink/renderer/core/frame/web_frame_widget_impl.h index 74250b4..e26903e 100644 --- a/third_party/blink/renderer/core/frame/web_frame_widget_impl.h +++ b/third_party/blink/renderer/core/frame/web_frame_widget_impl.h
@@ -67,6 +67,11 @@ class WebMouseWheelEvent; class WebFrameWidgetImpl; +// Implements WebFrameWidget for a child local root frame (OOPIF). This object +// is created in the child renderer and attached to the OOPIF's WebLocalFrame. +// +// For the main frame's WebFrameWidget implementation, see WebViewFrameWidget. +// class WebFrameWidgetImpl final : public WebFrameWidgetBase, public PageWidgetEventHandler { public: @@ -99,7 +104,6 @@ void SetCursorVisibilityState(bool is_visible) override; void MouseCaptureLost() override; - bool SelectionBounds(WebRect& anchor, WebRect& focus) const override; void SetRemoteViewportIntersection(const ViewportIntersectionState&) override; void SetIsInertForSubFrame(bool) override; void SetInheritedEffectiveTouchActionForSubFrame(TouchAction) override; @@ -136,6 +140,7 @@ float device_scale_factor) override; void ApplyVisualPropertiesSizing( const VisualProperties& visual_properties) override; + void CalculateSelectionBounds(gfx::Rect& anchor, gfx::Rect& focus) override; // FrameWidget overrides: void SetRootLayer(scoped_refptr<cc::Layer>) override;
diff --git a/third_party/blink/renderer/core/frame/web_view_frame_widget.cc b/third_party/blink/renderer/core/frame/web_view_frame_widget.cc index cfd1be3..9206d38 100644 --- a/third_party/blink/renderer/core/frame/web_view_frame_widget.cc +++ b/third_party/blink/renderer/core/frame/web_view_frame_widget.cc
@@ -5,9 +5,11 @@ #include "third_party/blink/renderer/core/frame/web_view_frame_widget.h" #include "third_party/blink/public/platform/platform.h" +#include "third_party/blink/renderer/core/editing/frame_selection.h" #include "third_party/blink/renderer/core/exported/web_view_impl.h" #include "third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.h" #include "third_party/blink/renderer/core/frame/screen_metrics_emulator.h" +#include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" #include "third_party/blink/renderer/platform/scheduler/public/thread.h" #include "third_party/blink/renderer/platform/widget/widget_base.h" @@ -202,9 +204,27 @@ return 1.0f; } -bool WebViewFrameWidget::SelectionBounds(WebRect& anchor, - WebRect& focus) const { - return web_view_->SelectionBounds(anchor, focus); +void WebViewFrameWidget::CalculateSelectionBounds(gfx::Rect& anchor_root_frame, + gfx::Rect& focus_root_frame) { + const Frame* frame = View()->FocusedCoreFrame(); + const auto* local_frame = DynamicTo<LocalFrame>(frame); + if (!local_frame) + return; + + LocalFrameView* frame_view = local_frame->View(); + if (!frame_view) + return; + + IntRect anchor; + IntRect focus; + if (!local_frame->Selection().ComputeAbsoluteBounds(anchor, focus)) + return; + + VisualViewport& visual_viewport = GetPage()->GetVisualViewport(); + anchor_root_frame = visual_viewport.RootFrameToViewport( + frame_view->ConvertToRootFrame(anchor)); + focus_root_frame = visual_viewport.RootFrameToViewport( + frame_view->ConvertToRootFrame(focus)); } WebURL WebViewFrameWidget::GetURLForDebugTrace() {
diff --git a/third_party/blink/renderer/core/frame/web_view_frame_widget.h b/third_party/blink/renderer/core/frame/web_view_frame_widget.h index 1d98679..4cd79d7 100644 --- a/third_party/blink/renderer/core/frame/web_view_frame_widget.h +++ b/third_party/blink/renderer/core/frame/web_view_frame_widget.h
@@ -68,7 +68,6 @@ WebInputEventResult DispatchBufferedTouchEvents() override; void SetCursorVisibilityState(bool is_visible) override; void MouseCaptureLost() override; - bool SelectionBounds(WebRect& anchor, WebRect& focus) const override; WebURL GetURLForDebugTrace() override; WebString GetLastToolTipTextForTesting() const override; @@ -103,6 +102,7 @@ const ScreenInfo& GetOriginalScreenInfo() override; void ApplyVisualPropertiesSizing( const VisualProperties& visual_properties) override; + void CalculateSelectionBounds(gfx::Rect& anchor, gfx::Rect& focus) override; // FrameWidget overrides: void SetRootLayer(scoped_refptr<cc::Layer>) override;
diff --git a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc index 9219e785..95c9713 100644 --- a/third_party/blink/renderer/core/html/forms/html_text_area_element.cc +++ b/third_party/blink/renderer/core/html/forms/html_text_area_element.cc
@@ -214,10 +214,16 @@ } } +bool HTMLTextAreaElement::TypeShouldForceLegacyLayout() const { + if (RuntimeEnabledFeatures::LayoutNGTextAreaEnabled()) + return false; + UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutByTextControl); + return true; +} + LayoutObject* HTMLTextAreaElement::CreateLayoutObject( const ComputedStyle& style, LegacyLayout legacy) { - UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutByTextControl); return LayoutObjectFactory::CreateTextControlMultiLine(*this, style, legacy); }
diff --git a/third_party/blink/renderer/core/html/forms/html_text_area_element.h b/third_party/blink/renderer/core/html/forms/html_text_area_element.h index 8700e49..c490877 100644 --- a/third_party/blink/renderer/core/html/forms/html_text_area_element.h +++ b/third_party/blink/renderer/core/html/forms/html_text_area_element.h
@@ -117,7 +117,7 @@ const QualifiedName&, const AtomicString&, MutableCSSPropertyValueSet*) override; - bool TypeShouldForceLegacyLayout() const override { return true; } + bool TypeShouldForceLegacyLayout() const override; LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override; void AppendToFormData(FormData&) override; void ResetImpl() override;
diff --git a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc index 28e87ca..6db69ba 100644 --- a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc +++ b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.cc
@@ -64,6 +64,10 @@ return style; } +bool EditingViewPortElement::TypeShouldForceLegacyLayout() const { + return !RuntimeEnabledFeatures::LayoutNGTextFieldEnabled(); +} + // --------------------------- TextControlInnerEditorElement::TextControlInnerEditorElement(Document& document) @@ -118,6 +122,12 @@ style_change_reason::kControl)); } +bool TextControlInnerEditorElement::TypeShouldForceLegacyLayout() const { + if (OwnerShadowHost()->HasTagName(html_names::kInputTag)) + return !RuntimeEnabledFeatures::LayoutNGTextFieldEnabled(); + return !RuntimeEnabledFeatures::LayoutNGTextAreaEnabled(); +} + LayoutObject* TextControlInnerEditorElement::CreateLayoutObject( const ComputedStyle& style, LegacyLayout legacy) { @@ -241,6 +251,10 @@ return HTMLDivElement::WillRespondToMouseClickEvents(); } +bool SearchFieldCancelButtonElement::TypeShouldForceLegacyLayout() const { + return !RuntimeEnabledFeatures::LayoutNGTextFieldEnabled(); +} + // ---------------------------- PasswordRevealButtonElement::PasswordRevealButtonElement(Document& document)
diff --git a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.h b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.h index 77206a9..4be63f67 100644 --- a/third_party/blink/renderer/core/html/forms/text_control_inner_elements.h +++ b/third_party/blink/renderer/core/html/forms/text_control_inner_elements.h
@@ -40,7 +40,7 @@ scoped_refptr<ComputedStyle> CustomStyleForLayoutObject() override; private: - bool TypeShouldForceLegacyLayout() const final { return true; } + bool TypeShouldForceLegacyLayout() const final; bool SupportsFocus() const override { return false; } }; @@ -56,7 +56,7 @@ private: LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override; - bool TypeShouldForceLegacyLayout() const final { return true; } + bool TypeShouldForceLegacyLayout() const final; scoped_refptr<ComputedStyle> CustomStyleForLayoutObject() override; bool SupportsFocus() const override { return false; } bool is_visible_ = true; @@ -70,7 +70,7 @@ bool WillRespondToMouseClickEvents() override; private: - bool TypeShouldForceLegacyLayout() const final { return true; } + bool TypeShouldForceLegacyLayout() const final; bool SupportsFocus() const override { return false; } };
diff --git a/third_party/blink/renderer/core/html/forms/text_field_input_type.cc b/third_party/blink/renderer/core/html/forms/text_field_input_type.cc index 39bd23d7..0853397 100644 --- a/third_party/blink/renderer/core/html/forms/text_field_input_type.cc +++ b/third_party/blink/renderer/core/html/forms/text_field_input_type.cc
@@ -277,14 +277,16 @@ } bool TextFieldInputType::TypeShouldForceLegacyLayout() const { + if (RuntimeEnabledFeatures::LayoutNGTextFieldEnabled()) + return false; + UseCounter::Count(GetElement().GetDocument(), + WebFeature::kLegacyLayoutByTextControl); return true; } LayoutObject* TextFieldInputType::CreateLayoutObject( const ComputedStyle& style, LegacyLayout legacy) const { - UseCounter::Count(GetElement().GetDocument(), - WebFeature::kLegacyLayoutByTextControl); return LayoutObjectFactory::CreateTextControlSingleLine(GetElement(), style, legacy); }
diff --git a/third_party/blink/renderer/core/html/html_rt_element.cc b/third_party/blink/renderer/core/html/html_rt_element.cc index e159d11..548e222 100644 --- a/third_party/blink/renderer/core/html/html_rt_element.cc +++ b/third_party/blink/renderer/core/html/html_rt_element.cc
@@ -5,28 +5,19 @@ #include "third_party/blink/renderer/core/html/html_rt_element.h" #include "third_party/blink/renderer/core/html_names.h" -#include "third_party/blink/renderer/core/layout/layout_ruby_text.h" -#include "third_party/blink/renderer/core/layout/ng/layout_ng_ruby_text.h" +#include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/layout_object_factory.h" +#include "third_party/blink/renderer/core/style/computed_style.h" namespace blink { HTMLRTElement::HTMLRTElement(Document& document) : HTMLElement(html_names::kRtTag, document) {} -bool HTMLRTElement::TypeShouldForceLegacyLayout() const { - return !RuntimeEnabledFeatures::LayoutNGRubyEnabled(); -} - LayoutObject* HTMLRTElement::CreateLayoutObject(const ComputedStyle& style, LegacyLayout legacy) { - if (style.Display() == EDisplay::kBlock) { - if (!RuntimeEnabledFeatures::LayoutNGRubyEnabled() || - legacy == LegacyLayout::kForce) { - UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutByRuby); - return new LayoutRubyText(this); - } - return new LayoutNGRubyText(this); - } + if (style.Display() == EDisplay::kBlock) + return LayoutObjectFactory::CreateRubyText(this, style, legacy); return LayoutObject::CreateObject(this, style, legacy); }
diff --git a/third_party/blink/renderer/core/html/html_rt_element.h b/third_party/blink/renderer/core/html/html_rt_element.h index 9b296cf8..3b2fe46 100644 --- a/third_party/blink/renderer/core/html/html_rt_element.h +++ b/third_party/blink/renderer/core/html/html_rt_element.h
@@ -17,7 +17,6 @@ private: LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override; - bool TypeShouldForceLegacyLayout() const final; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_ruby_element.cc b/third_party/blink/renderer/core/html/html_ruby_element.cc index 9245cf9..52f5b9a 100644 --- a/third_party/blink/renderer/core/html/html_ruby_element.cc +++ b/third_party/blink/renderer/core/html/html_ruby_element.cc
@@ -7,20 +7,12 @@ #include "third_party/blink/renderer/core/html_names.h" #include "third_party/blink/renderer/core/layout/layout_object_factory.h" #include "third_party/blink/renderer/core/layout/layout_ruby.h" -#include "third_party/blink/renderer/platform/runtime_enabled_features.h" namespace blink { HTMLRubyElement::HTMLRubyElement(Document& document) : HTMLElement(html_names::kRubyTag, document) {} -bool HTMLRubyElement::TypeShouldForceLegacyLayout() const { - if (RuntimeEnabledFeatures::LayoutNGRubyEnabled()) - return false; - UseCounter::Count(GetDocument(), WebFeature::kLegacyLayoutByRuby); - return true; -} - LayoutObject* HTMLRubyElement::CreateLayoutObject(const ComputedStyle& style, LegacyLayout legacy) { if (style.Display() == EDisplay::kInline)
diff --git a/third_party/blink/renderer/core/html/html_ruby_element.h b/third_party/blink/renderer/core/html/html_ruby_element.h index 71a4df0..341ae61 100644 --- a/third_party/blink/renderer/core/html/html_ruby_element.h +++ b/third_party/blink/renderer/core/html/html_ruby_element.h
@@ -17,7 +17,6 @@ private: LayoutObject* CreateLayoutObject(const ComputedStyle&, LegacyLayout) override; - bool TypeShouldForceLegacyLayout() const final; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/html/lazy_load_image_observer.cc b/third_party/blink/renderer/core/html/lazy_load_image_observer.cc index 90f6f81..ed86e3b 100644 --- a/third_party/blink/renderer/core/html/lazy_load_image_observer.cc +++ b/third_party/blink/renderer/core/html/lazy_load_image_observer.cc
@@ -84,8 +84,12 @@ return true; for (Node& ancestor : FlatTreeTraversal::InclusiveAncestorsOf(element)) { auto* ancestor_element = DynamicTo<Element>(ancestor); - if (!ancestor_element) + if (!ancestor_element) { + // Return true if the whole frame is not rendered. + if (ancestor.IsDocumentNode() && !ancestor.GetLayoutObject()) + return true; continue; + } const ComputedStyle* style = ancestor_element->EnsureComputedStyle(); if (style && (style->Visibility() != EVisibility::kVisible || style->Display() == EDisplay::kNone)) {
diff --git a/third_party/blink/renderer/core/layout/BUILD.gn b/third_party/blink/renderer/core/layout/BUILD.gn index 5c11e22..875e961 100644 --- a/third_party/blink/renderer/core/layout/BUILD.gn +++ b/third_party/blink/renderer/core/layout/BUILD.gn
@@ -4,13 +4,6 @@ import("//third_party/blink/renderer/core/core.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - blink_core_sources("layout") { sources = [ "api/hit_test_action.h", @@ -228,8 +221,6 @@ "layout_theme_default.h", "layout_theme_font_provider.cc", "layout_theme_font_provider.h", - "layout_theme_mac.h", - "layout_theme_mac.mm", "layout_theme_mobile.cc", "layout_theme_mobile.h", "layout_tree_as_text.cc", @@ -637,6 +628,13 @@ "view_fragmentation_context.h", ] + if (is_mac) { + sources += [ + "layout_theme_mac.h", + "layout_theme_mac.mm", + ] + } + if (is_win) { sources += [ "layout_theme_font_provider_win.cc",
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index 9e29aa37..228b17a 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -5129,6 +5129,16 @@ } } + if (ShouldComputeLogicalHeightFromAspectRatio()) { + NGBoxStrut border_padding(BorderStart() + ComputedCSSPaddingStart(), + BorderEnd() + ComputedCSSPaddingEnd(), + BorderBefore() + ComputedCSSPaddingBefore(), + BorderAfter() + ComputedCSSPaddingAfter()); + return BlockSizeFromAspectRatio(border_padding, + StyleRef().LogicalAspectRatio(), + StyleRef().BoxSizing(), LogicalWidth()); + } + if (h.IsPercentOrCalc() && IsOutOfFlowPositioned()) { // FIXME: This is wrong if the containingBlock has a perpendicular writing // mode.
diff --git a/third_party/blink/renderer/core/layout/layout_object_factory.cc b/third_party/blink/renderer/core/layout/layout_object_factory.cc index 1d189570..d67ea5ad 100644 --- a/third_party/blink/renderer/core/layout/layout_object_factory.cc +++ b/third_party/blink/renderer/core/layout/layout_object_factory.cc
@@ -38,6 +38,7 @@ #include "third_party/blink/renderer/core/layout/ng/layout_ng_fieldset.h" #include "third_party/blink/renderer/core/layout/ng/layout_ng_progress.h" #include "third_party/blink/renderer/core/layout/ng/layout_ng_ruby_as_block.h" +#include "third_party/blink/renderer/core/layout/ng/layout_ng_ruby_text.h" #include "third_party/blink/renderer/core/layout/ng/layout_ng_text_control_inner_editor.h" #include "third_party/blink/renderer/core/layout/ng/layout_ng_text_control_multi_line.h" #include "third_party/blink/renderer/core/layout/ng/layout_ng_text_control_single_line.h" @@ -343,6 +344,12 @@ legacy); } +LayoutObject* LayoutObjectFactory::CreateRubyText(Node* node, + const ComputedStyle& style, + LegacyLayout legacy) { + return CreateObject<LayoutRubyText, LayoutNGRubyText>(*node, style, legacy); +} + LayoutBox* LayoutObjectFactory::CreateAnonymousTableWithParent( const LayoutObject& parent) { scoped_refptr<ComputedStyle> new_style =
diff --git a/third_party/blink/renderer/core/layout/layout_object_factory.h b/third_party/blink/renderer/core/layout/layout_object_factory.h index 5877295..a1ed82d5 100644 --- a/third_party/blink/renderer/core/layout/layout_object_factory.h +++ b/third_party/blink/renderer/core/layout/layout_object_factory.h
@@ -98,6 +98,9 @@ static LayoutRubyAsBlock* CreateRubyAsBlock(Node* node, const ComputedStyle& style, LegacyLayout legacy); + static LayoutObject* CreateRubyText(Node* node, + const ComputedStyle& style, + LegacyLayout legacy); // Anonoymous creation methods
diff --git a/third_party/blink/renderer/core/layout/layout_replaced.cc b/third_party/blink/renderer/core/layout/layout_replaced.cc index 5cdc05cc0..0c8d304 100644 --- a/third_party/blink/renderer/core/layout/layout_replaced.cc +++ b/third_party/blink/renderer/core/layout/layout_replaced.cc
@@ -178,6 +178,14 @@ // Reset the size in case it was already populated. intrinsic_sizing_info.size = FloatSize(); + const StyleAspectRatio& aspect_ratio = StyleRef().AspectRatio(); + if (!aspect_ratio.IsAuto()) { + intrinsic_sizing_info.aspect_ratio.SetWidth( + aspect_ratio.GetRatio().Width()); + intrinsic_sizing_info.aspect_ratio.SetHeight( + aspect_ratio.GetRatio().Height()); + } + // If any of the dimensions are overridden, set those sizes. if (HasOverrideIntrinsicContentLogicalWidth()) { intrinsic_sizing_info.size.SetWidth(
diff --git a/third_party/blink/renderer/core/layout/layout_ruby_base.cc b/third_party/blink/renderer/core/layout/layout_ruby_base.cc index 0b662f3..bd4929b 100644 --- a/third_party/blink/renderer/core/layout/layout_ruby_base.cc +++ b/third_party/blink/renderer/core/layout/layout_ruby_base.cc
@@ -46,7 +46,6 @@ const LayoutRubyRun& ruby_run) { LayoutRubyBase* layout_object; if (ruby_run.IsLayoutNGObject()) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); layout_object = new LayoutNGRubyBase(); } else { layout_object = new LayoutRubyBase(nullptr);
diff --git a/third_party/blink/renderer/core/layout/layout_ruby_run.cc b/third_party/blink/renderer/core/layout/layout_ruby_run.cc index d5b60b55..70aa4f21 100644 --- a/third_party/blink/renderer/core/layout/layout_ruby_run.cc +++ b/third_party/blink/renderer/core/layout/layout_ruby_run.cc
@@ -208,8 +208,7 @@ DCHECK(parent_ruby); DCHECK(parent_ruby->IsRuby()); LayoutRubyRun* rr; - if (RuntimeEnabledFeatures::LayoutNGRubyEnabled() && - containing_block.IsLayoutNGObject()) { + if (containing_block.IsLayoutNGObject()) { rr = new LayoutNGRubyRun(); } else { rr = new LayoutRubyRun(nullptr);
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_ruby_utils.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_ruby_utils.cc index 94e6235..8cb92ad 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_ruby_utils.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_ruby_utils.cc
@@ -11,7 +11,6 @@ #include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.h" #include "third_party/blink/renderer/platform/fonts/font_height.h" -#include "third_party/blink/renderer/platform/runtime_enabled_features.h" namespace blink { @@ -100,7 +99,6 @@ // See LayoutRubyRun::GetOverhang(). NGAnnotationOverhang GetOverhang(const NGInlineItemResult& item) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); NGAnnotationOverhang overhang; if (!item.layout_result) return overhang; @@ -166,7 +164,6 @@ LayoutUnit& start_overhang) { if (start_overhang <= LayoutUnit()) return false; - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); const NGInlineItemResults& items = line_info.Results(); // Requires at least the current item and the previous item. if (items.size() < 2) @@ -193,7 +190,6 @@ // See LayoutRubyRun::GetOverhang(). LayoutUnit CommitPendingEndOverhang(NGLineInfo* line_info) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); DCHECK(line_info); NGInlineItemResults* items = line_info->MutableResults(); if (items->size() < 2U) @@ -235,7 +231,6 @@ const FontHeight& line_box_metrics, LayoutUnit line_over, const ComputedStyle& line_style) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); // Min/max position of content and annotations, ignoring line-height. LayoutUnit content_over = line_over + line_box_metrics.ascent; LayoutUnit content_under = content_over;
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 5668bb86..49deb7b 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
@@ -759,7 +759,6 @@ // can extend on the padding. So we decrease logical_block_offset by // shareable part of the annotation overflow and the padding. if (previous_inflow_position->block_end_annotation_space < LayoutUnit()) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); const LayoutUnit annotation_overflow = -previous_inflow_position->block_end_annotation_space; previous_inflow_position->logical_block_offset -= @@ -2775,7 +2774,6 @@ void NGBlockLayoutAlgorithm::LayoutRubyText( NGLayoutInputNode* ruby_text_child) { - DCHECK(RuntimeEnabledFeatures::LayoutNGRubyEnabled()); DCHECK(Node().IsRubyRun()); scoped_refptr<const NGBlockBreakToken> break_token;
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc index 5025a29..cfeac02 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
@@ -717,7 +717,7 @@ Style().IsFlippedBlocksWritingMode()); block_flow->SetPaintFragment(break_token, &physical_fragment); } else if (items) { - CopyFragmentItemsToLayoutBox(physical_fragment, *items); + CopyFragmentItemsToLayoutBox(physical_fragment, *items, break_token); } } else { // We still need to clear paint fragments in case it had inline children, @@ -1204,7 +1204,7 @@ // (but rather inside fragment items). Make sure that they get positioned, // too. if (const NGFragmentItems* items = column->Items()) - CopyFragmentItemsToLayoutBox(*column, *items); + CopyFragmentItemsToLayoutBox(*column, *items, previous_break_token); previous_break_token = To<NGBlockBreakToken>(column->BreakToken()); } @@ -1298,9 +1298,13 @@ void NGBlockNode::CopyFragmentItemsToLayoutBox( const NGPhysicalBoxFragment& container, - const NGFragmentItems& items) const { + const NGFragmentItems& items, + const NGBlockBreakToken* previous_break_token) const { DCHECK(RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()); + LayoutUnit previously_consumed_block_size; + if (previous_break_token) + previously_consumed_block_size = previous_break_token->ConsumedBlockSize(); bool initial_container_is_flipped = Style().IsFlippedBlocksWritingMode(); for (NGInlineCursor cursor(items); cursor; cursor.MoveToNext()) { if (const NGPhysicalBoxFragment* child = cursor.Current().BoxFragment()) { @@ -1317,6 +1321,10 @@ child->Size().width - maybe_flipped_offset.left; } + if (container.Style().IsHorizontalWritingMode()) + maybe_flipped_offset.top += previously_consumed_block_size; + else + maybe_flipped_offset.left += previously_consumed_block_size; layout_box->SetLocationAndUpdateOverflowControlsIfNeeded( maybe_flipped_offset.ToLayoutPoint()); if (UNLIKELY(layout_box->HasSelfPaintingLayer()))
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_node.h b/third_party/blink/renderer/core/layout/ng/ng_block_node.h index 1b5894c..81013149 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_node.h +++ b/third_party/blink/renderer/core/layout/ng/ng_block_node.h
@@ -206,8 +206,10 @@ const NGConstraintSpace&, const NGLayoutResult&, const NGBlockBreakToken* previous_break_token) const; - void CopyFragmentItemsToLayoutBox(const NGPhysicalBoxFragment& container, - const NGFragmentItems& items) const; + void CopyFragmentItemsToLayoutBox( + const NGPhysicalBoxFragment& container, + const NGFragmentItems& items, + const NGBlockBreakToken* previous_break_token) const; void CopyFragmentDataToLayoutBoxForInlineChildren( const NGPhysicalContainerFragment& container, LayoutUnit initial_container_width,
diff --git a/third_party/blink/renderer/core/layout/svg/BUILD.gn b/third_party/blink/renderer/core/layout/svg/BUILD.gn index b01361cc..26b5d06 100644 --- a/third_party/blink/renderer/core/layout/svg/BUILD.gn +++ b/third_party/blink/renderer/core/layout/svg/BUILD.gn
@@ -44,7 +44,6 @@ "layout_svg_resource_marker.h", "layout_svg_resource_masker.cc", "layout_svg_resource_masker.h", - "layout_svg_resource_paint_server.cc", "layout_svg_resource_paint_server.h", "layout_svg_resource_pattern.cc", "layout_svg_resource_pattern.h",
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.cc index 6d4fba89..f120756 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.cc
@@ -25,6 +25,7 @@ #include <memory> #include "third_party/blink/renderer/platform/graphics/gradient.h" +#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" namespace blink { @@ -97,22 +98,28 @@ return gradient_data; } -SVGPaintServer LayoutSVGResourceGradient::PreparePaintServer( +bool LayoutSVGResourceGradient::ApplyShader( const SVGResourceClient& client, - const FloatRect& object_bounding_box) { + const FloatRect& reference_box, + const AffineTransform* additional_transform, + PaintFlags& flags) { NOT_DESTROYED(); ClearInvalidationMask(); std::unique_ptr<GradientData>& gradient_data = gradient_map_->insert(&client, nullptr).stored_value->value; if (!gradient_data) - gradient_data = BuildGradientData(object_bounding_box); + gradient_data = BuildGradientData(reference_box); if (!gradient_data->gradient) - return SVGPaintServer::Invalid(); + return false; - return SVGPaintServer(gradient_data->gradient, - gradient_data->userspace_transform); + AffineTransform transform = gradient_data->userspace_transform; + if (additional_transform) + transform = *additional_transform * transform; + gradient_data->gradient->ApplyToFlags(flags, + AffineTransformToSkMatrix(transform)); + return true; } bool LayoutSVGResourceGradient::IsChildAllowed(LayoutObject* child,
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.h b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.h index 530933fd..ed810fb 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.h +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_gradient.h
@@ -39,8 +39,10 @@ void RemoveAllClientsFromCache() final; bool RemoveClientFromCache(SVGResourceClient&) final; - SVGPaintServer PreparePaintServer(const SVGResourceClient&, - const FloatRect& object_bounding_box) final; + bool ApplyShader(const SVGResourceClient&, + const FloatRect& reference_box, + const AffineTransform* additional_transform, + PaintFlags&) final; bool IsChildAllowed(LayoutObject* child, const ComputedStyle&) const final;
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc deleted file mode 100644 index 99ba54e..0000000 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.cc +++ /dev/null
@@ -1,181 +0,0 @@ -/* - * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> - * Copyright (C) 2007 Rob Buis <buis@kde.org> - * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> - * Copyright (C) Research In Motion Limited 2010. All rights reserved. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - */ - -#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h" - -#include "third_party/blink/renderer/core/layout/svg/svg_resources.h" -#include "third_party/blink/renderer/core/layout/svg/svg_resources_cache.h" -#include "third_party/blink/renderer/core/style/computed_style.h" -#include "third_party/blink/renderer/platform/graphics/paint/paint_canvas.h" -#include "third_party/blink/renderer/platform/graphics/paint/paint_flags.h" -#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" -#include "third_party/skia/include/core/SkPaint.h" - -namespace blink { - -namespace { - -// If |SVGPaintDescription::has_fallback| is true, |SVGPaintDescription::color| -// is set to a fallback color. -struct SVGPaintDescription { - STACK_ALLOCATED(); - - public: - SVGPaintDescription() = default; - explicit SVGPaintDescription(Color color) : color(color), is_valid(true) {} - explicit SVGPaintDescription(LayoutSVGResourcePaintServer* resource) - : resource(resource), is_valid(true) { - DCHECK(resource); - } - SVGPaintDescription(LayoutSVGResourcePaintServer* resource, - Color fallback_color) - : resource(resource), - color(fallback_color), - is_valid(true), - has_fallback(true) { - DCHECK(resource); - } - - LayoutSVGResourcePaintServer* resource = nullptr; - Color color; - bool is_valid = false; - bool has_fallback = false; -}; - -} // namespace - -SVGPaintServer::SVGPaintServer(Color color) : color_(color) {} - -SVGPaintServer::SVGPaintServer(scoped_refptr<Gradient> gradient, - const AffineTransform& transform) - : gradient_(std::move(gradient)), - transform_(transform), - color_(Color::kBlack) {} - -SVGPaintServer::SVGPaintServer(scoped_refptr<Pattern> pattern, - const AffineTransform& transform) - : pattern_(std::move(pattern)), - transform_(transform), - color_(Color::kBlack) {} - -void SVGPaintServer::ApplyToPaintFlags(PaintFlags& flags, float alpha) { - SkColor base_color = gradient_ || pattern_ ? SK_ColorBLACK : color_.Rgb(); - flags.setColor(ScaleAlpha(base_color, alpha)); - if (pattern_) { - pattern_->ApplyToFlags(flags, AffineTransformToSkMatrix(transform_)); - } else if (gradient_) { - gradient_->ApplyToFlags(flags, AffineTransformToSkMatrix(transform_)); - } else { - flags.setShader(nullptr); - } -} - -void SVGPaintServer::PrependTransform(const AffineTransform& transform) { - DCHECK(gradient_ || pattern_); - transform_ = transform * transform_; -} - -static base::Optional<Color> ResolveColor(const ComputedStyle& style, - const SVGPaint& paint, - const SVGPaint& visited_paint) { - if (!paint.HasColor()) - return base::nullopt; - Color color = style.ResolvedColor(paint.GetColor()); - if (style.InsideLink() != EInsideLink::kInsideVisitedLink) - return color; - // FIXME: This code doesn't support the uri component of the visited link - // paint, https://bugs.webkit.org/show_bug.cgi?id=70006 - if (!visited_paint.HasColor()) - return color; - const Color& visited_color = style.ResolvedColor(visited_paint.GetColor()); - return Color(visited_color.Red(), visited_color.Green(), visited_color.Blue(), - color.Alpha()); -} - -static SVGPaintDescription RequestPaint(const LayoutObject& object, - const ComputedStyle& style, - LayoutSVGResourceMode mode) { - bool apply_to_fill = mode == kApplyToFillMode; - - const SVGComputedStyle& svg_style = style.SvgStyle(); - const SVGPaint& paint = - apply_to_fill ? svg_style.FillPaint() : svg_style.StrokePaint(); - const SVGPaint& visited_paint = apply_to_fill - ? svg_style.InternalVisitedFillPaint() - : svg_style.InternalVisitedStrokePaint(); - base::Optional<Color> color = ResolveColor(style, paint, visited_paint); - - if (paint.HasUrl()) { - LayoutSVGResourcePaintServer* uri_resource = nullptr; - if (SVGResources* resources = - SVGResourcesCache::CachedResourcesForLayoutObject(object)) - uri_resource = apply_to_fill ? resources->Fill() : resources->Stroke(); - if (uri_resource) { - // The paint server resource exists, though it may be invalid (pattern - // with width/height=0). Return the fallback color to our caller so it can - // use it, if PreparePaintServer() on the resource container failed. - if (color) - return SVGPaintDescription(uri_resource, *color); - return SVGPaintDescription(uri_resource); - } - // If the requested resource is not available, return the color resource or - // 'none'. - } - - // Color or fallback color. - if (color) - return SVGPaintDescription(*color); - - // Either 'none' or a 'none' fallback. (SVG2 say 'none' is implied when no - // fallback is specified.) - return SVGPaintDescription(); -} - -SVGPaintServer SVGPaintServer::RequestForLayoutObject( - const LayoutObject& layout_object, - const ComputedStyle& style, - LayoutSVGResourceMode resource_mode) { - DCHECK(resource_mode == kApplyToFillMode || - resource_mode == kApplyToStrokeMode); - - SVGPaintDescription paint_description = - RequestPaint(layout_object, style, resource_mode); - if (!paint_description.is_valid) - return Invalid(); - if (!paint_description.resource) - return SVGPaintServer(paint_description.color); - SVGPaintServer paint_server = paint_description.resource->PreparePaintServer( - *SVGResources::GetClient(layout_object), - SVGResources::ReferenceBoxForEffects(layout_object)); - if (paint_server.IsValid()) - return paint_server; - if (paint_description.has_fallback) - return SVGPaintServer(paint_description.color); - return Invalid(); -} - -LayoutSVGResourcePaintServer::LayoutSVGResourcePaintServer(SVGElement* element) - : LayoutSVGResourceContainer(element) {} - -LayoutSVGResourcePaintServer::~LayoutSVGResourcePaintServer() = default; - -} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h index 88a29e8..d6cba0f 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h
@@ -21,59 +21,19 @@ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_SVG_LAYOUT_SVG_RESOURCE_PAINT_SERVER_H_ #include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_container.h" -#include "third_party/blink/renderer/platform/graphics/color.h" -#include "third_party/blink/renderer/platform/graphics/gradient.h" -#include "third_party/blink/renderer/platform/graphics/pattern.h" -#include "third_party/blink/renderer/platform/transforms/affine_transform.h" -#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" +#include "third_party/blink/renderer/platform/graphics/paint/paint_flags.h" namespace blink { -enum LayoutSVGResourceMode { - kApplyToFillMode, - kApplyToStrokeMode, -}; - -class LayoutObject; -class ComputedStyle; - -class SVGPaintServer { - STACK_ALLOCATED(); - - public: - explicit SVGPaintServer(Color); - SVGPaintServer(scoped_refptr<Gradient>, const AffineTransform&); - SVGPaintServer(scoped_refptr<Pattern>, const AffineTransform&); - - static SVGPaintServer RequestForLayoutObject(const LayoutObject&, - const ComputedStyle&, - LayoutSVGResourceMode); - - void ApplyToPaintFlags(PaintFlags&, float alpha); - - static SVGPaintServer Invalid() { - return SVGPaintServer(Color(Color::kTransparent)); - } - bool IsValid() const { return color_ != Color::kTransparent; } - - bool IsTransformDependent() const { return gradient_ || pattern_; } - void PrependTransform(const AffineTransform&); - - private: - scoped_refptr<Gradient> gradient_; - scoped_refptr<Pattern> pattern_; - AffineTransform transform_; // Used for gradient/pattern shaders. - Color color_; -}; - class LayoutSVGResourcePaintServer : public LayoutSVGResourceContainer { public: - LayoutSVGResourcePaintServer(SVGElement*); - ~LayoutSVGResourcePaintServer() override; + explicit LayoutSVGResourcePaintServer(SVGElement* element) + : LayoutSVGResourceContainer(element) {} - virtual SVGPaintServer PreparePaintServer( - const SVGResourceClient&, - const FloatRect& object_bounding_box) = 0; + virtual bool ApplyShader(const SVGResourceClient&, + const FloatRect& reference_box, + const AffineTransform* additional_transform, + PaintFlags&) = 0; }; template <>
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.cc index b8550aaf..13bf83a 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.cc
@@ -34,6 +34,7 @@ #include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" +#include "third_party/blink/renderer/platform/graphics/skia/skia_utils.h" #include "third_party/blink/renderer/platform/heap/heap.h" namespace blink { @@ -135,21 +136,29 @@ return pattern_data; } -SVGPaintServer LayoutSVGResourcePattern::PreparePaintServer( +bool LayoutSVGResourcePattern::ApplyShader( const SVGResourceClient& client, - const FloatRect& object_bounding_box) { + const FloatRect& reference_box, + const AffineTransform* additional_transform, + PaintFlags& flags) { NOT_DESTROYED(); ClearInvalidationMask(); std::unique_ptr<PatternData>& pattern_data = pattern_map_->insert(&client, nullptr).stored_value->value; if (!pattern_data) - pattern_data = BuildPatternData(object_bounding_box); + pattern_data = BuildPatternData(reference_box); if (!pattern_data->pattern) - return SVGPaintServer::Invalid(); + return false; - return SVGPaintServer(pattern_data->pattern, pattern_data->transform); + AffineTransform transform = pattern_data->transform; + if (additional_transform) + transform = *additional_transform * transform; + pattern_data->pattern->ApplyToFlags(flags, + AffineTransformToSkMatrix(transform)); + flags.setFilterQuality(kLow_SkFilterQuality); + return true; } const LayoutSVGResourceContainer*
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.h b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.h index 6731799..4566993 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.h +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_resource_pattern.h
@@ -47,9 +47,10 @@ void RemoveAllClientsFromCache() override; bool RemoveClientFromCache(SVGResourceClient&) override; - SVGPaintServer PreparePaintServer( - const SVGResourceClient&, - const FloatRect& object_bounding_box) override; + bool ApplyShader(const SVGResourceClient&, + const FloatRect& reference_box, + const AffineTransform* additional_transform, + PaintFlags&) override; static const LayoutSVGResourceType kResourceType = kPatternResourceType; LayoutSVGResourceType ResourceType() const override {
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc index 4db7178..07bf48b 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_shape.cc
@@ -30,13 +30,13 @@ #include "third_party/blink/renderer/core/layout/hit_test_result.h" #include "third_party/blink/renderer/core/layout/layout_analyzer.h" #include "third_party/blink/renderer/core/layout/pointer_events_hit_rules.h" -#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h" #include "third_party/blink/renderer/core/layout/svg/layout_svg_root.h" #include "third_party/blink/renderer/core/layout/svg/svg_layout_support.h" #include "third_party/blink/renderer/core/layout/svg/svg_resources.h" #include "third_party/blink/renderer/core/layout/svg/svg_resources_cache.h" #include "third_party/blink/renderer/core/layout/svg/transform_helper.h" #include "third_party/blink/renderer/core/layout/svg/transformed_hit_test_location.h" +#include "third_party/blink/renderer/core/paint/svg_object_painter.h" #include "third_party/blink/renderer/core/paint/svg_shape_painter.h" #include "third_party/blink/renderer/core/svg/svg_geometry_element.h" #include "third_party/blink/renderer/core/svg/svg_length_context.h"
diff --git a/third_party/blink/renderer/core/loader/document_loader_test.cc b/third_party/blink/renderer/core/loader/document_loader_test.cc index 12e2f58..2ed5db7 100644 --- a/third_party/blink/renderer/core/loader/document_loader_test.cc +++ b/third_party/blink/renderer/core/loader/document_loader_test.cc
@@ -538,7 +538,8 @@ Window().ReportDocumentPolicyViolation( mojom::blink::DocumentPolicyFeature::kFontDisplay, - mojom::blink::PolicyDisposition::kEnforce); + mojom::blink::PolicyDisposition::kEnforce, + "first font display violation"); histogram_tester.ExpectTotalCount("Blink.UseCounter.DocumentPolicy.Enforced", 1); @@ -548,7 +549,8 @@ // Multiple reports should be recorded multiple times. Window().ReportDocumentPolicyViolation( mojom::blink::DocumentPolicyFeature::kFontDisplay, - mojom::blink::PolicyDisposition::kEnforce); + mojom::blink::PolicyDisposition::kEnforce, + "second font display violation"); histogram_tester.ExpectTotalCount("Blink.UseCounter.DocumentPolicy.Enforced", 2); @@ -570,7 +572,7 @@ Window().ReportDocumentPolicyViolation( mojom::blink::DocumentPolicyFeature::kFontDisplay, - mojom::blink::PolicyDisposition::kReport); + mojom::blink::PolicyDisposition::kReport, "first font display violation"); histogram_tester.ExpectTotalCount( "Blink.UseCounter.DocumentPolicy.ReportOnly", 1); @@ -580,7 +582,8 @@ // Multiple reports should be recorded multiple times. Window().ReportDocumentPolicyViolation( mojom::blink::DocumentPolicyFeature::kFontDisplay, - mojom::blink::PolicyDisposition::kReport); + mojom::blink::PolicyDisposition::kReport, + "second font display violation"); histogram_tester.ExpectTotalCount( "Blink.UseCounter.DocumentPolicy.ReportOnly", 2);
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.cc b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.cc index f386226e..ad820ba 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.cc +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.cc
@@ -21,6 +21,7 @@ #include "third_party/blink/renderer/core/page/scrolling/text_fragment_selector.h" #include "third_party/blink/renderer/core/scroll/scroll_alignment.h" #include "third_party/blink/renderer/core/scroll/scrollable_area.h" +#include "third_party/blink/renderer/platform/search_engine_utils.h" namespace blink { @@ -377,6 +378,7 @@ did_find_match_ = true; if (first_match_needs_scroll_) { + metrics_->SetSearchEngineSource(HasSearchEngineSource()); first_match_needs_scroll_ = false; PhysicalRect bounding_box(ComputeTextRect(range)); @@ -498,4 +500,13 @@ metrics_->SetTickClockForTesting(tick_clock); } +bool TextFragmentAnchor::HasSearchEngineSource() { + AtomicString referrer = frame_->GetDocument()->referrer(); + // TODO(crbug.com/1133823): Add test case for valid referrer. + if (!referrer) + return false; + + return IsKnownSearchEngine(referrer); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.h b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.h index 22cf488..ee4d075 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.h +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor.h
@@ -95,6 +95,8 @@ void FireBeforeMatchEvent(Element* element); + bool HasSearchEngineSource(); + Vector<TextFragmentFinder> text_fragment_finders_; Member<LocalFrame> frame_;
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.cc b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.cc index 10fdb64..e100957 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.cc +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.cc
@@ -150,7 +150,7 @@ } UMA_HISTOGRAM_ENUMERATION("TextFragmentAnchor.Parameters", - GetParametersForMatch(match)); + GetParametersForSelector(match.selector)); } UMA_HISTOGRAM_BOOLEAN("TextFragmentAnchor.AmbiguousMatch", ambiguous_match_); @@ -182,6 +182,8 @@ time_to_scroll_into_view.InMilliseconds()); } + UMA_HISTOGRAM_BOOLEAN("TextFragmentAnchor.LinkOpenSource", + has_search_engine_source_); #ifndef NDEBUG metrics_reported_ = true; #endif @@ -200,26 +202,26 @@ } TextFragmentAnchorMetrics::TextFragmentAnchorParameters -TextFragmentAnchorMetrics::GetParametersForMatch(const Match& match) { +TextFragmentAnchorMetrics::GetParametersForSelector( + const TextFragmentSelector& selector) { TextFragmentAnchorParameters parameters = TextFragmentAnchorParameters::kUnknown; - if (match.selector.Type() == TextFragmentSelector::SelectorType::kExact) { - if (match.selector.Prefix().length() && match.selector.Suffix().length()) + if (selector.Type() == TextFragmentSelector::SelectorType::kExact) { + if (selector.Prefix().length() && selector.Suffix().length()) parameters = TextFragmentAnchorParameters::kExactTextWithContext; - else if (match.selector.Prefix().length()) + else if (selector.Prefix().length()) parameters = TextFragmentAnchorParameters::kExactTextWithPrefix; - else if (match.selector.Suffix().length()) + else if (selector.Suffix().length()) parameters = TextFragmentAnchorParameters::kExactTextWithSuffix; else parameters = TextFragmentAnchorParameters::kExactText; - } else if (match.selector.Type() == - TextFragmentSelector::SelectorType::kRange) { - if (match.selector.Prefix().length() && match.selector.Suffix().length()) + } else if (selector.Type() == TextFragmentSelector::SelectorType::kRange) { + if (selector.Prefix().length() && selector.Suffix().length()) parameters = TextFragmentAnchorParameters::kTextRangeWithContext; - else if (match.selector.Prefix().length()) + else if (selector.Prefix().length()) parameters = TextFragmentAnchorParameters::kTextRangeWithPrefix; - else if (match.selector.Suffix().length()) + else if (selector.Suffix().length()) parameters = TextFragmentAnchorParameters::kTextRangeWithSuffix; else parameters = TextFragmentAnchorParameters::kTextRange; @@ -233,4 +235,9 @@ tick_clock_ = tick_clock; } +void TextFragmentAnchorMetrics::SetSearchEngineSource( + bool has_search_engine_source) { + has_search_engine_source_ = has_search_engine_source; +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h index c7b177d1..616beb85 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h
@@ -42,6 +42,9 @@ explicit TextFragmentAnchorMetrics(Document* document); + static TextFragmentAnchorParameters GetParametersForSelector( + const TextFragmentSelector& selector); + void DidCreateAnchor(int selector_count, int directive_length); void DidFindMatch(Match match); @@ -65,11 +68,11 @@ void SetTickClockForTesting(const base::TickClock* tick_clock); + void SetSearchEngineSource(bool has_search_engine_source); + void Trace(Visitor*) const; private: - TextFragmentAnchorParameters GetParametersForMatch(const Match& match); - Member<Document> document_; #ifndef NDEBUG @@ -85,6 +88,7 @@ base::TimeTicks first_scroll_into_view_time_; bool did_non_zero_scroll_ = false; bool did_scroll_to_top_ = false; + bool has_search_engine_source_ = false; const base::TickClock* tick_clock_; };
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics_test.cc b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics_test.cc index 85b43c33..61fb0b08 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics_test.cc +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics_test.cc
@@ -137,6 +137,9 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.TableCellMatch", 0, 1); + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } // Test UMA metrics collection when there is no match found @@ -199,6 +202,10 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ListItemMatch", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 0); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } // Test that we don't collect any metrics when there is no text directive @@ -245,6 +252,8 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ListItemMatch", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 0); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 0); } // Test that the correct metrics are collected when we found a match but didn't @@ -312,6 +321,10 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.TableCellMatch", 0, 1); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } // Test that the correct metrics are collected for all possible combinations of @@ -405,6 +418,10 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 4); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.TableCellMatch", 0, 4); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } // Test that the correct metrics are collected for all possible combinations of @@ -510,6 +527,10 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.ListItemMatch", 0); histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 0); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } class TextFragmentAnchorScrollMetricsTest @@ -635,6 +656,10 @@ histogram_tester_.ExpectTotalCount("TextFragmentAnchor.TableCellMatch", 1); histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.TableCellMatch", 0, 1); + + histogram_tester_.ExpectTotalCount("TextFragmentAnchor.LinkOpenSource", 1); + histogram_tester_.ExpectUniqueSample("TextFragmentAnchor.LinkOpenSource", 0, + 1); } // Test that the user scrolling back to the top of the page reports metrics
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc index 19cf8c3..282a10b 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
@@ -4,12 +4,15 @@ #include "third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h" +#include "base/metrics/histogram_macros.h" +#include "base/time/default_tick_clock.h" #include "third_party/blink/public/common/browser_interface_broker_proxy.h" #include "third_party/blink/public/platform/interface_registry.h" #include "third_party/blink/renderer/core/editing/ephemeral_range.h" #include "third_party/blink/renderer/core/editing/finder/find_buffer.h" #include "third_party/blink/renderer/core/editing/iterators/text_iterator.h" #include "third_party/blink/renderer/core/frame/local_frame.h" +#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h" #include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h" #include "third_party/blink/renderer/platform/text/text_boundaries.h" @@ -157,6 +160,7 @@ constexpr int kNoContextMinChars = 20; constexpr int kMaxContextWords = 10; constexpr int kMaxRangeWords = 10; +constexpr int kMaxIterationCountToRecord = 10; void TextFragmentSelectorGenerator::UpdateSelection( LocalFrame* selection_frame, @@ -228,6 +232,7 @@ DCHECK(selection_range_); DCHECK(callback); + generation_start_time_ = base::DefaultTickClock::GetInstance()->NowTicks(); pending_generate_selector_callback_ = std::move(callback); state_ = kNeedsNewCandidate; step_ = kExact; @@ -235,8 +240,13 @@ max_available_suffix_ = ""; num_prefix_words_ = 0; num_suffix_words_ = 0; + iteration_ = 0; CompleteSelection(); + UMA_HISTOGRAM_COUNTS_1000( + "SharedHighlights.LinkGenerated.SelectionLength", + PlainText(EphemeralRange(selection_range_)).length()); + GenerateSelectorCandidate(); } @@ -274,7 +284,7 @@ void TextFragmentSelectorGenerator::RunTextFinder() { DCHECK(selector_); - + iteration_++; // |FindMatch| will call |DidFindMatch| indicating if the match was unique. TextFragmentFinder finder(*this, *selector_); finder.FindMatch(*selection_frame_->GetDocument()); @@ -301,6 +311,8 @@ } void TextFragmentSelectorGenerator::NoMatchFound() { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kIncorrectSelector); NotifySelectorReady( TextFragmentSelector(TextFragmentSelector::SelectorType::kInvalid)); } @@ -308,6 +320,33 @@ void TextFragmentSelectorGenerator::NotifySelectorReady( const TextFragmentSelector& selector) { DCHECK(pending_generate_selector_callback_); + // TODO(crbug.com/1133823): Add unit tests for all SharedHighlights.* + // histograms. + UMA_HISTOGRAM_BOOLEAN( + "SharedHighlights.LinkGenerated", + selector.Type() != TextFragmentSelector::SelectorType::kInvalid); + + if (selector.Type() != TextFragmentSelector::SelectorType::kInvalid) { + UMA_HISTOGRAM_COUNTS_1000("SharedHighlights.LinkGenerated.ParamLength", + selector.ToString().length()); + + UMA_HISTOGRAM_EXACT_LINEAR("SharedHighlights.LinkGenerated.Iterations", + iteration_, kMaxIterationCountToRecord); + UMA_HISTOGRAM_TIMES("SharedHighlights.LinkGenerated.TimeToGenerate", + base::DefaultTickClock::GetInstance()->NowTicks() - + generation_start_time_); + UMA_HISTOGRAM_ENUMERATION( + "SharedHighlights.LinkGenerated.SelectorParameters", + TextFragmentAnchorMetrics::GetParametersForSelector(selector)); + } else { + UMA_HISTOGRAM_EXACT_LINEAR( + "SharedHighlights.LinkGenerated.Error.Iterations", iteration_, + kMaxIterationCountToRecord); + UMA_HISTOGRAM_TIMES("SharedHighlights.LinkGenerated.Error.TimeToGenerate", + base::DefaultTickClock::GetInstance()->NowTicks() - + generation_start_time_); + } + std::move(pending_generate_selector_callback_).Run(selector.ToString()); } @@ -351,6 +390,8 @@ String selected_text = PlainText(ephemeral_range).StripWhiteSpace(); if (selected_text.IsEmpty()) { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kEmptySelection); state_ = kFailure; return; } @@ -411,6 +452,8 @@ // If from middle till end of selection there is no word break, then we // cannot use it for range end. if (mid_point == selection_length) { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kNoRange); state_ = kFailure; return; } @@ -451,6 +494,8 @@ // Give up if context is already too long. if (num_prefix_words_ == kMaxContextWords || num_prefix_words_ == kMaxContextWords) { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kContextLimitReached); state_ = kFailure; return; } @@ -463,6 +508,8 @@ } if (max_available_prefix_.IsEmpty() && max_available_suffix_.IsEmpty()) { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kNoContext); state_ = kFailure; return; } @@ -472,6 +519,8 @@ // Give up if we were unable to get new prefix and suffix. if (prefix == selector_->Prefix() && suffix == selector_->Suffix()) { + UMA_HISTOGRAM_ENUMERATION("SharedHighlights.LinkGenerated.Error", + LinkGenerationError::kContextExhausted); state_ = kFailure; return; }
diff --git a/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h b/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h index 5f7c047..14272be 100644 --- a/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h +++ b/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.h
@@ -31,6 +31,17 @@ public TextFragmentFinder::Client, public blink::mojom::blink::TextFragmentSelectorProducer { public: + // Update corresponding |LinkGenerationError| in enums.xml. + enum LinkGenerationError { + kIncorrectSelector, + kNoRange, + kNoContext, + kContextExhausted, + kContextLimitReached, + kEmptySelection, + + kMaxValue = kContextLimitReached + }; explicit TextFragmentSelectorGenerator() = default; void BindTextFragmentSelectorProducer( @@ -140,6 +151,9 @@ int num_range_start_words_ = 0; int num_range_end_words_ = 0; + int iteration_ = 0; + base::TimeTicks generation_start_time_; + DISALLOW_COPY_AND_ASSIGN(TextFragmentSelectorGenerator); };
diff --git a/third_party/blink/renderer/core/paint/svg_inline_text_box_painter.h b/third_party/blink/renderer/core/paint/svg_inline_text_box_painter.h index 89f5c08..c7511e9b 100644 --- a/third_party/blink/renderer/core/paint/svg_inline_text_box_painter.h +++ b/third_party/blink/renderer/core/paint/svg_inline_text_box_painter.h
@@ -5,7 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_SVG_INLINE_TEXT_BOX_PAINTER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_SVG_INLINE_TEXT_BOX_PAINTER_H_ -#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h" +#include "third_party/blink/renderer/core/paint/svg_object_painter.h" #include "third_party/blink/renderer/core/style/computed_style_constants.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
diff --git a/third_party/blink/renderer/core/paint/svg_object_painter.cc b/third_party/blink/renderer/core/paint/svg_object_painter.cc index 2d3a14aa..67a2120 100644 --- a/third_party/blink/renderer/core/paint/svg_object_painter.cc +++ b/third_party/blink/renderer/core/paint/svg_object_painter.cc
@@ -5,12 +5,47 @@ #include "third_party/blink/renderer/core/paint/svg_object_painter.h" #include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h" #include "third_party/blink/renderer/core/layout/svg/svg_resources.h" +#include "third_party/blink/renderer/core/layout/svg/svg_resources_cache.h" #include "third_party/blink/renderer/core/paint/paint_info.h" #include "third_party/blink/renderer/core/paint/paint_layer.h" namespace blink { +namespace { + +Color ResolveColor(const ComputedStyle& style, + const SVGPaint& paint, + const SVGPaint& visited_paint) { + Color color = style.ResolvedColor(paint.GetColor()); + if (style.InsideLink() != EInsideLink::kInsideVisitedLink) + return color; + // FIXME: This code doesn't support the uri component of the visited link + // paint, https://bugs.webkit.org/show_bug.cgi?id=70006 + if (!visited_paint.HasColor()) + return color; + const Color& visited_color = style.ResolvedColor(visited_paint.GetColor()); + return Color(visited_color.Red(), visited_color.Green(), visited_color.Blue(), + color.Alpha()); +} + +void CopyStateFromGraphicsContext(GraphicsContext& context, PaintFlags& flags) { + // TODO(fs): The color filter can be set when generating a picture for a mask + // due to color-interpolation. We could also just apply the + // color-interpolation property from the the shape itself (which could mean + // the paintserver if it has it specified), since that would be more in line + // with the spec for color-interpolation. For now, just steal it from the GC + // though. + // Additionally, it's not really safe/guaranteed to be correct, as something + // down the flags pipe may want to farther tweak the color filter, which could + // yield incorrect results. (Consider just using saveLayer() w/ this color + // filter explicitly instead.) + flags.setColorFilter(sk_ref_sp(context.GetColorFilter())); +} + +} // namespace + void SVGObjectPainter::PaintResourceSubtree(GraphicsContext& context) { DCHECK(!layout_object_.NeedsLayout()); @@ -22,6 +57,25 @@ layout_object_.Paint(info); } +bool SVGObjectPainter::ApplyPaintResource( + LayoutSVGResourceMode resource_mode, + PaintFlags& flags, + const AffineTransform* additional_paint_server_transform) { + SVGResources* resources = + SVGResourcesCache::CachedResourcesForLayoutObject(layout_object_); + if (!resources) + return false; + const bool apply_to_fill = resource_mode == kApplyToFillMode; + LayoutSVGResourcePaintServer* uri_resource = + apply_to_fill ? resources->Fill() : resources->Stroke(); + if (!uri_resource || !uri_resource->ApplyShader( + *SVGResources::GetClient(layout_object_), + SVGResources::ReferenceBoxForEffects(layout_object_), + additional_paint_server_transform, flags)) + return false; + return true; +} + bool SVGObjectPainter::PreparePaint( const PaintInfo& paint_info, const ComputedStyle& style, @@ -36,36 +90,31 @@ return true; } - SVGPaintServer paint_server = SVGPaintServer::RequestForLayoutObject( - layout_object_, style, resource_mode); - if (!paint_server.IsValid()) - return false; - - if (additional_paint_server_transform && paint_server.IsTransformDependent()) - paint_server.PrependTransform(*additional_paint_server_transform); - + const bool apply_to_fill = resource_mode == kApplyToFillMode; const SVGComputedStyle& svg_style = style.SvgStyle(); - float alpha = resource_mode == kApplyToFillMode ? svg_style.FillOpacity() - : svg_style.StrokeOpacity(); - paint_server.ApplyToPaintFlags(flags, alpha); - - // We always set filter quality to 'low' here. This value will only have an - // effect for patterns, which are SkPictures, so using high-order filter - // should have little effect on the overall quality. - flags.setFilterQuality(kLow_SkFilterQuality); - - // TODO(fs): The color filter can set when generating a picture for a mask - - // due to color-interpolation. We could also just apply the - // color-interpolation property from the the shape itself (which could mean - // the paintserver if it has it specified), since that would be more in line - // with the spec for color-interpolation. For now, just steal it from the GC - // though. - // Additionally, it's not really safe/guaranteed to be correct, as - // something down the flags pipe may want to farther tweak the color - // filter, which could yield incorrect results. (Consider just using - // saveLayer() w/ this color filter explicitly instead.) - flags.setColorFilter(sk_ref_sp(paint_info.context.GetColorFilter())); - return true; + const SVGPaint& paint = + apply_to_fill ? svg_style.FillPaint() : svg_style.StrokePaint(); + const float alpha = + apply_to_fill ? svg_style.FillOpacity() : svg_style.StrokeOpacity(); + if (paint.HasUrl()) { + if (ApplyPaintResource(resource_mode, flags, + additional_paint_server_transform)) { + flags.setColor(ScaleAlpha(SK_ColorBLACK, alpha)); + CopyStateFromGraphicsContext(paint_info.context, flags); + return true; + } + } + if (paint.HasColor()) { + const SVGPaint& visited_paint = + apply_to_fill ? svg_style.InternalVisitedFillPaint() + : svg_style.InternalVisitedStrokePaint(); + const Color color = ResolveColor(style, paint, visited_paint); + flags.setColor(ScaleAlpha(color.Rgb(), alpha)); + flags.setShader(nullptr); + CopyStateFromGraphicsContext(paint_info.context, flags); + return true; + } + return false; } } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/svg_object_painter.h b/third_party/blink/renderer/core/paint/svg_object_painter.h index 9e4c594..117d56c 100644 --- a/third_party/blink/renderer/core/paint/svg_object_painter.h +++ b/third_party/blink/renderer/core/paint/svg_object_painter.h
@@ -6,7 +6,7 @@ #define THIRD_PARTY_BLINK_RENDERER_CORE_PAINT_SVG_OBJECT_PAINTER_H_ #include "third_party/blink/renderer/core/layout/layout_object.h" -#include "third_party/blink/renderer/core/layout/svg/layout_svg_resource_paint_server.h" +#include "third_party/blink/renderer/platform/graphics/paint/paint_flags.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" namespace blink { @@ -16,6 +16,11 @@ class ComputedStyle; class GraphicsContext; +enum LayoutSVGResourceMode { + kApplyToFillMode, + kApplyToStrokeMode, +}; + class SVGObjectPainter { STACK_ALLOCATED(); @@ -38,6 +43,11 @@ void PaintResourceSubtree(GraphicsContext&); private: + bool ApplyPaintResource( + LayoutSVGResourceMode resource_mode, + PaintFlags& flags, + const AffineTransform* additional_paint_server_transform); + const LayoutObject& layout_object_; };
diff --git a/third_party/blink/renderer/core/scroll/BUILD.gn b/third_party/blink/renderer/core/scroll/BUILD.gn index f18daa68..5fa7408 100644 --- a/third_party/blink/renderer/core/scroll/BUILD.gn +++ b/third_party/blink/renderer/core/scroll/BUILD.gn
@@ -4,13 +4,6 @@ import("//third_party/blink/renderer/core/core.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - blink_core_sources("scroll") { sources = [ "ns_scroller_imp_details.h", @@ -18,14 +11,10 @@ "programmatic_scroll_animator.h", "scroll_alignment.cc", "scroll_alignment.h", - "scroll_animator.cc", - "scroll_animator.h", "scroll_animator_base.cc", "scroll_animator_base.h", "scroll_animator_compositor_coordinator.cc", "scroll_animator_compositor_coordinator.h", - "scroll_animator_mac.h", - "scroll_animator_mac.mm", "scroll_customization.cc", "scroll_customization.h", "scroll_state_data.h", @@ -39,9 +28,6 @@ "scrollbar_test_suite.h", "scrollbar_theme.cc", "scrollbar_theme.h", - "scrollbar_theme_android.cc", - "scrollbar_theme_mac.h", - "scrollbar_theme_mac.mm", "scrollbar_theme_overlay.cc", "scrollbar_theme_overlay.h", "scrollbar_theme_overlay_mobile.cc", @@ -51,12 +37,23 @@ "smooth_scroll_sequencer.h", ] + if (is_android) { + sources += [ "scrollbar_theme_android.cc" ] + } + if (is_mac) { - sources -= [ + sources += [ + "scroll_animator_mac.h", + "scroll_animator_mac.mm", + "scrollbar_theme_mac.h", + "scrollbar_theme_mac.mm", + "web_scrollbar_theme.mm", + ] + } else { + sources += [ "scroll_animator.cc", "scroll_animator.h", ] - sources += [ "web_scrollbar_theme.mm" ] } if (use_aura) {
diff --git a/third_party/blink/renderer/core/style/svg_computed_style_defs.h b/third_party/blink/renderer/core/style/svg_computed_style_defs.h index 85e444a..40e11080 100644 --- a/third_party/blink/renderer/core/style/svg_computed_style_defs.h +++ b/third_party/blink/renderer/core/style/svg_computed_style_defs.h
@@ -135,8 +135,7 @@ return type == other.type && (type != SVG_PAINTTYPE_COLOR || color == other.color); } - bool HasFallbackColor() const { return type == SVG_PAINTTYPE_URI_COLOR; } - bool HasColor() const { return IsColor() || HasFallbackColor(); } + bool HasColor() const { return IsColor() || type == SVG_PAINTTYPE_URI_COLOR; } bool HasUrl() const { return type >= SVG_PAINTTYPE_URI_NONE; } bool HasCurrentColor() const { return HasColor() && color.IsCurrentColor(); } StyleSVGResource* Resource() const { return resource.get(); }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index 9169a57..daae241 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -510,17 +510,6 @@ return node->GetDocument().ActiveModalDialog(); } -bool HasUninheritedHiddenVisibility(const ComputedStyle* style, Node* node) { - // Is this the root of a visibility:hidden or visibility:collapsed subtree? - if (style->Visibility() == EVisibility::kVisible) - return false; - Node* parent = node->parentNode(); - if (!parent) - return true; - return !parent->GetComputedStyle() || - parent->GetComputedStyle()->Visibility() == EVisibility::kVisible; -} - } // namespace unsigned AXObject::number_of_live_ax_objects_ = 0; @@ -1355,19 +1344,8 @@ last_modification_count_ = cache.ModificationCount(); - if (GetElement() && !GetLayoutObject() && - !DisplayLockUtilities::NearestLockedExclusiveAncestor(*GetNode())) { - // While it's safe to do so, ensure the computed style for display:none - // nodes, so that IsHiddenForTextAlternativeCalculation() can determine - // whether the node is directly styled as display:none vs hidden because - // of display:none on an ancestor. - // If there is no computed style, assume that it may be display:none, - // since we can't prove otherwise. - const ComputedStyle* style = GetElement()->GetComputedStyle(); - if (!style || style->IsEnsuredInDisplayNone()) - GetElement()->EnsureComputedStyle(); - } cached_background_color_ = ComputeBackgroundColor(); + cached_is_hidden_via_style = ComputeIsHiddenViaStyle(); cached_is_inert_or_aria_hidden_ = ComputeIsInertOrAriaHidden(); cached_is_descendant_of_leaf_node_ = !!LeafNodeAncestor(); cached_is_descendant_of_disabled_node_ = !!DisabledAncestor(); @@ -2157,7 +2135,7 @@ name_from, nullptr, nullptr); } -bool AXObject::IsHiddenViaStyle() const { +bool AXObject::ComputeIsHiddenViaStyle() const { Node* node = GetNode(); if (!node) return false; @@ -2166,17 +2144,29 @@ if (DisplayLockUtilities::NearestLockedExclusiveAncestor(*node)) return true; + // Style elements in SVG are not display: none, unlike HTML style elements, + // but they are still hidden and thus treated as hidden from style. + if (IsA<SVGStyleElement>(node)) + return true; + + // For elements with layout objects we can get their style directly. if (GetLayoutObject()) return GetLayoutObject()->Style()->Visibility() != EVisibility::kVisible; + // No layout object: must ensure computed style. if (Element* element = DynamicTo<Element>(node)) { - const ComputedStyle* style = element->GetComputedStyle(); + const ComputedStyle* style = element->EnsureComputedStyle(); return !style || style->IsEnsuredInDisplayNone() || style->Visibility() != EVisibility::kVisible; } return false; } +bool AXObject::IsHiddenViaStyle() const { + UpdateCachedAttributeValuesIfNeeded(); + return cached_is_hidden_via_style; +} + // Return true if this should be removed from accessible name computations, // unless it is reached by following an aria-labelledby. When that happens, this // is not checked, because aria-labelledby can use hidden subtrees. @@ -2187,6 +2177,7 @@ // hiding styles is problematic because it would prevent name contributions from // deeper nodes in hidden aria-labelledby subtrees. bool AXObject::IsHiddenForTextAlternativeCalculation() const { + // aria-hidden=false allows hidden contents to be used in name from contents. if (AOMPropertyOrARIAAttributeIsFalse(AOMBooleanProperty::kHidden)) return false; @@ -2202,37 +2193,18 @@ if (!document || !document->GetFrame()) return false; - if (GetLayoutObject()) { - return HasUninheritedHiddenVisibility(GetLayoutObject()->Style(), - GetNode()); - } else if (GetNode() && IsA<HTMLNoScriptElement>(GetNode())) { + // Do not contribute <noscript> to text alternative of an ancestor. + if (IsA<HTMLNoScriptElement>(node)) return true; - } - // This is an important corner case: if a node has no LayoutObject, that means - // it's not rendered, but we still may be exploring it as part of a text - // alternative calculation, for example if it was explicitly referenced by - // aria-labelledby. So we need to explicitly call the style resolver to check - // whether it's invisible or display:none, rather than relying on the style - // cached in the LayoutObject. - auto* element = DynamicTo<Element>(node); - if (element && node->isConnected()) { - const ComputedStyle* style = element->GetComputedStyle(); - if (!style) - return false; + // Always contribute SVG <title> despite it having a hidden style by default. + if (IsA<SVGTitleElement>(node)) + return false; - if (style->Display() == EDisplay::kNone || - HasUninheritedHiddenVisibility(style, GetNode())) { - return true; - } - - // Style elements in SVG are not display: none, unlike HTML style elements, - // but they are still hidden from all users. - if (IsA<SVGElement>(element)) - return IsA<SVGStyleElement>(element); - } - - return false; + // If this is hidden but its parent isn't, then it appears the hiding style + // targeted this node directly. Do not recurse into it for name from contents. + return IsHiddenViaStyle() && + (!ParentObject() || !ParentObject()->IsHiddenViaStyle()); } String AXObject::AriaTextAlternative(bool recursive,
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.h b/third_party/blink/renderer/modules/accessibility/ax_object.h index 3f8798d..d9d8585 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object.h
@@ -513,6 +513,8 @@ bool AccessibilityIsIgnored() const; // Whether objects are ignored but included in the tree. bool AccessibilityIsIgnoredButIncludedInTree() const; + // Is visibility:hidden or display:none being used to hide this element. + bool IsHiddenViaStyle() const; // Whether objects are included in the tree. Nodes that are included in the // tree are serialized, even if they are ignored. This allows browser-side @@ -1306,10 +1308,11 @@ mutable bool cached_is_ignored_but_included_in_tree_ : 1; mutable bool cached_is_inert_or_aria_hidden_ : 1; + mutable bool cached_is_hidden_via_style : 1; mutable bool cached_is_descendant_of_leaf_node_ : 1; mutable bool cached_is_descendant_of_disabled_node_ : 1; mutable bool cached_has_inherited_presentational_role_ : 1; - mutable bool cached_is_editable_root_; + mutable bool cached_is_editable_root_ : 1; mutable Member<AXObject> cached_live_region_root_; mutable int cached_aria_column_index_; mutable int cached_aria_row_index_; @@ -1341,7 +1344,7 @@ bool HasInternalsAttribute(Element&, const QualifiedName&) const; const AtomicString& GetInternalsAttribute(Element&, const QualifiedName&) const; - bool IsHiddenViaStyle() const; + bool ComputeIsHiddenViaStyle() const; // This returns true if the element associated with this AXObject is has // focusable style, meaning that it is visible. Note that we prefer to rely on
diff --git a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.idl b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.idl index b05f526..9e0f8704 100644 --- a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.idl +++ b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.idl
@@ -26,4 +26,7 @@ // https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension // [RuntimeEnabled=WebAuthenticationResidentKeyRequirement] boolean credProps = false; + + // https://w3c.github.io/webauthn/#sctn-large-blob-extension + [RuntimeEnabled=WebAuthenticationLargeBlobExtension] AuthenticationExtensionsLargeBlobInputs largeBlob; };
diff --git a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_outputs.idl b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_outputs.idl index cccbbf5..ebaee1e 100644 --- a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_outputs.idl +++ b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_outputs.idl
@@ -16,4 +16,7 @@ // https://w3c.github.io/webauthn/#sctn-authenticator-credential-properties-extension CredentialPropertiesOutput credProps; + + // https://w3c.github.io/webauthn/#sctn-large-blob-extension + [RuntimeEnabled=WebAuthenticationLargeBlobExtension] AuthenticationExtensionsLargeBlobOutputs largeBlob; };
diff --git a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_inputs.idl b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_inputs.idl new file mode 100644 index 0000000..a5aa124e --- /dev/null +++ b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_inputs.idl
@@ -0,0 +1,10 @@ +// Copyright 2020 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://w3c.github.io/webauthn/#dictdef-authenticationextensionslargeblobinputs +dictionary AuthenticationExtensionsLargeBlobInputs { + DOMString support; + boolean read; + BufferSource write; +};
diff --git a/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_outputs.idl b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_outputs.idl new file mode 100644 index 0000000..a5e38901 --- /dev/null +++ b/third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_outputs.idl
@@ -0,0 +1,10 @@ +// Copyright 2020 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://w3c.github.io/webauthn/#dictdef-authenticationextensionslargebloboutputs +dictionary AuthenticationExtensionsLargeBlobOutputs { + boolean supported; + ArrayBuffer blob; + boolean written; +};
diff --git a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc index c9a4a7c..0aa863b 100644 --- a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc +++ b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.cc
@@ -11,6 +11,7 @@ #include "third_party/blink/public/mojom/webauthn/authenticator.mojom-blink.h" #include "third_party/blink/renderer/bindings/core/v8/array_buffer_or_array_buffer_view.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_client_inputs.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_authentication_extensions_large_blob_inputs.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_authenticator_selection_criteria.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_cable_authentication_data.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_cable_registration_data.h" @@ -43,6 +44,7 @@ using blink::mojom::blink::CredentialInfoPtr; using blink::mojom::blink::CredentialManagerError; using blink::mojom::blink::CredentialType; +using blink::mojom::blink::LargeBlobSupport; using blink::mojom::blink::PublicKeyCredentialCreationOptionsPtr; using blink::mojom::blink::PublicKeyCredentialDescriptor; using blink::mojom::blink::PublicKeyCredentialDescriptorPtr; @@ -311,6 +313,18 @@ } // static +LargeBlobSupport TypeConverter<LargeBlobSupport, String>::Convert( + const String& large_blob_support) { + if (large_blob_support == "required") + return LargeBlobSupport::REQUIRED; + if (large_blob_support == "preferred") + return LargeBlobSupport::PREFERRED; + + // Unknown values are treated as preferred. + return LargeBlobSupport::PREFERRED; +} + +// static AuthenticatorSelectionCriteriaPtr TypeConverter<AuthenticatorSelectionCriteriaPtr, blink::AuthenticatorSelectionCriteria>:: @@ -548,6 +562,10 @@ WebAuthenticationResidentKeyRequirementEnabled()); mojo_options->cred_props = true; } + if (extensions->largeBlob()) { + mojo_options->large_blob_enable = + ConvertTo<LargeBlobSupport>(extensions->largeBlob()->support()); + } } return mojo_options; @@ -642,6 +660,15 @@ mojo_options->user_verification_methods = extensions->uvm(); } #endif + if (extensions->hasLargeBlob()) { + if (extensions->largeBlob()->hasRead()) { + mojo_options->large_blob_read = extensions->largeBlob()->read(); + } + if (extensions->largeBlob()->hasWrite()) { + mojo_options->large_blob_write = + ConvertTo<Vector<uint8_t>>(extensions->largeBlob()->write()); + } + } } return mojo_options;
diff --git a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.h b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.h index 5414c53a..70bf4951 100644 --- a/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.h +++ b/third_party/blink/renderer/modules/credentialmanager/credential_manager_type_converters.h
@@ -106,6 +106,11 @@ }; template <> +struct TypeConverter<blink::mojom::blink::LargeBlobSupport, String> { + static blink::mojom::blink::LargeBlobSupport Convert(const String&); +}; + +template <> struct TypeConverter<blink::mojom::blink::AuthenticatorSelectionCriteriaPtr, blink::AuthenticatorSelectionCriteria> { static blink::mojom::blink::AuthenticatorSelectionCriteriaPtr Convert( @@ -170,4 +175,4 @@ } // namespace mojo -#endif // CredentialManagerProxy_h +#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CREDENTIALMANAGER_CREDENTIAL_MANAGER_TYPE_CONVERTERS_H_
diff --git a/third_party/blink/renderer/modules/credentialmanager/credentials_container.cc b/third_party/blink/renderer/modules/credentialmanager/credentials_container.cc index b1251b6..d81cff32 100644 --- a/third_party/blink/renderer/modules/credentialmanager/credentials_container.cc +++ b/third_party/blink/renderer/modules/credentialmanager/credentials_container.cc
@@ -40,6 +40,9 @@ #include "third_party/blink/renderer/core/inspector/console_message.h" #include "third_party/blink/renderer/core/page/frame_tree.h" #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h" +#include "third_party/blink/renderer/modules/credentialmanager/authentication_extensions_client_inputs.h" +#include "third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_inputs.h" +#include "third_party/blink/renderer/modules/credentialmanager/authentication_extensions_large_blob_outputs.h" #include "third_party/blink/renderer/modules/credentialmanager/authenticator_assertion_response.h" #include "third_party/blink/renderer/modules/credentialmanager/authenticator_attestation_response.h" #include "third_party/blink/renderer/modules/credentialmanager/credential.h" @@ -450,6 +453,14 @@ } extension_outputs->setCredProps(cred_props_output); } + if (credential->echo_large_blob) { + DCHECK( + RuntimeEnabledFeatures::WebAuthenticationLargeBlobExtensionEnabled()); + AuthenticationExtensionsLargeBlobOutputs* large_blob_outputs = + AuthenticationExtensionsLargeBlobOutputs::Create(); + large_blob_outputs->setSupported(credential->supports_large_blob); + extension_outputs->setLargeBlob(large_blob_outputs); + } resolver->Resolve(MakeGarbageCollected<PublicKeyCredential>( credential->info->id, raw_id, authenticator_response, extension_outputs)); @@ -820,6 +831,25 @@ "a credential")); return promise; } + if (options->publicKey()->extensions()->hasLargeBlob()) { + DCHECK(RuntimeEnabledFeatures:: + WebAuthenticationLargeBlobExtensionEnabled()); + if (options->publicKey()->extensions()->largeBlob()->hasSupport()) { + resolver->Reject(MakeGarbageCollected<DOMException>( + DOMExceptionCode::kNotSupportedError, + "The 'largeBlob' extension's 'support' parameter is only valid " + "when creating a credential")); + return promise; + } + if (options->publicKey()->extensions()->largeBlob()->hasWrite() && + options->publicKey()->extensions()->largeBlob()->hasRead()) { + resolver->Reject(MakeGarbageCollected<DOMException>( + DOMExceptionCode::kNotSupportedError, + "Only one of the 'largeBlob' extension's 'read' and 'write' " + "parameters is allowed at a time")); + return promise; + } + } } if (!options->publicKey()->hasUserVerification()) { @@ -1064,6 +1094,22 @@ "an assertion")); return promise; } + if (options->publicKey()->extensions()->hasLargeBlob()) { + if (options->publicKey()->extensions()->largeBlob()->hasRead()) { + resolver->Reject(MakeGarbageCollected<DOMException>( + DOMExceptionCode::kNotSupportedError, + "The 'largeBlob' extension's 'read' parameter is only valid when " + "requesting an assertion")); + return promise; + } + if (options->publicKey()->extensions()->largeBlob()->hasWrite()) { + resolver->Reject(MakeGarbageCollected<DOMException>( + DOMExceptionCode::kNotSupportedError, + "The 'largeBlob' extension's 'write' parameter is only valid " + "when requesting an assertion")); + return promise; + } + } } if (options->hasSignal()) { @@ -1099,7 +1145,7 @@ MakeGarbageCollected<ConsoleMessage>( mojom::blink::ConsoleMessageSource::kJavaScript, mojom::blink::ConsoleMessageLevel::kWarning, - "Ignoring unknown publicKey.authenticatorSelection.resident_key " + "Ignoring unknown publicKey.authenticatorSelection.residentKey " "value")); } auto mojo_options =
diff --git a/third_party/blink/renderer/modules/credentialmanager/idls.gni b/third_party/blink/renderer/modules/credentialmanager/idls.gni index 4747570..8feeabfc 100644 --- a/third_party/blink/renderer/modules/credentialmanager/idls.gni +++ b/third_party/blink/renderer/modules/credentialmanager/idls.gni
@@ -18,6 +18,8 @@ modules_dictionary_idl_files = [ "authentication_extensions_client_inputs.idl", "authentication_extensions_client_outputs.idl", + "authentication_extensions_large_blob_inputs.idl", + "authentication_extensions_large_blob_outputs.idl", "authenticator_selection_criteria.idl", "cable_authentication_data.idl", "cable_registration_data.idl",
diff --git a/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc b/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc index 18472ad8..808560f 100644 --- a/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc +++ b/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc
@@ -8,13 +8,11 @@ #include <memory> #include <utility> -#include "base/bind.h" #include "base/location.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram_macros.h" #include "base/stl_util.h" #include "base/synchronization/lock.h" -#include "base/task/post_task.h" #include "base/trace_event/trace_event.h" #include "media/audio/audio_device_description.h" #include "media/base/audio_renderer_sink.h" @@ -23,7 +21,9 @@ #include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame.h" +#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" #include "third_party/blink/renderer/platform/supplementable.h" +#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" namespace blink { @@ -245,14 +245,15 @@ } void AudioRendererSinkCache::DeleteLaterIfUnused( - const media::AudioRendererSink* sink_ptr) { - cleanup_task_runner_->PostDelayedTask( - FROM_HERE, - base::BindOnce(&AudioRendererSinkCache::DeleteSink, - // Unretained is safe here since this is a process-wide - // singleton and tests will ensure lifetime. - base::Unretained(this), base::RetainedRef(sink_ptr), - false /*do not delete if used*/), + scoped_refptr<media::AudioRendererSink> sink) { + PostDelayedCrossThreadTask( + *cleanup_task_runner_, FROM_HERE, + CrossThreadBindOnce( + &AudioRendererSinkCache::DeleteSink, + // Unretained is safe here since this is a process-wide + // singleton and tests will ensure lifetime. + CrossThreadUnretained(this), WTF::RetainedRef(std::move(sink)), + false /*do not delete if used*/), delete_timeout_); } @@ -343,7 +344,7 @@ cache_.push_back(cache_entry); } - DeleteLaterIfUnused(cache_entry.sink.get()); + DeleteLaterIfUnused(cache_entry.sink); } void AudioRendererSinkCache::DropSinksForFrame(
diff --git a/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h b/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h index 88335a8..08df2b9 100644 --- a/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h +++ b/third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.h
@@ -74,7 +74,7 @@ // Schedules a sink for deletion. Deletion will be performed on the same // thread the cache is created on. - void DeleteLaterIfUnused(const media::AudioRendererSink* sink_ptr); + void DeleteLaterIfUnused(scoped_refptr<media::AudioRendererSink> sink); // Deletes a sink from the cache. If |force_delete_used| is set, a sink being // deleted can (and should) be in use at the moment of deletion; otherwise the
diff --git a/third_party/blink/renderer/modules/media/audio/web_audio_device_factory.cc b/third_party/blink/renderer/modules/media/audio/web_audio_device_factory.cc index 0d79ad4..734c4c2 100644 --- a/third_party/blink/renderer/modules/media/audio/web_audio_device_factory.cc +++ b/third_party/blink/renderer/modules/media/audio/web_audio_device_factory.cc
@@ -193,9 +193,6 @@ base::TimeDelta::FromMilliseconds(5000); // There's one process wide instance that lives on the render thread. - // - // TODO(crbug.com/787252): Replace the use of base::ThreadPool below by - // worker_pool::PostTask(). static base::NoDestructor<AudioRendererSinkCache> cache( base::ThreadPool::CreateSequencedTaskRunner( {base::TaskPriority::BEST_EFFORT,
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc index 98aadee5..d9d2e80 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.cc
@@ -932,6 +932,18 @@ } make_xr_compatible_resolver_ = nullptr; + + if (IdentifiabilityStudySettings::Get()->IsSurfaceAllowed( + IdentifiableSurface::FromTypeAndToken( + IdentifiableSurface::Type::kWebFeature, + WebFeature::kWebGLRenderingContextMakeXRCompatible))) { + if (auto& ukm_params = GetUkmParameters()) { + IdentifiabilityMetricBuilder(ukm_params->source_id) + .SetWebfeature(WebFeature::kWebGLRenderingContextMakeXRCompatible, + exception_code == DOMExceptionCode::kNoError) + .Record(ukm_params->ukm_recorder); + } + } } }
diff --git a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl index 437dd930..4bf2227 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl +++ b/third_party/blink/renderer/modules/webgl/webgl_rendering_context_base.idl
@@ -709,5 +709,5 @@ [RuntimeEnabled=OffscreenCanvasCommit] void commit(); // WebXR Device API support - [RuntimeEnabled=WebXR, SecureContext, CallWith=ScriptState, RaisesException] Promise<void> makeXRCompatible(); + [RuntimeEnabled=WebXR, SecureContext, CallWith=ScriptState, RaisesException, HighEntropy, MeasureAs=WebGLRenderingContextMakeXRCompatible] Promise<void> makeXRCompatible(); };
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn index 34325e02..09207b4 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -17,13 +17,6 @@ import("//third_party/blink/renderer/platform/platform_generated.gni") import("//v8/gni/v8.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - # Most targets in this file are private actions so use that as the default. visibility = [ ":*", @@ -373,8 +366,6 @@ "audio/hrtf_panner.h", "audio/iir_filter.cc", "audio/iir_filter.h", - "audio/mac/fft_frame_mac.cc", - "audio/mac/vector_math_mac.h", "audio/media_multi_channel_resampler.cc", "audio/media_multi_channel_resampler.h", "audio/panner.cc", @@ -562,9 +553,6 @@ "file_metadata.cc", "file_metadata.h", "fonts/alternate_font_family.h", - "fonts/android/font_cache_android.cc", - "fonts/android/font_unique_name_lookup_android.cc", - "fonts/android/font_unique_name_lookup_android.h", "fonts/bitmap_glyphs_block_list.cc", "fonts/bitmap_glyphs_block_list.h", "fonts/canvas_rotation_in_vertical.h", @@ -638,18 +626,6 @@ "fonts/generic_font_family_settings.cc", "fonts/generic_font_family_settings.h", "fonts/glyph_metrics_map.h", - "fonts/linux/font_cache_linux.cc", - "fonts/linux/font_unique_name_lookup_linux.cc", - "fonts/linux/font_unique_name_lookup_linux.h", - "fonts/mac/attributed_string_type_converter.h", - "fonts/mac/attributed_string_type_converter.mm", - "fonts/mac/core_text_font_format_support.cc", - "fonts/mac/core_text_font_format_support.h", - "fonts/mac/font_cache_mac.mm", - "fonts/mac/font_matcher_mac.h", - "fonts/mac/font_matcher_mac.mm", - "fonts/mac/font_platform_data_mac.h", - "fonts/mac/font_platform_data_mac.mm", "fonts/ng_text_fragment_paint_info.h", "fonts/opentype/font_format_check.cc", "fonts/opentype/font_format_check.h", @@ -737,16 +713,6 @@ "fonts/web_font_render_style.cc", "fonts/web_font_typeface_factory.cc", "fonts/web_font_typeface_factory.h", - "fonts/win/dwrite_font_format_support.cc", - "fonts/win/dwrite_font_format_support.h", - "fonts/win/fallback_family_style_cache_win.cc", - "fonts/win/fallback_family_style_cache_win.h", - "fonts/win/font_cache_skia_win.cc", - "fonts/win/font_fallback_win.cc", - "fonts/win/font_fallback_win.h", - "fonts/win/font_platform_data_win.cc", - "fonts/win/font_unique_name_lookup_win.cc", - "fonts/win/font_unique_name_lookup_win.h", "geometry/blend.h", "geometry/calculation_expression_node.cc", "geometry/calculation_expression_node.h", @@ -1204,16 +1170,6 @@ "language.h", "link_hash.cc", "link_hash.h", - "mac/block_exceptions.h", - "mac/block_exceptions.mm", - "mac/color_mac.h", - "mac/color_mac.mm", - "mac/graphics_context_canvas.h", - "mac/graphics_context_canvas.mm", - "mac/local_current_graphics_context.h", - "mac/local_current_graphics_context.mm", - "mac/web_core_ns_cell_extras.h", - "mac/web_core_ns_cell_extras.mm", "media/web_audio_source_provider_client.h", "media/webaudiosourceprovider_impl.cc", "media_capabilities/web_audio_configuration.h", @@ -1361,6 +1317,8 @@ "privacy_budget/identifiability_digest_helpers.cc", "privacy_budget/identifiability_digest_helpers.h", "resolution_units.h", + "search_engine_utils.cc", + "search_engine_utils.h", "supplementable.cc", "supplementable.h", "text/bidi_character_run.h", @@ -1388,16 +1346,10 @@ "text/icu_error.h", "text/layout_locale.cc", "text/layout_locale.h", - "text/linux/hyphenation_linux.cc", "text/locale_icu.cc", "text/locale_icu.h", - "text/locale_mac.h", - "text/locale_mac.mm", "text/locale_to_script_mapping.cc", "text/locale_to_script_mapping.h", - "text/locale_win.cc", - "text/locale_win.h", - "text/mac/hyphenation_mac.cc", "text/mathml_operator_dictionary.cc", "text/mathml_operator_dictionary.h", "text/platform_locale.cc", @@ -1428,7 +1380,6 @@ "text/unicode_utilities.h", "text/web_entities.cc", "text/web_entities.h", - "text/win/hyphenation_win.cc", "text/writing_direction_mode.cc", "text/writing_direction_mode.h", "text/writing_mode.cc", @@ -1561,11 +1512,70 @@ if (is_android) { sources += [ + "fonts/android/font_cache_android.cc", + "fonts/android/font_unique_name_lookup_android.cc", + "fonts/android/font_unique_name_lookup_android.h", "widget/input/synchronous_compositor_proxy.cc", "widget/input/synchronous_compositor_proxy.h", ] } + if (is_mac) { + sources += [ + "audio/mac/fft_frame_mac.cc", + "audio/mac/vector_math_mac.h", + "fonts/mac/attributed_string_type_converter.h", + "fonts/mac/attributed_string_type_converter.mm", + "fonts/mac/core_text_font_format_support.cc", + "fonts/mac/core_text_font_format_support.h", + "fonts/mac/font_cache_mac.mm", + "fonts/mac/font_matcher_mac.h", + "fonts/mac/font_matcher_mac.mm", + "fonts/mac/font_platform_data_mac.h", + "fonts/mac/font_platform_data_mac.mm", + "mac/block_exceptions.h", + "mac/block_exceptions.mm", + "mac/color_mac.h", + "mac/color_mac.mm", + "mac/graphics_context_canvas.h", + "mac/graphics_context_canvas.mm", + "mac/local_current_graphics_context.h", + "mac/local_current_graphics_context.mm", + "mac/web_core_ns_cell_extras.h", + "mac/web_core_ns_cell_extras.mm", + "text/locale_mac.h", + "text/locale_mac.mm", + "text/mac/hyphenation_mac.cc", + ] + } + + if (is_linux || is_chromeos) { + sources += [ + "fonts/linux/font_cache_linux.cc", + "fonts/linux/font_unique_name_lookup_linux.cc", + "fonts/linux/font_unique_name_lookup_linux.h", + "text/linux/hyphenation_linux.cc", + ] + } + + if (is_win) { + sources += [ + "fonts/win/dwrite_font_format_support.cc", + "fonts/win/dwrite_font_format_support.h", + "fonts/win/fallback_family_style_cache_win.cc", + "fonts/win/fallback_family_style_cache_win.h", + "fonts/win/font_cache_skia_win.cc", + "fonts/win/font_fallback_win.cc", + "fonts/win/font_fallback_win.h", + "fonts/win/font_platform_data_win.cc", + "fonts/win/font_unique_name_lookup_win.cc", + "fonts/win/font_unique_name_lookup_win.h", + "text/locale_win.cc", + "text/locale_win.h", + "text/win/hyphenation_win.cc", + ] + } + configs += [ ":blink_platform_pch", ":blink_platform_config", @@ -1607,6 +1617,7 @@ "//base/allocator:buildflags", "//cc/ipc", "//components/paint_preview/common", + "//components/search_engines:search_engine_utils", "//components/viz/client", "//components/viz/common", "//crypto", @@ -1896,7 +1907,6 @@ "exported/web_screen_info_test.cc", "exported/web_string_test.cc", "exported/web_vector_test.cc", - "fonts/android/font_cache_android_test.cc", "fonts/bitmap_glyphs_block_list_test.cc", "fonts/cursor_position_test.cc", "fonts/font_cache_test.cc", @@ -1907,8 +1917,6 @@ "fonts/font_test.cc", "fonts/font_test_utilities.cc", "fonts/generic_font_family_settings_test.cc", - "fonts/mac/font_matcher_mac_test.mm", - "fonts/mac/font_platform_data_mac_test.mm", "fonts/opentype/font_settings_test.cc", "fonts/opentype/open_type_math_support_test.cc", "fonts/opentype/open_type_vertical_data_test.cc", @@ -2009,7 +2017,6 @@ "image-decoders/webp/webp_image_decoder_test.cc", "json/json_parser_test.cc", "json/json_values_test.cc", - "mac/graphics_context_canvas_test.mm", "media/webaudiosourceprovider_impl_test.cc", "mediastream/media_stream_audio_processor_options_test.cc", "mediastream/media_stream_audio_test.cc", @@ -2085,14 +2092,19 @@ "widget/input/scroll_predictor_unittest.cc", ] - if (is_win) { + if (is_android) { + sources += [ "fonts/android/font_cache_android_test.cc" ] + } else if (is_win) { sources += [ "fonts/win/fallback_lru_cache_win_test.cc", "text/locale_win_test.cc", ] } else if (is_mac) { sources += [ + "fonts/mac/font_matcher_mac_test.mm", + "fonts/mac/font_platform_data_mac_test.mm", "fonts/opentype/open_type_caps_support_test.mm", + "mac/graphics_context_canvas_test.mm", "text/locale_mac_test.mm", ] } else if (is_posix || is_fuchsia) {
diff --git a/third_party/blink/renderer/platform/DEPS b/third_party/blink/renderer/platform/DEPS index 8b2054f6..b6e1dc15 100644 --- a/third_party/blink/renderer/platform/DEPS +++ b/third_party/blink/renderer/platform/DEPS
@@ -97,4 +97,7 @@ "ukm_time_aggregator_test.cc" : [ "+components/ukm/test_ukm_recorder.h" ], + "search_engine_utils.cc": [ + "+components/search_engines/search_engine_utils.h" + ], }
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index f7c4a557..0a8962b4 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1026,13 +1026,15 @@ name: "LayoutNGPrinting", }, { - name: "LayoutNGRuby", - depends_on: ["LayoutNG"], - // The flag value is managed by kLayoutNGRuby in common/features.cc too. - status: "stable", + name: "LayoutNGTable", }, { - name: "LayoutNGTable", + name: "LayoutNGTextArea", + depends_on: ["EditingNG"], + }, + { + name: "LayoutNGTextField", + depends_on: ["EditingNG"], }, { // Adds the "sources" attribute to the LayoutShift interface for the @@ -2006,6 +2008,10 @@ status: "experimental", }, { + name: "WebAuthenticationLargeBlobExtension", + status: "experimental", + }, + { name: "WebAuthenticationResidentKeyRequirement", status: "experimental", },
diff --git a/third_party/blink/renderer/platform/search_engine_utils.cc b/third_party/blink/renderer/platform/search_engine_utils.cc new file mode 100644 index 0000000..02e013a9 --- /dev/null +++ b/third_party/blink/renderer/platform/search_engine_utils.cc
@@ -0,0 +1,18 @@ +// Copyright 2020 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 "third_party/blink/renderer/platform/search_engine_utils.h" + +#include "components/search_engines/search_engine_utils.h" +#include "url/gurl.h" + +namespace blink { + +bool IsKnownSearchEngine(const AtomicString& url) { + GURL gurl(url.GetString().Utf8()); + + return SearchEngineUtils::GetEngineType(gurl) > 0; +} + +} // namespace blink
diff --git a/third_party/blink/renderer/platform/search_engine_utils.h b/third_party/blink/renderer/platform/search_engine_utils.h new file mode 100644 index 0000000..551ead90 --- /dev/null +++ b/third_party/blink/renderer/platform/search_engine_utils.h
@@ -0,0 +1,18 @@ +// Copyright 2020 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 THIRD_PARTY_BLINK_RENDERER_PLATFORM_SEARCH_ENGINE_UTILS_H_ +#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SEARCH_ENGINE_UTILS_H_ + +#include "third_party/blink/renderer/platform/platform_export.h" +#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" + +namespace blink { + +// Returns whether provided string is a URL of a known search engine. +PLATFORM_EXPORT bool IsKnownSearchEngine(const AtomicString&); + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SEARCH_ENGINE_UTILS_H_
diff --git a/third_party/blink/renderer/platform/transforms/transformation_matrix.cc b/third_party/blink/renderer/platform/transforms/transformation_matrix.cc index 637cdfd..ee79816 100644 --- a/third_party/blink/renderer/platform/transforms/transformation_matrix.cc +++ b/third_party/blink/renderer/platform/transforms/transformation_matrix.cc
@@ -845,8 +845,7 @@ return FloatPoint(static_cast<float>(out_x), static_cast<float>(out_y)); } -FloatQuad TransformationMatrix::ProjectQuad(const FloatQuad& q, - bool* clamped) const { +FloatQuad TransformationMatrix::ProjectQuad(const FloatQuad& q) const { FloatQuad projected_quad; bool clamped1 = false; @@ -859,9 +858,6 @@ projected_quad.SetP3(ProjectPoint(q.P3(), &clamped3)); projected_quad.SetP4(ProjectPoint(q.P4(), &clamped4)); - if (clamped) - *clamped = clamped1 || clamped2 || clamped3 || clamped4; - // If all points on the quad had w < 0, then the entire quad would not be // visible to the projected surface. bool everything_was_clipped = clamped1 && clamped2 && clamped3 && clamped4;
diff --git a/third_party/blink/renderer/platform/transforms/transformation_matrix.h b/third_party/blink/renderer/platform/transforms/transformation_matrix.h index 772678a..46cd52a8 100644 --- a/third_party/blink/renderer/platform/transforms/transformation_matrix.h +++ b/third_party/blink/renderer/platform/transforms/transformation_matrix.h
@@ -215,14 +215,13 @@ // dropped, effectively projecting the quad into the z=0 plane FloatQuad MapQuad(const FloatQuad&) const; - // Map a point on the z=0 plane into a point on - // the plane with with the transform applied, by extending - // a ray perpendicular to the source plane and computing - // the local x,y position of the point where that ray intersects + // Map a point on the z=0 plane into a point on the plane with with the + // transform applied, by extending a ray perpendicular to the source plane and + // computing the local x,y position of the point where that ray intersects // with the destination plane. FloatPoint ProjectPoint(const FloatPoint&, bool* clamped = nullptr) const; - // Projects the four corners of the quad - FloatQuad ProjectQuad(const FloatQuad&, bool* clamped = nullptr) const; + // Projects the four corners of the quad. + FloatQuad ProjectQuad(const FloatQuad&) const; // Projects the four corners of the quad and takes a bounding box, // while sanitizing values created when the w component is negative. LayoutRect ClampedBoundsOfProjectedQuad(const FloatQuad&) const;
diff --git a/third_party/blink/renderer/platform/widget/widget_base.cc b/third_party/blink/renderer/platform/widget/widget_base.cc index f7b9702..dd29acb0 100644 --- a/third_party/blink/renderer/platform/widget/widget_base.cc +++ b/third_party/blink/renderer/platform/widget/widget_base.cc
@@ -1286,8 +1286,8 @@ return point; // TODO(danakj): Should this be GetScreenInfo() so it changes under emulation? // TODO(dtapuska): Determine if this should be a floor vs rounded. - return gfx::ScaleToFlooredPoint( - point, client_->GetOriginalScreenInfo().device_scale_factor); + float reverse = 1 / client_->GetOriginalScreenInfo().device_scale_factor; + return gfx::ScaleToFlooredPoint(point, reverse); } gfx::Size WidgetBase::DIPsToCeiledBlinkSpace(const gfx::Size& size) {
diff --git a/third_party/blink/renderer/platform/wtf/BUILD.gn b/third_party/blink/renderer/platform/wtf/BUILD.gn index f7200b2..99836f52 100644 --- a/third_party/blink/renderer/platform/wtf/BUILD.gn +++ b/third_party/blink/renderer/platform/wtf/BUILD.gn
@@ -8,13 +8,6 @@ import("//testing/test.gni") import("//third_party/blink/renderer/config.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - visibility = [ ":*", "//mojo/public/cpp/bindings/*", @@ -132,8 +125,6 @@ "text/string_hasher.h", "text/string_impl.cc", "text/string_impl.h", - "text/string_impl_mac.mm", - "text/string_mac.mm", "text/string_operators.h", "text/string_statics.cc", "text/string_statics.h", @@ -179,8 +170,6 @@ "threading.cc", "threading.h", "threading_primitives.h", - "threading_pthreads.cc", - "threading_win.cc", "tree_node.h", "type_traits.h", "uuid.cc", @@ -223,8 +212,15 @@ # Rules changing the |sources| list are temporarily commented out, until # those files are actually moved to here. + if (is_mac) { + sources += [ + "text/string_impl_mac.mm", + "text/string_mac.mm", + ] + } + if (is_win) { - sources -= [ "threading_pthreads.cc" ] + sources += [ "threading_win.cc" ] cflags = [ "/wd4068" ] # Unknown pragma. @@ -237,6 +233,8 @@ # in generated build files. "//tools/win/DebugVisualizers/blink.natvis", ] + } else { + sources += [ "threading_pthreads.cc" ] } if (is_android) {
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng index e086c38..e5571f4 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-layout-ng +++ b/third_party/blink/web_tests/FlagExpectations/disable-layout-ng
@@ -121,7 +121,6 @@ crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/abspos-013.tentative.html [ Pass ] crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/block-aspect-ratio-024.tentative.html [ Failure ] crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/block-aspect-ratio-028.tentative.html [ Failure ] -crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/percentage-resolution-002.tentative.html [ Failure ] crbug.com/1045668 external/wpt/css/css-sizing/aspect-ratio/quirks-mode-001.tentative.html [ Failure ] crbug.com/591099 external/wpt/css/css-sizing/clone-nowrap-intrinsic-size-bidi.html [ Failure ] crbug.com/591099 external/wpt/css/css-sizing/intrinsic-percent-non-replaced-004.html [ Failure ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index ce6e100a..bd0538f 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -273,11 +273,6 @@ crbug.com/1004547 external/wpt/intersection-observer/cross-origin-iframe.sub.html [ Pass Failure ] crbug.com/1007229 external/wpt/intersection-observer/same-origin-grand-child-iframe.sub.html [ Pass Failure ] -# Not supported yet -crbug.com/1133835 external/wpt/css/css-sizing/aspect-ratio/replaced-element-023.tentative.html [ Failure ] -crbug.com/1133835 external/wpt/css/css-sizing/aspect-ratio/replaced-element-025.tentative.html [ Failure ] -crbug.com/1133835 external/wpt/css/css-sizing/aspect-ratio/replaced-element-027.tentative.html [ Failure ] - crbug.com/936084 external/wpt/css/css-sizing/max-content-input-001.html [ Failure ] crbug.com/849459 fragmentation/repeating-thead-under-repeating-thead.html [ Failure ] @@ -1023,7 +1018,6 @@ crbug.com/1113911 virtual/layout_ng_block_frag/external/wpt/css/css-break/fieldset-001.html [ Failure ] crbug.com/1066380 virtual/layout_ng_block_frag/external/wpt/css/css-break/widows-orphans-002.html [ Failure ] crbug.com/1066380 virtual/layout_ng_block_frag/external/wpt/css/css-break/widows-orphans-004.html [ Failure ] -crbug.com/829028 virtual/layout_ng_block_frag/external/wpt/css/css-break/widows-orphans-005.html [ Failure ] crbug.com/1079031 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/change-out-of-flow-type-and-remove-inner-multicol-crash.html [ Crash Failure ] crbug.com/1058792 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/composited-under-clip-under-multicol.html [ Failure Crash ] crbug.com/996655 virtual/layout_ng_block_frag/external/wpt/css/css-multicol/going-out-of-flow-after-spanner.html [ Crash Failure Pass ] @@ -1057,7 +1051,6 @@ crbug.com/1079031 virtual/layout_ng_block_frag/fast/multicol/abspos-after-break-after.html [ Failure ] crbug.com/1079031 virtual/layout_ng_block_frag/fast/multicol/abspos-new-width-rebalance.html [ Crash Failure ] crbug.com/1066616 virtual/layout_ng_block_frag/fast/multicol/border-radius-clipped-layer-second-column.html [ Failure ] -crbug.com/829028 virtual/layout_ng_block_frag/fast/multicol/break-before-first-line-in-first-child.html [ Failure ] crbug.com/829028 virtual/layout_ng_block_frag/fast/multicol/caret-range-anonymous-block.html [ Failure ] crbug.com/829028 virtual/layout_ng_block_frag/fast/multicol/caret-range-anonymous-block-rtl.html [ Failure ] crbug.com/829028 virtual/layout_ng_block_frag/fast/multicol/caret-range-outside-columns.html [ Failure ]
diff --git a/third_party/blink/web_tests/accessibility/name-calc-visibility.html b/third_party/blink/web_tests/accessibility/name-calc-visibility.html index 2d938e65..9bdbf493 100644 --- a/third_party/blink/web_tests/accessibility/name-calc-visibility.html +++ b/third_party/blink/web_tests/accessibility/name-calc-visibility.html
@@ -86,8 +86,8 @@ <script> test(function(t) { var axInput4 = accessibilityController.accessibleElementById("input4"); - assert_equals(axInput4.name, "1 2 7"); -}, "Visibility: 'hidden' and display: 'none' inside aria-labelledby label subtree, where entire label subtree is display: 'none'"); + assert_equals(axInput4.name, "1 2 3 4 5 6 7"); +}, "Visibility: nested 'hidden' and display: 'none' inside aria-labelledby label subtree, where entire label subtree is display: 'none'"); </script> <div class="container">
diff --git a/third_party/blink/web_tests/android/ChromiumWPTExpectations b/third_party/blink/web_tests/android/ChromiumWPTExpectations index e4e2cace..38ec0751 100644 --- a/third_party/blink/web_tests/android/ChromiumWPTExpectations +++ b/third_party/blink/web_tests/android/ChromiumWPTExpectations
@@ -3282,7 +3282,6 @@ crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_mouse-on-object.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_mouse-pointer-on-scrollbar.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/idlharness.window.html [ Failure ] -crbug.com/1050754 external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_coalesced_events_attributes.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_pointercapture_in_frame.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_touch-action-none-css_touch.html [ Timeout ]
diff --git a/third_party/blink/web_tests/android/WeblayerWPTExpectations b/third_party/blink/web_tests/android/WeblayerWPTExpectations index 6989dd5..774124e 100644 --- a/third_party/blink/web_tests/android/WeblayerWPTExpectations +++ b/third_party/blink/web_tests/android/WeblayerWPTExpectations
@@ -3280,7 +3280,6 @@ crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_mouse-on-object.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_mouse-pointer-on-scrollbar.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/idlharness.window.html [ Failure ] -crbug.com/1050754 external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_coalesced_events_attributes.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_pointercapture_in_frame.html [ Timeout ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_tiltX_tiltY_to_azimuth_altitude.html [ Failure ]
diff --git a/third_party/blink/web_tests/android/WebviewWPTExpectations b/third_party/blink/web_tests/android/WebviewWPTExpectations index ec7d7b29..63c85e1 100644 --- a/third_party/blink/web_tests/android/WebviewWPTExpectations +++ b/third_party/blink/web_tests/android/WebviewWPTExpectations
@@ -3444,7 +3444,6 @@ crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_mouse-pointer-on-scrollbar.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/compat/pointerevent_touch-action_two-finger_interaction.html [ Failure Timeout ] crbug.com/1050754 external/wpt/pointerevents/idlharness.window.html [ Failure ] -crbug.com/1050754 external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html [ Failure ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_attributes_nohover_pointers.html [ Failure Timeout ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_boundary_events_in_capturing.html [ Failure Timeout ] crbug.com/1050754 external/wpt/pointerevents/pointerevent_change-touch-action-onpointerdown_touch.html [ Failure Timeout ]
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json index 3f412d7e..95f04c0 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_8.json
@@ -159289,6 +159289,19 @@ {} ] ], + "mask-containing-image-with-clip-path.svg": [ + "faeec28a35292846fb25c5788d1e6d39e1e33975", + [ + null, + [ + [ + "/svg/embedded/reference/green-rect-100x100.svg", + "==" + ] + ], + {} + ] + ], "reftests": { "display-none-mask.html": [ "5a746c9fdaec71c5c530e393aaa1f641f55c89b8", @@ -174734,7 +174747,7 @@ [] ], "KeyframeEffect-getKeyframes.tentative-expected.txt": [ - "9dc46918c17373ca1cb2b8cd6816750155280697", + "bfffc51489c6c02572b0b8599dc1c8b8097e29e6", [] ], "META.yml": [ @@ -211488,7 +211501,7 @@ [] ], "window-tests-enumeration.js": [ - "24c8e0f94664a055318feaa3bf58a5bb1a840256", + "6e60910251fc59012d28f3c9a42adac7b7cb6d7a", [] ] } @@ -227814,7 +227827,7 @@ [] ], "largest-contentful-paint-helpers.js": [ - "0529e227b8094656361a7ab9d5ae81a92f0e8934", + "e7f7aa764f8643460f5ae86de5b39171da29d80a", [] ] } @@ -233892,7 +233905,7 @@ [] ], "webxr-test.js": [ - "084d692ee0a7f705e9647c7b13038c85127cb9af", + "6b6c41de0c4c1082affb2ec54208c326a755b425", [] ], "webxr-test.js.headers": [ @@ -233928,6 +233941,10 @@ "b6030bf121388d5f4e33fbc31f8680fb6f58344b", [] ], + "testdriver-vendor.js": [ + "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391", + [] + ], "testdriver-vendor.js.headers": [ "5e8f640c6659d176eaca4c71cc1798b7285540b7", [] @@ -233948,6 +233965,10 @@ "5e8f640c6659d176eaca4c71cc1798b7285540b7", [] ], + "testharnessreport.js": [ + "e5cb40fe0ef652be407d4c48b1c59391864cec7b", + [] + ], "testharnessreport.js.headers": [ "5e8f640c6659d176eaca4c71cc1798b7285540b7", [] @@ -238443,6 +238464,12 @@ [] ] }, + "support": { + "white-rect-100x100.svg": [ + "6ee3841974a82aa60187570b3f18fc239bf44534", + [] + ] + }, "svg-child-will-change-transform-invalidation-ref.html": [ "0d760d18dce03df5917086ccb0253a8ced421e36", [] @@ -248482,6 +248509,10 @@ "cb6e177c1eaa6e75659080e578e767ee807a7be7", [] ], + "RTCDataChannel-binaryType.window-expected.txt": [ + "c9bf0c90775919645f47d2085a90837c06e4c6ef", + [] + ], "RTCDataChannel-bufferedAmount-expected.txt": [ "b7497b7d878c2ffcc7f2f4c1e728e50425fe56c4", [] @@ -251331,7 +251362,7 @@ ] }, "idlharness.https.window-expected.txt": [ - "babb34bddc7e1462737ce060c9e27cd60982ae8f", + "88ee8bc4e5a3d1ad1b5b7839263053cd5c13ae97", [] ], "resources": { @@ -251363,6 +251394,10 @@ "webxr_feature_policy.https.html.headers": [ "2c758962332e723453f31a6cb8d3dfc3ac292d44", [] + ], + "xr_viewport_scale.https-expected.txt": [ + "5f7bbdc82bb4858a88b92287b35559c0a1399fc5", + [] ] }, "window-segments": { @@ -366429,21 +366464,28 @@ ] ], "image-TAO.sub.html": [ - "41c8c748619aea00c2afe67dd5983ab7601121b0", + "8b7d99e47164803047cad4b7280e2b3e4950d93f", + [ + null, + {} + ] + ], + "image-full-viewport.html": [ + "7da6c5c3dc9a2c32699277da0bfecf1b7a4a1dab", [ null, {} ] ], "image-inside-svg.html": [ - "5fff9e47f6424284fd707e276a68fa1f302d781c", + "ce96574609a56e5721a136416c5d411a1e37e38e", [ null, {} ] ], "image-not-fully-visible.html": [ - "cec488c1c899d3d8b7ad9fbd306ec6cd92ecc416", + "8990fd14c0787caa07225017108edb8031eca899", [ null, {} @@ -366527,7 +366569,7 @@ ] ], "observe-text.html": [ - "a0a07d9422d62c2a20d72310c903242af0c56825", + "b4b485ddebd57afbd4af2ff962151f92d19a54d3", [ null, {} @@ -414986,6 +415028,13 @@ } ] ], + "RTCDataChannel-binaryType.window.js": [ + "c63281bd51b0a01de27785c1e14792a6b51e0625", + [ + "webrtc/RTCDataChannel-binaryType.window.html", + {} + ] + ], "RTCDataChannel-bufferedAmount.html": [ "f663941162d93e511b1a5d6be01ed79fe28c9bbf", [ @@ -422561,6 +422610,13 @@ null, {} ] + ], + "xr_viewport_scale.https.html": [ + "baff125705fb2121c973845d89214e8bc435e115", + [ + null, + {} + ] ] }, "window-segments": {
diff --git a/third_party/blink/web_tests/external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html b/third_party/blink/web_tests/external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html index e8779f6..9cd6c6b 100644 --- a/third_party/blink/web_tests/external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html +++ b/third_party/blink/web_tests/external/wpt/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html
@@ -34,14 +34,14 @@ var rect = document.getElementById("target").getBoundingClientRect(); await new test_driver.Actions() - .pointerMove(rect.left - 10, rect.top - 10) + .pointerMove(Math.ceil(rect.left - 10), Math.ceil(rect.top - 10)) .send() - + await resolveWhen(() => { return moveReceived == true }); receivedEvents = []; moveReceived = false; await new test_driver.Actions() - .pointerMove(rect.left + 10, rect.top + 10) + .pointerMove(Math.ceil(rect.left + 10), Math.ceil(rect.top + 10)) .send() await resolveWhen(() => { return moveReceived == true }); @@ -57,7 +57,7 @@ moveReceived = false; await new test_driver.Actions() - .pointerMove(rect.left - 10, rect.top - 10) + .pointerMove(Math.ceil(rect.left - 10), Math.ceil(rect.top - 10)) .send() await resolveWhen(() => { return moveReceived == true });
diff --git a/third_party/blink/web_tests/external/wpt/resources/testdriver-vendor.js b/third_party/blink/web_tests/external/wpt/resources/testdriver-vendor.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/resources/testdriver-vendor.js
diff --git a/third_party/blink/web_tests/external/wpt/resources/testharnessreport.js b/third_party/blink/web_tests/external/wpt/resources/testharnessreport.js new file mode 100644 index 0000000..e5cb40fe --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/resources/testharnessreport.js
@@ -0,0 +1,57 @@ +/* global add_completion_callback */ +/* global setup */ + +/* + * This file is intended for vendors to implement code needed to integrate + * testharness.js tests with their own test systems. + * + * Typically test system integration will attach callbacks when each test has + * run, using add_result_callback(callback(test)), or when the whole test file + * has completed, using + * add_completion_callback(callback(tests, harness_status)). + * + * For more documentation about the callback functions and the + * parameters they are called with see testharness.js + */ + +function dump_test_results(tests, status) { + var results_element = document.createElement("script"); + results_element.type = "text/json"; + results_element.id = "__testharness__results__"; + var test_results = tests.map(function(x) { + return {name:x.name, status:x.status, message:x.message, stack:x.stack} + }); + var data = {test:window.location.href, + tests:test_results, + status: status.status, + message: status.message, + stack: status.stack}; + results_element.textContent = JSON.stringify(data); + + // To avoid a HierarchyRequestError with XML documents, ensure that 'results_element' + // is inserted at a location that results in a valid document. + var parent = document.body + ? document.body // <body> is required in XHTML documents + : document.documentElement; // fallback for optional <body> in HTML5, SVG, etc. + + parent.appendChild(results_element); +} + +add_completion_callback(dump_test_results); + +/* If the parent window has a testharness_properties object, + * we use this to provide the test settings. This is used by the + * default in-browser runner to configure the timeout and the + * rendering of results + */ +try { + if (window.opener && "testharness_properties" in window.opener) { + /* If we pass the testharness_properties object as-is here without + * JSON stringifying and reparsing it, IE fails & emits the message + * "Could not complete the operation due to error 80700019". + */ + setup(JSON.parse(JSON.stringify(window.opener.testharness_properties))); + } +} catch (e) { +} +// vim: set expandtab shiftwidth=4 tabstop=4:
diff --git a/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window-expected.txt b/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window-expected.txt new file mode 100644 index 0000000..c9bf0c9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window-expected.txt
@@ -0,0 +1,20 @@ +This is a testharness.js-based test. +FAIL Setting binaryType to 'blob' should succeed Failed to set the 'binaryType' property on 'RTCDataChannel': Blob support not implemented yet +PASS Setting binaryType to 'arraybuffer' should succeed +FAIL Setting invalid binaryType 'jellyfish' should throw SyntaxError assert_throws_dom: function "() => { + dc.binaryType = binaryType; + }" threw object "TypeMismatchError: Failed to set the 'binaryType' property on 'RTCDataChannel': Unknown binary type : jellyfish" that is not a DOMException SyntaxError: property "code" is equal to 17, expected 12 +FAIL Setting invalid binaryType 'arraybuffer ' should throw SyntaxError assert_throws_dom: function "() => { + dc.binaryType = binaryType; + }" threw object "TypeMismatchError: Failed to set the 'binaryType' property on 'RTCDataChannel': Unknown binary type : arraybuffer " that is not a DOMException SyntaxError: property "code" is equal to 17, expected 12 +FAIL Setting invalid binaryType '' should throw SyntaxError assert_throws_dom: function "() => { + dc.binaryType = binaryType; + }" threw object "TypeMismatchError: Failed to set the 'binaryType' property on 'RTCDataChannel': Unknown binary type : " that is not a DOMException SyntaxError: property "code" is equal to 17, expected 12 +FAIL Setting invalid binaryType 'null' should throw SyntaxError assert_throws_dom: function "() => { + dc.binaryType = binaryType; + }" threw object "TypeMismatchError: Failed to set the 'binaryType' property on 'RTCDataChannel': Unknown binary type : null" that is not a DOMException SyntaxError: property "code" is equal to 17, expected 12 +FAIL Setting invalid binaryType 'undefined' should throw SyntaxError assert_throws_dom: function "() => { + dc.binaryType = binaryType; + }" threw object "TypeMismatchError: Failed to set the 'binaryType' property on 'RTCDataChannel': Unknown binary type : undefined" that is not a DOMException SyntaxError: property "code" is equal to 17, expected 12 +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window.js b/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window.js new file mode 100644 index 0000000..c63281bd --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webrtc/RTCDataChannel-binaryType.window.js
@@ -0,0 +1,27 @@ +'use strict'; + +const validBinaryTypes = ['blob', 'arraybuffer']; +const invalidBinaryTypes = ['jellyfish', 'arraybuffer ', '', null, undefined]; + +for (const binaryType of validBinaryTypes) { + test((t) => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const dc = pc.createDataChannel('test-binary-type'); + + dc.binaryType = binaryType; + assert_equals(dc.binaryType, binaryType, `dc.binaryType should be '${binaryType}'`); + }, `Setting binaryType to '${binaryType}' should succeed`); +} + +for (const binaryType of invalidBinaryTypes) { + test((t) => { + const pc = new RTCPeerConnection(); + t.add_cleanup(() => pc.close()); + const dc = pc.createDataChannel('test-binary-type'); + + assert_throws_dom('SyntaxError', () => { + dc.binaryType = binaryType; + }); + }, `Setting invalid binaryType '${binaryType}' should throw SyntaxError`); +}
diff --git a/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-create-with-virtual-authenticator.html b/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-create-with-virtual-authenticator.html index 6cecfaf..83929e5 100644 --- a/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-create-with-virtual-authenticator.html +++ b/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-create-with-virtual-authenticator.html
@@ -91,6 +91,125 @@ authAbortController.abort(); return promise; }, "navigator.credentials.create() with abort signal flag is set after promise resolved"); + + // TODO(nsatragno): move largeBlob tests to WPTs once the largeBlob webdriver + // extension is implemented. + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + read: true, + }, + }; + return promise_rejects_dom(t, "NotSupportedError", + navigator.credentials.create({ publicKey : customMakeCredOptions })); + }, "navigator.credentials.create() with largeBlob.read set"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + write: new ArrayBuffer(), + }, + }; + return promise_rejects_dom(t, "NotSupportedError", + navigator.credentials.create({ publicKey : customMakeCredOptions })); + }, "navigator.credentials.create() with largeBlob.write set"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + support: "preferred", + }, + }; + var credential = + await navigator.credentials.create({ publicKey : customMakeCredOptions }); + assert_false(credential.getClientExtensionResults().largeBlob.supported); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob"); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written"); + + }, "navigator.credentials.create() with largeBlob.support set to preferred and not supported by authenticator"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: {}, + }; + // Should be equivalent to preferred. + var credential = + await navigator.credentials.create({ publicKey : customMakeCredOptions }); + assert_false(credential.getClientExtensionResults().largeBlob.supported); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob"); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written"); + + }, "navigator.credentials.create() with largeBlob.support not set and not supported by authenticator"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + support: "required", + }, + }; + return promise_rejects_dom(t, "NotAllowedError", + navigator.credentials.create({ publicKey : customMakeCredOptions })); + }, "navigator.credentials.create() with largeBlob.support set to required and not supported by authenticator"); }, {}); +authenticatorSetup("With large blob", () => { + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + support: "preferred", + }, + }; + var credential = + await navigator.credentials.create({ publicKey : customMakeCredOptions }); + assert_true(credential.getClientExtensionResults().largeBlob.supported); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob"); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written"); + }, "navigator.credentials.create() with largeBlob.support set to preferred and supported by authenticator"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: {}, + }; + // Should be equivalent to preferred. + var credential = + await navigator.credentials.create({ publicKey : customMakeCredOptions }); + assert_true(credential.getClientExtensionResults().largeBlob.supported); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob"); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written"); + }, "navigator.credentials.create() with largeBlob.support not set and supported by authenticator"); + + promise_test(async t => { + var customMakeCredOptions = deepCopy(MAKE_CREDENTIAL_OPTIONS); + customMakeCredOptions.authenticatorSelection.requireResidentKey = true; + customMakeCredOptions.extensions = { + largeBlob: { + support: "required", + }, + }; + var credential = + await navigator.credentials.create({ publicKey : customMakeCredOptions }); + assert_true(credential.getClientExtensionResults().largeBlob.supported); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "blob"); + assert_not_own_property(credential.getClientExtensionResults().largeBlob, "written"); + }, "navigator.credentials.create() with largeBlob.support set to required and supported by authenticator"); +}, { + protocol: blink.test.mojom.ClientToAuthenticatorProtocol.CTAP2, + ctap2version: blink.test.mojom.ClientToAuthenticatorProtocol.CTAP2_1, + hasLargeBlob: true, +}); + </script>
diff --git a/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-get-with-virtual-authenticator.html b/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-get-with-virtual-authenticator.html index 4e78b16..4d1876b 100644 --- a/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-get-with-virtual-authenticator.html +++ b/third_party/blink/web_tests/http/tests/credentialmanager/credentialscontainer-get-with-virtual-authenticator.html
@@ -113,6 +113,29 @@ return navigator.credentials.get({ publicKey : customGetAssertionOptions }); }, "navigator.credentials.get() with authenticators supporting different transports"); +promise_test(async t => { + var customGetCredentialOptions = deepCopy(GET_CREDENTIAL_OPTIONS); + customGetCredentialOptions.extensions = { + largeBlob: { + support: "preferred", + }, + }; + return promise_rejects_dom(t, "NotSupportedError", + navigator.credentials.get({publicKey: customGetCredentialOptions})); +}, "navigator.credentials.get() with largeBlob.support set"); + +promise_test(async t => { + var customGetCredentialOptions = deepCopy(GET_CREDENTIAL_OPTIONS); + customGetCredentialOptions.extensions = { + largeBlob: { + read: true, + write: new ArrayBuffer(), + }, + }; + return promise_rejects_dom(t, "NotSupportedError", + navigator.credentials.get({publicKey: customGetCredentialOptions})); +}, "navigator.credentials.get() with largeBlob.read and largeBlob.write set"); + promise_test(t => { return navigator.credentials.test.clearAuthenticators(); }, "Clean up testing environment.");
diff --git a/third_party/blink/web_tests/http/tests/credentialmanager/resources/virtual-navigator-credentials.js b/third_party/blink/web_tests/http/tests/credentialmanager/resources/virtual-navigator-credentials.js index 904a580..0831e68e 100644 --- a/third_party/blink/web_tests/http/tests/credentialmanager/resources/virtual-navigator-credentials.js +++ b/third_party/blink/web_tests/http/tests/credentialmanager/resources/virtual-navigator-credentials.js
@@ -67,6 +67,7 @@ attachment: blink.mojom.AuthenticatorAttachment.CROSS_PLATFORM, hasResidentKey: true, hasUserVerification: true, + hasLargeBlob: false, }, options); let createAuthenticatorResponse =
diff --git a/third_party/blink/web_tests/http/tests/devtools/layers/layer-canvas-log-expected.txt b/third_party/blink/web_tests/http/tests/devtools/layers/layer-canvas-log-expected.txt index 8f3b2f9..6ce89a7e 100644 --- a/third_party/blink/web_tests/http/tests/devtools/layers/layer-canvas-log-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/layers/layer-canvas-log-expected.txt
@@ -129,7 +129,7 @@ params : { paint : { color : "#7F000000" - filterLevel : "Low" + filterLevel : "None" flags : "AntiAlias" strokeCap : "Butt" strokeJoin : "Miter"
diff --git a/third_party/blink/web_tests/inspector-protocol/accessibility/accessibility-nameSources-visiblity-expected.txt b/third_party/blink/web_tests/inspector-protocol/accessibility/accessibility-nameSources-visiblity-expected.txt index 96264bc..09b89446c 100644 --- a/third_party/blink/web_tests/inspector-protocol/accessibility/accessibility-nameSources-visiblity-expected.txt +++ b/third_party/blink/web_tests/inspector-protocol/accessibility/accessibility-nameSources-visiblity-expected.txt
@@ -361,7 +361,7 @@ [0] : { idref : label4 nodeResult : div#label4 - text : 1 2 7 + text : 1 2 3 4 5 6 7 } ] type : idrefList @@ -370,7 +370,7 @@ type : relatedElement value : { type : computedString - value : 1 2 7 + value : 1 2 3 4 5 6 7 } } [1] : { @@ -400,7 +400,7 @@ } ] type : computedString - value : 1 2 7 + value : 1 2 3 4 5 6 7 } nodeId : <string> properties : [ @@ -460,7 +460,7 @@ [0] : { idref : label4 nodeResult : div#label4 - text : 1 2 7 + text : 1 2 3 4 5 6 7 } ] type : nodeList
diff --git a/third_party/breakpad/BUILD.gn b/third_party/breakpad/BUILD.gn index b5452e16..4871df2 100644 --- a/third_party/breakpad/BUILD.gn +++ b/third_party/breakpad/BUILD.gn
@@ -10,13 +10,6 @@ import("//build/config/win/visual_studio_version.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - config("tools_config") { include_dirs = [ "breakpad/src", @@ -88,8 +81,6 @@ if (current_toolchain == host_toolchain) { # Contains the code shared by both {micro,mini}dump_stackwalk. static_library("stackwalk_common") { - # Always want these files included regardless of platform. - set_sources_assignment_filter([]) sources = [ "breakpad/src/common/path_helper.cc", "breakpad/src/common/path_helper.h", @@ -194,8 +185,6 @@ "max_len=128000", ] - # Always want these files included regardless of platform. - set_sources_assignment_filter([]) sources += [ "breakpad/src/processor/exploitability_linux.cc", "breakpad/src/processor/exploitability_linux.h", @@ -234,8 +223,6 @@ configs += [ "//build/config/compiler:no_chromium_code" ] configs += default_breakpad_configs - # Always want these files included regardless of platform. - set_sources_assignment_filter([]) sources += [ "breakpad/src/processor/exploitability_linux.cc", "breakpad/src/processor/exploitability_linux.h", @@ -247,7 +234,6 @@ } executable("minidump_dump") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/processor/basic_code_module.h", "breakpad/src/processor/basic_code_modules.cc", @@ -576,8 +562,6 @@ } static_library("client") { - # Want all these sources for both Linux and Android. - set_sources_assignment_filter([]) sources = [ "breakpad/src/client/linux/crash_generation/crash_generation_client.cc", "breakpad/src/client/linux/crash_generation/crash_generation_client.h", @@ -658,7 +642,6 @@ } static_library("processor_support") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/common/scoped_ptr.h", "breakpad/src/processor/basic_code_modules.cc", @@ -688,7 +671,6 @@ } test("breakpad_unittests") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/client/linux/handler/exception_handler_unittest.cc", "breakpad/src/client/linux/minidump_writer/cpu_set_unittest.cc", @@ -759,7 +741,6 @@ } executable("linux_dumper_unittest_helper") { - set_sources_assignment_filter([]) testonly = true sources = [ "breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc" ] deps = [ ":processor_support" ] @@ -772,7 +753,6 @@ } executable("generate_test_dump") { - set_sources_assignment_filter([]) testonly = true sources = [ "linux/generate-test-dump.cc" ] @@ -791,7 +771,6 @@ } executable("minidump-2-core") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/common/path_helper.cc", "breakpad/src/common/path_helper.h", @@ -804,7 +783,6 @@ } executable("core-2-minidump") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/tools/linux/core2md/core2md.cc" ] deps = [ ":client" ] @@ -1016,7 +994,6 @@ if (is_ios) { static_library("client") { - set_sources_assignment_filter([]) sources = [ "breakpad/src/client/ios/Breakpad.h", "breakpad/src/client/ios/Breakpad.mm", @@ -1065,7 +1042,6 @@ "breakpad/src/common/string_conversion.h", "breakpad/src/google_breakpad/common/minidump_format.h", ] - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) include_dirs = [ "breakpad/src",
diff --git a/third_party/crashpad/crashpad/BUILD.gn b/third_party/crashpad/crashpad/BUILD.gn index 98d7390d..8f52b08 100644 --- a/third_party/crashpad/crashpad/BUILD.gn +++ b/third_party/crashpad/crashpad/BUILD.gn
@@ -16,11 +16,6 @@ import("build/test.gni") import("util/net/tls.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - config("crashpad_config") { include_dirs = [ "." ] } @@ -31,8 +26,8 @@ cflags = [ "-fno-sanitize=undefined" ] } visibility = [ - "snapshot:snapshot", "minidump:minidump_test", + "snapshot:snapshot", "third_party/googletest:googletest", "util:util", ]
diff --git a/third_party/crashpad/crashpad/client/BUILD.gn b/third_party/crashpad/crashpad/client/BUILD.gn index ca55ad4..4a5f34ad 100644 --- a/third_party/crashpad/crashpad/client/BUILD.gn +++ b/third_party/crashpad/crashpad/client/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - crashpad_static_library("client") { sources = [ "annotation.cc",
diff --git a/third_party/crashpad/crashpad/compat/BUILD.gn b/third_party/crashpad/crashpad/compat/BUILD.gn index 9bb2306..54d9acb 100644 --- a/third_party/crashpad/crashpad/compat/BUILD.gn +++ b/third_party/crashpad/crashpad/compat/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - config("compat_config") { include_dirs = []
diff --git a/third_party/crashpad/crashpad/handler/BUILD.gn b/third_party/crashpad/crashpad/handler/BUILD.gn index 332117d7..9d5f7c60 100644 --- a/third_party/crashpad/crashpad/handler/BUILD.gn +++ b/third_party/crashpad/crashpad/handler/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - static_library("handler") { sources = [ "crash_report_upload_thread.cc",
diff --git a/third_party/crashpad/crashpad/minidump/BUILD.gn b/third_party/crashpad/crashpad/minidump/BUILD.gn index d07c1dd4c..6217ede 100644 --- a/third_party/crashpad/crashpad/minidump/BUILD.gn +++ b/third_party/crashpad/crashpad/minidump/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - crashpad_static_library("minidump") { sources = [ "minidump_annotation_writer.cc",
diff --git a/third_party/crashpad/crashpad/snapshot/BUILD.gn b/third_party/crashpad/crashpad/snapshot/BUILD.gn index 49a809a..6ca9bd4 100644 --- a/third_party/crashpad/crashpad/snapshot/BUILD.gn +++ b/third_party/crashpad/crashpad/snapshot/BUILD.gn
@@ -17,9 +17,6 @@ if (crashpad_is_in_chromium) { import("//build/config/compiler/compiler.gni") - - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) } crashpad_static_library("snapshot") {
diff --git a/third_party/crashpad/crashpad/test/BUILD.gn b/third_party/crashpad/crashpad/test/BUILD.gn index e225e47..9348574 100644 --- a/third_party/crashpad/crashpad/test/BUILD.gn +++ b/third_party/crashpad/crashpad/test/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - static_library("test") { testonly = true
diff --git a/third_party/crashpad/crashpad/test/ios/BUILD.gn b/third_party/crashpad/crashpad/test/ios/BUILD.gn index cbf8ef8..59dd35d 100644 --- a/third_party/crashpad/crashpad/test/ios/BUILD.gn +++ b/third_party/crashpad/crashpad/test/ios/BUILD.gn
@@ -16,9 +16,6 @@ if (crashpad_is_in_chromium) { import("//build/config/ios/rules.gni") - - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) } else if (crashpad_is_standalone) { import("//third_party/mini_chromium/mini_chromium/build/ios/rules.gni") }
diff --git a/third_party/crashpad/crashpad/test/ios/host/BUILD.gn b/third_party/crashpad/crashpad/test/ios/host/BUILD.gn index 0a14f17..20f2500 100644 --- a/third_party/crashpad/crashpad/test/ios/host/BUILD.gn +++ b/third_party/crashpad/crashpad/test/ios/host/BUILD.gn
@@ -16,9 +16,6 @@ if (crashpad_is_in_chromium) { import("//build/config/ios/rules.gni") - - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) } else if (crashpad_is_standalone) { import("//third_party/mini_chromium/mini_chromium/build/ios/rules.gni") }
diff --git a/third_party/crashpad/crashpad/tools/BUILD.gn b/third_party/crashpad/crashpad/tools/BUILD.gn index 592e0ad..7da109bc 100644 --- a/third_party/crashpad/crashpad/tools/BUILD.gn +++ b/third_party/crashpad/crashpad/tools/BUILD.gn
@@ -14,11 +14,6 @@ import("../build/crashpad_buildconfig.gni") -if (crashpad_is_in_chromium) { - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) -} - source_set("tool_support") { sources = [ "tool_support.cc",
diff --git a/third_party/crashpad/crashpad/util/BUILD.gn b/third_party/crashpad/crashpad/util/BUILD.gn index 0ce8359..da0b7a3 100644 --- a/third_party/crashpad/crashpad/util/BUILD.gn +++ b/third_party/crashpad/crashpad/util/BUILD.gn
@@ -17,9 +17,6 @@ if (crashpad_is_in_chromium) { import("//build/config/sanitizers/sanitizers.gni") - - # Prevent Chromium source assignment filters from being inherited. - set_sources_assignment_filter([]) } if (crashpad_is_mac || crashpad_is_ios) {
diff --git a/third_party/grpc/BUILD.gn b/third_party/grpc/BUILD.gn index e0b3c8e..1358ba54 100644 --- a/third_party/grpc/BUILD.gn +++ b/third_party/grpc/BUILD.gn
@@ -4,13 +4,6 @@ import("//testing/libfuzzer/fuzzer_test.gni") -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - config("grpc_config") { include_dirs = [ "src/include" ] defines = [ @@ -129,10 +122,6 @@ static_library("grpc_core") { visibility = [ ":*" ] - # gRPC has some _linux.cc files that provide no-op implementations when the - # platform is not Linux. We need to disable source filter so that they can be - # built, otherwise linker will complain for undefined symbols. - set_sources_assignment_filter([]) sources = [ "src/src/core/ext/filters/census/grpc_context.cc", "src/src/core/ext/filters/client_channel/backup_poller.cc", @@ -504,7 +493,7 @@ "src/src/core/tsi/transport_security.cc", "src/src/core/tsi/transport_security_grpc.cc", ] - set_sources_assignment_filter(deprecated_default_sources_assignment_filter) + configs -= [ "//build/config/compiler:chromium_code" ] configs += [ ":grpc_config",
diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn index cf40215..d0254b9f 100644 --- a/third_party/libxslt/BUILD.gn +++ b/third_party/libxslt/BUILD.gn
@@ -2,13 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - config("libxslt_config") { defines = [ "LIBXSLT_STATIC" ] include_dirs = [ "src" ] @@ -29,8 +22,6 @@ static_library("libxslt") { sources = [ - "linux/config.h", - "mac/config.h", "src/libxslt/attributes.c", "src/libxslt/attributes.h", "src/libxslt/attrvt.c", @@ -87,6 +78,13 @@ ] public_configs = [ ":libxslt_config" ] + if (is_linux || is_chromeos) { + sources += [ "linux/config.h" ] + } + if (is_mac) { + sources += [ "mac/config.h" ] + } + cflags = [] if (is_linux || is_chromeos || is_android || is_fuchsia) { include_dirs = [ "linux" ]
diff --git a/third_party/protobuf/proto_library.gni b/third_party/protobuf/proto_library.gni index e41ae5f..cbeb416 100644 --- a/third_party/protobuf/proto_library.gni +++ b/third_party/protobuf/proto_library.gni
@@ -297,8 +297,8 @@ # Generate protobuf stubs. action(action_name) { visibility = [ - ":$source_set_name", ":$javascript_name", + ":$source_set_name", ] script = "//tools/protoc_wrapper/protoc_wrapper.py" sources = proto_sources @@ -371,9 +371,15 @@ } if (generate_descriptor != "") { + depfile = + "$root_gen_dir/" + proto_out_dir + "/" + generate_descriptor + ".d" + rel_depfile = rebase_path(depfile, root_build_dir) + args += [ "--descriptor-set-out", rel_descriptor_out, + "--descriptor-set-dependency-file", + rel_depfile, ] }
diff --git a/tools/binary_size/libsupersize/apkanalyzer.py b/tools/binary_size/libsupersize/apkanalyzer.py index 9eba8fb..187ef19 100644 --- a/tools/binary_size/libsupersize/apkanalyzer.py +++ b/tools/binary_size/libsupersize/apkanalyzer.py
@@ -159,9 +159,8 @@ 'Node size too large, check for node processing errors. ' 'dex_expected_size=%d total_node_size=%d', dex_expected_size, total_node_size) - # We have more than 100KB of ids for methods, strings - id_metadata_overhead_size = dex_expected_size - total_node_size - symbols = [] + # Use (DEX_METHODS, DEX) buckets to speed up sorting. + symbols = ([], []) lambda_by_class_counter = collections.defaultdict(int) lambda_name_to_nested_number = {} for _, name, node_size in nodes: @@ -192,16 +191,21 @@ if source_path: object_path = package elif package == _TOTAL_NODE_NAME: - name = '* Unattributed Dex' - object_path = '' # Categorize in the anonymous section. - node_size += id_metadata_overhead_size + # Unattributed size is handled outside of this function. + continue else: object_path = os.path.join(models.APK_PREFIX_PATH, *package.split('.')) if name.endswith(')'): section_name = models.SECTION_DEX_METHOD else: section_name = models.SECTION_DEX - symbols.append(models.Symbol( - section_name, node_size, full_name=name, object_path=object_path, - source_path=source_path)) - return symbols + symbols[int(section_name is models.SECTION_DEX)].append( + models.Symbol(section_name, + node_size, + full_name=name, + object_path=object_path, + source_path=source_path)) + symbols[0].sort(key=lambda s: s.full_name) + symbols[1].sort(key=lambda s: s.full_name) + symbols[0].extend(symbols[1]) + return symbols[0]
diff --git a/tools/binary_size/libsupersize/archive.py b/tools/binary_size/libsupersize/archive.py index 6daf2ac..0683875 100644 --- a/tools/binary_size/libsupersize/archive.py +++ b/tools/binary_size/libsupersize/archive.py
@@ -165,9 +165,8 @@ name = full_name[space_idx + 1:] symbol.template_name = name symbol.name = name - elif (full_name.startswith('*') or - symbol.IsOverhead() or - symbol.IsOther()): + elif (full_name.startswith('**') or symbol.IsOverhead() + or symbol.IsOther()): symbol.template_name = full_name symbol.name = full_name elif symbol.IsDex(): @@ -492,9 +491,8 @@ logging.debug('Created %d string literal symbols', sum(len(x) for x in ret)) logging.debug('Sorting string literals') for symbols in ret: - # In order to achieve a total ordering in the presence of aliases, need to - # include both |address| and |object_path|. - # In order to achieve consistent deduping, need to include |size|. + # For de-duping & alias creation, order by address & size. + # For alias symbol ordering, sort by object_path. symbols.sort(key=lambda x: (x.address, -x.size, x.object_path)) logging.debug('Deduping string literals') @@ -532,8 +530,6 @@ new_symbols.append(symbol) prev_symbol = symbol ret[i] = new_symbols - # Aliases come out in random order, so sort to be deterministic. - ret[i].sort(key=lambda s: (s.address, s.object_path)) logging.debug( 'Removed %d overlapping string literals (%d bytes) & created %d aliases', @@ -1144,20 +1140,17 @@ paths = object_paths_by_pak_id.get(resource_id) if not paths: continue - symbol.object_path = paths.pop() - if not paths: + symbol.object_path = paths[0] + if len(paths) == 1: continue aliases = symbol.aliases or [symbol] symbol.aliases = aliases - for path in paths: + for path in paths[1:]: new_sym = models.Symbol( symbol.section_name, symbol.size, address=symbol.address, full_name=symbol.full_name, object_path=path, aliases=aliases) aliases.append(new_sym) raw_symbols.append(new_sym) - # Sorting can ignore containers because symbols created here are all in the - # same container. - raw_symbols.sort(key=lambda s: (s.section_name, s.address, s.object_path)) raw_total = 0.0 int_total = 0 for symbol in raw_symbols: @@ -1167,9 +1160,18 @@ symbol.size = int(symbol.size) int_total += symbol.size # Attribute excess to translations since only those are compressed. - raw_symbols.append(models.Symbol( - models.SECTION_PAK_TRANSLATIONS, int(round(raw_total - int_total)), - full_name='Overhead: Pak compression artifacts')) + overhead_size = round(raw_total - int_total) + if overhead_size: + raw_symbols.append( + models.Symbol(models.SECTION_PAK_TRANSLATIONS, + overhead_size, + address=raw_symbols[-1].end_address, + full_name='Overhead: Pak compression artifacts')) + + # Pre-sort to make final sort faster. + # Note: _SECTION_SORT_ORDER[] for pak symbols matches section_name ordering. + raw_symbols.sort( + key=lambda s: (s.section_name, s.IsOverhead(), s.address, s.object_path)) return raw_symbols @@ -1420,44 +1422,54 @@ def _AddUnattributedSectionSymbols(raw_symbols, section_ranges): # Create symbols for ELF sections not covered by existing symbols. logging.info('Searching for symbol gaps...') - last_symbol_ends = collections.defaultdict(int) - for sym in raw_symbols: - if sym.end_address > last_symbol_ends[sym.section_name]: - last_symbol_ends[sym.section_name] = sym.end_address - for section_name, last_symbol_end in last_symbol_ends.items(): - size_from_syms = last_symbol_end - section_ranges[section_name][0] + new_syms_by_section = collections.defaultdict(list) + + for section_name, group in itertools.groupby( + raw_symbols, lambda s: s.section_name): + # Get last Last symbol in group. + for sym in group: + pass + end_address = sym.end_address # pylint: disable=undefined-loop-variable + size_from_syms = end_address - section_ranges[section_name][0] overhead = section_ranges[section_name][1] - size_from_syms assert overhead >= 0, ( ('End of last symbol (%x) in section %s is %d bytes after the end of ' - 'section from readelf (%x).') % (last_symbol_end, section_name, - -overhead, + 'section from readelf (%x).') % (end_address, section_name, -overhead, sum(section_ranges[section_name]))) if overhead > 0 and section_name not in models.BSS_SECTIONS: - raw_symbols.append( - models.Symbol( - section_name, - overhead, - address=last_symbol_end, - full_name='** {} (unattributed)'.format(section_name))) + new_syms_by_section[section_name].append( + models.Symbol(section_name, + overhead, + address=end_address, + full_name='** {} (unattributed)'.format(section_name))) logging.info('Last symbol in %s does not reach end of section, gap=%d', section_name, overhead) # Sections that should not bundle into ".other". unsummed_sections, summed_sections = models.ClassifySections( section_ranges.keys()) + other_elf_symbols = [] # Sort keys to ensure consistent order (> 1 sections may have address = 0). - for section_name in sorted(section_ranges.keys()): + for section_name, (_, section_size) in list(section_ranges.items()): # Handle sections that don't appear in |raw_symbols|. - address, section_size = section_ranges[section_name] if (section_name not in unsummed_sections and section_name not in summed_sections): - raw_symbols.append( - models.Symbol( - models.SECTION_OTHER, - section_size, - full_name='** ELF Section: {}'.format(section_name), - address=address)) + other_elf_symbols.append( + models.Symbol(models.SECTION_OTHER, + section_size, + full_name='** ELF Section: {}'.format(section_name))) _ExtendSectionRange(section_ranges, models.SECTION_OTHER, section_size) + other_elf_symbols.sort(key=lambda s: (s.address, s.full_name)) + + # TODO(agrieve): It would probably simplify things to use a dict of + # section_name->raw_symbols while creating symbols. + # Merge |new_syms_by_section| into |raw_symbols| while maintaining ordering. + ret = [] + for section_name, group in itertools.groupby( + raw_symbols, lambda s: s.section_name): + ret.extend(group) + ret.extend(new_syms_by_section[section_name]) + return ret, other_elf_symbols def CreateContainerAndSymbols(knobs=None, @@ -1588,9 +1600,11 @@ elf_overhead_size = _CalculateElfOverhead(section_ranges, f.name) if elf_path: - _AddUnattributedSectionSymbols(raw_symbols, section_ranges) + raw_symbols, other_elf_symbols = _AddUnattributedSectionSymbols( + raw_symbols, section_ranges) pak_symbols_by_id = None + other_symbols = [] if apk_path and size_info_prefix: # Can modify |section_ranges|. pak_symbols_by_id = _FindPakSymbolsFromApk(opts, section_ranges, apk_path, @@ -1606,7 +1620,6 @@ if opts.analyze_java: dex_symbols = apkanalyzer.CreateDexSymbols(apk_path, mapping_path, size_info_prefix) - raw_symbols.extend(dex_symbols) # We can't meaningfully track section size of dex methods vs other, so # just fake the size of dex methods as the sum of symbols, and make @@ -1627,13 +1640,12 @@ assert unattributed_dex >= -5, ('Dex symbols take up more space than ' 'the dex sections have available') if unattributed_dex > 0: - other_symbols.append( + dex_symbols.append( models.Symbol( models.SECTION_DEX, unattributed_dex, full_name='** .dex (unattributed - includes string literals)')) - - raw_symbols.extend(other_symbols) + raw_symbols.extend(dex_symbols) elif pak_files and pak_info_file: # Can modify |section_ranges|. @@ -1644,7 +1656,8 @@ elf_overhead_symbol = models.Symbol( models.SECTION_OTHER, elf_overhead_size, full_name='Overhead: ELF file') _ExtendSectionRange(section_ranges, models.SECTION_OTHER, elf_overhead_size) - raw_symbols.append(elf_overhead_symbol) + other_symbols.append(elf_overhead_symbol) + other_symbols.extend(other_elf_symbols) if pak_symbols_by_id: logging.debug('Extracting pak IDs from symbol names, and creating symbols') @@ -1655,6 +1668,11 @@ pak_symbols_by_id, object_paths_by_pak_id) raw_symbols.extend(pak_raw_symbols) + # Always have .other come last. + other_symbols.sort(key=lambda s: (s.IsOverhead(), s.full_name.startswith( + '**'), s.address, s.full_name)) + raw_symbols.extend(other_symbols) + _ExtractSourcePathsAndNormalizeObjectPaths(raw_symbols, source_mapper) _PopulateComponents(raw_symbols, source_directory) logging.info('Converting excessive aliases into shared-path symbols') @@ -1671,6 +1689,9 @@ section_sizes=section_sizes) for symbol in raw_symbols: symbol.container = container + + file_format.SortSymbols(raw_symbols, check_already_mostly_sorted=True) + return container, raw_symbols @@ -1683,7 +1704,6 @@ all_raw_symbols = [] for raw_symbols in raw_symbols_list: - file_format.SortSymbols(raw_symbols) file_format.CalculatePadding(raw_symbols) # Do not call _NormalizeNames() during archive since that method tends to
diff --git a/tools/binary_size/libsupersize/file_format.py b/tools/binary_size/libsupersize/file_format.py index 3c7073b5e..b0a24d14 100644 --- a/tools/binary_size/libsupersize/file_format.py +++ b/tools/binary_size/libsupersize/file_format.py
@@ -124,6 +124,27 @@ _SIZEDIFF_HEADER = b'DIFF\n' _SIZEDIFF_VERSION = 1 +# Native sections are sorted by address. +_SECTION_SORT_ORDER = { + models.SECTION_DATA: 0, + models.SECTION_DATA_REL_RO_LOCAL: 0, + models.SECTION_DATA_REL_RO: 0, + models.SECTION_RODATA: 0, + models.SECTION_TEXT: 0, + models.SECTION_BSS: 1, + models.SECTION_BSS_REL_RO: 1, + models.SECTION_PART_END: 1, + models.SECTION_DEX: 2, + models.SECTION_DEX_METHOD: 3, + models.SECTION_PAK_NONTRANSLATED: 4, + models.SECTION_PAK_TRANSLATIONS: 5, + models.SECTION_OTHER: 6, +} + +# Ensure each |models.SECTION_*| (except |SECTION_MULTIPLE|) has an entry. +assert len(_SECTION_SORT_ORDER) + 1 == len(models.SECTION_NAME_TO_SECTION) + + class _Writer: """Helper to format and write data to a file object.""" @@ -156,37 +177,88 @@ logging.debug('File size with %s: %d' % (desc, size)) -def SortSymbols(raw_symbols): - logging.debug('Sorting %d symbols', len(raw_symbols)) - # TODO(agrieve): Either change this sort so that it's only sorting by section - # (and not using .sort()), or have it specify a total ordering (which must - # also include putting padding-only symbols before others of the same - # address). Note: The sort as-is takes ~1.5 seconds. - # s.size_without_padding > 0 prevents CalculatePadding() from incorrectly - # detecting duplicate symbols. - # (s.full_name, s.object_path) are important for sort stability when called by - # _ExpandSparseSymbols(). +def SortSymbols(raw_symbols, check_already_mostly_sorted=True): + """Sorts the given symbols in the order that they should be archived in. + + The sort order is chosen such that: + * Padding can be discarded. + * Ordering is deterministic (total ordering). + + Also sorts |aliases| such that they match the order within |raw_symbols|. + + Args: + raw_symbols: List of symbols to sort. + check_already_mostly_sorted: Whether to assert that there are a low number + of out-of-order elements in raw_symbols. Older .size files are not + properly sorted, this check makes sense only for "supersize archive". + """ + def sort_key(s): - return (s.IsPak(), s.IsBss(), s.section_name, s.address, - s.size_without_padding > 0, s.full_name, s.object_path) + # size_without_padding so that "** symbol gap" sorts before other symbols + # with same address (necessary for correctness within CalculatePadding()). + return ( + _SECTION_SORT_ORDER[s.section_name], + s.IsOverhead(), + s.address, + # Only use size_without_padding for native symbols (that have + # addresses) since padding-only symbols must come first for + # correctness. + # DEX also has 0-size symbols (for nested classes, not sure why) + # and we don't want to sort them differently since they don't have + # any padding either. + s.address and s.size_without_padding > 0, + s.full_name.startswith('**'), + s.full_name, + s.object_path) - raw_symbols.sort(key=sort_key) - seen_aliases = set() - for s in raw_symbols: + def describe(syms): + return ''.join('%r: %r\n' % (s, sort_key(s)) for s in syms) + + logging.debug('Sorting %d symbols', len(raw_symbols)) + + # Sort aliases first to make raw_symbols quicker to sort. + # Although sorting is done when aliases are first created, aliases that differ + # only by path can later become out-of-order due to path normalization. + i = 0 + count = len(raw_symbols) + while i < count: + s = raw_symbols[i] + num_aliases = s.num_aliases if s.aliases: - if s.aliases[0] not in seen_aliases: - s.aliases.sort(key=sort_key) - seen_aliases.add(s.aliases[0]) + expected = raw_symbols[i:i + num_aliases] + assert s.aliases == expected, 'Aliases out of order:\n{}\n{}'.format( + describe(s.aliases), describe(expected)) - logging.info('Processed %d symbols', len(raw_symbols)) + s.aliases.sort(key=sort_key) + raw_symbols[i:i + num_aliases] = s.aliases + i += num_aliases + else: + i += 1 + + if check_already_mostly_sorted: + count = sum( + int(sort_key(raw_symbols[i]) > sort_key(raw_symbols[i + 1])) + for i in range(len(raw_symbols) - 1)) + logging.debug('Number of out-of-order symbols: %d', count) + if count > 20: + logging.error('Number of out-of-order symbols: %d', count) + logging.error('Showing first 10') + num_reported = 0 + for i in range(len(raw_symbols) - 1): + if sort_key(raw_symbols[i]) > sort_key(raw_symbols[i + 1]): + num_reported += 1 + logging.error('\n%s', describe(raw_symbols[i:i + 2])) + if num_reported == 10: + break + + # Python's sort() is faster when the input list is already mostly sorted. + raw_symbols.sort(key=sort_key) def CalculatePadding(raw_symbols): """Populates the |padding| field based on symbol addresses. """ logging.info('Calculating padding') - # Padding not really required, but it is useful to check for large padding and - # log a warning. seen_container_and_sections = set() for i, symbol in enumerate(raw_symbols[1:]): prev_symbol = raw_symbols[i]
diff --git a/tools/binary_size/libsupersize/integration_test.py b/tools/binary_size/libsupersize/integration_test.py index 398a1a4a..0a96916b 100755 --- a/tools/binary_size/libsupersize/integration_test.py +++ b/tools/binary_size/libsupersize/integration_test.py
@@ -441,16 +441,19 @@ container1.metadata = {"foo": 1, "bar": [1, 2, 3], "baz": "yes"} container2.metadata = {"foo": 1, "bar": [1, 3], "baz": "yes"} - size_info1.raw_symbols -= size_info1.raw_symbols[:2] - size_info2.raw_symbols -= size_info2.raw_symbols[-3:] + size_info1.raw_symbols -= size_info1.raw_symbols.WhereNameMatches( + r'pLinuxKernelCmpxchg|pLinuxKernelMemoryBarrier') + size_info2.raw_symbols -= size_info2.raw_symbols.WhereNameMatches( + r'IDS_AW_WEBPAGE_PARENTAL_|IDS_WEB_FONT_FAMILY|IDS_WEB_FONT_SIZE') changed_sym = size_info1.raw_symbols.WhereNameMatches('Patcher::Name_')[0] changed_sym.size -= 10 padding_sym = size_info2.raw_symbols.WhereNameMatches('symbol gap 0')[0] padding_sym.padding += 20 padding_sym.size += 20 - pak_sym = size_info2.raw_symbols.WhereInSection( - models.SECTION_PAK_NONTRANSLATED)[0] - pak_sym.full_name = 'foo: ' + pak_sym.full_name.split()[-1] + # Test pak symbols changing .grd files. They should not show as changed. + pak_sym = size_info2.raw_symbols.WhereNameMatches( + r'IDR_PDF_COMPOSITOR_MANIFEST')[0] + pak_sym.full_name = pak_sym.full_name.replace('.grd', '2.grd') # Serialize & de-serialize so that name normalization runs again for the pak # symbol. @@ -461,7 +464,7 @@ d = diff.Diff(size_info1, size_info2) d.raw_symbols = d.raw_symbols.Sorted() - self.assertEqual(d.raw_symbols.CountsByDiffStatus()[1:], (2, 2, 3)) + self.assertEqual((1, 2, 3), d.raw_symbols.CountsByDiffStatus()[1:]) changed_sym = d.raw_symbols.WhereNameMatches('Patcher::Name_')[0] padding_sym = d.raw_symbols.WhereNameMatches('symbol gap 0')[0] bss_sym = d.raw_symbols.WhereInSection(models.SECTION_BSS)[0]
diff --git a/tools/binary_size/libsupersize/nm.py b/tools/binary_size/libsupersize/nm.py index d9a5596..387c1830 100644 --- a/tools/binary_size/libsupersize/nm.py +++ b/tools/binary_size/libsupersize/nm.py
@@ -133,7 +133,7 @@ # only aliased symbols. # Also: Sort to ensure stable ordering. return { - addr: sorted(names) + addr: sorted(names, key=lambda n: (n.startswith('**'), n)) for addr, names in names_by_address.items() if len(names) > 1 or num_outlined_functions_at_address.get(addr, 0) > 1 }
diff --git a/tools/binary_size/libsupersize/testdata/Archive.golden b/tools/binary_size/libsupersize/testdata/Archive.golden index 3598739..b91f3b83 100644 --- a/tools/binary_size/libsupersize/testdata/Archive.golden +++ b/tools/binary_size/libsupersize/testdata/Archive.golden
@@ -62,28 +62,6 @@ * 0 have source paths. Accounts for 0 bytes (0.0%). * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 0 symbols have shared ownership. -.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) -.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) -.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={rel},num_aliases=1,component=) -.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={anon},num_aliases=1,component=) -.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={anon,rel.loc},num_aliases=1,component=) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.rodata@266e600(size_without_padding=32,padding=0,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e630(size_without_padding=16,padding=16,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={anon},num_aliases=1,component=) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={anon},num_aliases=1,component=) .text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=,flags={startup},num_aliases=1,component=) .text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=,flags={startup},num_aliases=1,component=) .text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=,flags={startup},num_aliases=1,component=) @@ -100,6 +78,28 @@ .text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={anon,clone},num_aliases=1,component=) .text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) .text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) +.rodata@266e600(size_without_padding=32,padding=0,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e630(size_without_padding=16,padding=16,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={anon},num_aliases=1,component=) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/WebKit.a/./../third_party/sub/PaintChunker.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) +.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=,flags={},num_aliases=1,component=) +.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={},num_aliases=1,component=) +.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={rel},num_aliases=1,component=) +.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={anon},num_aliases=1,component=) +.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/WebKit.a/sub/ContiguousContainer.o,source_path=,flags={anon,rel.loc},num_aliases=1,component=) .bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=,flags={},num_aliases=1,component=) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=,flags={},num_aliases=1,component=) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=,flags={},num_aliases=1,component=)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_Apk.golden b/tools/binary_size/libsupersize/testdata/Archive_Apk.golden index d5558df..fce261c 100644 --- a/tools/binary_size/libsupersize/testdata/Archive_Apk.golden +++ b/tools/binary_size/libsupersize/testdata/Archive_Apk.golden
@@ -64,7 +64,7 @@ * 94 have source paths. Accounts for 21294 bytes (89.7%). * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 0 symbols have shared ownership. -Section .pak.translations: has 100.0% of 6821 bytes accounted for from 208 symbols. 0 bytes are unaccounted for. +Section .pak.translations: has 100.0% of 6821 bytes accounted for from 207 symbols. 0 bytes are unaccounted for. * Padding accounts for 18 bytes (0.3%) * 3 have source paths. Accounts for 23 bytes (0.3%). * 3 have a component assigned. Accounts for 23 bytes (0.3%). @@ -83,22 +83,61 @@ * 22 placeholders exist (symbols that start with **). Accounts for 56448494 bytes (59.0%). * 0 symbols have shared ownership. * 1 symbols are from generated sources. Accounts for 4194304 bytes (4.4%). +.text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d964(size_without_padding=38,padding=0,full_name=extFromUUseMapping(signed char, unsigned int, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.text@28d98a(size_without_padding=32,padding=0,full_name=extFromUUseMapping(aj, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.text@28f000(size_without_padding=0,padding=5718,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.text@28f000(size_without_padding=448,padding=0,full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.text@28f1c8(size_without_padding=20,padding=8,full_name=_GLOBAL__sub_I_SkDeviceProfile.cpp,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={startup,gen},num_aliases=1,component=Internal>Android) +.text@28f1e0(size_without_padding=69120,padding=4,full_name=foo_bar,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={unlikely,gen},num_aliases=1,component=Internal>Android) +.text@2a0000(size_without_padding=16,padding=32,full_name=BazAlias(bool),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.text@2a0000(size_without_padding=16,padding=32,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a0010(size_without_padding=12,padding=0,full_name=BarAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=FooAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen,clone},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={clone},num_aliases=4,component=Internal>Android) +.text@2a0020(size_without_padding=24,padding=4,full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) +.text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) +.text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) .data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) .data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) .data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) .data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) .data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.dex@0(size_without_padding=4616803,padding=0,full_name=* Unattributed Dex,object_path=,source_path=,flags={},num_aliases=1,component=) +.bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) .dex@0(size_without_padding=1792,padding=0,full_name=org,object_path=$APK/org,source_path=,flags={},num_aliases=1,component=) .dex@0(size_without_padding=975347,padding=0,full_name=org.chromium,object_path=$APK/org/chromium,source_path=,flags={},num_aliases=1,component=) .dex@0(size_without_padding=44714,padding=0,full_name=org.chromium.chrome,object_path=$APK/org/chromium/chrome,source_path=,flags={},num_aliases=1,component=) @@ -198,6 +237,7 @@ .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mState: int,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mVelocity: int,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mStartTime: long,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) +.dex@0(size_without_padding=4616803,padding=0,full_name=** .dex (unattributed - includes string literals),object_path=,source_path=,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=113,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#<clinit>(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=225,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#<init>(android.content.Context,org.chromium.chrome.browser.compositor.layouts.phone.StackLayout),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=100,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#allowOverscroll(): boolean,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) @@ -302,78 +342,9 @@ .dex.method@0(size_without_padding=109,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#startScroll(int,int,long,int): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=167,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#startSpringback$4868d30e(int,int): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=90,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#updateScroll(float): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) -.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=764,full_name=Overhead: APK file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=1048576,padding=0,full_name=assets/icudtl.dat,object_path=,source_path=third_party/icu/android/icudtl.dat,flags={},num_aliases=1,component=Internal>Android) -.other@0(size_without_padding=1024,padding=0,full_name=res/drawable-v13/test.xml,object_path=,source_path=chrome/android/res/drawable/test.xml,flags={},num_aliases=1,component=) -.other@0(size_without_padding=4194304,padding=0,full_name=smalltest.so,object_path=,source_path=$APK/smalltest.so,flags={gen},num_aliases=1,component=) -.other@154(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@168(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@18c(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@1b0c(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ad4(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3558(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3888(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@38a4(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3904(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@29fbec(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2a06ec(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd3d10(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd5858(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc608(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6f4(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6fc(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc834(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d964(size_without_padding=38,padding=0,full_name=extFromUUseMapping(signed char, unsigned int, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.text@28d98a(size_without_padding=32,padding=0,full_name=extFromUUseMapping(aj, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.text@28f000(size_without_padding=0,padding=5718,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.text@28f000(size_without_padding=448,padding=0,full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.text@28f1c8(size_without_padding=20,padding=8,full_name=_GLOBAL__sub_I_SkDeviceProfile.cpp,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={startup,gen},num_aliases=1,component=Internal>Android) -.text@28f1e0(size_without_padding=69120,padding=4,full_name=foo_bar,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={unlikely,gen},num_aliases=1,component=Internal>Android) -.text@2a0000(size_without_padding=16,padding=32,full_name=BazAlias(bool),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.text@2a0000(size_without_padding=16,padding=32,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a0010(size_without_padding=12,padding=0,full_name=BarAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=FooAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen,clone},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={clone},num_aliases=4,component=Internal>Android) -.text@2a0020(size_without_padding=24,padding=4,full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) -.text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) -.text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) -.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.nontranslated@2f03(size_without_padding=502,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_PDF_COMPOSITOR_MANIFEST,object_path=,source_path=,flags={uncompressed},num_aliases=1,component=) .pak.nontranslated@2f04(size_without_padding=217,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_CHROME_RENDERER_SERVICE_MANIFEST,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=0,full_name=Overhead: Pak compression artifacts,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3ac6(size_without_padding=40,padding=0,full_name=../../components/app_modal_strings.grdp: IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d7c(size_without_padding=24,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_TYPE_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d82(size_without_padding=25,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_LIST_ENTRY_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) @@ -580,3 +551,31 @@ .pak.translations@5bda(size_without_padding=80,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6917(size_without_padding=23,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_FAMILY,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6918(size_without_padding=9,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_SIZE,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1048576,padding=0,full_name=assets/icudtl.dat,object_path=,source_path=third_party/icu/android/icudtl.dat,flags={},num_aliases=1,component=Internal>Android) +.other@0(size_without_padding=1024,padding=0,full_name=res/drawable-v13/test.xml,object_path=,source_path=chrome/android/res/drawable/test.xml,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4194304,padding=0,full_name=smalltest.so,object_path=,source_path=$APK/smalltest.so,flags={gen},num_aliases=1,component=) +.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=764,full_name=Overhead: APK file,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_Elf.golden b/tools/binary_size/libsupersize/testdata/Archive_Elf.golden index 7643bde2..b1ab8c6 100644 --- a/tools/binary_size/libsupersize/testdata/Archive_Elf.golden +++ b/tools/binary_size/libsupersize/testdata/Archive_Elf.golden
@@ -75,56 +75,6 @@ * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 22 placeholders exist (symbols that start with **). Accounts for 56448494 bytes (62.5%). * 0 symbols have shared ownership. -.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) -.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) -.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) -.data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@154(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@168(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@18c(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@1b0c(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ad4(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3558(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3888(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@38a4(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3904(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@29fbec(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2a06ec(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd3d10(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd5858(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc608(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6f4(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6fc(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc834(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) @@ -144,12 +94,62 @@ .text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) .text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) .text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) .text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) .text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) +.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) +.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) +.data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) .bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) .bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) .bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) +.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_MinimalApks.golden b/tools/binary_size/libsupersize/testdata/Archive_MinimalApks.golden index d5dbaa1..1197c0b59 100644 --- a/tools/binary_size/libsupersize/testdata/Archive_MinimalApks.golden +++ b/tools/binary_size/libsupersize/testdata/Archive_MinimalApks.golden
@@ -65,7 +65,7 @@ * 94 have source paths. Accounts for 21294 bytes (89.7%). * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 0 symbols have shared ownership. -Section .pak.translations: has 100.0% of 6821 bytes accounted for from 208 symbols. 0 bytes are unaccounted for. +Section .pak.translations: has 100.0% of 6821 bytes accounted for from 207 symbols. 0 bytes are unaccounted for. * Padding accounts for 18 bytes (0.3%) * 3 have source paths. Accounts for 23 bytes (0.3%). * 3 have a component assigned. Accounts for 23 bytes (0.3%). @@ -84,22 +84,61 @@ * 22 placeholders exist (symbols that start with **). Accounts for 56448494 bytes (59.0%). * 0 symbols have shared ownership. * 1 symbols are from generated sources. Accounts for 4194304 bytes (4.4%). +.text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) +.text@28d964(size_without_padding=38,padding=0,full_name=extFromUUseMapping(signed char, unsigned int, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.text@28d98a(size_without_padding=32,padding=0,full_name=extFromUUseMapping(aj, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.text@28f000(size_without_padding=0,padding=5718,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.text@28f000(size_without_padding=448,padding=0,full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.text@28f1c8(size_without_padding=20,padding=8,full_name=_GLOBAL__sub_I_SkDeviceProfile.cpp,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={startup,gen},num_aliases=1,component=Internal>Android) +.text@28f1e0(size_without_padding=69120,padding=4,full_name=foo_bar,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={unlikely,gen},num_aliases=1,component=Internal>Android) +.text@2a0000(size_without_padding=16,padding=32,full_name=BazAlias(bool),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.text@2a0000(size_without_padding=16,padding=32,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a0010(size_without_padding=12,padding=0,full_name=BarAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=FooAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen,clone},num_aliases=4,component=Internal>Android) +.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={clone},num_aliases=4,component=Internal>Android) +.text@2a0020(size_without_padding=24,padding=4,full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) +.text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) +.text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) .data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) .data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) .data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) .data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) .data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.dex@0(size_without_padding=4616803,padding=0,full_name=* Unattributed Dex,object_path=,source_path=,flags={},num_aliases=1,component=) +.bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) +.bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) .dex@0(size_without_padding=1792,padding=0,full_name=org,object_path=$APK/org,source_path=,flags={},num_aliases=1,component=) .dex@0(size_without_padding=975347,padding=0,full_name=org.chromium,object_path=$APK/org/chromium,source_path=,flags={},num_aliases=1,component=) .dex@0(size_without_padding=44714,padding=0,full_name=org.chromium.chrome,object_path=$APK/org/chromium/chrome,source_path=,flags={},num_aliases=1,component=) @@ -199,6 +238,7 @@ .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mState: int,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mVelocity: int,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex@0(size_without_padding=10,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#mStartTime: long,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) +.dex@0(size_without_padding=4616803,padding=0,full_name=** .dex (unattributed - includes string literals),object_path=,source_path=,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=113,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#<clinit>(),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=225,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#<init>(android.content.Context,org.chromium.chrome.browser.compositor.layouts.phone.StackLayout),object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=100,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack#allowOverscroll(): boolean,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.Stack,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/Stack.java,flags={},num_aliases=1,component=) @@ -303,78 +343,9 @@ .dex.method@0(size_without_padding=109,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#startScroll(int,int,long,int): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=167,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#startSpringback$4868d30e(int,int): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) .dex.method@0(size_without_padding=90,padding=0,full_name=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller#updateScroll(float): void,object_path=org.chromium.chrome.browser.compositor.layouts.phone.stack.StackScroller$SplineStackScroller,source_path=chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/phone/stack/StackScroller.java,flags={},num_aliases=1,component=) -.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=764,full_name=Overhead: APK file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=1048576,padding=0,full_name=assets/icudtl.dat,object_path=,source_path=third_party/icu/android/icudtl.dat,flags={},num_aliases=1,component=Internal>Android) -.other@0(size_without_padding=1024,padding=0,full_name=res/drawable-v13/test.xml,object_path=,source_path=chrome/android/res/drawable/test.xml,flags={},num_aliases=1,component=) -.other@0(size_without_padding=4194304,padding=0,full_name=smalltest.so,object_path=,source_path=$APK/smalltest.so,flags={gen},num_aliases=1,component=) -.other@154(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@168(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@18c(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@1b0c(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ad4(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3558(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3888(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@38a4(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3904(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@29fbec(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2a06ec(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd3d10(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd5858(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc608(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6f4(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6fc(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc834(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) -.text@28d964(size_without_padding=38,padding=0,full_name=extFromUUseMapping(signed char, unsigned int, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.text@28d98a(size_without_padding=32,padding=0,full_name=extFromUUseMapping(aj, int),object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.text@28f000(size_without_padding=0,padding=5718,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.text@28f000(size_without_padding=448,padding=0,full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.text@28f1c8(size_without_padding=20,padding=8,full_name=_GLOBAL__sub_I_SkDeviceProfile.cpp,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={startup,gen},num_aliases=1,component=Internal>Android) -.text@28f1e0(size_without_padding=69120,padding=4,full_name=foo_bar,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={unlikely,gen},num_aliases=1,component=Internal>Android) -.text@2a0000(size_without_padding=16,padding=32,full_name=BazAlias(bool),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.text@2a0000(size_without_padding=16,padding=32,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a0010(size_without_padding=12,padding=0,full_name=BarAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=FooAlias(),object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen,clone},num_aliases=4,component=Internal>Android) -.text@2a0010(size_without_padding=12,padding=0,full_name=blink::ContiguousContainerBase::shrinkToFit(),object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={clone},num_aliases=4,component=Internal>Android) -.text@2a0020(size_without_padding=24,padding=4,full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) -.text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) -.text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) -.text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) -.bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) -.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.nontranslated@2f03(size_without_padding=502,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_PDF_COMPOSITOR_MANIFEST,object_path=,source_path=,flags={uncompressed},num_aliases=1,component=) .pak.nontranslated@2f04(size_without_padding=217,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_CHROME_RENDERER_SERVICE_MANIFEST,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=0,full_name=Overhead: Pak compression artifacts,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3ac6(size_without_padding=40,padding=0,full_name=../../components/app_modal_strings.grdp: IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d7c(size_without_padding=24,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_TYPE_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d82(size_without_padding=25,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_LIST_ENTRY_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) @@ -581,3 +552,31 @@ .pak.translations@5bda(size_without_padding=80,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6917(size_without_padding=23,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_FAMILY,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6918(size_without_padding=9,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_SIZE,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1048576,padding=0,full_name=assets/icudtl.dat,object_path=,source_path=third_party/icu/android/icudtl.dat,flags={},num_aliases=1,component=Internal>Android) +.other@0(size_without_padding=1024,padding=0,full_name=res/drawable-v13/test.xml,object_path=,source_path=chrome/android/res/drawable/test.xml,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4194304,padding=0,full_name=smalltest.so,object_path=,source_path=$APK/smalltest.so,flags={gen},num_aliases=1,component=) +.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=764,full_name=Overhead: APK file,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden b/tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden index a019ca58..011101c 100644 --- a/tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden +++ b/tools/binary_size/libsupersize/testdata/Archive_OutputDirectory.golden
@@ -65,28 +65,6 @@ * 0 have source paths. Accounts for 0 bytes (0.0%). * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 0 symbols have shared ownership. -.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) -.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) -.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.rodata@266e600(size_without_padding=32,padding=0,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e630(size_without_padding=16,padding=16,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) .text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) @@ -103,6 +81,28 @@ .text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) .text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) .text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@266e600(size_without_padding=32,padding=0,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e630(size_without_padding=16,padding=16,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) +.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) +.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) .bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android)
diff --git a/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden b/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden index 2ff3741..080727b 100644 --- a/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden +++ b/tools/binary_size/libsupersize/testdata/Archive_Pak_Files.golden
@@ -59,7 +59,7 @@ * 0 have source paths. Accounts for 0 bytes (0.0%). * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 0 symbols have shared ownership. -Section .pak.translations: has 100.0% of 6821 bytes accounted for from 208 symbols. 0 bytes are unaccounted for. +Section .pak.translations: has 100.0% of 6821 bytes accounted for from 207 symbols. 0 bytes are unaccounted for. * Padding accounts for 18 bytes (0.3%) * 3 have source paths. Accounts for 23 bytes (0.3%). * 3 have a component assigned. Accounts for 23 bytes (0.3%). @@ -77,56 +77,6 @@ * 0 have a component assigned. Accounts for 0 bytes (0.0%). * 22 placeholders exist (symbols that start with **). Accounts for 56448494 bytes (62.5%). * 0 symbols have shared ownership. -.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) -.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) -.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) -.data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) -.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) -.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) -.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@154(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@168(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@18c(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@1b0c(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ad4(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3558(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3888(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@38a4(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@3904(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@29fbec(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2a06ec(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd3d10(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2bd5858(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc608(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6f4(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc6fc(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) -.other@2ddc834(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) -.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) -.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) -.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) -.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) -.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) -.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .text@28d900(size_without_padding=16,padding=0,full_name=_GLOBAL__sub_I_page_allocator.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d910(size_without_padding=56,padding=0,full_name=_GLOBAL__sub_I_bbr_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) .text@28d948(size_without_padding=28,padding=0,full_name=_GLOBAL__sub_I_pacing_sender.cc,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={startup},num_aliases=1,component=Blink>Internal) @@ -146,20 +96,45 @@ .text@2a1000(size_without_padding=0,padding=4040,full_name=** symbol gap 1,object_path=,source_path=,flags={},num_aliases=1,component=) .text@2a1000(size_without_padding=94,padding=0,full_name=blink::PaintChunker::releasePaintChunks(),object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,clone},num_aliases=1,component=UI>Browser) .text@2a2000(size_without_padding=32,padding=4002,full_name=** outlined function,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) -.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) .text@2a2020(size_without_padding=48,padding=0,full_name=aliasedWithOutlinedFunction(),object_path=,source_path=,flags={},num_aliases=2,component=) +.text@2a2020(size_without_padding=48,padding=0,full_name=** outlined function * 2,object_path=,source_path=,flags={},num_aliases=2,component=) .text@2a2050(size_without_padding=35898456,padding=0,full_name=** .text (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=2,component=Blink>Internal) +.rodata@266e600(size_without_padding=5,padding=0,full_name="Str1",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=2,component=Internal>Android) +.rodata@266e605(size_without_padding=16,padding=0,full_name="String literal2",object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.rodata@266e630(size_without_padding=16,padding=27,full_name=** merge strings,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284d600(size_without_padding=3425,padding=1961920,full_name=** merge constants,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=0,padding=3,full_name=** symbol gap 0,object_path=,source_path=,flags={},num_aliases=1,component=) +.rodata@284e364(size_without_padding=8,padding=0,full_name=,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e370(size_without_padding=40,padding=4,full_name=Name,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.rodata@284e398(size_without_padding=32,padding=0,full_name=chrome::mojom::FilePatcher::Name_,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.rodata@28f3450(size_without_padding=48,padding=675992,full_name=kAnimationFrameTimeHistogramClassPath,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3480(size_without_padding=4,padding=0,full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list,object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={anon},num_aliases=1,component=Internal>Android) +.rodata@28f3484(size_without_padding=3286096,padding=0,full_name=** .rodata (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2c176f0(size_without_padding=56,padding=0,full_name=ChromeMainDelegate [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17728(size_without_padding=24,padding=0,full_name=chrome::mojom::FieldTrialRecorder [vtable],object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) +.data.rel.ro.local@2c17740(size_without_padding=789904,padding=0,full_name=chrome::mojom::FieldTrialRecorderProxy [vtable],object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data.rel.ro.local@2cd84e0(size_without_padding=16,padding=16,full_name=.Lswitch.table.45,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o,source_path=,flags={},num_aliases=1,component=) +.data.rel.ro.local@2cd84f0(size_without_padding=8,padding=0,full_name=kSystemClassPrefixes,object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o,source_path=,flags={anon},num_aliases=1,component=) +.data.rel.ro@2cd8500(size_without_padding=56,padding=0,full_name=ChromeMainDelegateAndroid [vtable],object_path=third_party/sub/PaintChunker.o,source_path=third_party/paint.cc,flags={},num_aliases=1,component=Internal>Android) +.data.rel.ro@2cd8538(size_without_padding=24,padding=0,full_name=mojo::MessageReceiver [vtable],object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd8550(size_without_padding=12,padding=0,full_name=kMethodsAnimationFrameTimeHistogram,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data.rel.ro@2cd855c(size_without_padding=1065132,padding=0,full_name=** .data.rel.ro (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) +.data@2de7000(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelCmpxchg,object_path=base/base/page_allocator.o,source_path=base/page_allocator.cc,flags={},num_aliases=1,component=Blink>Internal) +.data@2de7004(size_without_padding=4,padding=0,full_name=google::protobuf::internal::pLinuxKernelMemoryBarrier,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={},num_aliases=1,component=UI>Browser) +.data@2de7008(size_without_padding=152,padding=0,full_name=base::android::kBaseRegisteredMethods,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={rel},num_aliases=1,component=UI>Browser) +.data@2de70a0(size_without_padding=4,padding=0,full_name=base::android::g_renderer_histogram_code,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon},num_aliases=1,component=UI>Browser) +.data@2de70a4(size_without_padding=4,padding=0,full_name=base::android::g_library_version_number,object_path=third_party/sub/ContiguousContainer.o,source_path=third_party/container/container.c,flags={anon,rel.loc},num_aliases=1,component=UI>Browser) +.data@2de70a8(size_without_padding=101600,padding=0,full_name=** .data (unattributed),object_path=,source_path=,flags={},num_aliases=1,component=) .bss@0(size_without_padding=262144,padding=0,full_name=ff_cos_131072,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_131072_fixed,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o,source_path=third_party/fft_fixed.cc,flags={},num_aliases=1,component=Internal>Android) .bss@0(size_without_padding=131072,padding=0,full_name=ff_cos_65536,object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o,source_path=third_party/fft_float.cc,flags={},num_aliases=1,component=Internal>Android) .bss@2dffda0(size_without_padding=28,padding=0,full_name=g_chrome_content_browser_client,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) .bss@2dffe80(size_without_padding=4,padding=196,full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={gen},num_aliases=1,component=Internal>Android) .bss@2dffe84(size_without_padding=4,padding=0,full_name=g_AnimationFrameTimeHistogram_clazz,object_path=third_party/icu/icuuc/ucnv_ext.o,source_path=third_party/icu/ucnv_ext.c,flags={anon,gen},num_aliases=1,component=Internal>Android) -.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: ../../../mock_apk/assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.nontranslated@2f03(size_without_padding=502,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_PDF_COMPOSITOR_MANIFEST,object_path=,source_path=,flags={uncompressed},num_aliases=1,component=) .pak.nontranslated@2f04(size_without_padding=217,padding=0,full_name=../../chrome/browser/browser_resources.grd: IDR_CHROME_RENDERER_SERVICE_MANIFEST,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=0,full_name=Overhead: Pak compression artifacts,object_path=,source_path=,flags={},num_aliases=1,component=) -.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: ../../../mock_apk/assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.nontranslated@0(size_without_padding=0,padding=18,full_name=Overhead: ../../../mock_apk/assets/resources.pak,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3ac6(size_without_padding=40,padding=0,full_name=../../components/app_modal_strings.grdp: IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d7c(size_without_padding=24,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_TYPE_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@3d82(size_without_padding=25,padding=0,full_name=../../components/policy_strings.grdp: IDS_POLICY_LIST_ENTRY_ERROR,object_path=,source_path=,flags={},num_aliases=1,component=) @@ -366,3 +341,27 @@ .pak.translations@5bda(size_without_padding=80,padding=0,full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6917(size_without_padding=23,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_FAMILY,object_path=,source_path=,flags={},num_aliases=1,component=) .pak.translations@6918(size_without_padding=9,padding=0,full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_SIZE,object_path=,source_path=,flags={},num_aliases=1,component=) +.pak.translations@0(size_without_padding=0,padding=18,full_name=Overhead: ../../../mock_apk/assets/en-US.pak,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=60,padding=0,full_name=** ELF Section: .ARM.attributes,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=1536456,padding=0,full_name=** ELF Section: .ARM.exidx,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=183632,padding=0,full_name=** ELF Section: .ARM.extab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=304,padding=0,full_name=** ELF Section: .dynamic,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4025,padding=0,full_name=** ELF Section: .dynstr,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=6496,padding=0,full_name=** ELF Section: .dynsym,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .fini_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=812,padding=0,full_name=** ELF Section: .gnu.version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .gnu.version_d,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=96,padding=0,full_name=** ELF Section: .gnu.version_r,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=42956,padding=0,full_name=** ELF Section: .got,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2684,padding=0,full_name=** ELF Section: .hash,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=8,padding=0,full_name=** ELF Section: .init_array,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=19,padding=0,full_name=** ELF Section: .interp,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=36,padding=0,full_name=** ELF Section: .note.gnu.build-id,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=28,padding=0,full_name=** ELF Section: .note.gnu.gold-version,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=4244,padding=0,full_name=** ELF Section: .plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2655384,padding=0,full_name=** ELF Section: .rel.dyn,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=2816,padding=0,full_name=** ELF Section: .rel.plt,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=436,padding=0,full_name=** ELF Section: .shstrtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=34841854,padding=0,full_name=** ELF Section: .strtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=17166112,padding=0,full_name=** ELF Section: .symtab,object_path=,source_path=,flags={},num_aliases=1,component=) +.other@0(size_without_padding=0,padding=33902635,full_name=Overhead: ELF file,object_path=,source_path=,flags={},num_aliases=1,component=)
diff --git a/tools/binary_size/libsupersize/testdata/Console.golden b/tools/binary_size/libsupersize/testdata/Console.golden index 807919b..fc03748 100644 --- a/tools/binary_size/libsupersize/testdata/Console.golden +++ b/tools/binary_size/libsupersize/testdata/Console.golden
@@ -99,156 +99,156 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | PSS | Path ------------------------------------------------------------ -0) 4 (0.0%) d@0x2de7000 4 base/page_allocator.cc - google::protobuf::internal::pLinuxKernelCmpxchg -1) 8 (0.0%) d@0x2de7004 4 third_party/container/container.c - google::protobuf::internal::pLinuxKernelMemoryBarrier -2) 160 (0.0%) d@0x2de7008 152 third_party/container/container.c - base::android::kBaseRegisteredMethods -3) 164 (0.0%) d@0x2de70a0 4 third_party/container/container.c - base::android::g_renderer_histogram_code -4) 168 (0.0%) d@0x2de70a4 4 third_party/container/container.c - base::android::g_library_version_number -5) 101768 (0.1%) d@0x2de70a8 101600 {no path} - ** .data (unattributed) -6) 101824 (0.1%) R@0x2cd8500 56 third_party/paint.cc - ChromeMainDelegateAndroid [vtable] -7) 101848 (0.1%) R@0x2cd8538 24 base/page_allocator.cc - mojo::MessageReceiver [vtable] -8) 101860 (0.1%) R@0x2cd8550 12 base/page_allocator.cc - kMethodsAnimationFrameTimeHistogram -9) 1166992 (0.9%) R@0x2cd855c 1065132 {no path} - ** .data.rel.ro (unattributed) -10) 1167048 (0.9%) R@0x2c176f0 56 $root_gen_dir/third_party/icu/ucnv_ext.c - ChromeMainDelegate [vtable] -11) 1167072 (0.9%) R@0x2c17728 24 $root_gen_dir/third_party/icu/ucnv_ext.c - chrome::mojom::FieldTrialRecorder [vtable] -12) 1956976 (1.5%) R@0x2c17740 789904 third_party/container/container.c - chrome::mojom::FieldTrialRecorderProxy [vtable] -13) 1957008 (1.5%) R@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o - .Lswitch.table.45 -14) 1957016 (1.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o - kSystemClassPrefixes -15) 1957076 (1.5%) o@0x0 60 {no path} - ** ELF Section: .ARM.attributes -16) 1957104 (1.5%) o@0x0 28 {no path} - ** ELF Section: .note.gnu.gold-version -17) 1957540 (1.5%) o@0x0 436 {no path} - ** ELF Section: .shstrtab -18) 36799394 (27.4%) o@0x0 34841854 {no path} - ** ELF Section: .strtab -19) 53965506 (40.2%) o@0x0 17166112 {no path} - ** ELF Section: .symtab -20) 87868141 (65.5%) o@0x0 33902635 {no path} - Overhead: ELF file -21) 87868160 (65.5%) o@0x154 19 {no path} - ** ELF Section: .interp -22) 87868196 (65.5%) o@0x168 36 {no path} - ** ELF Section: .note.gnu.build-id -23) 87874692 (65.5%) o@0x18c 6496 {no path} - ** ELF Section: .dynsym -24) 87878717 (65.5%) o@0x1b0c 4025 {no path} - ** ELF Section: .dynstr -25) 87881401 (65.5%) o@0x2ad4 2684 {no path} - ** ELF Section: .hash -26) 87882213 (65.5%) o@0x3558 812 {no path} - ** ELF Section: .gnu.version -27) 87882241 (65.5%) o@0x3888 28 {no path} - ** ELF Section: .gnu.version_d -28) 87882337 (65.5%) o@0x38a4 96 {no path} - ** ELF Section: .gnu.version_r -29) 90537721 (67.5%) o@0x3904 2655384 {no path} - ** ELF Section: .rel.dyn -30) 90540537 (67.5%) o@0x29fbec 2816 {no path} - ** ELF Section: .rel.plt -31) 90544781 (67.5%) o@0x2a06ec 4244 {no path} - ** ELF Section: .plt -32) 92081237 (68.6%) o@0x2bd3d10 1536456 {no path} - ** ELF Section: .ARM.exidx -33) 92264869 (68.7%) o@0x2bd5858 183632 {no path} - ** ELF Section: .ARM.extab -34) 92264877 (68.7%) o@0x2ddc608 8 {no path} - ** ELF Section: .init_array -35) 92264885 (68.7%) o@0x2ddc6f4 8 {no path} - ** ELF Section: .fini_array -36) 92265189 (68.7%) o@0x2ddc6fc 304 {no path} - ** ELF Section: .dynamic -37) 92308145 (68.8%) o@0x2ddc834 42956 {no path} - ** ELF Section: .got -38) 92308147 (68.8%) r@0x266e600 2.5 (size=5) base/page_allocator.cc - "Str1" (num_aliases=2) -39) 92308150 (68.8%) r@0x266e600 2.5 (size=5) $root_gen_dir/third_party/icu/ucnv_ext.c - "Str1" (num_aliases=2) -40) 92308166 (68.8%) r@0x266e605 16 $root_gen_dir/third_party/icu/ucnv_ext.c - "String literal2" -41) 92308209 (68.8%) r@0x266e630 43 {no path} - ** merge strings -42) 94273554 (70.2%) r@0x284d600 1965345 {no path} - ** merge constants -43) 94273557 (70.2%) r@0x284e364 3 {no path} - ** symbol gap 0 -44) 94273565 (70.2%) r@0x284e364 8 base/page_allocator.cc -45) 94273609 (70.2%) r@0x284e370 44 base/page_allocator.cc - Name -46) 94273641 (70.2%) r@0x284e398 32 third_party/container/container.c - chrome::mojom::FilePatcher::Name_ -47) 94949681 (70.7%) r@0x28f3450 676040 third_party/paint.cc - kAnimationFrameTimeHistogramClassPath -48) 94949685 (70.7%) r@0x28f3480 4 third_party/paint.cc - blink::CSSValueKeywordsHash::findValueImpl::value_word_list -49) 98235781 (73.2%) r@0x28f3484 3286096 {no path} - ** .rodata (unattributed) -50) 98235797 (73.2%) t@0x28d900 16 base/page_allocator.cc +0) 16 (0.0%) t@0x28d900 16 base/page_allocator.cc _GLOBAL__sub_I_page_allocator.cc -51) 98235853 (73.2%) t@0x28d910 56 base/page_allocator.cc +1) 72 (0.0%) t@0x28d910 56 base/page_allocator.cc _GLOBAL__sub_I_bbr_sender.cc -52) 98235881 (73.2%) t@0x28d948 28 base/page_allocator.cc +2) 100 (0.0%) t@0x28d948 28 base/page_allocator.cc _GLOBAL__sub_I_pacing_sender.cc -53) 98235919 (73.2%) t@0x28d964 38 base/page_allocator.cc +3) 138 (0.0%) t@0x28d964 38 base/page_allocator.cc extFromUUseMapping -54) 98235951 (73.2%) t@0x28d98a 32 base/page_allocator.cc +4) 170 (0.0%) t@0x28d98a 32 base/page_allocator.cc extFromUUseMapping -55) 98245709 (73.2%) t@Group 9758 {no path} +5) 9928 (0.0%) t@Group 9758 {no path} ** symbol gaps (count=2) -56) 98246157 (73.2%) t@0x28f000 448 $root_gen_dir/third_party/icu/ucnv_ext.c +6) 10376 (0.0%) t@0x28f000 448 $root_gen_dir/third_party/icu/ucnv_ext.c ucnv_extMatchFromU -57) 98246185 (73.2%) t@0x28f1c8 28 $root_gen_dir/third_party/icu/ucnv_ext.c +7) 10404 (0.0%) t@0x28f1c8 28 $root_gen_dir/third_party/icu/ucnv_ext.c _GLOBAL__sub_I_SkDeviceProfile.cpp -58) 98315309 (73.3%) t@0x28f1e0 69124 $root_gen_dir/third_party/icu/ucnv_ext.c +8) 79528 (0.1%) t@0x28f1e0 69124 $root_gen_dir/third_party/icu/ucnv_ext.c foo_bar -59) 98315333 (73.3%) t@0x2a0000 24 (size=48) $root_gen_dir/third_party/icu/ucnv_ext.c +9) 79552 (0.1%) t@0x2a0000 24 (size=48) $root_gen_dir/third_party/icu/ucnv_ext.c BazAlias (num_aliases=2) -60) 98315357 (73.3%) t@0x2a0000 24 (size=48) {no path} +10) 79576 (0.1%) t@0x2a0000 24 (size=48) {no path} blink::ContiguousContainerBase::shrinkToFit (num_aliases=2) -61) 98315360 (73.3%) t@0x2a0010 3 (size=12) third_party/fft_float.cc +11) 79579 (0.1%) t@0x2a0010 3 (size=12) third_party/fft_float.cc BarAlias (num_aliases=4) -62) 98315363 (73.3%) t@0x2a0010 3 (size=12) third_party/fft_float.cc +12) 79582 (0.1%) t@0x2a0010 3 (size=12) third_party/fft_float.cc FooAlias (num_aliases=4) -63) 98315366 (73.3%) t@0x2a0010 3 (size=12) $root_gen_dir/third_party/icu/ucnv_ext.c +13) 79585 (0.1%) t@0x2a0010 3 (size=12) $root_gen_dir/third_party/icu/ucnv_ext.c blink::ContiguousContainerBase::shrinkToFit (num_aliases=4) -64) 98315369 (73.3%) t@0x2a0010 3 (size=12) third_party/paint.cc +14) 79588 (0.1%) t@0x2a0010 3 (size=12) third_party/paint.cc blink::ContiguousContainerBase::shrinkToFit (num_aliases=4) -65) 98315397 (73.3%) t@0x2a0020 28 third_party/container/container.c +15) 79616 (0.1%) t@0x2a0020 28 third_party/container/container.c blink::ContiguousContainerBase::ContiguousContainerBase -66) 98315491 (73.3%) t@0x2a1000 94 third_party/container/container.c +16) 79710 (0.1%) t@0x2a1000 94 third_party/container/container.c blink::PaintChunker::releasePaintChunks -67) 98319525 (73.3%) t@0x2a2000 4034 third_party/container/container.c +17) 83744 (0.1%) t@0x2a2000 4034 third_party/container/container.c ** outlined function -68) 98319549 (73.3%) t@0x2a2020 24 (size=48) {no path} - ** outlined function * 2 (num_aliases=2) -69) 98319573 (73.3%) t@0x2a2020 24 (size=48) {no path} +18) 83768 (0.1%) t@0x2a2020 24 (size=48) {no path} aliasedWithOutlinedFunction (num_aliases=2) -70) 134218029 (100.0%) t@0x2a2050 35898456 {no path} +19) 83792 (0.1%) t@0x2a2020 24 (size=48) {no path} + ** outlined function * 2 (num_aliases=2) +20) 35982248 (26.8%) t@0x2a2050 35898456 {no path} ** .text (unattributed) -71) 134218029 (100.0%) b@0x0 262144 third_party/fft_float.cc +21) 35982250 (26.8%) r@0x266e600 2.5 (size=5) base/page_allocator.cc + "Str1" (num_aliases=2) +22) 35982253 (26.8%) r@0x266e600 2.5 (size=5) $root_gen_dir/third_party/icu/ucnv_ext.c + "Str1" (num_aliases=2) +23) 35982269 (26.8%) r@0x266e605 16 $root_gen_dir/third_party/icu/ucnv_ext.c + "String literal2" +24) 35982312 (26.8%) r@0x266e630 43 {no path} + ** merge strings +25) 37947657 (28.3%) r@0x284d600 1965345 {no path} + ** merge constants +26) 37947660 (28.3%) r@0x284e364 3 {no path} + ** symbol gap 0 +27) 37947668 (28.3%) r@0x284e364 8 base/page_allocator.cc +28) 37947712 (28.3%) r@0x284e370 44 base/page_allocator.cc + Name +29) 37947744 (28.3%) r@0x284e398 32 third_party/container/container.c + chrome::mojom::FilePatcher::Name_ +30) 38623784 (28.8%) r@0x28f3450 676040 third_party/paint.cc + kAnimationFrameTimeHistogramClassPath +31) 38623788 (28.8%) r@0x28f3480 4 third_party/paint.cc + blink::CSSValueKeywordsHash::findValueImpl::value_word_list +32) 41909884 (31.2%) r@0x28f3484 3286096 {no path} + ** .rodata (unattributed) +33) 41909940 (31.2%) R@0x2c176f0 56 $root_gen_dir/third_party/icu/ucnv_ext.c + ChromeMainDelegate [vtable] +34) 41909964 (31.2%) R@0x2c17728 24 $root_gen_dir/third_party/icu/ucnv_ext.c + chrome::mojom::FieldTrialRecorder [vtable] +35) 42699868 (31.8%) R@0x2c17740 789904 third_party/container/container.c + chrome::mojom::FieldTrialRecorderProxy [vtable] +36) 42699900 (31.8%) R@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + .Lswitch.table.45 +37) 42699908 (31.8%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + kSystemClassPrefixes +38) 42699964 (31.8%) R@0x2cd8500 56 third_party/paint.cc + ChromeMainDelegateAndroid [vtable] +39) 42699988 (31.8%) R@0x2cd8538 24 base/page_allocator.cc + mojo::MessageReceiver [vtable] +40) 42700000 (31.8%) R@0x2cd8550 12 base/page_allocator.cc + kMethodsAnimationFrameTimeHistogram +41) 43765132 (32.6%) R@0x2cd855c 1065132 {no path} + ** .data.rel.ro (unattributed) +42) 43765136 (32.6%) d@0x2de7000 4 base/page_allocator.cc + google::protobuf::internal::pLinuxKernelCmpxchg +43) 43765140 (32.6%) d@0x2de7004 4 third_party/container/container.c + google::protobuf::internal::pLinuxKernelMemoryBarrier +44) 43765292 (32.6%) d@0x2de7008 152 third_party/container/container.c + base::android::kBaseRegisteredMethods +45) 43765296 (32.6%) d@0x2de70a0 4 third_party/container/container.c + base::android::g_renderer_histogram_code +46) 43765300 (32.6%) d@0x2de70a4 4 third_party/container/container.c + base::android::g_library_version_number +47) 43866900 (32.7%) d@0x2de70a8 101600 {no path} + ** .data (unattributed) +48) 43866900 (32.7%) b@0x0 262144 third_party/fft_float.cc ff_cos_131072 -72) 134218029 (100.0%) b@0x0 131072 third_party/fft_fixed.cc +49) 43866900 (32.7%) b@0x0 131072 third_party/fft_fixed.cc ff_cos_131072_fixed -73) 134218029 (100.0%) b@0x0 131072 third_party/fft_float.cc +50) 43866900 (32.7%) b@0x0 131072 third_party/fft_float.cc ff_cos_65536 -74) 134218029 (100.0%) b@0x2dffda0 28 $root_gen_dir/third_party/icu/ucnv_ext.c +51) 43866900 (32.7%) b@0x2dffda0 28 $root_gen_dir/third_party/icu/ucnv_ext.c g_chrome_content_browser_client -75) 134218029 (100.0%) b@0x2dffe80 200 $root_gen_dir/third_party/icu/ucnv_ext.c +52) 43866900 (32.7%) b@0x2dffe80 200 $root_gen_dir/third_party/icu/ucnv_ext.c SaveHistogram::atomic_histogram_pointer -76) 134218029 (100.0%) b@0x2dffe84 4 $root_gen_dir/third_party/icu/ucnv_ext.c +53) 43866900 (32.7%) b@0x2dffe84 4 $root_gen_dir/third_party/icu/ucnv_ext.c g_AnimationFrameTimeHistogram_clazz +54) 43866960 (32.7%) o@0x0 60 {no path} + ** ELF Section: .ARM.attributes +55) 45403416 (33.8%) o@0x0 1536456 {no path} + ** ELF Section: .ARM.exidx +56) 45587048 (34.0%) o@0x0 183632 {no path} + ** ELF Section: .ARM.extab +57) 45587352 (34.0%) o@0x0 304 {no path} + ** ELF Section: .dynamic +58) 45591377 (34.0%) o@0x0 4025 {no path} + ** ELF Section: .dynstr +59) 45597873 (34.0%) o@0x0 6496 {no path} + ** ELF Section: .dynsym +60) 45597881 (34.0%) o@0x0 8 {no path} + ** ELF Section: .fini_array +61) 45598693 (34.0%) o@0x0 812 {no path} + ** ELF Section: .gnu.version +62) 45598721 (34.0%) o@0x0 28 {no path} + ** ELF Section: .gnu.version_d +63) 45598817 (34.0%) o@0x0 96 {no path} + ** ELF Section: .gnu.version_r +64) 45641773 (34.0%) o@0x0 42956 {no path} + ** ELF Section: .got +65) 45644457 (34.0%) o@0x0 2684 {no path} + ** ELF Section: .hash +66) 45644465 (34.0%) o@0x0 8 {no path} + ** ELF Section: .init_array +67) 45644484 (34.0%) o@0x0 19 {no path} + ** ELF Section: .interp +68) 45644520 (34.0%) o@0x0 36 {no path} + ** ELF Section: .note.gnu.build-id +69) 45644548 (34.0%) o@0x0 28 {no path} + ** ELF Section: .note.gnu.gold-version +70) 45648792 (34.0%) o@0x0 4244 {no path} + ** ELF Section: .plt +71) 48304176 (36.0%) o@0x0 2655384 {no path} + ** ELF Section: .rel.dyn +72) 48306992 (36.0%) o@0x0 2816 {no path} + ** ELF Section: .rel.plt +73) 48307428 (36.0%) o@0x0 436 {no path} + ** ELF Section: .shstrtab +74) 83149282 (62.0%) o@0x0 34841854 {no path} + ** ELF Section: .strtab +75) 100315394 (74.7%) o@0x0 17166112 {no path} + ** ELF Section: .symtab +76) 134218029 (100.0%) o@0x0 33902635 {no path} + Overhead: ELF file
diff --git a/tools/binary_size/libsupersize/testdata/Csv.golden b/tools/binary_size/libsupersize/testdata/Csv.golden index 8344710..1b88a02 100644 --- a/tools/binary_size/libsupersize/testdata/Csv.golden +++ b/tools/binary_size/libsupersize/testdata/Csv.golden
@@ -11,56 +11,6 @@ .text,35982248 GroupCount,Address,SizeWithoutPadding,Padding,NumAliases,PSS,Section,Name -,0x2de7000,4,0,1,4.0,d,google::protobuf::internal::pLinuxKernelCmpxchg -,0x2de7004,4,0,1,4.0,d,google::protobuf::internal::pLinuxKernelMemoryBarrier -,0x2de7008,152,0,1,152.0,d,base::android::kBaseRegisteredMethods -,0x2de70a0,4,0,1,4.0,d,base::android::g_renderer_histogram_code -,0x2de70a4,4,0,1,4.0,d,base::android::g_library_version_number -,0x2de70a8,101600,0,1,101600.0,d,** .data (unattributed) -,0x2cd8500,56,0,1,56.0,R,ChromeMainDelegateAndroid [vtable] -,0x2cd8538,24,0,1,24.0,R,mojo::MessageReceiver [vtable] -,0x2cd8550,12,0,1,12.0,R,kMethodsAnimationFrameTimeHistogram -,0x2cd855c,1065132,0,1,1065132.0,R,** .data.rel.ro (unattributed) -,0x2c176f0,56,0,1,56.0,R,ChromeMainDelegate [vtable] -,0x2c17728,24,0,1,24.0,R,chrome::mojom::FieldTrialRecorder [vtable] -,0x2c17740,789904,0,1,789904.0,R,chrome::mojom::FieldTrialRecorderProxy [vtable] -,0x2cd84e0,16,16,1,32.0,R,.Lswitch.table.45 -,0x2cd84f0,8,0,1,8.0,R,kSystemClassPrefixes -,0x0,60,0,1,60.0,o,** ELF Section: .ARM.attributes -,0x0,28,0,1,28.0,o,** ELF Section: .note.gnu.gold-version -,0x0,436,0,1,436.0,o,** ELF Section: .shstrtab -,0x0,34841854,0,1,34841854.0,o,** ELF Section: .strtab -,0x0,17166112,0,1,17166112.0,o,** ELF Section: .symtab -,0x0,0,33902635,1,33902635.0,o,Overhead: ELF file -,0x154,19,0,1,19.0,o,** ELF Section: .interp -,0x168,36,0,1,36.0,o,** ELF Section: .note.gnu.build-id -,0x18c,6496,0,1,6496.0,o,** ELF Section: .dynsym -,0x1b0c,4025,0,1,4025.0,o,** ELF Section: .dynstr -,0x2ad4,2684,0,1,2684.0,o,** ELF Section: .hash -,0x3558,812,0,1,812.0,o,** ELF Section: .gnu.version -,0x3888,28,0,1,28.0,o,** ELF Section: .gnu.version_d -,0x38a4,96,0,1,96.0,o,** ELF Section: .gnu.version_r -,0x3904,2655384,0,1,2655384.0,o,** ELF Section: .rel.dyn -,0x29fbec,2816,0,1,2816.0,o,** ELF Section: .rel.plt -,0x2a06ec,4244,0,1,4244.0,o,** ELF Section: .plt -,0x2bd3d10,1536456,0,1,1536456.0,o,** ELF Section: .ARM.exidx -,0x2bd5858,183632,0,1,183632.0,o,** ELF Section: .ARM.extab -,0x2ddc608,8,0,1,8.0,o,** ELF Section: .init_array -,0x2ddc6f4,8,0,1,8.0,o,** ELF Section: .fini_array -,0x2ddc6fc,304,0,1,304.0,o,** ELF Section: .dynamic -,0x2ddc834,42956,0,1,42956.0,o,** ELF Section: .got -,0x266e600,5,0,2,2.5,r,"""Str1""" -,0x266e600,5,0,2,2.5,r,"""Str1""" -,0x266e605,16,0,1,16.0,r,"""String literal2""" -,0x266e630,16,27,1,43.0,r,** merge strings -,0x284d600,3425,1961920,1,1965345.0,r,** merge constants -,0x284e364,0,3,1,3.0,r,** symbol gap 0 -,0x284e364,8,0,1,8.0,r, -,0x284e370,40,4,1,44.0,r,Name -,0x284e398,32,0,1,32.0,r,chrome::mojom::FilePatcher::Name_ -,0x28f3450,48,675992,1,676040.0,r,kAnimationFrameTimeHistogramClassPath -,0x28f3480,4,0,1,4.0,r,blink::CSSValueKeywordsHash::findValueImpl::value_word_list -,0x28f3484,3286096,0,1,3286096.0,r,** .rodata (unattributed) ,0x28d900,16,0,1,16.0,t,_GLOBAL__sub_I_page_allocator.cc ,0x28d910,56,0,1,56.0,t,_GLOBAL__sub_I_bbr_sender.cc ,0x28d948,28,0,1,28.0,t,_GLOBAL__sub_I_pacing_sender.cc @@ -79,12 +29,62 @@ ,0x2a0020,24,4,1,28.0,t,blink::ContiguousContainerBase::ContiguousContainerBase ,0x2a1000,94,0,1,94.0,t,blink::PaintChunker::releasePaintChunks ,0x2a2000,32,4002,1,4034.0,t,** outlined function -,0x2a2020,48,0,2,24.0,t,** outlined function * 2 ,0x2a2020,48,0,2,24.0,t,aliasedWithOutlinedFunction +,0x2a2020,48,0,2,24.0,t,** outlined function * 2 ,0x2a2050,35898456,0,1,35898456.0,t,** .text (unattributed) +,0x266e600,5,0,2,2.5,r,"""Str1""" +,0x266e600,5,0,2,2.5,r,"""Str1""" +,0x266e605,16,0,1,16.0,r,"""String literal2""" +,0x266e630,16,27,1,43.0,r,** merge strings +,0x284d600,3425,1961920,1,1965345.0,r,** merge constants +,0x284e364,0,3,1,3.0,r,** symbol gap 0 +,0x284e364,8,0,1,8.0,r, +,0x284e370,40,4,1,44.0,r,Name +,0x284e398,32,0,1,32.0,r,chrome::mojom::FilePatcher::Name_ +,0x28f3450,48,675992,1,676040.0,r,kAnimationFrameTimeHistogramClassPath +,0x28f3480,4,0,1,4.0,r,blink::CSSValueKeywordsHash::findValueImpl::value_word_list +,0x28f3484,3286096,0,1,3286096.0,r,** .rodata (unattributed) +,0x2c176f0,56,0,1,56.0,R,ChromeMainDelegate [vtable] +,0x2c17728,24,0,1,24.0,R,chrome::mojom::FieldTrialRecorder [vtable] +,0x2c17740,789904,0,1,789904.0,R,chrome::mojom::FieldTrialRecorderProxy [vtable] +,0x2cd84e0,16,16,1,32.0,R,.Lswitch.table.45 +,0x2cd84f0,8,0,1,8.0,R,kSystemClassPrefixes +,0x2cd8500,56,0,1,56.0,R,ChromeMainDelegateAndroid [vtable] +,0x2cd8538,24,0,1,24.0,R,mojo::MessageReceiver [vtable] +,0x2cd8550,12,0,1,12.0,R,kMethodsAnimationFrameTimeHistogram +,0x2cd855c,1065132,0,1,1065132.0,R,** .data.rel.ro (unattributed) +,0x2de7000,4,0,1,4.0,d,google::protobuf::internal::pLinuxKernelCmpxchg +,0x2de7004,4,0,1,4.0,d,google::protobuf::internal::pLinuxKernelMemoryBarrier +,0x2de7008,152,0,1,152.0,d,base::android::kBaseRegisteredMethods +,0x2de70a0,4,0,1,4.0,d,base::android::g_renderer_histogram_code +,0x2de70a4,4,0,1,4.0,d,base::android::g_library_version_number +,0x2de70a8,101600,0,1,101600.0,d,** .data (unattributed) ,0x0,262144,0,1,262144.0,b,ff_cos_131072 ,0x0,131072,0,1,131072.0,b,ff_cos_131072_fixed ,0x0,131072,0,1,131072.0,b,ff_cos_65536 ,0x2dffda0,28,0,1,28.0,b,g_chrome_content_browser_client ,0x2dffe80,4,196,1,200.0,b,SaveHistogram::atomic_histogram_pointer ,0x2dffe84,4,0,1,4.0,b,g_AnimationFrameTimeHistogram_clazz +,0x0,60,0,1,60.0,o,** ELF Section: .ARM.attributes +,0x0,1536456,0,1,1536456.0,o,** ELF Section: .ARM.exidx +,0x0,183632,0,1,183632.0,o,** ELF Section: .ARM.extab +,0x0,304,0,1,304.0,o,** ELF Section: .dynamic +,0x0,4025,0,1,4025.0,o,** ELF Section: .dynstr +,0x0,6496,0,1,6496.0,o,** ELF Section: .dynsym +,0x0,8,0,1,8.0,o,** ELF Section: .fini_array +,0x0,812,0,1,812.0,o,** ELF Section: .gnu.version +,0x0,28,0,1,28.0,o,** ELF Section: .gnu.version_d +,0x0,96,0,1,96.0,o,** ELF Section: .gnu.version_r +,0x0,42956,0,1,42956.0,o,** ELF Section: .got +,0x0,2684,0,1,2684.0,o,** ELF Section: .hash +,0x0,8,0,1,8.0,o,** ELF Section: .init_array +,0x0,19,0,1,19.0,o,** ELF Section: .interp +,0x0,36,0,1,36.0,o,** ELF Section: .note.gnu.build-id +,0x0,28,0,1,28.0,o,** ELF Section: .note.gnu.gold-version +,0x0,4244,0,1,4244.0,o,** ELF Section: .plt +,0x0,2655384,0,1,2655384.0,o,** ELF Section: .rel.dyn +,0x0,2816,0,1,2816.0,o,** ELF Section: .rel.plt +,0x0,436,0,1,436.0,o,** ELF Section: .shstrtab +,0x0,34841854,0,1,34841854.0,o,** ELF Section: .strtab +,0x0,17166112,0,1,17166112.0,o,** ELF Section: .symtab +,0x0,0,33902635,1,33902635.0,o,Overhead: ELF file
diff --git a/tools/binary_size/libsupersize/testdata/Diff_Basic.golden b/tools/binary_size/libsupersize/testdata/Diff_Basic.golden index 216bd97..beae377 100644 --- a/tools/binary_size/libsupersize/testdata/Diff_Basic.golden +++ b/tools/binary_size/libsupersize/testdata/Diff_Basic.golden
@@ -45,47 +45,42 @@ .strtab: 0 bytes (0 bytes) (counted in .other) .symtab: 0 bytes (0 bytes) (counted in .other) -2 symbols added (+), 2 changed (~), 3 removed (-), 243 unchanged (not shown) +2 symbols added (+), 1 changed (~), 3 removed (-), 243 unchanged (not shown) Added/Removed by section: .data: +2 .pak.translations: -3 -Of changed symbols, 3 grew, 4 shrank -Number of unique symbols 252 -> 251 (-1) -0 paths added, 0 removed, 2 changed +Of changed symbols, 3 grew, 3 shrank +Number of unique symbols 251 -> 250 (-1) +0 paths added, 0 removed, 1 changed Changed files: - third_party/container/container.c -Showing 7 symbols (5 -> 4 unique) with total pss: -112 bytes +Showing 6 symbols (4 -> 3 unique) with total pss: -94 bytes Histogram of symbols based on PSS: - (-128,-64]: 1 (-32,-16]: 2 (-16,-8]: 1 [4,8): 2 [8,16): 1 -Sizes: .text=0 bytes .rodata=10 bytes .data.rel.ro=0 bytes .data=8 bytes .bss=0 bytes .pak.translations=-112 bytes .pak.nontranslated=-18 bytes total=-112 bytes -Counts: .text=0 .rodata=1 .data.rel.ro=0 .data=2 .bss=0 .pak.translations=3 .pak.nontranslated=1 + (-128,-64]: 1 (-32,-16]: 1 (-16,-8]: 1 [4,8): 2 [8,16): 1 +Sizes: .text=0 bytes .rodata=10 bytes .data.rel.ro=0 bytes .data=8 bytes .bss=0 bytes .pak.translations=-112 bytes .pak.nontranslated=0 bytes total=-94 bytes +Counts: .text=0 .rodata=1 .data.rel.ro=0 .data=2 .bss=0 .pak.translations=3 .pak.nontranslated=0 Number of unique paths: 3 Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, p=.pak.translations, P=.pak.nontranslated Index | Running Total | Section@Address | ... ------------------------------------------------------------ -- 0) -80 (71.4%) p@0x0 -80 (80->0) num_aliases=1 +- 0) -80 (85.1%) p@0x0 -80 (80->0) num_aliases=1 source_path= object_path= flags={} name=IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED full_name=../../android_webview/ui/aw_strings.grd: IDS_AW_WEBPAGE_PARENTAL_PERMISSION_NEEDED -- 1) -103 (92.0%) p@0x0 -23 (23->0) num_aliases=1 +- 1) -103 (109.6%) p@0x0 -23 (23->0) num_aliases=1 source_path= object_path= flags={} name=IDS_WEB_FONT_FAMILY full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_FAMILY -- 2) -112 (100.0%) p@0x0 -9 (9->0) num_aliases=1 +- 2) -112 (119.1%) p@0x0 -9 (9->0) num_aliases=1 source_path= object_path= flags={} name=IDS_WEB_FONT_SIZE full_name=../../ui/strings/app_locale_settings.grd: IDS_WEB_FONT_SIZE -~ 3) -130 (116.1%) P@0x0 -18 (0->0) num_aliases=1 - source_path= object_path= - flags={} name=../../../mock_apk/assets/resources.pak - full_name=foo: ../../../mock_apk/assets/resources.pak -~ 4) -120 (107.1%) r@0x284e398 +10 (22->32) num_aliases=1 +~ 3) -102 (108.5%) r@0x284e398 +10 (22->32) num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=chrome::mojom::FilePatcher::Name_ -+ 5) -116 (103.6%) d@0x2de7000 +4 (0->4) num_aliases=1 ++ 4) -98 (104.3%) d@0x2de7000 +4 (0->4) num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={} name=google::protobuf::internal::pLinuxKernelCmpxchg -+ 6) -112 (100.0%) d@0x2de7004 +4 (0->4) num_aliases=1 ++ 5) -94 (100.0%) d@0x2de7004 +4 (0->4) num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=google::protobuf::internal::pLinuxKernelMemoryBarrier
diff --git a/tools/binary_size/libsupersize/testdata/FullDescription.golden b/tools/binary_size/libsupersize/testdata/FullDescription.golden index 227a77eb..bcb1e3e 100644 --- a/tools/binary_size/libsupersize/testdata/FullDescription.golden +++ b/tools/binary_size/libsupersize/testdata/FullDescription.golden
@@ -124,253 +124,253 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | ... ------------------------------------------------------------ -0) 4 (0.0%) d@0x2de7000 pss=4 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=google::protobuf::internal::pLinuxKernelCmpxchg -1) 8 (0.0%) d@0x2de7004 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=google::protobuf::internal::pLinuxKernelMemoryBarrier -2) 160 (0.0%) d@0x2de7008 pss=152 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={rel} name=base::android::kBaseRegisteredMethods -3) 164 (0.0%) d@0x2de70a0 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={anon} name=base::android::g_renderer_histogram_code -4) 168 (0.0%) d@0x2de70a4 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={anon,rel.loc} name=base::android::g_library_version_number -5) 101768 (0.1%) d@0x2de70a8 pss=101600 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .data (unattributed) -6) 101824 (0.1%) R@0x2cd8500 pss=56 padding=0 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={} name=ChromeMainDelegateAndroid [vtable] -7) 101848 (0.1%) R@0x2cd8538 pss=24 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=mojo::MessageReceiver [vtable] -8) 101860 (0.1%) R@0x2cd8550 pss=12 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=kMethodsAnimationFrameTimeHistogram -9) 1166992 (0.9%) R@0x2cd855c pss=1065132 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .data.rel.ro (unattributed) -10) 1167048 (0.9%) R@0x2c176f0 pss=56 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name=ChromeMainDelegate [vtable] -11) 1167072 (0.9%) R@0x2c17728 pss=24 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name=chrome::mojom::FieldTrialRecorder [vtable] -12) 1956976 (1.5%) R@0x2c17740 pss=789904 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=chrome::mojom::FieldTrialRecorderProxy [vtable] -13) 1957008 (1.5%) R@0x2cd84e0 pss=32 padding=16 num_aliases=1 - source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o - flags={} name=.Lswitch.table.45 -14) 1957016 (1.5%) R@0x2cd84f0 pss=8 padding=0 num_aliases=1 - source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o - flags={anon} name=kSystemClassPrefixes -15) 1957076 (1.5%) o@0x0 pss=60 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.attributes -16) 1957104 (1.5%) o@0x0 pss=28 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .note.gnu.gold-version -17) 1957540 (1.5%) o@0x0 pss=436 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .shstrtab -18) 36799394 (27.4%) o@0x0 pss=34841854 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .strtab -19) 53965506 (40.2%) o@0x0 pss=17166112 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .symtab -20) 87868141 (65.5%) o@0x0 pss=33902635 padding=33902635 num_aliases=1 - source_path= object_path= - flags={} name=Overhead: ELF file -21) 87868160 (65.5%) o@0x154 pss=19 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .interp -22) 87868196 (65.5%) o@0x168 pss=36 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .note.gnu.build-id -23) 87874692 (65.5%) o@0x18c pss=6496 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynsym -24) 87878717 (65.5%) o@0x1b0c pss=4025 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynstr -25) 87881401 (65.5%) o@0x2ad4 pss=2684 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .hash -26) 87882213 (65.5%) o@0x3558 pss=812 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version -27) 87882241 (65.5%) o@0x3888 pss=28 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version_d -28) 87882337 (65.5%) o@0x38a4 pss=96 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version_r -29) 90537721 (67.5%) o@0x3904 pss=2655384 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .rel.dyn -30) 90540537 (67.5%) o@0x29fbec pss=2816 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .rel.plt -31) 90544781 (67.5%) o@0x2a06ec pss=4244 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .plt -32) 92081237 (68.6%) o@0x2bd3d10 pss=1536456 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.exidx -33) 92264869 (68.7%) o@0x2bd5858 pss=183632 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.extab -34) 92264877 (68.7%) o@0x2ddc608 pss=8 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .init_array -35) 92264885 (68.7%) o@0x2ddc6f4 pss=8 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .fini_array -36) 92265189 (68.7%) o@0x2ddc6fc pss=304 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynamic -37) 92308145 (68.8%) o@0x2ddc834 pss=42956 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .got -38) 92308147 (68.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name="Str1" -39) 92308150 (68.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name="Str1" -40) 92308166 (68.8%) r@0x266e605 pss=16 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name="String literal2" -41) 92308209 (68.8%) r@0x266e630 pss=43 padding=27 num_aliases=1 - source_path= object_path= - flags={} name=** merge strings -42) 94273554 (70.2%) r@0x284d600 pss=1965345 padding=1961920 num_aliases=1 - source_path= object_path= - flags={} name=** merge constants -43) 94273557 (70.2%) r@0x284e364 pss=3 padding=3 num_aliases=1 - source_path= object_path= - flags={} name=** symbol gap 0 -44) 94273565 (70.2%) r@0x284e364 pss=8 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o -45) 94273609 (70.2%) r@0x284e370 pss=44 padding=4 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=Name -46) 94273641 (70.2%) r@0x284e398 pss=32 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=chrome::mojom::FilePatcher::Name_ -47) 94949681 (70.7%) r@0x28f3450 pss=676040 padding=675992 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={anon} name=kAnimationFrameTimeHistogramClassPath -48) 94949685 (70.7%) r@0x28f3480 pss=4 padding=0 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={anon} name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list - full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list -49) 98235781 (73.2%) r@0x28f3484 pss=3286096 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .rodata (unattributed) -50) 98235797 (73.2%) t@0x28d900 pss=16 padding=0 num_aliases=1 +0) 16 (0.0%) t@0x28d900 pss=16 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_page_allocator.cc -51) 98235853 (73.2%) t@0x28d910 pss=56 padding=0 num_aliases=1 +1) 72 (0.0%) t@0x28d910 pss=56 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_bbr_sender.cc -52) 98235881 (73.2%) t@0x28d948 pss=28 padding=0 num_aliases=1 +2) 100 (0.0%) t@0x28d948 pss=28 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_pacing_sender.cc -53) 98235919 (73.2%) t@0x28d964 pss=38 padding=0 num_aliases=1 +3) 138 (0.0%) t@0x28d964 pss=38 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={} name=extFromUUseMapping full_name=extFromUUseMapping(signed char, unsigned int, int) -54) 98235951 (73.2%) t@0x28d98a pss=32 padding=0 num_aliases=1 +4) 170 (0.0%) t@0x28d98a pss=32 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={} name=extFromUUseMapping full_name=extFromUUseMapping(aj, int) -55) 98241669 (73.2%) t@0x28f000 pss=5718 padding=5718 num_aliases=1 +5) 5888 (0.0%) t@0x28f000 pss=5718 padding=5718 num_aliases=1 source_path= object_path= flags={} name=** symbol gap 0 -56) 98242117 (73.2%) t@0x28f000 pss=448 padding=0 num_aliases=1 +6) 6336 (0.0%) t@0x28f000 pss=448 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=ucnv_extMatchFromU full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char) -57) 98242145 (73.2%) t@0x28f1c8 pss=28 padding=8 num_aliases=1 +7) 6364 (0.0%) t@0x28f1c8 pss=28 padding=8 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={startup,gen} name=_GLOBAL__sub_I_SkDeviceProfile.cpp -58) 98311269 (73.2%) t@0x28f1e0 pss=69124 padding=4 num_aliases=1 +8) 75488 (0.1%) t@0x28f1e0 pss=69124 padding=4 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={unlikely,gen} name=foo_bar -59) 98311293 (73.2%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 +9) 75512 (0.1%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=BazAlias full_name=BazAlias(bool) -60) 98311317 (73.2%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 +10) 75536 (0.1%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 source_path= object_path= flags={} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -61) 98311320 (73.2%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +11) 75539 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=BarAlias full_name=BarAlias() -62) 98311323 (73.2%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +12) 75542 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=FooAlias full_name=FooAlias() -63) 98311326 (73.2%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +13) 75545 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen,clone} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -64) 98311329 (73.2%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +14) 75548 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o flags={clone} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -65) 98311357 (73.2%) t@0x2a0020 pss=28 padding=4 num_aliases=1 +15) 75576 (0.1%) t@0x2a0020 pss=28 padding=4 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=blink::ContiguousContainerBase::ContiguousContainerBase full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&) -66) 98315397 (73.3%) t@0x2a1000 pss=4040 padding=4040 num_aliases=1 +16) 79616 (0.1%) t@0x2a1000 pss=4040 padding=4040 num_aliases=1 source_path= object_path= flags={} name=** symbol gap 1 -67) 98315491 (73.3%) t@0x2a1000 pss=94 padding=0 num_aliases=1 +17) 79710 (0.1%) t@0x2a1000 pss=94 padding=0 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={anon,clone} name=blink::PaintChunker::releasePaintChunks full_name=blink::PaintChunker::releasePaintChunks() -68) 98319525 (73.3%) t@0x2a2000 pss=4034 padding=4002 num_aliases=1 +18) 83744 (0.1%) t@0x2a2000 pss=4034 padding=4002 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=** outlined function -69) 98319549 (73.3%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 - source_path= object_path= - flags={} name=** outlined function * 2 -70) 98319573 (73.3%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 +19) 83768 (0.1%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 source_path= object_path= flags={} name=aliasedWithOutlinedFunction full_name=aliasedWithOutlinedFunction() -71) 134218029 (100.0%) t@0x2a2050 pss=35898456 padding=0 num_aliases=1 +20) 83792 (0.1%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 + source_path= object_path= + flags={} name=** outlined function * 2 +21) 35982248 (26.8%) t@0x2a2050 pss=35898456 padding=0 num_aliases=1 source_path= object_path= flags={} name=** .text (unattributed) -72) 134218029 (100.0%) b@0x0 pss=262144 padding=0 num_aliases=1 +22) 35982250 (26.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name="Str1" +23) 35982253 (26.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name="Str1" +24) 35982269 (26.8%) r@0x266e605 pss=16 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name="String literal2" +25) 35982312 (26.8%) r@0x266e630 pss=43 padding=27 num_aliases=1 + source_path= object_path= + flags={} name=** merge strings +26) 37947657 (28.3%) r@0x284d600 pss=1965345 padding=1961920 num_aliases=1 + source_path= object_path= + flags={} name=** merge constants +27) 37947660 (28.3%) r@0x284e364 pss=3 padding=3 num_aliases=1 + source_path= object_path= + flags={} name=** symbol gap 0 +28) 37947668 (28.3%) r@0x284e364 pss=8 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o +29) 37947712 (28.3%) r@0x284e370 pss=44 padding=4 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=Name +30) 37947744 (28.3%) r@0x284e398 pss=32 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=chrome::mojom::FilePatcher::Name_ +31) 38623784 (28.8%) r@0x28f3450 pss=676040 padding=675992 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={anon} name=kAnimationFrameTimeHistogramClassPath +32) 38623788 (28.8%) r@0x28f3480 pss=4 padding=0 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={anon} name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list + full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list +33) 41909884 (31.2%) r@0x28f3484 pss=3286096 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .rodata (unattributed) +34) 41909940 (31.2%) R@0x2c176f0 pss=56 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name=ChromeMainDelegate [vtable] +35) 41909964 (31.2%) R@0x2c17728 pss=24 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name=chrome::mojom::FieldTrialRecorder [vtable] +36) 42699868 (31.8%) R@0x2c17740 pss=789904 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=chrome::mojom::FieldTrialRecorderProxy [vtable] +37) 42699900 (31.8%) R@0x2cd84e0 pss=32 padding=16 num_aliases=1 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + flags={} name=.Lswitch.table.45 +38) 42699908 (31.8%) R@0x2cd84f0 pss=8 padding=0 num_aliases=1 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + flags={anon} name=kSystemClassPrefixes +39) 42699964 (31.8%) R@0x2cd8500 pss=56 padding=0 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={} name=ChromeMainDelegateAndroid [vtable] +40) 42699988 (31.8%) R@0x2cd8538 pss=24 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=mojo::MessageReceiver [vtable] +41) 42700000 (31.8%) R@0x2cd8550 pss=12 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=kMethodsAnimationFrameTimeHistogram +42) 43765132 (32.6%) R@0x2cd855c pss=1065132 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .data.rel.ro (unattributed) +43) 43765136 (32.6%) d@0x2de7000 pss=4 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=google::protobuf::internal::pLinuxKernelCmpxchg +44) 43765140 (32.6%) d@0x2de7004 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=google::protobuf::internal::pLinuxKernelMemoryBarrier +45) 43765292 (32.6%) d@0x2de7008 pss=152 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={rel} name=base::android::kBaseRegisteredMethods +46) 43765296 (32.6%) d@0x2de70a0 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={anon} name=base::android::g_renderer_histogram_code +47) 43765300 (32.6%) d@0x2de70a4 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={anon,rel.loc} name=base::android::g_library_version_number +48) 43866900 (32.7%) d@0x2de70a8 pss=101600 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .data (unattributed) +49) 43866900 (32.7%) b@0x0 pss=262144 padding=0 num_aliases=1 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=ff_cos_131072 -73) 134218029 (100.0%) b@0x0 pss=131072 padding=0 num_aliases=1 +50) 43866900 (32.7%) b@0x0 pss=131072 padding=0 num_aliases=1 source_path=third_party/fft_fixed.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o flags={} name=ff_cos_131072_fixed -74) 134218029 (100.0%) b@0x0 pss=131072 padding=0 num_aliases=1 +51) 43866900 (32.7%) b@0x0 pss=131072 padding=0 num_aliases=1 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=ff_cos_65536 -75) 134218029 (100.0%) b@0x2dffda0 pss=28 padding=0 num_aliases=1 +52) 43866900 (32.7%) b@0x2dffda0 pss=28 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=g_chrome_content_browser_client -76) 134218029 (100.0%) b@0x2dffe80 pss=200 padding=196 num_aliases=1 +53) 43866900 (32.7%) b@0x2dffe80 pss=200 padding=196 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=SaveHistogram::atomic_histogram_pointer full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer -77) 134218029 (100.0%) b@0x2dffe84 pss=4 padding=0 num_aliases=1 +54) 43866900 (32.7%) b@0x2dffe84 pss=4 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={anon,gen} name=g_AnimationFrameTimeHistogram_clazz +55) 43866960 (32.7%) o@0x0 pss=60 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.attributes +56) 45403416 (33.8%) o@0x0 pss=1536456 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.exidx +57) 45587048 (34.0%) o@0x0 pss=183632 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.extab +58) 45587352 (34.0%) o@0x0 pss=304 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynamic +59) 45591377 (34.0%) o@0x0 pss=4025 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynstr +60) 45597873 (34.0%) o@0x0 pss=6496 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynsym +61) 45597881 (34.0%) o@0x0 pss=8 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .fini_array +62) 45598693 (34.0%) o@0x0 pss=812 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version +63) 45598721 (34.0%) o@0x0 pss=28 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version_d +64) 45598817 (34.0%) o@0x0 pss=96 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version_r +65) 45641773 (34.0%) o@0x0 pss=42956 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .got +66) 45644457 (34.0%) o@0x0 pss=2684 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .hash +67) 45644465 (34.0%) o@0x0 pss=8 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .init_array +68) 45644484 (34.0%) o@0x0 pss=19 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .interp +69) 45644520 (34.0%) o@0x0 pss=36 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .note.gnu.build-id +70) 45644548 (34.0%) o@0x0 pss=28 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .note.gnu.gold-version +71) 45648792 (34.0%) o@0x0 pss=4244 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .plt +72) 48304176 (36.0%) o@0x0 pss=2655384 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .rel.dyn +73) 48306992 (36.0%) o@0x0 pss=2816 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .rel.plt +74) 48307428 (36.0%) o@0x0 pss=436 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .shstrtab +75) 83149282 (62.0%) o@0x0 pss=34841854 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .strtab +76) 100315394 (74.7%) o@0x0 pss=17166112 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .symtab +77) 134218029 (100.0%) o@0x0 pss=33902635 padding=33902635 num_aliases=1 + source_path= object_path= + flags={} name=Overhead: ELF file Showing 77 symbols (71 unique) with total pss: 134218029 bytes Histogram of symbols based on PSS: [2,4): 7 [32,64): 11 [512,1024): 1 [32768,65536): 1 [524288,1048576): 2 [33554432,67108864): 3 @@ -384,174 +384,24 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | ... ------------------------------------------------------------ -0) 4 (0.0%) d@0x2de7000 pss=4 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=google::protobuf::internal::pLinuxKernelCmpxchg -1) 8 (0.0%) d@0x2de7004 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=google::protobuf::internal::pLinuxKernelMemoryBarrier -2) 160 (0.0%) d@0x2de7008 pss=152 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={rel} name=base::android::kBaseRegisteredMethods -3) 164 (0.0%) d@0x2de70a0 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={anon} name=base::android::g_renderer_histogram_code -4) 168 (0.0%) d@0x2de70a4 pss=4 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={anon,rel.loc} name=base::android::g_library_version_number -5) 101768 (0.1%) d@0x2de70a8 pss=101600 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .data (unattributed) -6) 101824 (0.1%) R@0x2cd8500 pss=56 padding=0 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={} name=ChromeMainDelegateAndroid [vtable] -7) 101848 (0.1%) R@0x2cd8538 pss=24 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=mojo::MessageReceiver [vtable] -8) 101860 (0.1%) R@0x2cd8550 pss=12 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=kMethodsAnimationFrameTimeHistogram -9) 1166992 (0.9%) R@0x2cd855c pss=1065132 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .data.rel.ro (unattributed) -10) 1167048 (0.9%) R@0x2c176f0 pss=56 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name=ChromeMainDelegate [vtable] -11) 1167072 (0.9%) R@0x2c17728 pss=24 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name=chrome::mojom::FieldTrialRecorder [vtable] -12) 1956976 (1.5%) R@0x2c17740 pss=789904 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=chrome::mojom::FieldTrialRecorderProxy [vtable] -13) 1957008 (1.5%) R@0x2cd84e0 pss=32 padding=16 num_aliases=1 - source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o - flags={} name=.Lswitch.table.45 -14) 1957016 (1.5%) R@0x2cd84f0 pss=8 padding=0 num_aliases=1 - source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o - flags={anon} name=kSystemClassPrefixes -15) 1957076 (1.5%) o@0x0 pss=60 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.attributes -16) 1957104 (1.5%) o@0x0 pss=28 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .note.gnu.gold-version -17) 1957540 (1.5%) o@0x0 pss=436 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .shstrtab -18) 36799394 (27.4%) o@0x0 pss=34841854 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .strtab -19) 53965506 (40.2%) o@0x0 pss=17166112 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .symtab -20) 87868141 (65.5%) o@0x0 pss=33902635 padding=33902635 num_aliases=1 - source_path= object_path= - flags={} name=Overhead: ELF file -21) 87868160 (65.5%) o@0x154 pss=19 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .interp -22) 87868196 (65.5%) o@0x168 pss=36 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .note.gnu.build-id -23) 87874692 (65.5%) o@0x18c pss=6496 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynsym -24) 87878717 (65.5%) o@0x1b0c pss=4025 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynstr -25) 87881401 (65.5%) o@0x2ad4 pss=2684 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .hash -26) 87882213 (65.5%) o@0x3558 pss=812 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version -27) 87882241 (65.5%) o@0x3888 pss=28 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version_d -28) 87882337 (65.5%) o@0x38a4 pss=96 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .gnu.version_r -29) 90537721 (67.5%) o@0x3904 pss=2655384 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .rel.dyn -30) 90540537 (67.5%) o@0x29fbec pss=2816 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .rel.plt -31) 90544781 (67.5%) o@0x2a06ec pss=4244 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .plt -32) 92081237 (68.6%) o@0x2bd3d10 pss=1536456 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.exidx -33) 92264869 (68.7%) o@0x2bd5858 pss=183632 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .ARM.extab -34) 92264877 (68.7%) o@0x2ddc608 pss=8 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .init_array -35) 92264885 (68.7%) o@0x2ddc6f4 pss=8 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .fini_array -36) 92265189 (68.7%) o@0x2ddc6fc pss=304 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .dynamic -37) 92308145 (68.8%) o@0x2ddc834 pss=42956 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** ELF Section: .got -38) 92308147 (68.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name="Str1" -39) 92308150 (68.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name="Str1" -40) 92308166 (68.8%) r@0x266e605 pss=16 padding=0 num_aliases=1 - source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o - flags={gen} name="String literal2" -41) 92308209 (68.8%) r@0x266e630 pss=43 padding=27 num_aliases=1 - source_path= object_path= - flags={} name=** merge strings -42) 94273554 (70.2%) r@0x284d600 pss=1965345 padding=1961920 num_aliases=1 - source_path= object_path= - flags={} name=** merge constants -43) 94273557 (70.2%) r@0x284e364 pss=3 padding=3 num_aliases=1 - source_path= object_path= - flags={} name=** symbol gap 0 -44) 94273565 (70.2%) r@0x284e364 pss=8 padding=0 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o -45) 94273609 (70.2%) r@0x284e370 pss=44 padding=4 num_aliases=1 - source_path=base/page_allocator.cc object_path=base/base/page_allocator.o - flags={} name=Name -46) 94273641 (70.2%) r@0x284e398 pss=32 padding=0 num_aliases=1 - source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o - flags={} name=chrome::mojom::FilePatcher::Name_ -47) 94949681 (70.7%) r@0x28f3450 pss=676040 padding=675992 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={anon} name=kAnimationFrameTimeHistogramClassPath -48) 94949685 (70.7%) r@0x28f3480 pss=4 padding=0 num_aliases=1 - source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o - flags={anon} name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list - full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list -49) 98235781 (73.2%) r@0x28f3484 pss=3286096 padding=0 num_aliases=1 - source_path= object_path= - flags={} name=** .rodata (unattributed) -50) 98235797 (73.2%) t@0x28d900 pss=16 padding=0 num_aliases=1 +0) 16 (0.0%) t@0x28d900 pss=16 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_page_allocator.cc -51) 98235853 (73.2%) t@0x28d910 pss=56 padding=0 num_aliases=1 +1) 72 (0.0%) t@0x28d910 pss=56 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_bbr_sender.cc -52) 98235881 (73.2%) t@0x28d948 pss=28 padding=0 num_aliases=1 +2) 100 (0.0%) t@0x28d948 pss=28 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={startup} name=_GLOBAL__sub_I_pacing_sender.cc -53) 98235919 (73.2%) t@0x28d964 pss=38 padding=0 num_aliases=1 +3) 138 (0.0%) t@0x28d964 pss=38 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={} name=extFromUUseMapping full_name=extFromUUseMapping(signed char, unsigned int, int) -54) 98235951 (73.2%) t@0x28d98a pss=32 padding=0 num_aliases=1 +4) 170 (0.0%) t@0x28d98a pss=32 padding=0 num_aliases=1 source_path=base/page_allocator.cc object_path=base/base/page_allocator.o flags={} name=extFromUUseMapping full_name=extFromUUseMapping(aj, int) -55) 98245709 (73.2%) t@Group pss=9758 padding=9758 count=2 +5) 9928 (0.0%) t@Group pss=9758 padding=9758 count=2 source_path= object_path= flags={} name=** symbol gaps > 0) 5718 (58.6%) t@0x28f000 pss=5718 padding=5718 num_aliases=1 @@ -560,77 +410,227 @@ > 1) 9758 (100.0%) t@0x2a1000 pss=4040 padding=4040 num_aliases=1 source_path= object_path= flags={} name=** symbol gap 1 -56) 98246157 (73.2%) t@0x28f000 pss=448 padding=0 num_aliases=1 +6) 10376 (0.0%) t@0x28f000 pss=448 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=ucnv_extMatchFromU full_name=ucnv_extMatchFromU(int const*, int, unsigned short const*, int, unsigned short const*, int, unsigned int*, signed char, signed char) -57) 98246185 (73.2%) t@0x28f1c8 pss=28 padding=8 num_aliases=1 +7) 10404 (0.0%) t@0x28f1c8 pss=28 padding=8 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={startup,gen} name=_GLOBAL__sub_I_SkDeviceProfile.cpp -58) 98315309 (73.3%) t@0x28f1e0 pss=69124 padding=4 num_aliases=1 +8) 79528 (0.1%) t@0x28f1e0 pss=69124 padding=4 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={unlikely,gen} name=foo_bar -59) 98315333 (73.3%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 +9) 79552 (0.1%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=BazAlias full_name=BazAlias(bool) -60) 98315357 (73.3%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 +10) 79576 (0.1%) t@0x2a0000 pss=24 (size=48) padding=32 num_aliases=2 source_path= object_path= flags={} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -61) 98315360 (73.3%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +11) 79579 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=BarAlias full_name=BarAlias() -62) 98315363 (73.3%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +12) 79582 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=FooAlias full_name=FooAlias() -63) 98315366 (73.3%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +13) 79585 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen,clone} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -64) 98315369 (73.3%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 +14) 79588 (0.1%) t@0x2a0010 pss=3 (size=12) padding=0 num_aliases=4 source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o flags={clone} name=blink::ContiguousContainerBase::shrinkToFit full_name=blink::ContiguousContainerBase::shrinkToFit() -65) 98315397 (73.3%) t@0x2a0020 pss=28 padding=4 num_aliases=1 +15) 79616 (0.1%) t@0x2a0020 pss=28 padding=4 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=blink::ContiguousContainerBase::ContiguousContainerBase full_name=blink::ContiguousContainerBase::ContiguousContainerBase(blink::ContiguousContainerBase&&) -66) 98315491 (73.3%) t@0x2a1000 pss=94 padding=0 num_aliases=1 +16) 79710 (0.1%) t@0x2a1000 pss=94 padding=0 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={anon,clone} name=blink::PaintChunker::releasePaintChunks full_name=blink::PaintChunker::releasePaintChunks() -67) 98319525 (73.3%) t@0x2a2000 pss=4034 padding=4002 num_aliases=1 +17) 83744 (0.1%) t@0x2a2000 pss=4034 padding=4002 num_aliases=1 source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o flags={} name=** outlined function -68) 98319549 (73.3%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 - source_path= object_path= - flags={} name=** outlined function * 2 -69) 98319573 (73.3%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 +18) 83768 (0.1%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 source_path= object_path= flags={} name=aliasedWithOutlinedFunction full_name=aliasedWithOutlinedFunction() -70) 134218029 (100.0%) t@0x2a2050 pss=35898456 padding=0 num_aliases=1 +19) 83792 (0.1%) t@0x2a2020 pss=24 (size=48) padding=0 num_aliases=2 + source_path= object_path= + flags={} name=** outlined function * 2 +20) 35982248 (26.8%) t@0x2a2050 pss=35898456 padding=0 num_aliases=1 source_path= object_path= flags={} name=** .text (unattributed) -71) 134218029 (100.0%) b@0x0 pss=262144 padding=0 num_aliases=1 +21) 35982250 (26.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name="Str1" +22) 35982253 (26.8%) r@0x266e600 pss=2.5 (size=5) padding=0 num_aliases=2 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name="Str1" +23) 35982269 (26.8%) r@0x266e605 pss=16 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name="String literal2" +24) 35982312 (26.8%) r@0x266e630 pss=43 padding=27 num_aliases=1 + source_path= object_path= + flags={} name=** merge strings +25) 37947657 (28.3%) r@0x284d600 pss=1965345 padding=1961920 num_aliases=1 + source_path= object_path= + flags={} name=** merge constants +26) 37947660 (28.3%) r@0x284e364 pss=3 padding=3 num_aliases=1 + source_path= object_path= + flags={} name=** symbol gap 0 +27) 37947668 (28.3%) r@0x284e364 pss=8 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o +28) 37947712 (28.3%) r@0x284e370 pss=44 padding=4 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=Name +29) 37947744 (28.3%) r@0x284e398 pss=32 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=chrome::mojom::FilePatcher::Name_ +30) 38623784 (28.8%) r@0x28f3450 pss=676040 padding=675992 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={anon} name=kAnimationFrameTimeHistogramClassPath +31) 38623788 (28.8%) r@0x28f3480 pss=4 padding=0 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={anon} name=blink::CSSValueKeywordsHash::findValueImpl::value_word_list + full_name=blink::CSSValueKeywordsHash::findValueImpl(char const*, unsigned int)::value_word_list +32) 41909884 (31.2%) r@0x28f3484 pss=3286096 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .rodata (unattributed) +33) 41909940 (31.2%) R@0x2c176f0 pss=56 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name=ChromeMainDelegate [vtable] +34) 41909964 (31.2%) R@0x2c17728 pss=24 padding=0 num_aliases=1 + source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o + flags={gen} name=chrome::mojom::FieldTrialRecorder [vtable] +35) 42699868 (31.8%) R@0x2c17740 pss=789904 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=chrome::mojom::FieldTrialRecorderProxy [vtable] +36) 42699900 (31.8%) R@0x2cd84e0 pss=32 padding=16 num_aliases=1 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + flags={} name=.Lswitch.table.45 +37) 42699908 (31.8%) R@0x2cd84f0 pss=8 padding=0 num_aliases=1 + source_path= object_path=third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + flags={anon} name=kSystemClassPrefixes +38) 42699964 (31.8%) R@0x2cd8500 pss=56 padding=0 num_aliases=1 + source_path=third_party/paint.cc object_path=third_party/sub/PaintChunker.o + flags={} name=ChromeMainDelegateAndroid [vtable] +39) 42699988 (31.8%) R@0x2cd8538 pss=24 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=mojo::MessageReceiver [vtable] +40) 42700000 (31.8%) R@0x2cd8550 pss=12 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=kMethodsAnimationFrameTimeHistogram +41) 43765132 (32.6%) R@0x2cd855c pss=1065132 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .data.rel.ro (unattributed) +42) 43765136 (32.6%) d@0x2de7000 pss=4 padding=0 num_aliases=1 + source_path=base/page_allocator.cc object_path=base/base/page_allocator.o + flags={} name=google::protobuf::internal::pLinuxKernelCmpxchg +43) 43765140 (32.6%) d@0x2de7004 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={} name=google::protobuf::internal::pLinuxKernelMemoryBarrier +44) 43765292 (32.6%) d@0x2de7008 pss=152 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={rel} name=base::android::kBaseRegisteredMethods +45) 43765296 (32.6%) d@0x2de70a0 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={anon} name=base::android::g_renderer_histogram_code +46) 43765300 (32.6%) d@0x2de70a4 pss=4 padding=0 num_aliases=1 + source_path=third_party/container/container.c object_path=third_party/sub/ContiguousContainer.o + flags={anon,rel.loc} name=base::android::g_library_version_number +47) 43866900 (32.7%) d@0x2de70a8 pss=101600 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** .data (unattributed) +48) 43866900 (32.7%) b@0x0 pss=262144 padding=0 num_aliases=1 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=ff_cos_131072 -72) 134218029 (100.0%) b@0x0 pss=131072 padding=0 num_aliases=1 +49) 43866900 (32.7%) b@0x0 pss=131072 padding=0 num_aliases=1 source_path=third_party/fft_fixed.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_fixed.o flags={} name=ff_cos_131072_fixed -73) 134218029 (100.0%) b@0x0 pss=131072 padding=0 num_aliases=1 +50) 43866900 (32.7%) b@0x0 pss=131072 padding=0 num_aliases=1 source_path=third_party/fft_float.cc object_path=third_party/ffmpeg/libffmpeg_internal.a/fft_float.o flags={} name=ff_cos_65536 -74) 134218029 (100.0%) b@0x2dffda0 pss=28 padding=0 num_aliases=1 +51) 43866900 (32.7%) b@0x2dffda0 pss=28 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=g_chrome_content_browser_client -75) 134218029 (100.0%) b@0x2dffe80 pss=200 padding=196 num_aliases=1 +52) 43866900 (32.7%) b@0x2dffe80 pss=200 padding=196 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={gen} name=SaveHistogram::atomic_histogram_pointer full_name=SaveHistogram(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, base::android::JavaParamRef<_jstring*> const&, base::android::JavaParamRef<_jlongArray*> const&, int)::atomic_histogram_pointer -76) 134218029 (100.0%) b@0x2dffe84 pss=4 padding=0 num_aliases=1 +53) 43866900 (32.7%) b@0x2dffe84 pss=4 padding=0 num_aliases=1 source_path=third_party/icu/ucnv_ext.c object_path=third_party/icu/icuuc/ucnv_ext.o flags={anon,gen} name=g_AnimationFrameTimeHistogram_clazz +54) 43866960 (32.7%) o@0x0 pss=60 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.attributes +55) 45403416 (33.8%) o@0x0 pss=1536456 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.exidx +56) 45587048 (34.0%) o@0x0 pss=183632 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .ARM.extab +57) 45587352 (34.0%) o@0x0 pss=304 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynamic +58) 45591377 (34.0%) o@0x0 pss=4025 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynstr +59) 45597873 (34.0%) o@0x0 pss=6496 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .dynsym +60) 45597881 (34.0%) o@0x0 pss=8 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .fini_array +61) 45598693 (34.0%) o@0x0 pss=812 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version +62) 45598721 (34.0%) o@0x0 pss=28 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version_d +63) 45598817 (34.0%) o@0x0 pss=96 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .gnu.version_r +64) 45641773 (34.0%) o@0x0 pss=42956 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .got +65) 45644457 (34.0%) o@0x0 pss=2684 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .hash +66) 45644465 (34.0%) o@0x0 pss=8 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .init_array +67) 45644484 (34.0%) o@0x0 pss=19 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .interp +68) 45644520 (34.0%) o@0x0 pss=36 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .note.gnu.build-id +69) 45644548 (34.0%) o@0x0 pss=28 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .note.gnu.gold-version +70) 45648792 (34.0%) o@0x0 pss=4244 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .plt +71) 48304176 (36.0%) o@0x0 pss=2655384 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .rel.dyn +72) 48306992 (36.0%) o@0x0 pss=2816 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .rel.plt +73) 48307428 (36.0%) o@0x0 pss=436 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .shstrtab +74) 83149282 (62.0%) o@0x0 pss=34841854 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .strtab +75) 100315394 (74.7%) o@0x0 pss=17166112 padding=0 num_aliases=1 + source_path= object_path= + flags={} name=** ELF Section: .symtab +76) 134218029 (100.0%) o@0x0 pss=33902635 padding=33902635 num_aliases=1 + source_path= object_path= + flags={} name=Overhead: ELF file
diff --git a/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden b/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden index 5881dd1f..5a00304 100644 --- a/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden +++ b/tools/binary_size/libsupersize/testdata/SymbolGroupMethods.golden
@@ -12,79 +12,79 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | PSS | Path ------------------------------------------------------------ -0) 4 (0.0%) *@Group 4 google::protobuf::internal::pLinuxKernelCmpxchg (count=1) -1) 8 (0.0%) *@Group 4 google::protobuf::internal::pLinuxKernelMemoryBarrier (count=1) -2) 160 (0.0%) *@Group 152 base::android::kBaseRegisteredMethods (count=1) -3) 164 (0.0%) *@Group 4 base::android::g_renderer_histogram_code (count=1) -4) 168 (0.0%) *@Group 4 base::android::g_library_version_number (count=1) -5) 101768 (0.1%) *@Group 101600 ** .data (unattributed) (count=1) -6) 101824 (0.1%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) -7) 101848 (0.1%) *@Group 24 mojo::MessageReceiver [vtable] (count=1) -8) 101860 (0.1%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) -9) 1166992 (0.9%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) -10) 1167048 (0.9%) *@Group 56 ChromeMainDelegate [vtable] (count=1) -11) 1167072 (0.9%) *@Group 24 chrome::mojom::FieldTrialRecorder [vtable] (count=1) -12) 1956976 (1.5%) *@Group 789904 chrome::mojom::FieldTrialRecorderProxy [vtable] (count=1) -13) 1957008 (1.5%) *@Group 32 .Lswitch.table.45 (count=1) -14) 1957016 (1.5%) *@Group 8 kSystemClassPrefixes (count=1) -15) 1957076 (1.5%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) -16) 1957104 (1.5%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) -17) 1957540 (1.5%) *@Group 436 ** ELF Section: .shstrtab (count=1) -18) 36799394 (27.4%) *@Group 34841854 ** ELF Section: .strtab (count=1) -19) 53965506 (40.2%) *@Group 17166112 ** ELF Section: .symtab (count=1) -20) 87868141 (65.5%) *@Group 33902635 Overhead: ELF file (count=1) -21) 87868160 (65.5%) *@Group 19 ** ELF Section: .interp (count=1) -22) 87868196 (65.5%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) -23) 87874692 (65.5%) *@Group 6496 ** ELF Section: .dynsym (count=1) -24) 87878717 (65.5%) *@Group 4025 ** ELF Section: .dynstr (count=1) -25) 87881401 (65.5%) *@Group 2684 ** ELF Section: .hash (count=1) -26) 87882213 (65.5%) *@Group 812 ** ELF Section: .gnu.version (count=1) -27) 87882241 (65.5%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) -28) 87882337 (65.5%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) -29) 90537721 (67.5%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) -30) 90540537 (67.5%) *@Group 2816 ** ELF Section: .rel.plt (count=1) -31) 90544781 (67.5%) *@Group 4244 ** ELF Section: .plt (count=1) -32) 92081237 (68.6%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) -33) 92264869 (68.7%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) -34) 92264877 (68.7%) *@Group 8 ** ELF Section: .init_array (count=1) -35) 92264885 (68.7%) *@Group 8 ** ELF Section: .fini_array (count=1) -36) 92265189 (68.7%) *@Group 304 ** ELF Section: .dynamic (count=1) -37) 92308145 (68.8%) *@Group 42956 ** ELF Section: .got (count=1) -38) 92308150 (68.8%) *@Group 5 "Str1" (count=2) -39) 92308166 (68.8%) *@Group 16 "String literal2" (count=1) -40) 92308209 (68.8%) *@Group 43 ** merge strings (count=1) -41) 94273554 (70.2%) *@Group 1965345 ** merge constants (count=1) -42) 94273557 (70.2%) *@Group 3 ** symbol gap 0 (count=1) -43) 94273565 (70.2%) *@Group 8 (count=1) -44) 94273609 (70.2%) *@Group 44 Name (count=1) -45) 94273641 (70.2%) *@Group 32 chrome::mojom::FilePatcher::Name_ (count=1) -46) 94949681 (70.7%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) -47) 94949685 (70.7%) *@Group 4 blink::CSSValueKeywordsHash::findValueImpl::value_word_list (count=1) -48) 98235781 (73.2%) *@Group 3286096 ** .rodata (unattributed) (count=1) -49) 98235797 (73.2%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) -50) 98235853 (73.2%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) -51) 98235881 (73.2%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) -52) 98235951 (73.2%) *@Group 70 extFromUUseMapping (count=2) -53) 98245709 (73.2%) *@Group 9758 ** symbol gaps (count=1) -54) 98246157 (73.2%) *@Group 448 ucnv_extMatchFromU (count=1) -55) 98246185 (73.2%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) -56) 98315309 (73.3%) *@Group 69124 foo_bar (count=1) -57) 98315333 (73.3%) *@Group 24 BazAlias (count=1) -58) 98315363 (73.3%) *@Group 30 blink::ContiguousContainerBase::shrinkToFit (count=3) -59) 98315366 (73.3%) *@Group 3 BarAlias (count=1) -60) 98315369 (73.3%) *@Group 3 FooAlias (count=1) -61) 98315397 (73.3%) *@Group 28 blink::ContiguousContainerBase::ContiguousContainerBase (count=1) -62) 98315491 (73.3%) *@Group 94 blink::PaintChunker::releasePaintChunks (count=1) -63) 98319525 (73.3%) *@Group 4034 ** outlined function (count=1) -64) 98319549 (73.3%) *@Group 24 ** outlined function * 2 (count=1) -65) 98319573 (73.3%) *@Group 24 aliasedWithOutlinedFunction (count=1) -66) 134218029 (100.0%) *@Group 35898456 ** .text (unattributed) (count=1) -67) 134218029 (100.0%) *@Group 0 ff_cos_131072 (count=1) -68) 134218029 (100.0%) *@Group 0 ff_cos_131072_fixed (count=1) -69) 134218029 (100.0%) *@Group 0 ff_cos_65536 (count=1) -70) 134218029 (100.0%) *@Group 0 g_chrome_content_browser_client (count=1) -71) 134218029 (100.0%) *@Group 0 SaveHistogram::atomic_histogram_pointer (count=1) -72) 134218029 (100.0%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +0) 16 (0.0%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) +1) 72 (0.0%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) +2) 100 (0.0%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) +3) 170 (0.0%) *@Group 70 extFromUUseMapping (count=2) +4) 9928 (0.0%) *@Group 9758 ** symbol gaps (count=1) +5) 10376 (0.0%) *@Group 448 ucnv_extMatchFromU (count=1) +6) 10404 (0.0%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) +7) 79528 (0.1%) *@Group 69124 foo_bar (count=1) +8) 79552 (0.1%) *@Group 24 BazAlias (count=1) +9) 79582 (0.1%) *@Group 30 blink::ContiguousContainerBase::shrinkToFit (count=3) +10) 79585 (0.1%) *@Group 3 BarAlias (count=1) +11) 79588 (0.1%) *@Group 3 FooAlias (count=1) +12) 79616 (0.1%) *@Group 28 blink::ContiguousContainerBase::ContiguousContainerBase (count=1) +13) 79710 (0.1%) *@Group 94 blink::PaintChunker::releasePaintChunks (count=1) +14) 83744 (0.1%) *@Group 4034 ** outlined function (count=1) +15) 83768 (0.1%) *@Group 24 aliasedWithOutlinedFunction (count=1) +16) 83792 (0.1%) *@Group 24 ** outlined function * 2 (count=1) +17) 35982248 (26.8%) *@Group 35898456 ** .text (unattributed) (count=1) +18) 35982253 (26.8%) *@Group 5 "Str1" (count=2) +19) 35982269 (26.8%) *@Group 16 "String literal2" (count=1) +20) 35982312 (26.8%) *@Group 43 ** merge strings (count=1) +21) 37947657 (28.3%) *@Group 1965345 ** merge constants (count=1) +22) 37947660 (28.3%) *@Group 3 ** symbol gap 0 (count=1) +23) 37947668 (28.3%) *@Group 8 (count=1) +24) 37947712 (28.3%) *@Group 44 Name (count=1) +25) 37947744 (28.3%) *@Group 32 chrome::mojom::FilePatcher::Name_ (count=1) +26) 38623784 (28.8%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) +27) 38623788 (28.8%) *@Group 4 blink::CSSValueKeywordsHash::findValueImpl::value_word_list (count=1) +28) 41909884 (31.2%) *@Group 3286096 ** .rodata (unattributed) (count=1) +29) 41909940 (31.2%) *@Group 56 ChromeMainDelegate [vtable] (count=1) +30) 41909964 (31.2%) *@Group 24 chrome::mojom::FieldTrialRecorder [vtable] (count=1) +31) 42699868 (31.8%) *@Group 789904 chrome::mojom::FieldTrialRecorderProxy [vtable] (count=1) +32) 42699900 (31.8%) *@Group 32 .Lswitch.table.45 (count=1) +33) 42699908 (31.8%) *@Group 8 kSystemClassPrefixes (count=1) +34) 42699964 (31.8%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) +35) 42699988 (31.8%) *@Group 24 mojo::MessageReceiver [vtable] (count=1) +36) 42700000 (31.8%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) +37) 43765132 (32.6%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) +38) 43765136 (32.6%) *@Group 4 google::protobuf::internal::pLinuxKernelCmpxchg (count=1) +39) 43765140 (32.6%) *@Group 4 google::protobuf::internal::pLinuxKernelMemoryBarrier (count=1) +40) 43765292 (32.6%) *@Group 152 base::android::kBaseRegisteredMethods (count=1) +41) 43765296 (32.6%) *@Group 4 base::android::g_renderer_histogram_code (count=1) +42) 43765300 (32.6%) *@Group 4 base::android::g_library_version_number (count=1) +43) 43866900 (32.7%) *@Group 101600 ** .data (unattributed) (count=1) +44) 43866900 (32.7%) *@Group 0 ff_cos_131072 (count=1) +45) 43866900 (32.7%) *@Group 0 ff_cos_131072_fixed (count=1) +46) 43866900 (32.7%) *@Group 0 ff_cos_65536 (count=1) +47) 43866900 (32.7%) *@Group 0 g_chrome_content_browser_client (count=1) +48) 43866900 (32.7%) *@Group 0 SaveHistogram::atomic_histogram_pointer (count=1) +49) 43866900 (32.7%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +50) 43866960 (32.7%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) +51) 45403416 (33.8%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) +52) 45587048 (34.0%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) +53) 45587352 (34.0%) *@Group 304 ** ELF Section: .dynamic (count=1) +54) 45591377 (34.0%) *@Group 4025 ** ELF Section: .dynstr (count=1) +55) 45597873 (34.0%) *@Group 6496 ** ELF Section: .dynsym (count=1) +56) 45597881 (34.0%) *@Group 8 ** ELF Section: .fini_array (count=1) +57) 45598693 (34.0%) *@Group 812 ** ELF Section: .gnu.version (count=1) +58) 45598721 (34.0%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) +59) 45598817 (34.0%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) +60) 45641773 (34.0%) *@Group 42956 ** ELF Section: .got (count=1) +61) 45644457 (34.0%) *@Group 2684 ** ELF Section: .hash (count=1) +62) 45644465 (34.0%) *@Group 8 ** ELF Section: .init_array (count=1) +63) 45644484 (34.0%) *@Group 19 ** ELF Section: .interp (count=1) +64) 45644520 (34.0%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) +65) 45644548 (34.0%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) +66) 45648792 (34.0%) *@Group 4244 ** ELF Section: .plt (count=1) +67) 48304176 (36.0%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) +68) 48306992 (36.0%) *@Group 2816 ** ELF Section: .rel.plt (count=1) +69) 48307428 (36.0%) *@Group 436 ** ELF Section: .shstrtab (count=1) +70) 83149282 (62.0%) *@Group 34841854 ** ELF Section: .strtab (count=1) +71) 100315394 (74.7%) *@Group 17166112 ** ELF Section: .symtab (count=1) +72) 134218029 (100.0%) *@Group 33902635 Overhead: ELF file (count=1) GroupedByName(depth=1) Showing 65 symbols (65 unique) with total pss: 134218029 bytes Histogram of symbols based on PSS: @@ -99,71 +99,71 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | PSS | Path ------------------------------------------------------------ -0) 8 (0.0%) *@Group 8 google (count=2) -1) 168 (0.0%) *@Group 160 base (count=3) -2) 101768 (0.1%) *@Group 101600 ** .data (unattributed) (count=1) -3) 101824 (0.1%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) -4) 101848 (0.1%) *@Group 24 mojo (count=1) -5) 101860 (0.1%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) -6) 1166992 (0.9%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) -7) 1167048 (0.9%) *@Group 56 ChromeMainDelegate [vtable] (count=1) -8) 1957008 (1.5%) *@Group 789960 chrome (count=3) -9) 1957040 (1.5%) *@Group 32 .Lswitch.table.45 (count=1) -10) 1957048 (1.5%) *@Group 8 kSystemClassPrefixes (count=1) -11) 1957108 (1.5%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) -12) 1957136 (1.5%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) -13) 1957572 (1.5%) *@Group 436 ** ELF Section: .shstrtab (count=1) -14) 36799426 (27.4%) *@Group 34841854 ** ELF Section: .strtab (count=1) -15) 53965538 (40.2%) *@Group 17166112 ** ELF Section: .symtab (count=1) -16) 87868173 (65.5%) *@Group 33902635 Overhead: ELF file (count=1) -17) 87868192 (65.5%) *@Group 19 ** ELF Section: .interp (count=1) -18) 87868228 (65.5%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) -19) 87874724 (65.5%) *@Group 6496 ** ELF Section: .dynsym (count=1) -20) 87878749 (65.5%) *@Group 4025 ** ELF Section: .dynstr (count=1) -21) 87881433 (65.5%) *@Group 2684 ** ELF Section: .hash (count=1) -22) 87882245 (65.5%) *@Group 812 ** ELF Section: .gnu.version (count=1) -23) 87882273 (65.5%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) -24) 87882369 (65.5%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) -25) 90537753 (67.5%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) -26) 90540569 (67.5%) *@Group 2816 ** ELF Section: .rel.plt (count=1) -27) 90544813 (67.5%) *@Group 4244 ** ELF Section: .plt (count=1) -28) 92081269 (68.6%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) -29) 92264901 (68.7%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) -30) 92264909 (68.7%) *@Group 8 ** ELF Section: .init_array (count=1) -31) 92264917 (68.7%) *@Group 8 ** ELF Section: .fini_array (count=1) -32) 92265221 (68.7%) *@Group 304 ** ELF Section: .dynamic (count=1) -33) 92308177 (68.8%) *@Group 42956 ** ELF Section: .got (count=1) -34) 92308182 (68.8%) *@Group 5 "Str1" (count=2) -35) 92308198 (68.8%) *@Group 16 "String literal2" (count=1) -36) 92308241 (68.8%) *@Group 43 ** merge strings (count=1) -37) 94273586 (70.2%) *@Group 1965345 ** merge constants (count=1) -38) 94273589 (70.2%) *@Group 3 ** symbol gap 0 (count=1) -39) 94273597 (70.2%) *@Group 8 (count=1) -40) 94273641 (70.2%) *@Group 44 Name (count=1) -41) 94949681 (70.7%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) -42) 94949837 (70.7%) *@Group 156 blink (count=6) -43) 98235933 (73.2%) *@Group 3286096 ** .rodata (unattributed) (count=1) -44) 98235949 (73.2%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) -45) 98236005 (73.2%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) -46) 98236033 (73.2%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) -47) 98236103 (73.2%) *@Group 70 extFromUUseMapping (count=2) -48) 98245861 (73.2%) *@Group 9758 ** symbol gaps (count=1) -49) 98246309 (73.2%) *@Group 448 ucnv_extMatchFromU (count=1) -50) 98246337 (73.2%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) -51) 98315461 (73.3%) *@Group 69124 foo_bar (count=1) -52) 98315485 (73.3%) *@Group 24 BazAlias (count=1) -53) 98315488 (73.3%) *@Group 3 BarAlias (count=1) -54) 98315491 (73.3%) *@Group 3 FooAlias (count=1) -55) 98319525 (73.3%) *@Group 4034 ** outlined function (count=1) -56) 98319549 (73.3%) *@Group 24 ** outlined function * 2 (count=1) -57) 98319573 (73.3%) *@Group 24 aliasedWithOutlinedFunction (count=1) -58) 134218029 (100.0%) *@Group 35898456 ** .text (unattributed) (count=1) -59) 134218029 (100.0%) *@Group 0 ff_cos_131072 (count=1) -60) 134218029 (100.0%) *@Group 0 ff_cos_131072_fixed (count=1) -61) 134218029 (100.0%) *@Group 0 ff_cos_65536 (count=1) -62) 134218029 (100.0%) *@Group 0 g_chrome_content_browser_client (count=1) -63) 134218029 (100.0%) *@Group 0 SaveHistogram (count=1) -64) 134218029 (100.0%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +0) 16 (0.0%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) +1) 72 (0.0%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) +2) 100 (0.0%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) +3) 170 (0.0%) *@Group 70 extFromUUseMapping (count=2) +4) 9928 (0.0%) *@Group 9758 ** symbol gaps (count=1) +5) 10376 (0.0%) *@Group 448 ucnv_extMatchFromU (count=1) +6) 10404 (0.0%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) +7) 79528 (0.1%) *@Group 69124 foo_bar (count=1) +8) 79552 (0.1%) *@Group 24 BazAlias (count=1) +9) 79708 (0.1%) *@Group 156 blink (count=6) +10) 79711 (0.1%) *@Group 3 BarAlias (count=1) +11) 79714 (0.1%) *@Group 3 FooAlias (count=1) +12) 83748 (0.1%) *@Group 4034 ** outlined function (count=1) +13) 83772 (0.1%) *@Group 24 aliasedWithOutlinedFunction (count=1) +14) 83796 (0.1%) *@Group 24 ** outlined function * 2 (count=1) +15) 35982252 (26.8%) *@Group 35898456 ** .text (unattributed) (count=1) +16) 35982257 (26.8%) *@Group 5 "Str1" (count=2) +17) 35982273 (26.8%) *@Group 16 "String literal2" (count=1) +18) 35982316 (26.8%) *@Group 43 ** merge strings (count=1) +19) 37947661 (28.3%) *@Group 1965345 ** merge constants (count=1) +20) 37947664 (28.3%) *@Group 3 ** symbol gap 0 (count=1) +21) 37947672 (28.3%) *@Group 8 (count=1) +22) 37947716 (28.3%) *@Group 44 Name (count=1) +23) 38737676 (28.9%) *@Group 789960 chrome (count=3) +24) 39413716 (29.4%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) +25) 42699812 (31.8%) *@Group 3286096 ** .rodata (unattributed) (count=1) +26) 42699868 (31.8%) *@Group 56 ChromeMainDelegate [vtable] (count=1) +27) 42699900 (31.8%) *@Group 32 .Lswitch.table.45 (count=1) +28) 42699908 (31.8%) *@Group 8 kSystemClassPrefixes (count=1) +29) 42699964 (31.8%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) +30) 42699988 (31.8%) *@Group 24 mojo (count=1) +31) 42700000 (31.8%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) +32) 43765132 (32.6%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) +33) 43765140 (32.6%) *@Group 8 google (count=2) +34) 43765300 (32.6%) *@Group 160 base (count=3) +35) 43866900 (32.7%) *@Group 101600 ** .data (unattributed) (count=1) +36) 43866900 (32.7%) *@Group 0 ff_cos_131072 (count=1) +37) 43866900 (32.7%) *@Group 0 ff_cos_131072_fixed (count=1) +38) 43866900 (32.7%) *@Group 0 ff_cos_65536 (count=1) +39) 43866900 (32.7%) *@Group 0 g_chrome_content_browser_client (count=1) +40) 43866900 (32.7%) *@Group 0 SaveHistogram (count=1) +41) 43866900 (32.7%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +42) 43866960 (32.7%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) +43) 45403416 (33.8%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) +44) 45587048 (34.0%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) +45) 45587352 (34.0%) *@Group 304 ** ELF Section: .dynamic (count=1) +46) 45591377 (34.0%) *@Group 4025 ** ELF Section: .dynstr (count=1) +47) 45597873 (34.0%) *@Group 6496 ** ELF Section: .dynsym (count=1) +48) 45597881 (34.0%) *@Group 8 ** ELF Section: .fini_array (count=1) +49) 45598693 (34.0%) *@Group 812 ** ELF Section: .gnu.version (count=1) +50) 45598721 (34.0%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) +51) 45598817 (34.0%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) +52) 45641773 (34.0%) *@Group 42956 ** ELF Section: .got (count=1) +53) 45644457 (34.0%) *@Group 2684 ** ELF Section: .hash (count=1) +54) 45644465 (34.0%) *@Group 8 ** ELF Section: .init_array (count=1) +55) 45644484 (34.0%) *@Group 19 ** ELF Section: .interp (count=1) +56) 45644520 (34.0%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) +57) 45644548 (34.0%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) +58) 45648792 (34.0%) *@Group 4244 ** ELF Section: .plt (count=1) +59) 48304176 (36.0%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) +60) 48306992 (36.0%) *@Group 2816 ** ELF Section: .rel.plt (count=1) +61) 48307428 (36.0%) *@Group 436 ** ELF Section: .shstrtab (count=1) +62) 83149282 (62.0%) *@Group 34841854 ** ELF Section: .strtab (count=1) +63) 100315394 (74.7%) *@Group 17166112 ** ELF Section: .symtab (count=1) +64) 134218029 (100.0%) *@Group 33902635 Overhead: ELF file (count=1) GroupedByName(depth=-1) Showing 68 symbols (68 unique) with total pss: 134218029 bytes Histogram of symbols based on PSS: @@ -178,74 +178,74 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | PSS | Path ------------------------------------------------------------ -0) 8 (0.0%) *@Group 8 google::protobuf::internal (count=2) -1) 168 (0.0%) *@Group 160 base::android (count=3) -2) 101768 (0.1%) *@Group 101600 ** .data (unattributed) (count=1) -3) 101824 (0.1%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) -4) 101848 (0.1%) *@Group 24 mojo (count=1) -5) 101860 (0.1%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) -6) 1166992 (0.9%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) -7) 1167048 (0.9%) *@Group 56 ChromeMainDelegate [vtable] (count=1) -8) 1956976 (1.5%) *@Group 789928 chrome::mojom (count=2) -9) 1957008 (1.5%) *@Group 32 .Lswitch.table.45 (count=1) -10) 1957016 (1.5%) *@Group 8 kSystemClassPrefixes (count=1) -11) 1957076 (1.5%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) -12) 1957104 (1.5%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) -13) 1957540 (1.5%) *@Group 436 ** ELF Section: .shstrtab (count=1) -14) 36799394 (27.4%) *@Group 34841854 ** ELF Section: .strtab (count=1) -15) 53965506 (40.2%) *@Group 17166112 ** ELF Section: .symtab (count=1) -16) 87868141 (65.5%) *@Group 33902635 Overhead: ELF file (count=1) -17) 87868160 (65.5%) *@Group 19 ** ELF Section: .interp (count=1) -18) 87868196 (65.5%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) -19) 87874692 (65.5%) *@Group 6496 ** ELF Section: .dynsym (count=1) -20) 87878717 (65.5%) *@Group 4025 ** ELF Section: .dynstr (count=1) -21) 87881401 (65.5%) *@Group 2684 ** ELF Section: .hash (count=1) -22) 87882213 (65.5%) *@Group 812 ** ELF Section: .gnu.version (count=1) -23) 87882241 (65.5%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) -24) 87882337 (65.5%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) -25) 90537721 (67.5%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) -26) 90540537 (67.5%) *@Group 2816 ** ELF Section: .rel.plt (count=1) -27) 90544781 (67.5%) *@Group 4244 ** ELF Section: .plt (count=1) -28) 92081237 (68.6%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) -29) 92264869 (68.7%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) -30) 92264877 (68.7%) *@Group 8 ** ELF Section: .init_array (count=1) -31) 92264885 (68.7%) *@Group 8 ** ELF Section: .fini_array (count=1) -32) 92265189 (68.7%) *@Group 304 ** ELF Section: .dynamic (count=1) -33) 92308145 (68.8%) *@Group 42956 ** ELF Section: .got (count=1) -34) 92308150 (68.8%) *@Group 5 "Str1" (count=2) -35) 92308166 (68.8%) *@Group 16 "String literal2" (count=1) -36) 92308209 (68.8%) *@Group 43 ** merge strings (count=1) -37) 94273554 (70.2%) *@Group 1965345 ** merge constants (count=1) -38) 94273557 (70.2%) *@Group 3 ** symbol gap 0 (count=1) -39) 94273565 (70.2%) *@Group 8 (count=1) -40) 94273609 (70.2%) *@Group 44 Name (count=1) -41) 94273641 (70.2%) *@Group 32 chrome::mojom::FilePatcher (count=1) -42) 94949681 (70.7%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) -43) 94949685 (70.7%) *@Group 4 blink::CSSValueKeywordsHash::findValueImpl (count=1) -44) 98235781 (73.2%) *@Group 3286096 ** .rodata (unattributed) (count=1) -45) 98235797 (73.2%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) -46) 98235853 (73.2%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) -47) 98235881 (73.2%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) -48) 98235951 (73.2%) *@Group 70 extFromUUseMapping (count=2) -49) 98245709 (73.2%) *@Group 9758 ** symbol gaps (count=1) -50) 98246157 (73.2%) *@Group 448 ucnv_extMatchFromU (count=1) -51) 98246185 (73.2%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) -52) 98315309 (73.3%) *@Group 69124 foo_bar (count=1) -53) 98315333 (73.3%) *@Group 24 BazAlias (count=1) -54) 98315391 (73.3%) *@Group 58 blink::ContiguousContainerBase (count=4) -55) 98315394 (73.3%) *@Group 3 BarAlias (count=1) -56) 98315397 (73.3%) *@Group 3 FooAlias (count=1) -57) 98315491 (73.3%) *@Group 94 blink::PaintChunker (count=1) -58) 98319525 (73.3%) *@Group 4034 ** outlined function (count=1) -59) 98319549 (73.3%) *@Group 24 ** outlined function * 2 (count=1) -60) 98319573 (73.3%) *@Group 24 aliasedWithOutlinedFunction (count=1) -61) 134218029 (100.0%) *@Group 35898456 ** .text (unattributed) (count=1) -62) 134218029 (100.0%) *@Group 0 ff_cos_131072 (count=1) -63) 134218029 (100.0%) *@Group 0 ff_cos_131072_fixed (count=1) -64) 134218029 (100.0%) *@Group 0 ff_cos_65536 (count=1) -65) 134218029 (100.0%) *@Group 0 g_chrome_content_browser_client (count=1) -66) 134218029 (100.0%) *@Group 0 SaveHistogram (count=1) -67) 134218029 (100.0%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +0) 16 (0.0%) *@Group 16 _GLOBAL__sub_I_page_allocator.cc (count=1) +1) 72 (0.0%) *@Group 56 _GLOBAL__sub_I_bbr_sender.cc (count=1) +2) 100 (0.0%) *@Group 28 _GLOBAL__sub_I_pacing_sender.cc (count=1) +3) 170 (0.0%) *@Group 70 extFromUUseMapping (count=2) +4) 9928 (0.0%) *@Group 9758 ** symbol gaps (count=1) +5) 10376 (0.0%) *@Group 448 ucnv_extMatchFromU (count=1) +6) 10404 (0.0%) *@Group 28 _GLOBAL__sub_I_SkDeviceProfile.cpp (count=1) +7) 79528 (0.1%) *@Group 69124 foo_bar (count=1) +8) 79552 (0.1%) *@Group 24 BazAlias (count=1) +9) 79610 (0.1%) *@Group 58 blink::ContiguousContainerBase (count=4) +10) 79613 (0.1%) *@Group 3 BarAlias (count=1) +11) 79616 (0.1%) *@Group 3 FooAlias (count=1) +12) 79710 (0.1%) *@Group 94 blink::PaintChunker (count=1) +13) 83744 (0.1%) *@Group 4034 ** outlined function (count=1) +14) 83768 (0.1%) *@Group 24 aliasedWithOutlinedFunction (count=1) +15) 83792 (0.1%) *@Group 24 ** outlined function * 2 (count=1) +16) 35982248 (26.8%) *@Group 35898456 ** .text (unattributed) (count=1) +17) 35982253 (26.8%) *@Group 5 "Str1" (count=2) +18) 35982269 (26.8%) *@Group 16 "String literal2" (count=1) +19) 35982312 (26.8%) *@Group 43 ** merge strings (count=1) +20) 37947657 (28.3%) *@Group 1965345 ** merge constants (count=1) +21) 37947660 (28.3%) *@Group 3 ** symbol gap 0 (count=1) +22) 37947668 (28.3%) *@Group 8 (count=1) +23) 37947712 (28.3%) *@Group 44 Name (count=1) +24) 37947744 (28.3%) *@Group 32 chrome::mojom::FilePatcher (count=1) +25) 38623784 (28.8%) *@Group 676040 kAnimationFrameTimeHistogramClassPath (count=1) +26) 38623788 (28.8%) *@Group 4 blink::CSSValueKeywordsHash::findValueImpl (count=1) +27) 41909884 (31.2%) *@Group 3286096 ** .rodata (unattributed) (count=1) +28) 41909940 (31.2%) *@Group 56 ChromeMainDelegate [vtable] (count=1) +29) 42699868 (31.8%) *@Group 789928 chrome::mojom (count=2) +30) 42699900 (31.8%) *@Group 32 .Lswitch.table.45 (count=1) +31) 42699908 (31.8%) *@Group 8 kSystemClassPrefixes (count=1) +32) 42699964 (31.8%) *@Group 56 ChromeMainDelegateAndroid [vtable] (count=1) +33) 42699988 (31.8%) *@Group 24 mojo (count=1) +34) 42700000 (31.8%) *@Group 12 kMethodsAnimationFrameTimeHistogram (count=1) +35) 43765132 (32.6%) *@Group 1065132 ** .data.rel.ro (unattributed) (count=1) +36) 43765140 (32.6%) *@Group 8 google::protobuf::internal (count=2) +37) 43765300 (32.6%) *@Group 160 base::android (count=3) +38) 43866900 (32.7%) *@Group 101600 ** .data (unattributed) (count=1) +39) 43866900 (32.7%) *@Group 0 ff_cos_131072 (count=1) +40) 43866900 (32.7%) *@Group 0 ff_cos_131072_fixed (count=1) +41) 43866900 (32.7%) *@Group 0 ff_cos_65536 (count=1) +42) 43866900 (32.7%) *@Group 0 g_chrome_content_browser_client (count=1) +43) 43866900 (32.7%) *@Group 0 SaveHistogram (count=1) +44) 43866900 (32.7%) *@Group 0 g_AnimationFrameTimeHistogram_clazz (count=1) +45) 43866960 (32.7%) *@Group 60 ** ELF Section: .ARM.attributes (count=1) +46) 45403416 (33.8%) *@Group 1536456 ** ELF Section: .ARM.exidx (count=1) +47) 45587048 (34.0%) *@Group 183632 ** ELF Section: .ARM.extab (count=1) +48) 45587352 (34.0%) *@Group 304 ** ELF Section: .dynamic (count=1) +49) 45591377 (34.0%) *@Group 4025 ** ELF Section: .dynstr (count=1) +50) 45597873 (34.0%) *@Group 6496 ** ELF Section: .dynsym (count=1) +51) 45597881 (34.0%) *@Group 8 ** ELF Section: .fini_array (count=1) +52) 45598693 (34.0%) *@Group 812 ** ELF Section: .gnu.version (count=1) +53) 45598721 (34.0%) *@Group 28 ** ELF Section: .gnu.version_d (count=1) +54) 45598817 (34.0%) *@Group 96 ** ELF Section: .gnu.version_r (count=1) +55) 45641773 (34.0%) *@Group 42956 ** ELF Section: .got (count=1) +56) 45644457 (34.0%) *@Group 2684 ** ELF Section: .hash (count=1) +57) 45644465 (34.0%) *@Group 8 ** ELF Section: .init_array (count=1) +58) 45644484 (34.0%) *@Group 19 ** ELF Section: .interp (count=1) +59) 45644520 (34.0%) *@Group 36 ** ELF Section: .note.gnu.build-id (count=1) +60) 45644548 (34.0%) *@Group 28 ** ELF Section: .note.gnu.gold-version (count=1) +61) 45648792 (34.0%) *@Group 4244 ** ELF Section: .plt (count=1) +62) 48304176 (36.0%) *@Group 2655384 ** ELF Section: .rel.dyn (count=1) +63) 48306992 (36.0%) *@Group 2816 ** ELF Section: .rel.plt (count=1) +64) 48307428 (36.0%) *@Group 436 ** ELF Section: .shstrtab (count=1) +65) 83149282 (62.0%) *@Group 34841854 ** ELF Section: .strtab (count=1) +66) 100315394 (74.7%) *@Group 17166112 ** ELF Section: .symtab (count=1) +67) 134218029 (100.0%) *@Group 33902635 Overhead: ELF file (count=1) GroupedByName(depth=1, min_count=2) Showing 65 symbols (63 unique) with total pss: 134218029 bytes Histogram of symbols based on PSS: @@ -260,132 +260,132 @@ Section Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, o=.other Index | Running Total | Section@Address | PSS | Path ------------------------------------------------------------ -0) 8 (0.0%) *@Group 8 {no path} - google (count=2) -1) 168 (0.0%) *@Group 160 third_party/container/container.c - base (count=3) -2) 101768 (0.1%) d@0x2de70a8 101600 {no path} - ** .data (unattributed) -3) 101824 (0.1%) R@0x2cd8500 56 third_party/paint.cc - ChromeMainDelegateAndroid [vtable] -4) 101848 (0.1%) R@0x2cd8538 24 base/page_allocator.cc - mojo::MessageReceiver [vtable] -5) 101860 (0.1%) R@0x2cd8550 12 base/page_allocator.cc - kMethodsAnimationFrameTimeHistogram -6) 1166992 (0.9%) R@0x2cd855c 1065132 {no path} - ** .data.rel.ro (unattributed) -7) 1167048 (0.9%) R@0x2c176f0 56 $root_gen_dir/third_party/icu/ucnv_ext.c - ChromeMainDelegate [vtable] -8) 1957008 (1.5%) *@Group 789960 {no path} - chrome (count=3) -9) 1957040 (1.5%) R@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o - .Lswitch.table.45 -10) 1957048 (1.5%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o - kSystemClassPrefixes -11) 1957108 (1.5%) o@0x0 60 {no path} - ** ELF Section: .ARM.attributes -12) 1957136 (1.5%) o@0x0 28 {no path} - ** ELF Section: .note.gnu.gold-version -13) 1957572 (1.5%) o@0x0 436 {no path} - ** ELF Section: .shstrtab -14) 36799426 (27.4%) o@0x0 34841854 {no path} - ** ELF Section: .strtab -15) 53965538 (40.2%) o@0x0 17166112 {no path} - ** ELF Section: .symtab -16) 87868173 (65.5%) o@0x0 33902635 {no path} - Overhead: ELF file -17) 87868192 (65.5%) o@0x154 19 {no path} - ** ELF Section: .interp -18) 87868228 (65.5%) o@0x168 36 {no path} - ** ELF Section: .note.gnu.build-id -19) 87874724 (65.5%) o@0x18c 6496 {no path} - ** ELF Section: .dynsym -20) 87878749 (65.5%) o@0x1b0c 4025 {no path} - ** ELF Section: .dynstr -21) 87881433 (65.5%) o@0x2ad4 2684 {no path} - ** ELF Section: .hash -22) 87882245 (65.5%) o@0x3558 812 {no path} - ** ELF Section: .gnu.version -23) 87882273 (65.5%) o@0x3888 28 {no path} - ** ELF Section: .gnu.version_d -24) 87882369 (65.5%) o@0x38a4 96 {no path} - ** ELF Section: .gnu.version_r -25) 90537753 (67.5%) o@0x3904 2655384 {no path} - ** ELF Section: .rel.dyn -26) 90540569 (67.5%) o@0x29fbec 2816 {no path} - ** ELF Section: .rel.plt -27) 90544813 (67.5%) o@0x2a06ec 4244 {no path} - ** ELF Section: .plt -28) 92081269 (68.6%) o@0x2bd3d10 1536456 {no path} - ** ELF Section: .ARM.exidx -29) 92264901 (68.7%) o@0x2bd5858 183632 {no path} - ** ELF Section: .ARM.extab -30) 92264909 (68.7%) o@0x2ddc608 8 {no path} - ** ELF Section: .init_array -31) 92264917 (68.7%) o@0x2ddc6f4 8 {no path} - ** ELF Section: .fini_array -32) 92265221 (68.7%) o@0x2ddc6fc 304 {no path} - ** ELF Section: .dynamic -33) 92308177 (68.8%) o@0x2ddc834 42956 {no path} - ** ELF Section: .got -34) 92308182 (68.8%) *@Group 5 {no path} - "Str1" (count=2) -35) 92308198 (68.8%) r@0x266e605 16 $root_gen_dir/third_party/icu/ucnv_ext.c - "String literal2" -36) 92308241 (68.8%) r@0x266e630 43 {no path} - ** merge strings -37) 94273586 (70.2%) r@0x284d600 1965345 {no path} - ** merge constants -38) 94273589 (70.2%) r@0x284e364 3 {no path} - ** symbol gap 0 -39) 94273597 (70.2%) r@0x284e364 8 base/page_allocator.cc -40) 94273641 (70.2%) r@0x284e370 44 base/page_allocator.cc - Name -41) 94949681 (70.7%) r@0x28f3450 676040 third_party/paint.cc - kAnimationFrameTimeHistogramClassPath -42) 94949837 (70.7%) *@Group 156 {no path} - blink (count=6) -43) 98235933 (73.2%) r@0x28f3484 3286096 {no path} - ** .rodata (unattributed) -44) 98235949 (73.2%) t@0x28d900 16 base/page_allocator.cc +0) 16 (0.0%) t@0x28d900 16 base/page_allocator.cc _GLOBAL__sub_I_page_allocator.cc -45) 98236005 (73.2%) t@0x28d910 56 base/page_allocator.cc +1) 72 (0.0%) t@0x28d910 56 base/page_allocator.cc _GLOBAL__sub_I_bbr_sender.cc -46) 98236033 (73.2%) t@0x28d948 28 base/page_allocator.cc +2) 100 (0.0%) t@0x28d948 28 base/page_allocator.cc _GLOBAL__sub_I_pacing_sender.cc -47) 98236103 (73.2%) *@Group 70 base/page_allocator.cc +3) 170 (0.0%) *@Group 70 base/page_allocator.cc extFromUUseMapping (count=2) -48) 98245861 (73.2%) t@Group 9758 {no path} +4) 9928 (0.0%) t@Group 9758 {no path} ** symbol gaps (count=2) -49) 98246309 (73.2%) t@0x28f000 448 $root_gen_dir/third_party/icu/ucnv_ext.c +5) 10376 (0.0%) t@0x28f000 448 $root_gen_dir/third_party/icu/ucnv_ext.c ucnv_extMatchFromU -50) 98246337 (73.2%) t@0x28f1c8 28 $root_gen_dir/third_party/icu/ucnv_ext.c +6) 10404 (0.0%) t@0x28f1c8 28 $root_gen_dir/third_party/icu/ucnv_ext.c _GLOBAL__sub_I_SkDeviceProfile.cpp -51) 98315461 (73.3%) t@0x28f1e0 69124 $root_gen_dir/third_party/icu/ucnv_ext.c +7) 79528 (0.1%) t@0x28f1e0 69124 $root_gen_dir/third_party/icu/ucnv_ext.c foo_bar -52) 98315485 (73.3%) t@0x2a0000 24 (size=48) $root_gen_dir/third_party/icu/ucnv_ext.c +8) 79552 (0.1%) t@0x2a0000 24 (size=48) $root_gen_dir/third_party/icu/ucnv_ext.c BazAlias (num_aliases=2) -53) 98315488 (73.3%) t@0x2a0010 3 (size=12) third_party/fft_float.cc +9) 79708 (0.1%) *@Group 156 {no path} + blink (count=6) +10) 79711 (0.1%) t@0x2a0010 3 (size=12) third_party/fft_float.cc BarAlias (num_aliases=4) -54) 98315491 (73.3%) t@0x2a0010 3 (size=12) third_party/fft_float.cc +11) 79714 (0.1%) t@0x2a0010 3 (size=12) third_party/fft_float.cc FooAlias (num_aliases=4) -55) 98319525 (73.3%) t@0x2a2000 4034 third_party/container/container.c +12) 83748 (0.1%) t@0x2a2000 4034 third_party/container/container.c ** outlined function -56) 98319549 (73.3%) t@0x2a2020 24 (size=48) {no path} - ** outlined function * 2 (num_aliases=2) -57) 98319573 (73.3%) t@0x2a2020 24 (size=48) {no path} +13) 83772 (0.1%) t@0x2a2020 24 (size=48) {no path} aliasedWithOutlinedFunction (num_aliases=2) -58) 134218029 (100.0%) t@0x2a2050 35898456 {no path} +14) 83796 (0.1%) t@0x2a2020 24 (size=48) {no path} + ** outlined function * 2 (num_aliases=2) +15) 35982252 (26.8%) t@0x2a2050 35898456 {no path} ** .text (unattributed) -59) 134218029 (100.0%) b@0x0 262144 third_party/fft_float.cc +16) 35982257 (26.8%) *@Group 5 {no path} + "Str1" (count=2) +17) 35982273 (26.8%) r@0x266e605 16 $root_gen_dir/third_party/icu/ucnv_ext.c + "String literal2" +18) 35982316 (26.8%) r@0x266e630 43 {no path} + ** merge strings +19) 37947661 (28.3%) r@0x284d600 1965345 {no path} + ** merge constants +20) 37947664 (28.3%) r@0x284e364 3 {no path} + ** symbol gap 0 +21) 37947672 (28.3%) r@0x284e364 8 base/page_allocator.cc +22) 37947716 (28.3%) r@0x284e370 44 base/page_allocator.cc + Name +23) 38737676 (28.9%) *@Group 789960 {no path} + chrome (count=3) +24) 39413716 (29.4%) r@0x28f3450 676040 third_party/paint.cc + kAnimationFrameTimeHistogramClassPath +25) 42699812 (31.8%) r@0x28f3484 3286096 {no path} + ** .rodata (unattributed) +26) 42699868 (31.8%) R@0x2c176f0 56 $root_gen_dir/third_party/icu/ucnv_ext.c + ChromeMainDelegate [vtable] +27) 42699900 (31.8%) R@0x2cd84e0 32 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libcontroller_api_impl.a_controller_api_impl.o + .Lswitch.table.45 +28) 42699908 (31.8%) R@0x2cd84f0 8 third_party/gvr-android-sdk/libgvr_shim_static_arm.a/libport_android_jni.a_jni_utils.o + kSystemClassPrefixes +29) 42699964 (31.8%) R@0x2cd8500 56 third_party/paint.cc + ChromeMainDelegateAndroid [vtable] +30) 42699988 (31.8%) R@0x2cd8538 24 base/page_allocator.cc + mojo::MessageReceiver [vtable] +31) 42700000 (31.8%) R@0x2cd8550 12 base/page_allocator.cc + kMethodsAnimationFrameTimeHistogram +32) 43765132 (32.6%) R@0x2cd855c 1065132 {no path} + ** .data.rel.ro (unattributed) +33) 43765140 (32.6%) *@Group 8 {no path} + google (count=2) +34) 43765300 (32.6%) *@Group 160 third_party/container/container.c + base (count=3) +35) 43866900 (32.7%) d@0x2de70a8 101600 {no path} + ** .data (unattributed) +36) 43866900 (32.7%) b@0x0 262144 third_party/fft_float.cc ff_cos_131072 -60) 134218029 (100.0%) b@0x0 131072 third_party/fft_fixed.cc +37) 43866900 (32.7%) b@0x0 131072 third_party/fft_fixed.cc ff_cos_131072_fixed -61) 134218029 (100.0%) b@0x0 131072 third_party/fft_float.cc +38) 43866900 (32.7%) b@0x0 131072 third_party/fft_float.cc ff_cos_65536 -62) 134218029 (100.0%) b@0x2dffda0 28 $root_gen_dir/third_party/icu/ucnv_ext.c +39) 43866900 (32.7%) b@0x2dffda0 28 $root_gen_dir/third_party/icu/ucnv_ext.c g_chrome_content_browser_client -63) 134218029 (100.0%) b@0x2dffe80 200 $root_gen_dir/third_party/icu/ucnv_ext.c +40) 43866900 (32.7%) b@0x2dffe80 200 $root_gen_dir/third_party/icu/ucnv_ext.c SaveHistogram::atomic_histogram_pointer -64) 134218029 (100.0%) b@0x2dffe84 4 $root_gen_dir/third_party/icu/ucnv_ext.c +41) 43866900 (32.7%) b@0x2dffe84 4 $root_gen_dir/third_party/icu/ucnv_ext.c g_AnimationFrameTimeHistogram_clazz +42) 43866960 (32.7%) o@0x0 60 {no path} + ** ELF Section: .ARM.attributes +43) 45403416 (33.8%) o@0x0 1536456 {no path} + ** ELF Section: .ARM.exidx +44) 45587048 (34.0%) o@0x0 183632 {no path} + ** ELF Section: .ARM.extab +45) 45587352 (34.0%) o@0x0 304 {no path} + ** ELF Section: .dynamic +46) 45591377 (34.0%) o@0x0 4025 {no path} + ** ELF Section: .dynstr +47) 45597873 (34.0%) o@0x0 6496 {no path} + ** ELF Section: .dynsym +48) 45597881 (34.0%) o@0x0 8 {no path} + ** ELF Section: .fini_array +49) 45598693 (34.0%) o@0x0 812 {no path} + ** ELF Section: .gnu.version +50) 45598721 (34.0%) o@0x0 28 {no path} + ** ELF Section: .gnu.version_d +51) 45598817 (34.0%) o@0x0 96 {no path} + ** ELF Section: .gnu.version_r +52) 45641773 (34.0%) o@0x0 42956 {no path} + ** ELF Section: .got +53) 45644457 (34.0%) o@0x0 2684 {no path} + ** ELF Section: .hash +54) 45644465 (34.0%) o@0x0 8 {no path} + ** ELF Section: .init_array +55) 45644484 (34.0%) o@0x0 19 {no path} + ** ELF Section: .interp +56) 45644520 (34.0%) o@0x0 36 {no path} + ** ELF Section: .note.gnu.build-id +57) 45644548 (34.0%) o@0x0 28 {no path} + ** ELF Section: .note.gnu.gold-version +58) 45648792 (34.0%) o@0x0 4244 {no path} + ** ELF Section: .plt +59) 48304176 (36.0%) o@0x0 2655384 {no path} + ** ELF Section: .rel.dyn +60) 48306992 (36.0%) o@0x0 2816 {no path} + ** ELF Section: .rel.plt +61) 48307428 (36.0%) o@0x0 436 {no path} + ** ELF Section: .shstrtab +62) 83149282 (62.0%) o@0x0 34841854 {no path} + ** ELF Section: .strtab +63) 100315394 (74.7%) o@0x0 17166112 {no path} + ** ELF Section: .symtab +64) 134218029 (100.0%) o@0x0 33902635 {no path} + Overhead: ELF file
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py index cfd6fbd..ea81973 100644 --- a/tools/json_schema_compiler/model.py +++ b/tools/json_schema_compiler/model.py
@@ -208,7 +208,7 @@ self.name = name # The typename "ManifestKeys" is reserved. - if name is 'ManifestKeys': + if name == 'ManifestKeys': assert parent == namespace and input_origin.from_manifest_keys, \ 'ManifestKeys type is reserved'
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 91a366d..1d63696 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -4858,8 +4858,8 @@ <int value="1649" label="ADDRESS_HOME_STREET: accepted"/> <int value="1664" label="ADDRESS_HOME_HOUSE_NUMBER: edited"/> <int value="1665" label="ADDRESS_HOME_HOUSE_NUMBER: accepted"/> - <int value="1680" label="ADDRESS_HOME_FLOOR: edited"/> - <int value="1681" label="ADDRESS_HOME_FLOOR: accepted"/> + <int value="1680" label="ADDRESS_HOME_SUBPREMISE: edited"/> + <int value="1681" label="ADDRESS_HOME_SUBPREMISE: accepted"/> <int value="1696" label="ADDRESS_HOME_OTHER_SUBUNIT: edited"/> <int value="1697" label="ADDRESS_HOME_OTHER_SUBUNIT: accepted"/> <int value="1712" label="NAME_LAST_FIRST: edited"/> @@ -4870,6 +4870,20 @@ <int value="1745" label="NAME_LAST_SECOND: accepted"/> <int value="1760" label="NAME_HONORIFIC_PREFIX: edited"/> <int value="1761" label="NAME_HONORIFIC_PREFIX: accepted"/> + <int value="1776" label="ADDRESS_HOME_PREMISE_NAME: edited"/> + <int value="1777" label="ADDRESS_HOME_PREMISE_NAME: accepted"/> + <int value="1792" label="ADDRESS_HOME_DEPENDENT_STREET_NAME: edited"/> + <int value="1793" label="ADDRESS_HOME_DEPENDENT_STREET_NAME: accepted"/> + <int value="1808" + label="ADDRESS_HOME_STREET_AND_DEPENDENT_STREET_NAME: edited"/> + <int value="1809" + label="ADDRESS_HOME_STREET_AND_DEPENDENT_STREET_NAME: accepted"/> + <int value="1824" label="ADDRESS_HOME_ADDRESS: edited"/> + <int value="1825" label="ADDRESS_HOME_ADDRESS: accepted"/> + <int value="1840" label="ADDRESS_HOME_ADDRESS_WITH_NAME: edited"/> + <int value="1841" label="ADDRESS_HOME_ADDRESS_WITH_NAME: accepted"/> + <int value="1856" label="ADDRESS_HOME_FLOOR: edited"/> + <int value="1857" label="ADDRESS_HOME_FLOOR: accepted"/> </enum> <enum name="AutofillExperimentId"> @@ -29052,7 +29066,7 @@ <int value="3213" label="OBSOLETE_LegacyLayoutByMenuList"/> <int value="3214" label="LegacyLayoutByMultiCol"/> <int value="3215" label="LegacyLayoutByPrinting"/> - <int value="3216" label="LegacyLayoutByRuby"/> + <int value="3216" label="OBSOLETE_LegacyLayoutByRuby"/> <int value="3217" label="LegacyLayoutBySVG"/> <int value="3218" label="LegacyLayoutBySlider"/> <int value="3219" label="LegacyLayoutByTable"/> @@ -29387,7 +29401,7 @@ <int value="3540" label="IdentifiabilityStudyReserved3540"/> <int value="3541" label="V8WheelEvent_DeltaMode_AttributeGetter"/> <int value="3542" label="V8Touch_Force_AttributeGetter"/> - <int value="3543" label="IdentifiabilityStudyReserved3543"/> + <int value="3543" label="WebGLRenderingContextMakeXRCompatible"/> <int value="3544" label="IdentifiabilityStudyReserved3544"/> <int value="3545" label="IdentifiabilityStudyReserved3545"/> <int value="3546" @@ -40211,6 +40225,15 @@ <int value="20" label="kOtherReason"/> </enum> +<enum name="LinkGenerationError"> + <int value="0" label="Incorrect selector"/> + <int value="1" label="No range available"/> + <int value="2" label="No context available"/> + <int value="3" label="Available context exhausted"/> + <int value="4" label="Context word limit reached"/> + <int value="5" label="Empty selection"/> +</enum> + <enum name="LinkMonitorFailureType"> <int value="0" label="Local MAC Address Not Found"/> <int value="1" label="Client Startup Failure"/> @@ -41153,6 +41176,8 @@ <int value="-1925453192" label="BlockInsecurePrivateNetworkRequests:enabled"/> <int value="-1925117279" label="disable-quic-https"/> <int value="-1925106340" label="CameraSystemWebApp:disabled"/> + <int value="-1922176861" + label="WalletRequiresFirstSyncSetupComplete:disabled"/> <int value="-1921593903" label="ImeInputLogicHmm:disabled"/> <int value="-1920912991" label="PermissionChip:disabled"/> <int value="-1919683750" label="EnableOopPrintDrivers:disabled"/> @@ -43709,6 +43734,7 @@ <int value="652561231" label="CustomContextMenu:enabled"/> <int value="653795860" label="HelpAppReleaseNotes:disabled"/> <int value="654199907" label="AllowSyncXHRInPageDismissal:disabled"/> + <int value="654879464" label="WalletRequiresFirstSyncSetupComplete:enabled"/> <int value="656864700" label="FillOnAccountSelectHttp:disabled"/> <int value="659086147" label="OverlayScrollbarFlashWhenMouseEnter:enabled"/> <int value="661020875" label="AutofillSaveCardShowNoThanks:disabled"/> @@ -70753,6 +70779,11 @@ <int value="8" label="TextRangeWithContext"/> </enum> +<enum name="TextFragmentLinkOpenSource"> + <int value="0" label="Unknown"/> + <int value="1" label="SearchEngine"/> +</enum> + <enum name="TextToSpeechEvent"> <int value="0" label="Start"/> <int value="1" label="End"/> @@ -71807,6 +71838,16 @@ <int value="2" label="unexpected other schemes"/> </enum> +<enum name="TranslateTabIntentResult"> + <int value="0" label="Feature was disabled"/> + <int value="1" label="Intent sent to the wrong component (missing token)"/> + <int value="2" label="No current tab (was null)"/> + <int value="3" label="The current tab was incognito"/> + <int value="4" label="The current URL differed from the expected URL"/> + <int value="5" label="canTranslateTab() was false"/> + <int value="6" label="Successfully handled"/> +</enum> + <enum name="TranslateTargetLanguageOrigin"> <int value="0" label="Recent target language"/> <int value="1" label="Language model"/>
diff --git a/tools/metrics/histograms/histograms_xml/blink/OWNERS b/tools/metrics/histograms/histograms_xml/blink/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/blink/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/compositing/OWNERS b/tools/metrics/histograms/histograms_xml/compositing/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/compositing/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/dom/OWNERS b/tools/metrics/histograms/histograms_xml/dom/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/dom/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/image/OWNERS b/tools/metrics/histograms/histograms_xml/image/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/image/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/others/histograms.xml b/tools/metrics/histograms/histograms_xml/others/histograms.xml index e96d50f..bd1f700 100644 --- a/tools/metrics/histograms/histograms_xml/others/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/others/histograms.xml
@@ -4764,6 +4764,9 @@ <histogram name="Favicons.LargeIconService.BlacklistedURLMismatch" units="BooleanError" expires_after="M77"> + <obsolete> + Removed in M88. + </obsolete> <owner>mastiz@chromium.org</owner> <summary> Records the number of large icons that were fetched from the local cache @@ -12661,6 +12664,96 @@ <summary>Win32 APIs that error out during setup.</summary> </histogram> +<histogram name="SharedHighlights.LinkGenerated" units="BooleanSuccess" + expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Indicates whether text fragment selector generation was successful. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.Error" + enum="LinkGenerationError" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Indicates error that caused text fragment selector generation to fail. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.Error.Iterations" + units="iterations" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Indicates number of iterations it took for the unsuccessful text fragment + selector generation run. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.Error.TimeToGenerate" + units="ms" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Time it took in millisecons for a failed text fragment selector generation + attempt. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.Iterations" units="iterations" + expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Indicates number of iterations it took to successfully generate text + fragment selector. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.ParamLength" units="characters" + expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Number of charaters in successfully generated text fragment selector. For + example, for #:=:text=sample%20text, it would be the + len("sample%20text") which is 13. Recorded only when selector + generation was successful. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.SelectionLength" + units="characters" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Number of characters in the user selected text, that text fragment selector + is generated for. Recorded regardless of generation success. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.SelectorParameters" + enum="TextFragmentAnchorParameters" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Indicates which parameters were specified in a text fragment selector. + Recorded only when selector generation was successful. + </summary> +</histogram> + +<histogram name="SharedHighlights.LinkGenerated.TimeToGenerate" units="ms" + expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + How long it took in milliseconds to successfully generate text fragment + selector. + </summary> +</histogram> + <histogram name="SharedMemory.MapBlockedForSecurity" enum="BooleanBlocked" expires_after="M85"> <owner>dcheng@chromium.org</owner> @@ -14234,6 +14327,17 @@ </summary> </histogram> +<histogram name="TextFragmentAnchor.LinkOpenSource" + enum="TextFragmentLinkOpenSource" expires_after="2021-03-07"> + <owner>gayane@chromium.org</owner> + <owner>chrome-shared-highlighting@google.com</owner> + <summary> + Recorded for every navigatin to a link with a valid text fragment selector + (e.g. #:=:text=SELECTOR). Indicates source type that navigation originated + from. + </summary> +</histogram> + <histogram name="TextFragmentAnchor.ListItemMatch" units="Boolean" expires_after="2021-03-07"> <owner>nburris@chromium.org</owner>
diff --git a/tools/metrics/histograms/histograms_xml/password/histograms.xml b/tools/metrics/histograms/histograms_xml/password/histograms.xml index 81e9b2d..caa775c 100644 --- a/tools/metrics/histograms/histograms_xml/password/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/password/histograms.xml
@@ -1933,7 +1933,7 @@ </histogram> <histogram name="PasswordManager.StoreDecryptionResult" - enum="PasswordDecryptionResult" expires_after="2020-11-01"> + enum="PasswordDecryptionResult" expires_after="2021-06-01"> <owner>cfroussios@chromium.org</owner> <owner>jdoerrie@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/histograms_xml/renderer/OWNERS b/tools/metrics/histograms/histograms_xml/renderer/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/renderer/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/renderer4/OWNERS b/tools/metrics/histograms/histograms_xml/renderer4/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/renderer4/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/metrics/histograms/histograms_xml/tab/histograms.xml b/tools/metrics/histograms/histograms_xml/tab/histograms.xml index ce11bc2..90a14534 100644 --- a/tools/metrics/histograms/histograms_xml/tab/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/tab/histograms.xml
@@ -1672,6 +1672,35 @@ </details> </histogram> +<histogram name="Tabs.TabCountPerDomainPerLoad.{TotalTabCountBucket}" + units="tabs" expires_after="2021-03-07"> + <owner>connily@chromium.org</owner> + <owner>cyan@chromium.org</owner> + <owner>chrome-desktop-ui-sea@google.com</owner> + <summary> + The number of tabs across all browsers (counting app-mode windows) with the + same host piece when a load completes. {TotalTabCountBucket} is inclusive + and describes the total number of tabs when logging. + </summary> + <token key="TotalTabCountBucket"> + <variant name="0to5" summary=""/> + <variant name="6to10" summary=""/> + <variant name="10to15" summary=""/> + <variant name="16to20" summary=""/> + <variant name="21to30" summary=""/> + <variant name="31to40" summary=""/> + <variant name="41to60" summary=""/> + <variant name="61to80" summary=""/> + <variant name="81to100" summary=""/> + <variant name="101to150" summary=""/> + <variant name="151to200" summary=""/> + <variant name="201to300" summary=""/> + <variant name="301to400" summary=""/> + <variant name="401to500" summary=""/> + <variant name="500+" summary=""/> + </token> +</histogram> + <histogram name="Tabs.TabCountPerLoad" units="tabs" expires_after="2021-07-31"> <owner>mpearson@chromium.org</owner> <owner>chrome-desktop-ui-sea@google.com</owner>
diff --git a/tools/metrics/histograms/histograms_xml/translate/histograms.xml b/tools/metrics/histograms/histograms_xml/translate/histograms.xml index 9cb0e17..178a11bb 100644 --- a/tools/metrics/histograms/histograms_xml/translate/histograms.xml +++ b/tools/metrics/histograms/histograms_xml/translate/histograms.xml
@@ -670,6 +670,16 @@ </summary> </histogram> +<histogram name="Translate.TranslateTabIntentResult" + enum="TranslateTabIntentResult" expires_after="M89"> + <owner>jds@chromium.org</owner> + <owner>chrome-language@google.com</owner> + <summary> + Android: Records the result of processing a TRANSLATE_TAB intent. See + TranslateTabIntentResult in enums.xml for possible values. + </summary> +</histogram> + <histogram name="Translate.UndisplayableLanguage" enum="LanguageCode" expires_after="M81"> <owner>kenjibaheux@google.com</owner>
diff --git a/tools/metrics/histograms/histograms_xml/web_core/OWNERS b/tools/metrics/histograms/histograms_xml/web_core/OWNERS new file mode 100644 index 0000000..fcb25654 --- /dev/null +++ b/tools/metrics/histograms/histograms_xml/web_core/OWNERS
@@ -0,0 +1 @@ +schenney@chromium.org
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 0f30ecb..67be228e 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -1,16 +1,16 @@ { "trace_processor_shell": { "win": { - "hash": "d9b5900e12f5b7913ffeb7b7c141d3be36673386", - "remote_path": "perfetto_binaries/trace_processor_shell/win/c4bfa82e48ed1d700813815e384779919dff68f7/trace_processor_shell.exe" + "hash": "c6324f5abb57373f80298484a41f0d81bc898af6", + "remote_path": "perfetto_binaries/trace_processor_shell/win/935a915963e1482109b102c82585d78c12112b31/trace_processor_shell.exe" }, "mac": { "hash": "48d4142996b03e8a2b6e6126fcc00e3abc34ddbe", "remote_path": "perfetto_binaries/trace_processor_shell/mac/6b0afc48ae3d07d8cf6598be674562f9844333ec/trace_processor_shell" }, "linux": { - "hash": "a4dde16c3a65a90950fbef9de7003dc503bfefa8", - "remote_path": "perfetto_binaries/trace_processor_shell/linux/bef393a5a340a4d6303b263cba7adee98372ab7f/trace_processor_shell" + "hash": "6ec5a86a8af22f49d98486d710eb866774290e91", + "remote_path": "perfetto_binaries/trace_processor_shell/linux/935a915963e1482109b102c82585d78c12112b31/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/tools/protoc_wrapper/protoc_wrapper.py b/tools/protoc_wrapper/protoc_wrapper.py index 94fde1e0..27fe2caed 100755 --- a/tools/protoc_wrapper/protoc_wrapper.py +++ b/tools/protoc_wrapper/protoc_wrapper.py
@@ -9,6 +9,12 @@ Features: - Inserts #include for extra header automatically. - Prevents bad proto names. +- Works around protoc's bad descriptor file generation. + Ninja expects the format: + target: deps + But protoc just outputs: + deps + This script adds the "target:" part. """ from __future__ import print_function @@ -99,6 +105,9 @@ ) parser.add_argument("--descriptor-set-out", help="Path to write a descriptor.") + parser.add_argument( + "--descriptor-set-dependency-file", + help="Path to write the dependency file for descriptor set.") parser.add_argument("protos", nargs="+", help="Input protobuf definition file(s).") @@ -155,6 +164,15 @@ if options.descriptor_set_out: protoc_cmd += ["--descriptor_set_out", options.descriptor_set_out] + protoc_cmd += ["--include_imports"] + + dependency_file_data = None + if options.descriptor_set_out and options.descriptor_set_dependency_file: + protoc_cmd += ['--dependency_out', options.descriptor_set_dependency_file] + ret = subprocess.call(protoc_cmd) + + with open(options.descriptor_set_dependency_file, 'r') as f: + dependency_file_data = f.read().decode('utf-8') ret = subprocess.call(protoc_cmd) if ret != 0: @@ -168,6 +186,11 @@ raise RuntimeError("Protoc has returned non-zero status: " "{0}".format(error_number)) + if dependency_file_data: + with open(options.descriptor_set_dependency_file, 'w') as f: + f.write(options.descriptor_set_out + ":") + f.write(dependency_file_data) + if options.include: WriteIncludes(headers, options.include)
diff --git a/ui/chromeos/devicetype_utils.cc b/ui/chromeos/devicetype_utils.cc index 6fcf37a9..d0c8da4 100644 --- a/ui/chromeos/devicetype_utils.cc +++ b/ui/chromeos/devicetype_utils.cc
@@ -37,4 +37,26 @@ return IDS_GENERIC_CHROMEOS_DEVICE_NAME; } +base::string16 GetChromeOSDeviceNameInPlural() { + return l10n_util::GetStringUTF16(GetChromeOSDeviceTypeInPluralResourceId()); +} + +int GetChromeOSDeviceTypeInPluralResourceId() { + switch (chromeos::GetDeviceType()) { + case chromeos::DeviceType::kChromebase: + return IDS_CHROMEBASE_DEVICE_NAME_IN_PLURAL; + case chromeos::DeviceType::kChromebook: + return IDS_CHROMEBOOK_DEVICE_NAME_IN_PLURAL; + case chromeos::DeviceType::kChromebox: + return IDS_CHROMEBOX_DEVICE_NAME_IN_PLURAL; + case chromeos::DeviceType::kChromebit: + return IDS_CHROMEBIT_DEVICE_NAME_IN_PLURAL; + case chromeos::DeviceType::kUnknown: + return IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL; + } + + NOTREACHED(); + return IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL; +} + } // namespace ui
diff --git a/ui/chromeos/devicetype_utils.h b/ui/chromeos/devicetype_utils.h index 68f2a0e..8390e34 100644 --- a/ui/chromeos/devicetype_utils.h +++ b/ui/chromeos/devicetype_utils.h
@@ -21,6 +21,14 @@ // Chromebox). UI_CHROMEOS_EXPORT int GetChromeOSDeviceTypeResourceId(); +// Returns the name (plural forms) of the Chrome device type (e.g. Chromebooks, +// Chromeboxes). +UI_CHROMEOS_EXPORT base::string16 GetChromeOSDeviceNameInPlural(); + +// Returns the resource ID for the current Chrome device type in plural forms +// (e.g. Chromebooks, Chromeboxes). +UI_CHROMEOS_EXPORT int GetChromeOSDeviceTypeInPluralResourceId(); + } // namespace ui #endif // UI_CHROMEOS_DEVICETYPE_UTILS_H_
diff --git a/ui/chromeos/ui_chromeos_strings.grd b/ui/chromeos/ui_chromeos_strings.grd index 666c52c..384e2ae 100644 --- a/ui/chromeos/ui_chromeos_strings.grd +++ b/ui/chromeos/ui_chromeos_strings.grd
@@ -495,6 +495,23 @@ Chrome device </message> + <!-- Generic device type names (plural forms) --> + <message name="IDS_CHROMEBASE_DEVICE_NAME_IN_PLURAL" desc="The device name (plural) for Chromebase (versus say Chromeboxes)"> + Chromebases + </message> + <message name="IDS_CHROMEBIT_DEVICE_NAME_IN_PLURAL" desc="The device name (plural) for Chromebit (versus say Chromeboxes)"> + Chromebits + </message> + <message name="IDS_CHROMEBOOK_DEVICE_NAME_IN_PLURAL" desc="The device name (plural) for Chromebook (versus say Chromeboxes)"> + Chromebooks + </message> + <message name="IDS_CHROMEBOX_DEVICE_NAME_IN_PLURAL" desc="The device name (plural) for Chromebox (versus say Chromebooks)"> + Chromeboxes + </message> + <message name="IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL" desc="The device name (plural) for generic Chrome device"> + Chrome devices + </message> + <!-- Input method strings. --> <message name="IDS_CHROMEOS_IME_INFOLIST_WINDOW_TITLE" desc="The title of the infolist window where the meanings and the usages of words are displayed."> Information
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBASE_DEVICE_NAME_IN_PLURAL.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBASE_DEVICE_NAME_IN_PLURAL.png.sha1 new file mode 100644 index 0000000..26b44db --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBASE_DEVICE_NAME_IN_PLURAL.png.sha1
@@ -0,0 +1 @@ +496b50523f5a12ee0b285bc94e679440468de151 \ No newline at end of file
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBIT_DEVICE_NAME_IN_PLURAL.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBIT_DEVICE_NAME_IN_PLURAL.png.sha1 new file mode 100644 index 0000000..de6f68d --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBIT_DEVICE_NAME_IN_PLURAL.png.sha1
@@ -0,0 +1 @@ +7fb35f15d65c7ed356b828911db9a585e365fefd \ No newline at end of file
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOOK_DEVICE_NAME_IN_PLURAL.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOOK_DEVICE_NAME_IN_PLURAL.png.sha1 new file mode 100644 index 0000000..6ced9a6 --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOOK_DEVICE_NAME_IN_PLURAL.png.sha1
@@ -0,0 +1 @@ +462caed499a6ade1f7af785e838a9ec96048c6db \ No newline at end of file
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOX_DEVICE_NAME_IN_PLURAL.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOX_DEVICE_NAME_IN_PLURAL.png.sha1 new file mode 100644 index 0000000..971d64b --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_CHROMEBOX_DEVICE_NAME_IN_PLURAL.png.sha1
@@ -0,0 +1 @@ +7b6f877e15c171b0894f6ed9eb9fb23900d1ccb9 \ No newline at end of file
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL.png.sha1 new file mode 100644 index 0000000..e7e8d5ea --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_GENERIC_CHROMEOS_DEVICE_NAME_IN_PLURAL.png.sha1
@@ -0,0 +1 @@ +dd44779a1d8150e023675353876b16bb65a06f54 \ No newline at end of file
diff --git a/weblayer/BUILD.gn b/weblayer/BUILD.gn index 370eaff..be4e02df 100644 --- a/weblayer/BUILD.gn +++ b/weblayer/BUILD.gn
@@ -28,13 +28,6 @@ import("//v8/gni/v8.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - source_set("android_descriptors") { sources = [ "browser/android_descriptors.h" ] public_deps = [ "//content/public/common:content_descriptors" ] @@ -200,12 +193,8 @@ "browser/http_auth_handler_impl.h", "browser/i18n_util.cc", "browser/i18n_util.h", - "browser/infobar_container_android.cc", - "browser/infobar_container_android.h", "browser/insecure_form_controller_client.cc", "browser/insecure_form_controller_client.h", - "browser/javascript_tab_modal_dialog_manager_delegate_android.cc", - "browser/javascript_tab_modal_dialog_manager_delegate_android.h", "browser/js_communication/web_message_host_factory_wrapper.cc", "browser/js_communication/web_message_host_factory_wrapper.h", "browser/navigation_controller_impl.cc", @@ -538,8 +527,12 @@ "browser/fullscreen_callback_proxy.h", "browser/google_accounts_callback_proxy.cc", "browser/google_accounts_callback_proxy.h", + "browser/infobar_container_android.cc", + "browser/infobar_container_android.h", "browser/infobar_service.cc", "browser/infobar_service.h", + "browser/javascript_tab_modal_dialog_manager_delegate_android.cc", + "browser/javascript_tab_modal_dialog_manager_delegate_android.h", "browser/js_communication/web_message_host_factory_proxy.cc", "browser/js_communication/web_message_host_factory_proxy.h", "browser/js_communication/web_message_reply_proxy_impl.cc",
diff --git a/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/InstrumentationActivityTestRule.java b/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/InstrumentationActivityTestRule.java index 7115d2e..c6f88e5 100644 --- a/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/InstrumentationActivityTestRule.java +++ b/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/InstrumentationActivityTestRule.java
@@ -228,9 +228,12 @@ } public boolean executeScriptAndExtractBoolean(String script) { + return executeScriptAndExtractBoolean(script, true /* useSeparateIsolate */); + } + + public boolean executeScriptAndExtractBoolean(String script, boolean useSeparateIsolate) { try { - return executeScriptSync(script, true /* useSeparateIsolate */) - .getBoolean(Tab.SCRIPT_RESULT_KEY); + return executeScriptSync(script, useSeparateIsolate).getBoolean(Tab.SCRIPT_RESULT_KEY); } catch (JSONException e) { throw new RuntimeException(e); }
diff --git a/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/TabTest.java b/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/TabTest.java index 9717e8c..cd82339 100644 --- a/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/TabTest.java +++ b/weblayer/browser/android/javatests/src/org/chromium/weblayer/test/TabTest.java
@@ -18,6 +18,7 @@ import org.junit.runner.RunWith; import org.chromium.base.test.util.CallbackHelper; +import org.chromium.content_public.browser.test.util.CriteriaHelper; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.weblayer.Browser; import org.chromium.weblayer.Tab; @@ -264,4 +265,26 @@ hidden = mActivityTestRule.executeScriptAndExtractBoolean("document.hidden;"); Assert.assertTrue(hidden); } + + @Test + @SmallTest + @MinWebLayerVersion(87) // Bug fix in 87. + // This is a regression test for https://crbug.com/1075744 . + public void testRotationDoesntChangeVisibility() throws Exception { + String url = mActivityTestRule.getTestDataURL("rotation.html"); + mActivity = mActivityTestRule.launchShellWithUrl(url); + mActivity.setRetainInstance(true); + Assert.assertNotNull(mActivity); + + // Touch to trigger fullscreen and rotation. + EventUtils.simulateTouchCenterOfView(mActivity.getWindow().getDecorView()); + + // Wait for the page to be told the orientation changed. + CriteriaHelper.pollInstrumentationThread(() -> { + return mActivityTestRule.executeScriptAndExtractBoolean("gotOrientationChange", false); + }); + + // The WebContents should not have been hidden as a result of the rotation. + Assert.assertFalse(mActivityTestRule.executeScriptAndExtractBoolean("gotHide", false)); + } }
diff --git a/weblayer/browser/content_view_render_view.cc b/weblayer/browser/content_view_render_view.cc index 1c97f433..b61a0c7b 100644 --- a/weblayer/browser/content_view_render_view.cc +++ b/weblayer/browser/content_view_render_view.cc
@@ -128,10 +128,8 @@ jint width, jint height, const JavaParamRef<jobject>& surface) { - if (current_surface_format_ != format) { - current_surface_format_ = format; - compositor_->SetSurface(surface, can_be_used_with_surface_control); - } + current_surface_format_ = format; + compositor_->SetSurface(surface, can_be_used_with_surface_control); compositor_->SetWindowBounds(gfx::Size(width, height)); }
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java b/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java index 4bdd8bac..e1b63ef 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java
@@ -72,7 +72,14 @@ private final UrlBarControllerImpl mUrlBarController; private boolean mFragmentStarted; private boolean mFragmentResumed; - private boolean mFragmentStoppedForConfigurationChange; + + // Tracks whether the fragment is in the middle of a configuration change and was attached when + // the configuration change started. This is set to true in onFragmentStop() and false when + // isViewAttachedToWindow() is true in either onViewAttachedToWindow() or onFragmentStarted(). + // It's important to only set this to false when isViewAttachedToWindow() is true, as otherwise + // the WebContents may be prematurely hidden. + private boolean mInConfigurationChangeAndWasAttached; + // Cache the value instead of querying system every time. private Boolean mPasswordEchoEnabled; private Boolean mDarkThemeEnabled; @@ -157,7 +164,7 @@ mWindowAndroid = windowAndroid; mEmbedderActivityContext = embedderAppContext; mViewController = new BrowserViewController( - windowAndroid, this, mViewControllerState, mFragmentStoppedForConfigurationChange); + windowAndroid, this, mViewControllerState, mInConfigurationChangeAndWasAttached); mLocaleReceiver = new LocaleChangedBroadcastReceiver(windowAndroid.getContext().get()); mPasswordEchoEnabled = null; } @@ -495,15 +502,17 @@ } public void onFragmentStart() { - mFragmentStoppedForConfigurationChange = false; mFragmentStarted = true; + if (mViewAttachedToWindow) { + mInConfigurationChangeAndWasAttached = false; + } BrowserImplJni.get().onFragmentStart(mNativeBrowser); updateAllTabs(); checkPreferences(); } public void onFragmentStop(boolean forConfigurationChange) { - mFragmentStoppedForConfigurationChange = forConfigurationChange; + mInConfigurationChangeAndWasAttached = forConfigurationChange; mFragmentStarted = false; updateAllTabs(); } @@ -527,8 +536,8 @@ return mFragmentResumed; } - public boolean isFragmentStoppedForConfigurationChange() { - return mFragmentStoppedForConfigurationChange; + public boolean isInConfigurationChangeAndWasAttached() { + return mInConfigurationChangeAndWasAttached; } public boolean isViewAttachedToWindow() { @@ -538,6 +547,9 @@ @Override public void onViewAttachedToWindow(View v) { mViewAttachedToWindow = true; + if (mFragmentStarted) { + mInConfigurationChangeAndWasAttached = false; + } updateAllTabsViewAttachedState(); }
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/BrowserViewController.java b/weblayer/browser/java/org/chromium/weblayer_private/BrowserViewController.java index 30475cf..0f917e5a 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/BrowserViewController.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/BrowserViewController.java
@@ -265,6 +265,10 @@ mContentView.setIsObscuredForAccessibility(isObscured); } + public View getViewForMagnifierReadback() { + return mContentViewRenderView.getViewForMagnifierReadback(); + } + @Override public void refreshPageHeight() { adjustWebContentsHeightIfNecessary();
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java b/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java index ebbe031..983632c 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/ContentViewRenderView.java
@@ -48,7 +48,8 @@ * visually seamless. */ @JNINamespace("weblayer") -public class ContentViewRenderView extends RelativeLayout { +public class ContentViewRenderView + extends RelativeLayout implements WindowAndroid.SelectionHandlesObserver { @Retention(RetentionPolicy.SOURCE) @IntDef({MODE_SURFACE_VIEW, MODE_TEXTURE_VIEW}) public @interface Mode {} @@ -92,6 +93,8 @@ private DisplayAndroid.DisplayAndroidObserver mDisplayAndroidObserver; + private boolean mSelectionHandlesActive; + // The time stamp when a configuration was detected (if any). // This is used along with a timeout to determine if a resize surface resize // is due to screen rotation. @@ -205,6 +208,7 @@ private final int mMode; private final SurfaceEventListener mListener; private final FrameLayout mParent; + private final boolean mAllowSurfaceControl; private final Runnable mEvict; private boolean mRanCallbacks; @@ -244,10 +248,11 @@ private ArrayList<Runnable> mSurfaceRedrawNeededCallbacks; public SurfaceData(@Mode int mode, FrameLayout parent, SurfaceEventListener listener, - int backgroundColor, Runnable evict) { + int backgroundColor, boolean allowSurfaceControl, Runnable evict) { mMode = mode; mListener = listener; mParent = parent; + mAllowSurfaceControl = allowSurfaceControl; mEvict = evict; if (mode == MODE_SURFACE_VIEW) { mSurfaceView = new SurfaceView(parent.getContext()); @@ -304,6 +309,10 @@ return mMode; } + public boolean getAllowSurfaceControl() { + return mAllowSurfaceControl; + } + public void addCallback(ValueCallback<Boolean> callback) { assert !mMarkedForDestroy; mModeCallbacks.add(callback); @@ -435,6 +444,10 @@ } } + public View getView() { + return mMode == MODE_SURFACE_VIEW ? mSurfaceView : mTextureView; + } + private void destroyPreviousData() { if (mPrevSurfaceDataNeedsDestroy != null) { mPrevSurfaceDataNeedsDestroy.destroy(); @@ -467,7 +480,9 @@ public void surfaceChanged(Surface surface, boolean canBeUsedWithSurfaceControl, int format, int width, int height) { if (mMarkedForDestroy) return; - mListener.surfaceChanged(surface, canBeUsedWithSurfaceControl, format, width, height); + // Selection magnifier does not work with surface control enabled. + mListener.surfaceChanged(surface, canBeUsedWithSurfaceControl && mAllowSurfaceControl, + format, width, height); mNumSurfaceViewSwapsUntilVisible = 2; } @@ -670,13 +685,17 @@ } }; mWindowAndroid.getDisplay().addObserver(mDisplayAndroidObserver); + mWindowAndroid.addSelectionHandlesObserver(this); updateBackgroundColor(); } public void requestMode(@Mode int mode, ValueCallback<Boolean> callback) { + boolean allowSurfaceControl = !mSelectionHandlesActive; assert mode == MODE_SURFACE_VIEW || mode == MODE_TEXTURE_VIEW; assert callback != null; - if (mRequested != null && mRequested.getMode() != mode) { + if (mRequested != null + && (mRequested.getMode() != mode + || mRequested.getAllowSurfaceControl() != allowSurfaceControl)) { if (mRequested != mCurrent) { mRequested.markForDestroy(false /* hasNextSurface */); mRequested.destroy(); @@ -686,8 +705,8 @@ if (mRequested == null) { SurfaceEventListenerImpl listener = new SurfaceEventListenerImpl(); - mRequested = new SurfaceData( - mode, mSurfaceParent, listener, mBackgroundColor, this::evictCachedSurface); + mRequested = new SurfaceData(mode, mSurfaceParent, listener, mBackgroundColor, + allowSurfaceControl, this::evictCachedSurface); listener.setRequestData(mRequested); } assert mRequested.getMode() == mode; @@ -703,6 +722,14 @@ updateWebContentsSize(); } + /** + * Return the view used for selection magnifier readback. + */ + public View getViewForMagnifierReadback() { + if (mCurrent == null) return null; + return mCurrent.getView(); + } + private void updateWebContentsSize() { if (mWebContents == null) return; Size size = getViewportSize(); @@ -768,6 +795,19 @@ ContentViewRenderViewJni.get().updateBackgroundColor(mNativeContentViewRenderView); } + // SelectionHandlesObserver overrides + @Override + public void onSelectionHandlesStateChanged(boolean active) { + if (mSelectionHandlesActive == active) return; + mSelectionHandlesActive = active; + if (mCurrent == null) return; + if (mCurrent.getMode() == MODE_TEXTURE_VIEW) return; + + // requestMode will take into account the updated |mSelectionHandlesActive| + // and respond appropriately, even if mode is the same. + requestMode(mCurrent.getMode(), (Boolean result) -> {}); + } + public InsetObserverView getInsetObserverView() { return mInsetObserverView; } @@ -792,6 +832,7 @@ mWindowAndroid.getDisplay().removeObserver(mDisplayAndroidObserver); mDisplayAndroidObserver = null; } + mWindowAndroid.removeSelectionHandlesObserver(this); mWindowAndroid = null; while (!mPendingRunnables.isEmpty()) {
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/FragmentWindowAndroid.java b/weblayer/browser/java/org/chromium/weblayer_private/FragmentWindowAndroid.java index 46f3fbe..39ba245c 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/FragmentWindowAndroid.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/FragmentWindowAndroid.java
@@ -10,6 +10,7 @@ import android.content.Intent; import android.content.IntentSender; import android.os.Build; +import android.view.View; import org.chromium.ui.base.ActivityKeyboardVisibilityDelegate; import org.chromium.ui.base.ImmutableWeakReference; @@ -63,6 +64,13 @@ return mModalDialogManager; } + @Override + public View getReadbackView() { + BrowserViewController viewController = getBrowser().getPossiblyNullViewController(); + if (viewController == null) return null; + return viewController.getViewForMagnifierReadback(); + } + public void setModalDialogManager(ModalDialogManager modalDialogManager) { mModalDialogManager = modalDialogManager; }
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java b/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java index 0fb7ca8d..059e153 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java
@@ -453,7 +453,7 @@ public boolean isVisible() { return mBrowser.getActiveTab() == this && ((mBrowser.isStarted() && mBrowser.isViewAttachedToWindow()) - || mBrowser.isFragmentStoppedForConfigurationChange()); + || mBrowser.isInConfigurationChangeAndWasAttached()); } private void updateWebContentsVisibility() { @@ -1102,7 +1102,12 @@ */ @Nullable private BrowserViewController getViewController() { - return (mBrowser.getActiveTab() == this) ? mBrowser.getPossiblyNullViewController() : null; + if (mBrowser.getActiveTab() != this) return null; + // During rotation it's possible for this to be called before BrowserViewController has been + // updated. Verify BrowserViewController reflects this is the active tab before returning + // it. + BrowserViewController viewController = mBrowser.getPossiblyNullViewController(); + return viewController != null && viewController.getTab() == this ? viewController : null; } @VisibleForTesting
diff --git a/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java b/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java index cf1c3320..7bd95d6 100644 --- a/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java +++ b/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java
@@ -260,6 +260,7 @@ FirebaseConfig.getFirebaseAppIdForPackage(packageInfo.packageName)); SelectionPopupController.setMustUseWebContentsContext(); + SelectionPopupController.setShouldGetReadbackViewFromWindowAndroid(); ResourceBundle.setAvailablePakLocales(new String[] {}, ProductConfig.UNCOMPRESSED_LOCALES); BundleUtils.setIsBundle(ProductConfig.IS_BUNDLE);
diff --git a/weblayer/browser/translate_compact_infobar.cc b/weblayer/browser/translate_compact_infobar.cc index 808fb81..7c7719a 100644 --- a/weblayer/browser/translate_compact_infobar.cc +++ b/weblayer/browser/translate_compact_infobar.cc
@@ -221,6 +221,13 @@ } } +void TranslateCompactInfoBar::OnTargetLanguageChanged( + const std::string& target_language_code) { + // In WebLayer, target language changes are only initiated by the UI. This + // method should always be a no-op. + DCHECK_EQ(GetDelegate()->target_language_code(), target_language_code); +} + bool TranslateCompactInfoBar::IsDeclinedByUser() { // Whether there is any affirmative action bit. return action_flags_ == FLAG_NONE;
diff --git a/weblayer/browser/translate_compact_infobar.h b/weblayer/browser/translate_compact_infobar.h index 2e85f5ba..52253bf 100644 --- a/weblayer/browser/translate_compact_infobar.h +++ b/weblayer/browser/translate_compact_infobar.h
@@ -53,6 +53,8 @@ void OnTranslateStepChanged( translate::TranslateStep step, translate::TranslateErrors::Type error_type) override; + void OnTargetLanguageChanged( + const std::string& target_language_code) override; // Returns true if the user didn't take any affirmative action. // The function will be called when the translate infobar is dismissed. // If it's true, we will record a declined event.
diff --git a/weblayer/shell/BUILD.gn b/weblayer/shell/BUILD.gn index 66984a7..b9a9ed8 100644 --- a/weblayer/shell/BUILD.gn +++ b/weblayer/shell/BUILD.gn
@@ -14,13 +14,6 @@ import("//build/config/android/config.gni") } -# This file depends on the legacy global sources assignment filter. It should -# be converted to check target platform before assigning source files to the -# sources variable. Remove this import and set_sources_assignment_filter call -# when the file has been converted. See https://crbug.com/1018739 for details. -import("//build/config/deprecated_default_sources_assignment_filter.gni") -set_sources_assignment_filter(deprecated_default_sources_assignment_filter) - static_library("weblayer_shell_lib") { testonly = true sources = [ @@ -28,11 +21,14 @@ "app/shell_main_params.h", "browser/shell.cc", "browser/shell.h", - "browser/shell_android.cc", "common/shell_switches.cc", "common/shell_switches.h", ] + if (is_android) { + sources += [ "browser/shell_android.cc" ] + } + configs += [ "//build/config:precompiled_headers",
diff --git a/weblayer/shell/android/shell_apk/src/org/chromium/weblayer/shell/WebLayerShellActivity.java b/weblayer/shell/android/shell_apk/src/org/chromium/weblayer/shell/WebLayerShellActivity.java index 6aef27d2..ec3bcecf 100644 --- a/weblayer/shell/android/shell_apk/src/org/chromium/weblayer/shell/WebLayerShellActivity.java +++ b/weblayer/shell/android/shell_apk/src/org/chromium/weblayer/shell/WebLayerShellActivity.java
@@ -656,7 +656,10 @@ // testing where a port is remapped. // Use WEB_URL first to ensure this matches urls such as 'https.' if (WEB_URL.matcher(input).matches() || input.startsWith("http://localhost:")) { - return Uri.parse(input); + // WEB_URL matches relative urls (relative meaning no scheme), but this branch is only + // interested in absolute urls. Fall through if no scheme is supplied. + Uri uri = Uri.parse(input); + if (!uri.isRelative()) return uri; } if (input.startsWith("www.") || input.indexOf(":") == -1) {
diff --git a/weblayer/test/data/rotation.html b/weblayer/test/data/rotation.html new file mode 100644 index 0000000..4dbbade6 --- /dev/null +++ b/weblayer/test/data/rotation.html
@@ -0,0 +1,29 @@ +<html> + <body style="height:5000px"> + <p>A (mostly) empty page.</p> + </body> + <script> + var gotHide = false; + var gotOrientationChange = false; + async function doRequestFullscreen() { + return document.documentElement.requestFullscreen(); + } + async function toggleFullscreen() { + if (!document.fullscreenElement) { + await doRequestFullscreen(); + await screen.orientation.lock("landscape"); + } else { + document.exitFullscreen(); + } + } + document.addEventListener("visibilitychange", function() { + if (document.visibilityState !== 'visible') { + gotHide = true; + } + }); + window.addEventListener("orientationchange", function() { + gotOrientationChange = true; + }); + document.addEventListener('touchend', function(e) { toggleFullscreen(); }, false); + </script> +</html>