diff --git a/DEPS b/DEPS index 31062ed..79a6cf74 100644 --- a/DEPS +++ b/DEPS
@@ -142,11 +142,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '9fb7fa537d938618991922bfffa627e442db67f0', + 'skia_revision': 'effee206579608fad40658e608db4aa13910f76f', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': 'b6dda94d79dd9d7e5fe7b07b3a9b2b83c655896d', + 'v8_revision': 'c382128adc7b4bb1678d6357bbbc993e62afce38', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -154,11 +154,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': '5faff91af49995bb63a5d89ff4df7b81a03c128e', + 'angle_revision': '2afc3398b3d824c1ca7d9a7066f8c10ae52f03c6', # 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': '52edb176f1bde681ec725332852801c13697d962', + 'swiftshader_revision': '142f4581ffc9a90213c2c80496de6d3436208e94', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. @@ -205,7 +205,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '15ad0b0b623e650887828a303b93b4b67eed170a', + 'catapult_revision': '2c752374f1ec682dc41e179278071bc8621bff3e', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -277,7 +277,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': '521003fd4ea812776065c8f461bcb64751494d8b', + 'dawn_revision': 'ce32a94b3711d6a94f59deb2876f5507a4b674fc', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -806,7 +806,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '57894836684798a0ff7e1962179f0ad126ea01dd', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '16584a68b378caef055f936da36d044aee87865d', 'condition': 'checkout_linux', }, @@ -900,7 +900,7 @@ }, 'src/third_party/glslang/src': - Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '4162de4bbfc58ef37600c23e4e8fcf58e604f382', + Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '974a586688c169c5724faf34ed5ed6c8e7563711', 'src/third_party/google_toolbox_for_mac/src': { 'url': Var('chromium_git') + '/external/github.com/google/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'), @@ -1191,7 +1191,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '499d07100fe9782de301798ccf0d87604428fb86', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '6ce3dc661e2c8757ae4b29633c21c2146179b7e5', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1359,7 +1359,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '6f0b34abee8dba611c253738d955c59f703c147a', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '1cf9470d92a3c797b265da9b5a74345950b8303f', + Var('webrtc_git') + '/src.git' + '@' + '14be7993c6cb04d2c26bad9762c4b09390e2aa1d', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1400,7 +1400,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@c54695bd3770872ccc97ec07d0634518a074b0c9', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@9c72a3d95c97c8047c931fe8f1b75a2d4ba99c9f', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 625a49f..c9e1a7e6 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -2008,8 +2008,7 @@ 'blink_bluetooth': ['mattreynolds+watch@chromium.org', 'ortuno+watch@chromium.org', 'odejesush+watch@chromium.org'], - 'blink_canvas': [ 'dongseong.hwang@intel.com', - 'fserb+watch@chromium.org'], + 'blink_canvas': ['fserb+watch@chromium.org'], 'blink_client_hints': ['yoavweiss@chromium.org'], 'blink_clipboard': ['dcheng@chromium.org'], 'blink_common': ['jbroman+watch@chromium.org', @@ -2084,14 +2083,12 @@ 'blink_navigator_content_utils': ['gyuyoung.kim@chromium.org'], 'blink_out_of_process_frames': ['dcheng@chromium.org', 'mlamouri+watch-blink@chromium.org'], - 'blink_paint' : ['blink-reviews-paint@chromium.org', - 'dongseong.hwang@intel.com'], + 'blink_paint' : ['blink-reviews-paint@chromium.org'], 'blink_paintworklet' : ['xidachen@chromium.org'], 'blink_permissions': ['mlamouri+watch-blink@chromium.org', 'permissions-reviews@chromium.org'], 'blink_platform': ['kinuko+watch@chromium.org'], 'blink_platform_graphics': ['blink-reviews-platform-graphics@chromium.org', - 'dongseong.hwang@intel.com', 'drott+blinkwatch@chromium.org', 'dschulze@chromium.org', 'fmalita+watch@chromium.org',
diff --git a/android_webview/docs/commandline-flags.md b/android_webview/docs/commandline-flags.md index 2bb1946..deea817b 100644 --- a/android_webview/docs/commandline-flags.md +++ b/android_webview/docs/commandline-flags.md
@@ -69,6 +69,13 @@ adb shell "cat ${FLAG_FILE}" ``` +## Verifying flags are applied + +You can confirm you've applied commandline flags correctly by dumping the full +state of the commandline flags with the [WebView Log Verbosifier +app](/android_webview/tools/webview_log_verbosifier/README.md) and starting up a +WebView app. + ## Applying Features with flags WebView supports the same `--enable-features=feature1,feature2` and
diff --git a/android_webview/tools/webview_log_verbosifier/README.md b/android_webview/tools/webview_log_verbosifier/README.md index b95d1f1e..e03d04e1 100644 --- a/android_webview/tools/webview_log_verbosifier/README.md +++ b/android_webview/tools/webview_log_verbosifier/README.md
@@ -40,3 +40,8 @@ ```shell out/Default/bin/webview_log_verbosifier_apk uninstall ``` + +## See also + +* [How to set commandline flags in + WebView](/android_webview/docs/commandline-flags.md)
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index c99ef32a..5ac749f 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -347,8 +347,8 @@ "ime/ime_switch_type.h", "ime/mode_indicator_observer.cc", "ime/mode_indicator_observer.h", - "keyboard/ash_keyboard_controller.cc", - "keyboard/ash_keyboard_controller.h", + "keyboard/keyboard_controller_impl.cc", + "keyboard/keyboard_controller_impl.h", "keyboard/keyboard_util.cc", "keyboard/keyboard_util.h", "keyboard/virtual_keyboard_container_layout_manager.cc", @@ -1638,7 +1638,7 @@ "home_screen/home_screen_controller_unittest.cc", "ime/ime_controller_unittest.cc", "keyboard/arc/arc_input_method_surface_manager_unittest.cc", - "keyboard/ash_keyboard_controller_unittest.cc", + "keyboard/keyboard_controller_impl_unittest.cc", "keyboard/virtual_keyboard_controller_unittest.cc", "keyboard/virtual_keyboard_unittest.cc", "kiosk_next/kiosk_next_home_controller_unittest.cc",
diff --git a/ash/accessibility/accessibility_controller_impl.cc b/ash/accessibility/accessibility_controller_impl.cc index a8e4ac8..bcc863ad 100644 --- a/ash/accessibility/accessibility_controller_impl.cc +++ b/ash/accessibility/accessibility_controller_impl.cc
@@ -16,7 +16,7 @@ #include "ash/events/select_to_speak_event_handler.h" #include "ash/events/switch_access_event_handler.h" #include "ash/high_contrast/high_contrast_controller.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_util.h" #include "ash/policy/policy_recommendation_restorer.h" #include "ash/public/cpp/accessibility_controller_client.h" @@ -1326,9 +1326,9 @@ void AccessibilityControllerImpl::SetVirtualKeyboardVisible(bool is_visible) { if (is_visible) - Shell::Get()->ash_keyboard_controller()->ShowKeyboard(); + Shell::Get()->keyboard_controller()->ShowKeyboard(); else - Shell::Get()->ash_keyboard_controller()->HideKeyboard(HideReason::kUser); + Shell::Get()->keyboard_controller()->HideKeyboard(HideReason::kUser); } void AccessibilityControllerImpl::NotifyAccessibilityStatusChanged() {
diff --git a/ash/app_list/app_list_controller_impl_unittest.cc b/ash/app_list/app_list_controller_impl_unittest.cc index 2d3e93eb..789d3ad4 100644 --- a/ash/app_list/app_list_controller_impl_unittest.cc +++ b/ash/app_list/app_list_controller_impl_unittest.cc
@@ -14,7 +14,7 @@ #include "ash/home_screen/home_screen_controller.h" #include "ash/ime/ime_controller.h" #include "ash/ime/test_ime_controller_client.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/public/cpp/presentation_time_recorder.h" #include "ash/shelf/shelf.h" #include "ash/shelf/shelf_widget.h" @@ -65,7 +65,7 @@ aura::Window* GetVirtualKeyboardWindow() { return Shell::Get() - ->ash_keyboard_controller() + ->keyboard_controller() ->keyboard_controller() ->GetKeyboardWindow(); } @@ -143,7 +143,7 @@ // and app list state is HALF, the rounded corners should be hidden // (https://crbug.com/942084). TEST_F(AppListControllerImplTest, HideRoundingCorners) { - Shell::Get()->ash_keyboard_controller()->SetEnableFlag( + Shell::Get()->keyboard_controller()->SetEnableFlag( keyboard::KeyboardEnableFlag::kShelfEnabled); // Show the app list view and click on the search box with mouse. So the @@ -224,7 +224,7 @@ // the AppListView is in PEEKING state and the virtual keyboard is enabled (see // https://crbug.com/944233). TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenVKeyboardEnabled) { - Shell::Get()->ash_keyboard_controller()->SetEnableFlag( + Shell::Get()->keyboard_controller()->SetEnableFlag( keyboard::KeyboardEnableFlag::kShelfEnabled); // Show the AppListView and click on the search box with mouse. So the @@ -257,7 +257,7 @@ // Verifies that in tablet mode, the AppListView has correct bounds when the // virtual keyboard is dismissed (see https://crbug.com/944133). TEST_F(AppListControllerImplTest, CheckAppListViewBoundsWhenDismissVKeyboard) { - Shell::Get()->ash_keyboard_controller()->SetEnableFlag( + Shell::Get()->keyboard_controller()->SetEnableFlag( keyboard::KeyboardEnableFlag::kShelfEnabled); // Show the AppListView and click on the search box with mouse so the @@ -273,7 +273,7 @@ EXPECT_TRUE(GetVirtualKeyboardWindow()->IsVisible()); // Close the virtual keyboard. Wait until it is hidden. - Shell::Get()->ash_keyboard_controller()->HideKeyboard(HideReason::kUser); + Shell::Get()->keyboard_controller()->HideKeyboard(HideReason::kUser); base::RunLoop().RunUntilIdle(); EXPECT_EQ(nullptr, GetVirtualKeyboardWindow());
diff --git a/ash/keyboard/ash_keyboard_controller.cc b/ash/keyboard/keyboard_controller_impl.cc similarity index 77% rename from ash/keyboard/ash_keyboard_controller.cc rename to ash/keyboard/keyboard_controller_impl.cc index b9f5e648..8d1036c 100644 --- a/ash/keyboard/ash_keyboard_controller.cc +++ b/ash/keyboard/keyboard_controller_impl.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include <utility> @@ -38,7 +38,7 @@ } // namespace -AshKeyboardController::AshKeyboardController( +KeyboardControllerImpl::KeyboardControllerImpl( SessionControllerImpl* session_controller) : session_controller_(session_controller), keyboard_controller_(std::make_unique<keyboard::KeyboardController>()) { @@ -47,13 +47,13 @@ keyboard_controller_->AddObserver(this); } -AshKeyboardController::~AshKeyboardController() { +KeyboardControllerImpl::~KeyboardControllerImpl() { keyboard_controller_->RemoveObserver(this); if (session_controller_) // May be null in tests. session_controller_->RemoveObserver(this); } -void AshKeyboardController::CreateVirtualKeyboard( +void KeyboardControllerImpl::CreateVirtualKeyboard( std::unique_ptr<keyboard::KeyboardUIFactory> keyboard_ui_factory) { DCHECK(keyboard_ui_factory); virtual_keyboard_controller_ = std::make_unique<VirtualKeyboardController>(); @@ -66,82 +66,81 @@ } } -void AshKeyboardController::DestroyVirtualKeyboard() { +void KeyboardControllerImpl::DestroyVirtualKeyboard() { virtual_keyboard_controller_.reset(); keyboard_controller_->Shutdown(); } -void AshKeyboardController::SendOnKeyboardVisibleBoundsChanged( +void KeyboardControllerImpl::SendOnKeyboardVisibleBoundsChanged( const gfx::Rect& screen_bounds) { DVLOG(1) << "OnKeyboardVisibleBoundsChanged: " << screen_bounds.ToString(); for (auto& observer : observers_) observer.OnKeyboardVisibleBoundsChanged(screen_bounds); } -void AshKeyboardController::SendOnLoadKeyboardContentsRequested() { +void KeyboardControllerImpl::SendOnLoadKeyboardContentsRequested() { for (auto& observer : observers_) observer.OnLoadKeyboardContentsRequested(); } -void AshKeyboardController::SendOnKeyboardUIDestroyed() { +void KeyboardControllerImpl::SendOnKeyboardUIDestroyed() { for (auto& observer : observers_) observer.OnKeyboardUIDestroyed(); } // ash::KeyboardController -void AshKeyboardController::KeyboardContentsLoaded( - const gfx::Size& size) { +void KeyboardControllerImpl::KeyboardContentsLoaded(const gfx::Size& size) { keyboard_controller()->KeyboardContentsLoaded(size); } -keyboard::KeyboardConfig AshKeyboardController::GetKeyboardConfig() { +keyboard::KeyboardConfig KeyboardControllerImpl::GetKeyboardConfig() { return keyboard_controller_->keyboard_config(); } -void AshKeyboardController::SetKeyboardConfig( +void KeyboardControllerImpl::SetKeyboardConfig( const KeyboardConfig& keyboard_config) { keyboard_controller_->UpdateKeyboardConfig(keyboard_config); } -bool AshKeyboardController::IsKeyboardEnabled() { +bool KeyboardControllerImpl::IsKeyboardEnabled() { return keyboard_controller_->IsEnabled(); } -void AshKeyboardController::SetEnableFlag(KeyboardEnableFlag flag) { +void KeyboardControllerImpl::SetEnableFlag(KeyboardEnableFlag flag) { keyboard_controller_->SetEnableFlag(flag); } -void AshKeyboardController::ClearEnableFlag(KeyboardEnableFlag flag) { +void KeyboardControllerImpl::ClearEnableFlag(KeyboardEnableFlag flag) { keyboard_controller_->ClearEnableFlag(flag); } const std::set<keyboard::KeyboardEnableFlag>& -AshKeyboardController::GetEnableFlags() { +KeyboardControllerImpl::GetEnableFlags() { return keyboard_controller_->keyboard_enable_flags(); } -void AshKeyboardController::ReloadKeyboardIfNeeded() { +void KeyboardControllerImpl::ReloadKeyboardIfNeeded() { keyboard_controller_->Reload(); } -void AshKeyboardController::RebuildKeyboardIfEnabled() { +void KeyboardControllerImpl::RebuildKeyboardIfEnabled() { // Test IsKeyboardEnableRequested in case of an unlikely edge case where this // is called while after the enable state changed to disabled (in which case // we do not want to override the requested state). keyboard_controller_->RebuildKeyboardIfEnabled(); } -bool AshKeyboardController::IsKeyboardVisible() { +bool KeyboardControllerImpl::IsKeyboardVisible() { return keyboard_controller_->IsKeyboardVisible(); } -void AshKeyboardController::ShowKeyboard() { +void KeyboardControllerImpl::ShowKeyboard() { if (keyboard_controller_->IsEnabled()) keyboard_controller_->ShowKeyboard(false /* lock */); } -void AshKeyboardController::HideKeyboard(HideReason reason) { +void KeyboardControllerImpl::HideKeyboard(HideReason reason) { if (!keyboard_controller_->IsEnabled()) return; switch (reason) { @@ -154,7 +153,7 @@ } } -void AshKeyboardController::SetContainerType( +void KeyboardControllerImpl::SetContainerType( keyboard::ContainerType container_type, const base::Optional<gfx::Rect>& target_bounds, SetContainerTypeCallback callback) { @@ -162,11 +161,11 @@ std::move(callback)); } -void AshKeyboardController::SetKeyboardLocked(bool locked) { +void KeyboardControllerImpl::SetKeyboardLocked(bool locked) { keyboard_controller_->set_keyboard_locked(locked); } -void AshKeyboardController::SetOccludedBounds( +void KeyboardControllerImpl::SetOccludedBounds( const std::vector<gfx::Rect>& bounds) { // TODO(https://crbug.com/826617): Support occluded bounds with multiple // rectangles. @@ -174,21 +173,21 @@ : bounds[0]); } -void AshKeyboardController::SetHitTestBounds( +void KeyboardControllerImpl::SetHitTestBounds( const std::vector<gfx::Rect>& bounds) { keyboard_controller_->SetHitTestBounds(bounds); } -void AshKeyboardController::SetDraggableArea(const gfx::Rect& bounds) { +void KeyboardControllerImpl::SetDraggableArea(const gfx::Rect& bounds) { keyboard_controller_->SetDraggableArea(bounds); } -void AshKeyboardController::AddObserver(KeyboardControllerObserver* observer) { +void KeyboardControllerImpl::AddObserver(KeyboardControllerObserver* observer) { observers_.AddObserver(observer); } // SessionObserver -void AshKeyboardController::OnSessionStateChanged( +void KeyboardControllerImpl::OnSessionStateChanged( session_manager::SessionState state) { if (!keyboard_controller_->IsEnabled()) return; @@ -208,7 +207,7 @@ } } -void AshKeyboardController::OnRootWindowClosing(aura::Window* root_window) { +void KeyboardControllerImpl::OnRootWindowClosing(aura::Window* root_window) { if (keyboard_controller_->GetRootWindow() == root_window) { aura::Window* new_parent = GetContainerForDefaultDisplay(); DCHECK_NE(root_window, new_parent); @@ -216,7 +215,7 @@ } } -aura::Window* AshKeyboardController::GetContainerForDisplay( +aura::Window* KeyboardControllerImpl::GetContainerForDisplay( const display::Display& display) { DCHECK(display.is_valid()); @@ -228,7 +227,7 @@ return container; } -aura::Window* AshKeyboardController::GetContainerForDefaultDisplay() { +aura::Window* KeyboardControllerImpl::GetContainerForDefaultDisplay() { const display::Screen* screen = display::Screen::GetScreen(); const base::Optional<display::Display> first_touch_display = GetFirstTouchDisplay(); @@ -252,36 +251,36 @@ has_touch_display ? *first_touch_display : screen->GetPrimaryDisplay()); } -void AshKeyboardController::OnKeyboardConfigChanged( +void KeyboardControllerImpl::OnKeyboardConfigChanged( const keyboard::KeyboardConfig& config) { for (auto& observer : observers_) observer.OnKeyboardConfigChanged(config); } -void AshKeyboardController::OnKeyboardVisibilityChanged(bool is_visible) { +void KeyboardControllerImpl::OnKeyboardVisibilityChanged(bool is_visible) { for (auto& observer : observers_) observer.OnKeyboardVisibilityChanged(is_visible); } -void AshKeyboardController::OnKeyboardVisibleBoundsChanged( +void KeyboardControllerImpl::OnKeyboardVisibleBoundsChanged( const gfx::Rect& screen_bounds) { SendOnKeyboardVisibleBoundsChanged(screen_bounds); } -void AshKeyboardController::OnKeyboardOccludedBoundsChanged( +void KeyboardControllerImpl::OnKeyboardOccludedBoundsChanged( const gfx::Rect& screen_bounds) { DVLOG(1) << "OnKeyboardOccludedBoundsChanged: " << screen_bounds.ToString(); for (auto& observer : observers_) observer.OnKeyboardOccludedBoundsChanged(screen_bounds); } -void AshKeyboardController::OnKeyboardEnableFlagsChanged( +void KeyboardControllerImpl::OnKeyboardEnableFlagsChanged( const std::set<keyboard::KeyboardEnableFlag>& flags) { for (auto& observer : observers_) observer.OnKeyboardEnableFlagsChanged(flags); } -void AshKeyboardController::OnKeyboardEnabledChanged(bool is_enabled) { +void KeyboardControllerImpl::OnKeyboardEnabledChanged(bool is_enabled) { for (auto& observer : observers_) observer.OnKeyboardEnabledChanged(is_enabled); }
diff --git a/ash/keyboard/ash_keyboard_controller.h b/ash/keyboard/keyboard_controller_impl.h similarity index 89% rename from ash/keyboard/ash_keyboard_controller.h rename to ash/keyboard/keyboard_controller_impl.h index 59f9b4e..cfb809d 100644 --- a/ash/keyboard/ash_keyboard_controller.h +++ b/ash/keyboard/keyboard_controller_impl.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_KEYBOARD_ASH_KEYBOARD_CONTROLLER_H_ -#define ASH_KEYBOARD_ASH_KEYBOARD_CONTROLLER_H_ +#ifndef ASH_KEYBOARD_KEYBOARD_CONTROLLER_IMPL_H_ +#define ASH_KEYBOARD_KEYBOARD_CONTROLLER_IMPL_H_ #include <memory> #include <set> @@ -25,7 +25,7 @@ namespace keyboard { class KeyboardController; class KeyboardUIFactory; -} +} // namespace keyboard namespace ash { @@ -35,17 +35,16 @@ // Contains and observes a keyboard::KeyboardController instance. Ash specific // behavior, including implementing the public interface, is implemented in this // class. TODO(shend): Consider re-factoring keyboard::KeyboardController so -// that this can inherit from that class instead. Rename this to -// KeyboardControllerImpl. -class ASH_EXPORT AshKeyboardController +// that this can inherit from that class instead. +class ASH_EXPORT KeyboardControllerImpl : public KeyboardController, public keyboard::KeyboardLayoutDelegate, public KeyboardControllerObserver, public SessionObserver { public: - // |session_controller| is expected to outlive AshKeyboardController. - explicit AshKeyboardController(SessionControllerImpl* session_controller); - ~AshKeyboardController() override; + // |session_controller| is expected to outlive KeyboardControllerImpl. + explicit KeyboardControllerImpl(SessionControllerImpl* session_controller); + ~KeyboardControllerImpl() override; // Create or destroy the virtual keyboard. Called from Shell. TODO(stevenjb): // Fix dependencies so that the virtual keyboard can be created with the @@ -118,9 +117,9 @@ std::unique_ptr<VirtualKeyboardController> virtual_keyboard_controller_; base::ObserverList<KeyboardControllerObserver>::Unchecked observers_; - DISALLOW_COPY_AND_ASSIGN(AshKeyboardController); + DISALLOW_COPY_AND_ASSIGN(KeyboardControllerImpl); }; } // namespace ash -#endif // ASH_KEYBOARD_ASH_KEYBOARD_CONTROLLER_H_ +#endif // ASH_KEYBOARD_KEYBOARD_CONTROLLER_IMPL_H_
diff --git a/ash/keyboard/ash_keyboard_controller_unittest.cc b/ash/keyboard/keyboard_controller_impl_unittest.cc similarity index 64% rename from ash/keyboard/ash_keyboard_controller_unittest.cc rename to ash/keyboard/keyboard_controller_impl_unittest.cc index 2401679..858d9847 100644 --- a/ash/keyboard/ash_keyboard_controller_unittest.cc +++ b/ash/keyboard/keyboard_controller_impl_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include <memory> #include <set> @@ -96,27 +96,25 @@ gfx::Rect draggable_area_; }; -class AshKeyboardControllerTest : public AshTestBase { +class KeyboardControllerImplTest : public AshTestBase { public: - AshKeyboardControllerTest() = default; - ~AshKeyboardControllerTest() override = default; + KeyboardControllerImplTest() = default; + ~KeyboardControllerImplTest() override = default; void SetUp() override { AshTestBase::SetUp(); // Set the initial observer config to the default config. - test_observer()->set_config(ash_keyboard_controller()->GetKeyboardConfig()); + test_observer()->set_config(keyboard_controller()->GetKeyboardConfig()); } - void TearDown() override { - AshTestBase::TearDown(); - } + void TearDown() override { AshTestBase::TearDown(); } - AshKeyboardController* ash_keyboard_controller() { - return Shell::Get()->ash_keyboard_controller(); + KeyboardControllerImpl* keyboard_controller() { + return Shell::Get()->keyboard_controller(); } - keyboard::KeyboardController* keyboard_controller() { - return ash_keyboard_controller()->keyboard_controller(); + keyboard::KeyboardController* keyboard_ui_controller() { + return keyboard_controller()->keyboard_controller(); } TestKeyboardControllerObserver* test_observer() { return ash_test_helper()->test_keyboard_controller_observer(); @@ -127,7 +125,7 @@ const base::Optional<gfx::Rect>& target_bounds) { bool result = false; base::RunLoop run_loop; - ash_keyboard_controller()->SetContainerType( + keyboard_controller()->SetContainerType( container_type, target_bounds, base::BindLambdaForTesting([&](bool success) { result = success; @@ -153,243 +151,230 @@ } private: - DISALLOW_COPY_AND_ASSIGN(AshKeyboardControllerTest); + DISALLOW_COPY_AND_ASSIGN(KeyboardControllerImplTest); }; } // namespace -TEST_F(AshKeyboardControllerTest, SetKeyboardConfig) { +TEST_F(KeyboardControllerImplTest, SetKeyboardConfig) { // Enable the keyboard so that config changes trigger observer events. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); - ash_keyboard_controller()->GetKeyboardConfig(); - KeyboardConfig config = ash_keyboard_controller()->GetKeyboardConfig(); + keyboard_controller()->GetKeyboardConfig(); + KeyboardConfig config = keyboard_controller()->GetKeyboardConfig(); // Set the observer config to the default config. test_observer()->set_config(config); // Change the keyboard config. bool old_auto_complete = config.auto_complete; config.auto_complete = !config.auto_complete; - ash_keyboard_controller()->SetKeyboardConfig(std::move(config)); + keyboard_controller()->SetKeyboardConfig(std::move(config)); // Test that the config changes. - ash_keyboard_controller()->GetKeyboardConfig(); + keyboard_controller()->GetKeyboardConfig(); EXPECT_NE(old_auto_complete, - ash_keyboard_controller()->GetKeyboardConfig().auto_complete); + keyboard_controller()->GetKeyboardConfig().auto_complete); // Test that the test observer received the change. EXPECT_NE(old_auto_complete, test_observer()->config().auto_complete); } -TEST_F(AshKeyboardControllerTest, EnableFlags) { - EXPECT_FALSE(ash_keyboard_controller()->IsKeyboardEnabled()); +TEST_F(KeyboardControllerImplTest, EnableFlags) { + EXPECT_FALSE(keyboard_controller()->IsKeyboardEnabled()); // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); std::set<keyboard::KeyboardEnableFlag> enable_flags = - ash_keyboard_controller()->GetEnableFlags(); + keyboard_controller()->GetEnableFlags(); EXPECT_TRUE( base::Contains(enable_flags, KeyboardEnableFlag::kExtensionEnabled)); EXPECT_EQ(enable_flags, test_observer()->enable_flags()); - EXPECT_TRUE(ash_keyboard_controller()->IsKeyboardEnabled()); + EXPECT_TRUE(keyboard_controller()->IsKeyboardEnabled()); // Set the enable override to disable the keyboard. - ash_keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kPolicyDisabled); - enable_flags = ash_keyboard_controller()->GetEnableFlags(); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kPolicyDisabled); + enable_flags = keyboard_controller()->GetEnableFlags(); EXPECT_TRUE( base::Contains(enable_flags, KeyboardEnableFlag::kExtensionEnabled)); EXPECT_TRUE( base::Contains(enable_flags, KeyboardEnableFlag::kPolicyDisabled)); EXPECT_EQ(enable_flags, test_observer()->enable_flags()); - EXPECT_FALSE(ash_keyboard_controller()->IsKeyboardEnabled()); + EXPECT_FALSE(keyboard_controller()->IsKeyboardEnabled()); // Clear the enable override; should enable the keyboard. - ash_keyboard_controller()->ClearEnableFlag( - KeyboardEnableFlag::kPolicyDisabled); - enable_flags = ash_keyboard_controller()->GetEnableFlags(); + keyboard_controller()->ClearEnableFlag(KeyboardEnableFlag::kPolicyDisabled); + enable_flags = keyboard_controller()->GetEnableFlags(); EXPECT_TRUE( base::Contains(enable_flags, KeyboardEnableFlag::kExtensionEnabled)); EXPECT_FALSE( base::Contains(enable_flags, KeyboardEnableFlag::kPolicyDisabled)); EXPECT_EQ(enable_flags, test_observer()->enable_flags()); - EXPECT_TRUE(ash_keyboard_controller()->IsKeyboardEnabled()); + EXPECT_TRUE(keyboard_controller()->IsKeyboardEnabled()); } -TEST_F(AshKeyboardControllerTest, RebuildKeyboardIfEnabled) { +TEST_F(KeyboardControllerImplTest, RebuildKeyboardIfEnabled) { EXPECT_EQ(0, test_observer()->destroyed_count()); // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); EXPECT_EQ(0, test_observer()->destroyed_count()); // Enable the keyboard again; this should not reload the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); EXPECT_EQ(0, test_observer()->destroyed_count()); // Rebuild the keyboard. This should destroy the previous keyboard window. - ash_keyboard_controller()->RebuildKeyboardIfEnabled(); + keyboard_controller()->RebuildKeyboardIfEnabled(); EXPECT_EQ(1, test_observer()->destroyed_count()); // Disable the keyboard. The keyboard window should be destroyed. - ash_keyboard_controller()->ClearEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->ClearEnableFlag(KeyboardEnableFlag::kExtensionEnabled); EXPECT_EQ(2, test_observer()->destroyed_count()); } -TEST_F(AshKeyboardControllerTest, ShowAndHideKeyboard) { +TEST_F(KeyboardControllerImplTest, ShowAndHideKeyboard) { // Enable the keyboard. This will create the keyboard window but not show it. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); - ASSERT_TRUE(keyboard_controller()->GetKeyboardWindow()); - EXPECT_FALSE(keyboard_controller()->GetKeyboardWindow()->IsVisible()); + ASSERT_TRUE(keyboard_ui_controller()->GetKeyboardWindow()); + EXPECT_FALSE(keyboard_ui_controller()->GetKeyboardWindow()->IsVisible()); // The keyboard needs to be in a loaded state before being shown. ASSERT_TRUE(keyboard::test::WaitUntilLoaded()); - ash_keyboard_controller()->ShowKeyboard(); - EXPECT_TRUE(keyboard_controller()->GetKeyboardWindow()->IsVisible()); + keyboard_controller()->ShowKeyboard(); + EXPECT_TRUE(keyboard_ui_controller()->GetKeyboardWindow()->IsVisible()); - ash_keyboard_controller()->HideKeyboard(HideReason::kUser); - EXPECT_FALSE(keyboard_controller()->GetKeyboardWindow()->IsVisible()); + keyboard_controller()->HideKeyboard(HideReason::kUser); + EXPECT_FALSE(keyboard_ui_controller()->GetKeyboardWindow()->IsVisible()); // TODO(stevenjb): Also use TestKeyboardControllerObserver and // IsKeyboardVisible to test visibility changes. https://crbug.com/849995. } -TEST_F(AshKeyboardControllerTest, SetContainerType) { +TEST_F(KeyboardControllerImplTest, SetContainerType) { // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); const auto default_behavior = keyboard::ContainerType::kFullWidth; - EXPECT_EQ(default_behavior, keyboard_controller()->GetActiveContainerType()); + EXPECT_EQ(default_behavior, + keyboard_ui_controller()->GetActiveContainerType()); gfx::Rect target_bounds(0, 0, 10, 10); // Set the container type to kFloating. EXPECT_TRUE( SetContainerType(keyboard::ContainerType::kFloating, target_bounds)); EXPECT_EQ(keyboard::ContainerType::kFloating, - keyboard_controller()->GetActiveContainerType()); + keyboard_ui_controller()->GetActiveContainerType()); // Ensure that the window size is correct (position is determined by Ash). EXPECT_EQ( target_bounds.size(), - keyboard_controller()->GetKeyboardWindow()->GetTargetBounds().size()); + keyboard_ui_controller()->GetKeyboardWindow()->GetTargetBounds().size()); // Setting the container type to the current type should fail. EXPECT_FALSE( SetContainerType(keyboard::ContainerType::kFloating, base::nullopt)); EXPECT_EQ(keyboard::ContainerType::kFloating, - keyboard_controller()->GetActiveContainerType()); + keyboard_ui_controller()->GetActiveContainerType()); } -TEST_F(AshKeyboardControllerTest, SetKeyboardLocked) { - ASSERT_FALSE(keyboard_controller()->keyboard_locked()); - ash_keyboard_controller()->SetKeyboardLocked(true); - EXPECT_TRUE(keyboard_controller()->keyboard_locked()); - ash_keyboard_controller()->SetKeyboardLocked(false); - EXPECT_FALSE(keyboard_controller()->keyboard_locked()); +TEST_F(KeyboardControllerImplTest, SetKeyboardLocked) { + ASSERT_FALSE(keyboard_ui_controller()->keyboard_locked()); + keyboard_controller()->SetKeyboardLocked(true); + EXPECT_TRUE(keyboard_ui_controller()->keyboard_locked()); + keyboard_controller()->SetKeyboardLocked(false); + EXPECT_FALSE(keyboard_ui_controller()->keyboard_locked()); } -TEST_F(AshKeyboardControllerTest, SetOccludedBounds) { +TEST_F(KeyboardControllerImplTest, SetOccludedBounds) { // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // Override the container behavior. auto scoped_behavior = std::make_unique<TestContainerBehavior>(); TestContainerBehavior* behavior = scoped_behavior.get(); - keyboard_controller()->set_container_behavior_for_test( + keyboard_ui_controller()->set_container_behavior_for_test( std::move(scoped_behavior)); gfx::Rect bounds(10, 20, 30, 40); - ash_keyboard_controller()->SetOccludedBounds({bounds}); + keyboard_controller()->SetOccludedBounds({bounds}); EXPECT_EQ(bounds, behavior->occluded_bounds()); } -TEST_F(AshKeyboardControllerTest, SetHitTestBounds) { +TEST_F(KeyboardControllerImplTest, SetHitTestBounds) { // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); - ASSERT_FALSE(keyboard_controller()->GetKeyboardWindow()->targeter()); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); + ASSERT_FALSE(keyboard_ui_controller()->GetKeyboardWindow()->targeter()); // Setting the hit test bounds should set a WindowTargeter. - ash_keyboard_controller()->SetHitTestBounds({gfx::Rect(10, 20, 30, 40)}); - ASSERT_TRUE(keyboard_controller()->GetKeyboardWindow()->targeter()); + keyboard_ui_controller()->SetHitTestBounds({gfx::Rect(10, 20, 30, 40)}); + ASSERT_TRUE(keyboard_ui_controller()->GetKeyboardWindow()->targeter()); } -TEST_F(AshKeyboardControllerTest, SetDraggableArea) { +TEST_F(KeyboardControllerImplTest, SetDraggableArea) { // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // Override the container behavior. auto scoped_behavior = std::make_unique<TestContainerBehavior>(); TestContainerBehavior* behavior = scoped_behavior.get(); - keyboard_controller()->set_container_behavior_for_test( + keyboard_ui_controller()->set_container_behavior_for_test( std::move(scoped_behavior)); gfx::Rect bounds(10, 20, 30, 40); - ash_keyboard_controller()->SetDraggableArea(bounds); + keyboard_ui_controller()->SetDraggableArea(bounds); EXPECT_EQ(bounds, behavior->draggable_area()); } -TEST_F(AshKeyboardControllerTest, ChangingSessionRebuildsKeyboard) { +TEST_F(KeyboardControllerImplTest, ChangingSessionRebuildsKeyboard) { // Enable the keyboard. - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // LOGGED_IN_NOT_ACTIVE session state needs to rebuild keyboard for supervised // user profile. - Shell::Get()->ash_keyboard_controller()->OnSessionStateChanged( + Shell::Get()->keyboard_controller()->OnSessionStateChanged( session_manager::SessionState::LOGGED_IN_NOT_ACTIVE); EXPECT_EQ(1, test_observer()->destroyed_count()); // ACTIVE session state also needs to rebuild keyboard for guest user profile. - Shell::Get()->ash_keyboard_controller()->OnSessionStateChanged( + Shell::Get()->keyboard_controller()->OnSessionStateChanged( session_manager::SessionState::ACTIVE); EXPECT_EQ(2, test_observer()->destroyed_count()); } -TEST_F(AshKeyboardControllerTest, VisualBoundsInMultipleDisplays) { +TEST_F(KeyboardControllerImplTest, VisualBoundsInMultipleDisplays) { UpdateDisplay("800x600,1024x768"); - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // Show the keyboard in the second display. - keyboard_controller()->ShowKeyboardInDisplay( + keyboard_ui_controller()->ShowKeyboardInDisplay( Shell::Get()->display_manager()->GetSecondaryDisplay()); ASSERT_TRUE(keyboard::WaitUntilShown()); - gfx::Rect root_bounds = keyboard_controller()->visual_bounds_in_root(); + gfx::Rect root_bounds = keyboard_ui_controller()->visual_bounds_in_root(); EXPECT_EQ(0, root_bounds.x()); - gfx::Rect screen_bounds = keyboard_controller()->GetVisualBoundsInScreen(); + gfx::Rect screen_bounds = keyboard_ui_controller()->GetVisualBoundsInScreen(); EXPECT_EQ(800, screen_bounds.x()); } -TEST_F(AshKeyboardControllerTest, OccludedBoundsInMultipleDisplays) { +TEST_F(KeyboardControllerImplTest, OccludedBoundsInMultipleDisplays) { UpdateDisplay("800x600,1024x768"); - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // Show the keyboard in the second display. - keyboard_controller()->ShowKeyboardInDisplay( + keyboard_ui_controller()->ShowKeyboardInDisplay( Shell::Get()->display_manager()->GetSecondaryDisplay()); ASSERT_TRUE(keyboard::WaitUntilShown()); gfx::Rect screen_bounds = - keyboard_controller()->GetWorkspaceOccludedBoundsInScreen(); + keyboard_ui_controller()->GetWorkspaceOccludedBoundsInScreen(); EXPECT_EQ(800, screen_bounds.x()); } // Test for http://crbug.com/303429. |GetContainerForDisplay| should move // keyboard to specified display even when it's not touchable. -TEST_F(AshKeyboardControllerTest, GetContainerForDisplay) { +TEST_F(KeyboardControllerImplTest, GetContainerForDisplay) { UpdateDisplay("500x500,500x500"); // Make primary display touchable. @@ -404,13 +389,13 @@ // Move to primary display. EXPECT_EQ(GetPrimaryRootWindow(), - ash_keyboard_controller() + keyboard_controller() ->GetContainerForDisplay(GetPrimaryDisplay()) ->GetRootWindow()); // Move to secondary display. EXPECT_EQ(GetSecondaryRootWindow(), - ash_keyboard_controller() + keyboard_controller() ->GetContainerForDisplay(GetSecondaryDisplay()) ->GetRootWindow()); } @@ -418,7 +403,7 @@ // Test for http://crbug.com/297858. |GetContainerForDefaultDisplay| should // return the primary display if no display has touch capability and // no window is focused. -TEST_F(AshKeyboardControllerTest, +TEST_F(KeyboardControllerImplTest, DefaultContainerInPrimaryDisplayWhenNoDisplayHasTouch) { UpdateDisplay("500x500,500x500"); @@ -427,14 +412,14 @@ EXPECT_NE(display::Display::TouchSupport::AVAILABLE, GetSecondaryDisplay().touch_support()); - EXPECT_EQ(GetPrimaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetPrimaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); } // Test for http://crbug.com/297858. |GetContainerForDefaultDisplay| should // move keyboard to focused display if no display has touch capability. -TEST_F(AshKeyboardControllerTest, +TEST_F(KeyboardControllerImplTest, DefaultContainerIsInFocusedDisplayWhenNoDisplayHasTouch) { UpdateDisplay("500x500,500x500"); @@ -444,14 +429,14 @@ GetSecondaryDisplay().touch_support()); CreateFocusedTestWindowInRootWindow(GetSecondaryRootWindow()); - EXPECT_EQ(GetSecondaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetSecondaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); } // Test for http://crbug.com/303429. |GetContainerForDefaultDisplay| should // move keyboard to first touchable display when there is one. -TEST_F(AshKeyboardControllerTest, DefaultContainerIsInFirstTouchableDisplay) { +TEST_F(KeyboardControllerImplTest, DefaultContainerIsInFirstTouchableDisplay) { UpdateDisplay("500x500,500x500"); // Make secondary display touchable. @@ -464,16 +449,16 @@ EXPECT_EQ(display::Display::TouchSupport::AVAILABLE, GetSecondaryDisplay().touch_support()); - EXPECT_EQ(GetSecondaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetSecondaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); } // Test for http://crbug.com/303429. |GetContainerForDefaultDisplay| should // move keyboard to first touchable display when the focused display is not // touchable. TEST_F( - AshKeyboardControllerTest, + KeyboardControllerImplTest, DefaultContainerIsInFirstTouchableDisplayIfFocusedDisplayIsNotTouchable) { UpdateDisplay("500x500,500x500"); @@ -490,14 +475,14 @@ // Focus on primary display. CreateFocusedTestWindowInRootWindow(GetPrimaryRootWindow()); - EXPECT_EQ(GetSecondaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetSecondaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); } // Test for http://crbug.com/303429. |GetContainerForDefaultDisplay| should // move keyborad to first touchable display when there is one. -TEST_F(AshKeyboardControllerTest, +TEST_F(KeyboardControllerImplTest, DefaultContainerIsInFocusedDisplayIfTouchable) { UpdateDisplay("500x500,500x500"); @@ -516,29 +501,30 @@ // Focus on secondary display. CreateFocusedTestWindowInRootWindow(GetSecondaryRootWindow()); - EXPECT_EQ(GetSecondaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetSecondaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); // Focus on primary display. CreateFocusedTestWindowInRootWindow(GetPrimaryRootWindow()); - EXPECT_EQ(GetPrimaryRootWindow(), ash_keyboard_controller() - ->GetContainerForDefaultDisplay() - ->GetRootWindow()); + EXPECT_EQ( + GetPrimaryRootWindow(), + keyboard_controller()->GetContainerForDefaultDisplay()->GetRootWindow()); } // Test for https://crbug.com/897007. -TEST_F(AshKeyboardControllerTest, ShowKeyboardInSecondaryDisplay) { +TEST_F(KeyboardControllerImplTest, ShowKeyboardInSecondaryDisplay) { UpdateDisplay("500x500,500x500"); - ash_keyboard_controller()->SetEnableFlag( - KeyboardEnableFlag::kExtensionEnabled); + keyboard_controller()->SetEnableFlag(KeyboardEnableFlag::kExtensionEnabled); // Show in secondary display. - keyboard_controller()->ShowKeyboardInDisplay(GetSecondaryDisplay()); - EXPECT_EQ(GetSecondaryRootWindow(), keyboard_controller()->GetRootWindow()); + keyboard_ui_controller()->ShowKeyboardInDisplay(GetSecondaryDisplay()); + EXPECT_EQ(GetSecondaryRootWindow(), + keyboard_ui_controller()->GetRootWindow()); ASSERT_TRUE(keyboard::WaitUntilShown()); - EXPECT_TRUE(!keyboard_controller()->GetKeyboardWindow()->bounds().IsEmpty()); + EXPECT_TRUE( + !keyboard_ui_controller()->GetKeyboardWindow()->bounds().IsEmpty()); } } // namespace ash
diff --git a/ash/keyboard/ui/keyboard_controller.h b/ash/keyboard/ui/keyboard_controller.h index fcd5e23d..443cda4 100644 --- a/ash/keyboard/ui/keyboard_controller.h +++ b/ash/keyboard/ui/keyboard_controller.h
@@ -53,6 +53,8 @@ // Provides control of the virtual keyboard, including enabling/disabling the // keyboard and controlling its visibility. +// TODO(shend): Rename this to KeyboardUIController and move enable / disable +// logic to KeyboardControllerImpl. class KEYBOARD_EXPORT KeyboardController : public ui::InputMethodObserver, public aura::WindowObserver, public ContainerBehavior::Delegate {
diff --git a/ash/keyboard/virtual_keyboard_controller.cc b/ash/keyboard/virtual_keyboard_controller.cc index 80b8fcf..aa4b500 100644 --- a/ash/keyboard/virtual_keyboard_controller.cc +++ b/ash/keyboard/virtual_keyboard_controller.cc
@@ -7,7 +7,7 @@ #include <vector> #include "ash/ime/ime_controller.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_util.h" #include "ash/public/cpp/keyboard/keyboard_switches.h" @@ -194,7 +194,7 @@ void VirtualKeyboardController::OnActiveUserSessionChanged( const AccountId& account_id) { // Force on-screen keyboard to reset. - Shell::Get()->ash_keyboard_controller()->RebuildKeyboardIfEnabled(); + Shell::Get()->keyboard_controller()->RebuildKeyboardIfEnabled(); } void VirtualKeyboardController::OnBluetoothAdapterOrDeviceChanged(
diff --git a/ash/keyboard/virtual_keyboard_controller_unittest.cc b/ash/keyboard/virtual_keyboard_controller_unittest.cc index 59bd3c0..918a4cea 100644 --- a/ash/keyboard/virtual_keyboard_controller_unittest.cc +++ b/ash/keyboard/virtual_keyboard_controller_unittest.cc
@@ -10,7 +10,7 @@ #include "ash/accessibility/accessibility_controller_impl.h" #include "ash/ime/ime_controller.h" #include "ash/ime/test_ime_controller_client.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/test/keyboard_test_util.h" #include "ash/public/cpp/keyboard/keyboard_switches.h" #include "ash/shell.h" @@ -32,7 +32,7 @@ namespace { VirtualKeyboardController* GetVirtualKeyboardController() { - return Shell::Get()->ash_keyboard_controller()->virtual_keyboard_controller(); + return Shell::Get()->keyboard_controller()->virtual_keyboard_controller(); } } // namespace
diff --git a/ash/login/ui/login_keyboard_test_base.cc b/ash/login/ui/login_keyboard_test_base.cc index c4cd4bcb..fe235d5 100644 --- a/ash/login/ui/login_keyboard_test_base.cc +++ b/ash/login/ui/login_keyboard_test_base.cc
@@ -4,7 +4,7 @@ #include "ash/login/ui/login_keyboard_test_base.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_ui.h" #include "ash/keyboard/ui/test/keyboard_test_util.h"
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc index 9456381..df676ff 100644 --- a/ash/root_window_controller.cc +++ b/ash/root_window_controller.cc
@@ -17,7 +17,7 @@ #include "ash/high_contrast/high_contrast_controller.h" #include "ash/host/ash_window_tree_host.h" #include "ash/keyboard/arc/arc_virtual_keyboard_container_layout_manager.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_layout_manager.h" #include "ash/keyboard/ui/keyboard_util.h" @@ -610,7 +610,7 @@ // Notify the keyboard controller before closing child windows and shutting // down associated layout managers. - Shell::Get()->ash_keyboard_controller()->OnRootWindowClosing(root); + Shell::Get()->keyboard_controller()->OnRootWindowClosing(root); shelf_->ShutdownShelfWidget(); @@ -804,7 +804,7 @@ Shell::Get()->desks_controller()->OnRootWindowAdded(root_window); if (root_window_type == RootWindowType::PRIMARY) { - shell->ash_keyboard_controller()->RebuildKeyboardIfEnabled(); + shell->keyboard_controller()->RebuildKeyboardIfEnabled(); } else { window_tree_host_->Show();
diff --git a/ash/shell.cc b/ash/shell.cc index 9add2d3..fbe68e5 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -53,7 +53,7 @@ #include "ash/home_screen/home_screen_controller.h" #include "ash/host/ash_window_tree_host_init_params.h" #include "ash/ime/ime_controller.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_ui_factory.h" #include "ash/kiosk_next/kiosk_next_shell_controller_impl.h" #include "ash/laser/laser_pointer_controller.h" @@ -577,8 +577,8 @@ display_manager_.reset(ScreenAsh::CreateDisplayManager()); window_tree_host_manager_ = std::make_unique<WindowTreeHostManager>(); user_metrics_recorder_ = std::make_unique<UserMetricsRecorder>(); - ash_keyboard_controller_ = - std::make_unique<AshKeyboardController>(session_controller_.get()); + keyboard_controller_ = + std::make_unique<KeyboardControllerImpl>(session_controller_.get()); if (base::FeatureList::IsEnabled(features::kUseBluetoothSystemInAsh)) { tray_bluetooth_helper_ = @@ -642,7 +642,7 @@ // Destroy the virtual keyboard controller before the tablet mode controller // since the latters destructor triggers events that the former is listening // to but no longer cares about. - ash_keyboard_controller_->DestroyVirtualKeyboard(); + keyboard_controller_->DestroyVirtualKeyboard(); // Depends on |tablet_mode_controller_|. shelf_controller_->Shutdown(); @@ -817,7 +817,7 @@ display_change_observer_.reset(); display_shutdown_observer_.reset(); - ash_keyboard_controller_.reset(); + keyboard_controller_.reset(); PowerStatus::Shutdown(); // Depends on SessionController. @@ -1112,8 +1112,7 @@ // Create virtual keyboard after WindowTreeHostManager::InitHosts() since // it may enable the virtual keyboard immediately, which requires a // WindowTreeHostManager to host the keyboard window. - ash_keyboard_controller_->CreateVirtualKeyboard( - std::move(keyboard_ui_factory)); + keyboard_controller_->CreateVirtualKeyboard(std::move(keyboard_ui_factory)); cursor_manager_->HideCursor(); // Hide the mouse cursor on startup. cursor_manager_->SetCursor(ui::CursorType::kPointer);
diff --git a/ash/shell.h b/ash/shell.h index 454cc8f..9b0b814eb 100644 --- a/ash/shell.h +++ b/ash/shell.h
@@ -128,7 +128,7 @@ class KeyAccessibilityEnabler; class KeyboardBrightnessControlDelegate; class KioskNextShellControllerImpl; -class AshKeyboardController; +class KeyboardControllerImpl; class LaserPointerController; class LocaleUpdateControllerImpl; class LockStateController; @@ -381,8 +381,8 @@ KioskNextShellControllerImpl* kiosk_next_shell_controller() { return kiosk_next_shell_controller_.get(); } - AshKeyboardController* ash_keyboard_controller() { - return ash_keyboard_controller_.get(); + KeyboardControllerImpl* keyboard_controller() { + return keyboard_controller_.get(); } LaserPointerController* laser_pointer_controller() { return laser_pointer_controller_.get(); @@ -753,7 +753,7 @@ bluetooth_notification_controller_; std::unique_ptr<BluetoothPowerController> bluetooth_power_controller_; std::unique_ptr<TrayBluetoothHelper> tray_bluetooth_helper_; - std::unique_ptr<AshKeyboardController> ash_keyboard_controller_; + std::unique_ptr<KeyboardControllerImpl> keyboard_controller_; std::unique_ptr<DisplayColorManager> display_color_manager_; std::unique_ptr<DisplayErrorObserver> display_error_observer_; std::unique_ptr<ProjectingObserver> projecting_observer_;
diff --git a/ash/shell_test_api.cc b/ash/shell_test_api.cc index f93a252..7506e5c 100644 --- a/ash/shell_test_api.cc +++ b/ash/shell_test_api.cc
@@ -12,7 +12,7 @@ #include "ash/app_list/app_list_controller_impl.h" #include "ash/app_list/presenter/app_list_presenter_impl.h" #include "ash/app_list/views/app_list_view.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/public/cpp/app_list/app_list_types.h" #include "ash/root_window_controller.h" #include "ash/shell.h" @@ -191,7 +191,7 @@ } void ShellTestApi::EnableVirtualKeyboard() { - shell_->ash_keyboard_controller()->SetEnableFlag( + shell_->keyboard_controller()->SetEnableFlag( keyboard::KeyboardEnableFlag::kCommandLineEnabled); }
diff --git a/ash/system/ime_menu/ime_list_view.cc b/ash/system/ime_menu/ime_list_view.cc index 07fcfe8..a981f209 100644 --- a/ash/system/ime_menu/ime_list_view.cc +++ b/ash/system/ime_menu/ime_list_view.cc
@@ -6,7 +6,7 @@ #include "ash/ime/ime_controller.h" #include "ash/ime/ime_switch_type.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_util.h" #include "ash/keyboard/virtual_keyboard_controller.h" #include "ash/public/interfaces/ime_info.mojom.h" @@ -332,7 +332,7 @@ DCHECK_EQ(sender, keyboard_status_row_->toggle()); Shell::Get() - ->ash_keyboard_controller() + ->keyboard_controller() ->virtual_keyboard_controller() ->ToggleIgnoreExternalKeyboard(); last_selected_item_id_.clear();
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc index 00771a1..140da54 100644 --- a/ash/system/ime_menu/ime_menu_tray.cc +++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -6,7 +6,7 @@ #include "ash/accessibility/accessibility_controller_impl.h" #include "ash/ime/ime_controller.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/virtual_keyboard_controller.h" #include "ash/public/cpp/ash_constants.h" @@ -395,7 +395,7 @@ CloseBubble(); Shell::Get() - ->ash_keyboard_controller() + ->keyboard_controller() ->virtual_keyboard_controller() ->ForceShowKeyboardWithKeyset(keyset); }
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index 7a48300d..5c53752 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc
@@ -16,7 +16,7 @@ #include "ash/display/screen_orientation_controller_test_api.h" #include "ash/display/unified_mouse_warp_controller.h" #include "ash/display/window_tree_host_manager.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/public/cpp/shell_window_ids.h" #include "ash/public/cpp/window_properties.h" #include "ash/root_window_controller.h" @@ -464,10 +464,10 @@ void AshTestBase::SetTouchKeyboardEnabled(bool enabled) { auto flag = keyboard::KeyboardEnableFlag::kTouchEnabled; if (enabled) - Shell::Get()->ash_keyboard_controller()->SetEnableFlag(flag); + Shell::Get()->keyboard_controller()->SetEnableFlag(flag); else - Shell::Get()->ash_keyboard_controller()->ClearEnableFlag(flag); - // Ensure that observer methods and mojo calls between AshKeyboardController, + Shell::Get()->keyboard_controller()->ClearEnableFlag(flag); + // Ensure that observer methods and mojo calls between KeyboardControllerImpl, // keyboard::KeyboardController, and AshKeyboardUI complete. base::RunLoop().RunUntilIdle(); }
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 2b9b9645..fe162ef 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc
@@ -14,7 +14,7 @@ #include "ash/assistant/test/test_assistant_service.h" #include "ash/display/display_configuration_controller_test_api.h" #include "ash/display/screen_ash.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/test_keyboard_ui.h" #include "ash/mojo_test_interface_factory.h" #include "ash/public/cpp/ash_prefs.h" @@ -187,7 +187,7 @@ // OnLoadKeyboardContentsRequested(). test_keyboard_controller_observer_ = std::make_unique<TestKeyboardControllerObserver>( - shell->ash_keyboard_controller()); + shell->keyboard_controller()); new_window_delegate_ = std::make_unique<TestNewWindowDelegate>(); @@ -207,7 +207,7 @@ Shell::DeleteInstance(); new_window_delegate_.reset(); - // Needs to be reset after Shell::Get()->ash_keyboard_controller() is deleted. + // Needs to be reset after Shell::Get()->keyboard_controller() is deleted. test_keyboard_controller_observer_.reset(); // Suspend the tear down until all resources are returned via
diff --git a/ash/wm/always_on_top_controller_unittest.cc b/ash/wm/always_on_top_controller_unittest.cc index 8117a9e..26dae2c 100644 --- a/ash/wm/always_on_top_controller_unittest.cc +++ b/ash/wm/always_on_top_controller_unittest.cc
@@ -4,7 +4,7 @@ #include "ash/wm/always_on_top_controller.h" -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_ui.h" #include "ash/keyboard/ui/test/keyboard_test_util.h"
diff --git a/ash/wm/lock_action_handler_layout_manager_unittest.cc b/ash/wm/lock_action_handler_layout_manager_unittest.cc index 23d41e73..785c871f 100644 --- a/ash/wm/lock_action_handler_layout_manager_unittest.cc +++ b/ash/wm/lock_action_handler_layout_manager_unittest.cc
@@ -7,7 +7,7 @@ #include <memory> #include <utility> -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_ui.h" #include "ash/keyboard/ui/keyboard_util.h"
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc index cf681b13..dfd0b71 100644 --- a/ash/wm/system_modal_container_layout_manager_unittest.cc +++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -6,7 +6,7 @@ #include <memory> -#include "ash/keyboard/ash_keyboard_controller.h" +#include "ash/keyboard/keyboard_controller_impl.h" #include "ash/keyboard/ui/keyboard_controller.h" #include "ash/keyboard/ui/keyboard_ui.h" #include "ash/keyboard/ui/test/keyboard_test_util.h"
diff --git a/base/test/scoped_task_environment_unittest.cc b/base/test/scoped_task_environment_unittest.cc index 4280fd5..22de959 100644 --- a/base/test/scoped_task_environment_unittest.cc +++ b/base/test/scoped_task_environment_unittest.cc
@@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/cancelable_callback.h" +#include "base/debug/debugger.h" #include "base/run_loop.h" #include "base/synchronization/atomic_flag.h" #include "base/synchronization/waitable_event.h" @@ -500,7 +501,9 @@ RunLoop::ScopedRunTimeoutForTest::Current(); EXPECT_NE(run_timeout, old_run_timeout); EXPECT_TRUE(run_timeout); - EXPECT_LT(run_timeout->timeout(), TestTimeouts::test_launcher_timeout()); + if (!debug::BeingDebugged()) { + EXPECT_LT(run_timeout->timeout(), TestTimeouts::test_launcher_timeout()); + } EXPECT_NONFATAL_FAILURE({ run_timeout->on_timeout().Run(); }, "RunLoop::Run() timed out"); }
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 9626f90..9522b9c 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -8909123081399526848 \ No newline at end of file +8909064476425739776 \ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index b2e1168..2b8b660a 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -8909121411958154848 \ No newline at end of file +8909076652554121136 \ No newline at end of file
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 95248a07..6db4fc0 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc
@@ -582,15 +582,8 @@ inputs_.mask_layer->RemoveFromParent(); DCHECK(!inputs_.mask_layer->parent()); inputs_.mask_layer->SetParent(this); - if (inputs_.filters.IsEmpty() && inputs_.backdrop_filters.IsEmpty() && - (!layer_tree_host_ || - layer_tree_host_->GetSettings().enable_mask_tiling)) { - inputs_.mask_layer->SetLayerMaskType( - Layer::LayerMaskType::MULTI_TEXTURE_MASK); - } else { - inputs_.mask_layer->SetLayerMaskType( - Layer::LayerMaskType::SINGLE_TEXTURE_MASK); - } + inputs_.mask_layer->SetLayerMaskType( + Layer::LayerMaskType::SINGLE_TEXTURE_MASK); } SetSubtreePropertyChanged(); SetNeedsFullTreeSync(); @@ -601,10 +594,6 @@ if (inputs_.filters == filters) return; inputs_.filters = filters; - if (inputs_.mask_layer && !filters.IsEmpty()) { - inputs_.mask_layer->SetLayerMaskType( - Layer::LayerMaskType::SINGLE_TEXTURE_MASK); - } SetSubtreePropertyChanged(); SetPropertyTreesNeedRebuild(); SetNeedsCommit(); @@ -616,13 +605,6 @@ return; inputs_.backdrop_filters = filters; - // We will not set the mask type to MULTI_TEXTURE_MASK if the mask layer's - // filters are removed, because we do not want to reraster if the filters are - // being animated. - if (inputs_.mask_layer && !filters.IsEmpty()) { - inputs_.mask_layer->SetLayerMaskType( - Layer::LayerMaskType::SINGLE_TEXTURE_MASK); - } SetSubtreePropertyChanged(); SetPropertyTreesNeedRebuild(); SetNeedsCommit();
diff --git a/cc/layers/layer.h b/cc/layers/layer.h index fd5c08aec..8eee1adb 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h
@@ -78,7 +78,6 @@ // describe how the mask would be generated as a texture in that case. enum LayerMaskType { NOT_MASK = 0, - MULTI_TEXTURE_MASK, SINGLE_TEXTURE_MASK, };
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc index 2d1bdfb..535eb47 100644 --- a/cc/layers/picture_layer.cc +++ b/cc/layers/picture_layer.cc
@@ -92,10 +92,6 @@ if (!host) return; - if (!host->GetSettings().enable_mask_tiling && - mask_type_ == LayerMaskType::MULTI_TEXTURE_MASK) - mask_type_ = LayerMaskType::SINGLE_TEXTURE_MASK; - if (!recording_source_) recording_source_.reset(new RecordingSource); recording_source_->SetSlowdownRasterScaleFactor( @@ -165,11 +161,6 @@ } void PictureLayer::SetLayerMaskType(LayerMaskType mask_type) { - // We do not allow converting SINGLE_TEXTURE_MASK to MULTI_TEXTURE_MASK in - // order to avoid rerastering when a mask's transform is being animated. - if (mask_type_ == LayerMaskType::SINGLE_TEXTURE_MASK && - mask_type == LayerMaskType::MULTI_TEXTURE_MASK) - return; mask_type_ = mask_type; }
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index fa04946c..07afe94 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc
@@ -193,18 +193,14 @@ render_pass->CreateAndAppendSharedQuadState(); if (raster_source_->IsSolidColor()) { - // TODO(sunxd): Solid color non-mask layers are forced to have contents - // scale = 1. This is a workaround to temperarily fix - // https://crbug.com/796558. - // We need to investigate into the ca layers logic and remove this - // workaround after fixing the bug. - float max_contents_scale = - !(mask_type_ == Layer::LayerMaskType::MULTI_TEXTURE_MASK) - ? 1 - : CanHaveTilings() ? ideal_contents_scale_ - : std::min(kMaxIdealContentsScale, - std::max(GetIdealContentsScale(), - MinimumContentsScale())); + // TODO(979672): This is still hard-coded at 1.0. This has some history: + // - for crbug.com/769319, the contents scale was allowed to change, to + // avoid blurring on high-dpi screens. + // - for crbug.com/796558, the max device scale was hard-coded back to 1.0 + // for single-tile masks, to avoid problems with transforms. + // To avoid those transform/scale bugs, this is currently left at 1.0. See + // crbug.com/979672 for more context and test links. + float max_contents_scale = 1; // The downstream CA layers use shared_quad_state to generate resources of // the right size even if it is a solid color picture layer. @@ -430,7 +426,7 @@ float alpha = (SkColorGetA(draw_info.solid_color()) * (1.0f / 255.0f)) * shared_quad_state->opacity; - if (mask_type_ == Layer::LayerMaskType::MULTI_TEXTURE_MASK || + if (mask_type_ != Layer::LayerMaskType::NOT_MASK || alpha >= std::numeric_limits<float>::epsilon()) { auto* quad = render_pass->CreateAndAppendDrawQuad<viz::SolidColorDrawQuad>();
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index c9a39cf..0b242606 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -1159,7 +1159,7 @@ // Mask layers dont create low res since they always fit on one tile. std::unique_ptr<FakePictureLayerImpl> mask = - FakePictureLayerImpl::CreateSingleTextureMaskWithRasterSource( + FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl()->pending_tree(), 3, pending_raster_source); mask->SetBounds(layer_bounds); mask->SetDrawsContent(true); @@ -1192,7 +1192,7 @@ SetupPendingTree(valid_raster_source); std::unique_ptr<FakePictureLayerImpl> mask_ptr = - FakePictureLayerImpl::CreateSingleTextureMaskWithRasterSource( + FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl()->pending_tree(), 3, valid_raster_source); mask_ptr->SetBounds(layer_bounds); mask_ptr->SetDrawsContent(true); @@ -1325,7 +1325,7 @@ SetupPendingTree(valid_raster_source); std::unique_ptr<FakePictureLayerImpl> mask_ptr = - FakePictureLayerImpl::CreateSingleTextureMaskWithRasterSource( + FakePictureLayerImpl::CreateMaskWithRasterSource( host_impl()->pending_tree(), 3, valid_raster_source); mask_ptr->SetBounds(layer_bounds); mask_ptr->SetDrawsContent(true); @@ -3376,7 +3376,7 @@ scoped_refptr<FakeRasterSource> pending_raster_source = FakeRasterSource::CreateFilledSolidColor(layer_bounds); SetupPendingTree(std::move(pending_raster_source), gfx::Size(), Region(), - Layer::LayerMaskType::MULTI_TEXTURE_MASK); + Layer::LayerMaskType::SINGLE_TEXTURE_MASK); host_impl()->pending_tree()->SetDeviceScaleFactor(2.f); ActivateTree();
diff --git a/cc/layers/render_surface_impl.cc b/cc/layers/render_surface_impl.cc index 50da1d7..4c27de0 100644 --- a/cc/layers/render_surface_impl.cc +++ b/cc/layers/render_surface_impl.cc
@@ -434,10 +434,6 @@ "mask_layer_gpu_memory_usage", mask_layer->GPUMemoryUsageInBytes()); - if (mask_layer->mask_type() == Layer::LayerMaskType::MULTI_TEXTURE_MASK) { - TileMaskLayer(render_pass, shared_quad_state, unoccluded_content_rect); - return; - } gfx::SizeF mask_uv_size; mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size, &mask_uv_size); @@ -461,194 +457,4 @@ OwningEffectNode()->backdrop_filter_quality); } -void RenderSurfaceImpl::TileMaskLayer( - viz::RenderPass* render_pass, - viz::SharedQuadState* shared_quad_state, - const gfx::Rect& unoccluded_content_rect) { - DCHECK(MaskLayer()); - DCHECK(Filters().IsEmpty()); - - LayerImpl* mask_layer = MaskLayer(); - gfx::Vector2dF owning_layer_to_surface_contents_scale = - OwningEffectNode()->surface_contents_scale; - - // Use the picture layer's AppendQuads logic to generate TileDrawQuads. These - // DrawQuads are used to generate tiled RenderPassDrawQuad for the mask. - std::unique_ptr<viz::RenderPass> temp_render_pass = viz::RenderPass::Create(); - AppendQuadsData temp_append_quads_data; - mask_layer->AppendQuads(temp_render_pass.get(), &temp_append_quads_data); - - auto* temp_quad = temp_render_pass->quad_list.front(); - if (!temp_quad) - return; - - // There are two spaces we are dealing with here: - // 1. quad space: This is the space where the draw quads generated by the - // PictureLayerImpl's logic are in. In other words, this is the space where - // the |temp_quad|'s rect is in. - // 2. surface space: This is the contents space of |this| render surface. - // Since |mask_layer|'s target is the render surface it's masking, the surface - // space is also the target space for the quads generated by - // PictureLayerImpl's logic. - - gfx::Transform quad_space_to_surface_space_transform = - temp_quad->shared_quad_state->quad_to_target_transform; - // This transform should be a 2d scale + offset, so would be invertible. - gfx::Transform surface_space_to_quad_space_transform; - bool invertible = quad_space_to_surface_space_transform.GetInverse( - &surface_space_to_quad_space_transform); - DCHECK(invertible) << "RenderSurfaceImpl::TileMaskLayer created quads with " - "non-invertible transform."; - - // While converting from the TileDrawQuads to RenderPassDrawQuads, we keep the - // quad rects in the same space, and modify every other rect that is not in - // quad space accordingly. - - // The |shared_quad_state| being passed in is generated with |this| render - // surface's draw properties. It holds a transform from the surface contents - // space to the surface target space. We want to change the origin space to - // match the |mask_layer|'s quad space, so we must include the transform from - // the quad space to the surface contents space. Then the transform is from - // the |mask_layer|'s quad space to our target space. - shared_quad_state->quad_to_target_transform.PreconcatTransform( - quad_space_to_surface_space_transform); - - // Next, we need to modify the rects on |shared_quad_state| that are in - // surface's "quad space" (surface space) to quad space. - shared_quad_state->quad_layer_rect = MathUtil::ProjectEnclosingClippedRect( - surface_space_to_quad_space_transform, - shared_quad_state->quad_layer_rect); - shared_quad_state->visible_quad_layer_rect = - MathUtil::ProjectEnclosingClippedRect( - surface_space_to_quad_space_transform, - shared_quad_state->visible_quad_layer_rect); - - // The |shared_quad_state|'s |quad_layer_rect| and |visible_quad_layer_rect| - // is set from content_rect(). content_rect() defines the size of the source - // texture to be masked. PictureLayerImpl's generated |quad_layer_rect| and - // |visible_quad_layer_rect| is from the mask layer's |bounds| and - // |visible_layer_rect|. These rect defines the size of the mask texture. The - // intersection of the two rects is the rect we can draw. - shared_quad_state->quad_layer_rect.Intersect( - temp_quad->shared_quad_state->quad_layer_rect); - shared_quad_state->visible_quad_layer_rect.Intersect( - temp_quad->shared_quad_state->visible_quad_layer_rect); - - // Cache content_rect() and |unoccluded_content_rect| in quad space. - gfx::Rect content_rect_in_quad_space = MathUtil::MapEnclosingClippedRect( - surface_space_to_quad_space_transform, content_rect()); - gfx::Rect unoccluded_content_rect_in_quad_space = - MathUtil::MapEnclosingClippedRect(surface_space_to_quad_space_transform, - unoccluded_content_rect); - - // Generate RenderPassDrawQuads based on the temporary quads created by - // |mask_layer|. - for (auto* temp_quad : temp_render_pass->quad_list) { - gfx::Rect temp_quad_rect = temp_quad->rect; - // If the |temp_quad_rect| is entirely outside render surface's - // content_rect(), ignore the quad. - if (!temp_quad_rect.Intersects(content_rect_in_quad_space)) - continue; - - // We only care about the quads that are inside the content_rect(). - gfx::Rect quad_rect = - gfx::IntersectRects(temp_quad_rect, content_rect_in_quad_space); - - gfx::Rect visible_quad_rect = - gfx::IntersectRects(quad_rect, unoccluded_content_rect_in_quad_space); - if (visible_quad_rect.IsEmpty()) - continue; - - // |tex_coord_rect| is non-normalized sub-rect of the render surface's - // texture that is being masked. Its origin is (0,0) and it is in surface - // space. For example the |tex_coord_rect| for the entire texture would be - // (0,0 content_rect.width X content_rect.height). - - // In order to calculate the |tex_coord_rect|, we calculate what quad's rect - // would be masking in the surface contents space, then remove the offset. - gfx::RectF tex_coord_rect = MathUtil::MapClippedRect( - quad_space_to_surface_space_transform, gfx::RectF(quad_rect)); - tex_coord_rect.Offset(-content_rect().OffsetFromOrigin()); - - constexpr float backdrop_filter_quality = 1.0; - switch (temp_quad->material) { - case viz::DrawQuad::Material::kTiledContent: { - DCHECK_EQ(1U, temp_quad->resources.count); - // When the |temp_quad| is actually a texture, we need to calculate - // |mask_uv_rect|. The |mask_uv_rect| is the normalized sub-rect for - // applying the mask's texture. To get |mask_uv_rect|, we need the newly - // calculated |quad_rect| in the texture's space, then normalized by the - // texture's size. - - // We are applying the |temp_quad|'s texture as a mask, so we start with - // the |tex_coord_rect| of the |temp_quad|. - gfx::RectF temp_tex_coord_rect = - viz::TileDrawQuad::MaterialCast(temp_quad)->tex_coord_rect; - - // The |quad_rect| is in the same space as |temp_quad_rect|. Calculate - // the scale transform between the texture space and the quad space. - float scale_x = temp_tex_coord_rect.width() / temp_quad_rect.width(); - float scale_y = temp_tex_coord_rect.height() / temp_quad_rect.height(); - // Start by setting up the correct size of mask_uv_rect in texture - // space. - gfx::RectF mask_uv_rect(quad_rect.width() * scale_x, - quad_rect.height() * scale_y); - - // Now figure out what is the correct offset. Start with the original - // temp_tex_coord_rect's offset. - mask_uv_rect.Offset(temp_tex_coord_rect.OffsetFromOrigin()); - // Next figure out what offset to apply by checking the difference in - // offset between |temp_quad_rect| and |quad_rect| which is - // intersected by the content_rect(). - gfx::Vector2dF offset(quad_rect.OffsetFromOrigin()); - offset -= temp_quad_rect.OffsetFromOrigin(); - // Convert the difference in offset into texture space. - offset.Scale(scale_x, scale_y); - mask_uv_rect.Offset(offset); - - // |mask_uv_rect| is normalized to [0..1] by the |mask_texture_size|. - gfx::Size mask_texture_size = - viz::TileDrawQuad::MaterialCast(temp_quad)->texture_size; - mask_uv_rect.Scale(1.f / mask_texture_size.width(), - 1.f / mask_texture_size.height()); - - auto* quad = - render_pass->CreateAndAppendDrawQuad<viz::RenderPassDrawQuad>(); - quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, id(), - temp_quad->resources.ids[0], mask_uv_rect, - mask_texture_size, owning_layer_to_surface_contents_scale, - FiltersOrigin(), tex_coord_rect, - !layer_tree_impl_->settings().enable_edge_anti_aliasing, - backdrop_filter_quality); - } break; - case viz::DrawQuad::Material::kSolidColor: { - SkColor temp_color = - viz::SolidColorDrawQuad::MaterialCast(temp_quad)->color; - // Check the alpha channel of the color. We apply the mask by - // multiplying with the alpha channel, so if the alpha channel is - // transparent, we skip this quad. - if (SkColorGetA(temp_color) == SK_AlphaTRANSPARENT) - continue; - SkAlpha solid = SK_AlphaOPAQUE; - DCHECK_EQ(SkColorGetA(temp_color), solid); - - auto* quad = - render_pass->CreateAndAppendDrawQuad<viz::RenderPassDrawQuad>(); - quad->SetNew(shared_quad_state, quad_rect, visible_quad_rect, id(), 0, - gfx::RectF(), gfx::Size(), - owning_layer_to_surface_contents_scale, FiltersOrigin(), - tex_coord_rect, - !layer_tree_impl_->settings().enable_edge_anti_aliasing, - backdrop_filter_quality); - } break; - case viz::DrawQuad::Material::kDebugBorder: - NOTIMPLEMENTED(); - break; - default: - NOTREACHED(); - break; - } - } -} - } // namespace cc
diff --git a/cc/layers/render_surface_impl_unittest.cc b/cc/layers/render_surface_impl_unittest.cc index 89c6177..02effae 100644 --- a/cc/layers/render_surface_impl_unittest.cc +++ b/cc/layers/render_surface_impl_unittest.cc
@@ -147,7 +147,7 @@ TEST(RenderSurfaceLayerImplTest, AppendQuadsWithSolidColorMaskAndDeviceScaleFactor) { std::unique_ptr<viz::RenderPass> render_pass = DoAppendQuadsWithScaledMask( - DRAW_MODE_HARDWARE, 2.f, Layer::LayerMaskType::MULTI_TEXTURE_MASK); + DRAW_MODE_HARDWARE, 2.f, Layer::LayerMaskType::SINGLE_TEXTURE_MASK); DCHECK(render_pass->quad_list.front()); const viz::RenderPassDrawQuad* quad = viz::RenderPassDrawQuad::MaterialCast(render_pass->quad_list.front());
diff --git a/cc/layers/render_surface_unittest.cc b/cc/layers/render_surface_unittest.cc index 577594b0..8e5ca03 100644 --- a/cc/layers/render_surface_unittest.cc +++ b/cc/layers/render_surface_unittest.cc
@@ -21,6 +21,8 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/transform.h" +#include "cc/test/fake_raster_source.h" + namespace cc { namespace { @@ -76,7 +78,7 @@ FakePictureLayerImplForRenderSurfaceTest(LayerTreeImpl* tree_impl, int id) : FakePictureLayerImpl(tree_impl, id, - Layer::LayerMaskType::MULTI_TEXTURE_MASK) {} + Layer::LayerMaskType::SINGLE_TEXTURE_MASK) {} std::vector<gfx::Rect> quad_rects_; }; @@ -239,75 +241,6 @@ EXPECT_EQ(origin, pass->transform_to_root_target); } -TEST(RenderSurfaceTest, SanityCheckSurfaceDropsOccludedRenderPassDrawQuads) { - FakeImplTaskRunnerProvider task_runner_provider; - TestTaskGraphRunner task_graph_runner; - std::unique_ptr<LayerTreeFrameSink> layer_tree_frame_sink = - FakeLayerTreeFrameSink::Create3d(); - FakeLayerTreeHostImpl host_impl(&task_runner_provider, &task_graph_runner); - // Set a big enough viewport to show the entire render pass. - host_impl.active_tree()->SetDeviceViewportSize(gfx::Size(1000, 1000)); - - std::unique_ptr<LayerImpl> root_layer = - LayerImpl::Create(host_impl.active_tree(), 1); - - int owning_layer_id = 2; - std::unique_ptr<LayerImpl> owning_layer = - LayerImpl::Create(host_impl.active_tree(), owning_layer_id); - - int mask_layer_id = 3; - std::unique_ptr<FakePictureLayerImplForRenderSurfaceTest> mask_layer = - FakePictureLayerImplForRenderSurfaceTest::CreateMask( - host_impl.active_tree(), mask_layer_id); - mask_layer->SetBounds(gfx::Size(200, 100)); - mask_layer->SetDrawsContent(true); - std::vector<gfx::Rect> quad_rects; - quad_rects.push_back(gfx::Rect(0, 0, 100, 100)); - quad_rects.push_back(gfx::Rect(100, 0, 100, 100)); - mask_layer->SetQuadRectsForTesting(quad_rects); - - owning_layer->SetBounds(gfx::Size(200, 100)); - owning_layer->SetDrawsContent(true); - owning_layer->test_properties()->SetMaskLayer(std::move(mask_layer)); - root_layer->test_properties()->AddChild(std::move(owning_layer)); - host_impl.active_tree()->SetRootLayerForTesting(std::move(root_layer)); - host_impl.SetVisible(true); - host_impl.InitializeFrameSink(layer_tree_frame_sink.get()); - host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); - host_impl.active_tree()->UpdateDrawProperties(); - - ASSERT_TRUE( - GetRenderSurface(host_impl.active_tree()->LayerById(owning_layer_id))); - RenderSurfaceImpl* render_surface = - GetRenderSurface(host_impl.active_tree()->LayerById(owning_layer_id)); - - gfx::Rect content_rect(0, 0, 200, 100); - gfx::Rect occluded(0, 0, 100, 100); - - render_surface->SetContentRectForTesting(content_rect); - render_surface->set_occlusion_in_content_space( - Occlusion(gfx::Transform(), SimpleEnclosedRegion(occluded), - SimpleEnclosedRegion(occluded))); - - std::unique_ptr<viz::RenderPass> render_pass = viz::RenderPass::Create(); - AppendQuadsData append_quads_data; - - render_surface->AppendQuads(DRAW_MODE_HARDWARE, render_pass.get(), - &append_quads_data); - - ASSERT_EQ(1u, render_pass->shared_quad_state_list.size()); - viz::SharedQuadState* shared_quad_state = - render_pass->shared_quad_state_list.front(); - - EXPECT_EQ(content_rect, - gfx::Rect(shared_quad_state->visible_quad_layer_rect)); - - // The quad (0, 0, 100, 100) is occluded and should be dropped. - ASSERT_EQ(1u, render_pass->quad_list.size()); - EXPECT_EQ(gfx::Rect(100, 0, 100, 100).ToString(), - render_pass->quad_list.front()->rect.ToString()); -} - TEST(RenderSurfaceTest, SanityCheckSurfaceIgnoreMaskLayerOcclusion) { FakeImplTaskRunnerProvider task_runner_provider; TestTaskGraphRunner task_graph_runner; @@ -328,7 +261,11 @@ std::unique_ptr<FakePictureLayerImplForRenderSurfaceTest> mask_layer = FakePictureLayerImplForRenderSurfaceTest::CreateMask( host_impl.active_tree(), mask_layer_id); + mask_layer->SetBounds(gfx::Size(200, 100)); + scoped_refptr<FakeRasterSource> raster_source( + FakeRasterSource::CreateFilled(mask_layer->bounds())); + mask_layer->SetRasterSourceOnActive(raster_source, Region()); mask_layer->SetDrawsContent(true); std::vector<gfx::Rect> quad_rects; quad_rects.push_back(gfx::Rect(0, 0, 100, 100)); @@ -345,10 +282,9 @@ host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); host_impl.active_tree()->UpdateDrawProperties(); - ASSERT_TRUE( - GetRenderSurface(host_impl.active_tree()->LayerById(owning_layer_id))); RenderSurfaceImpl* render_surface = GetRenderSurface(host_impl.active_tree()->LayerById(owning_layer_id)); + ASSERT_TRUE(render_surface); gfx::Rect content_rect(0, 0, 200, 100); gfx::Rect occluded(0, 0, 200, 100); @@ -373,14 +309,9 @@ EXPECT_EQ(content_rect, gfx::Rect(shared_quad_state->visible_quad_layer_rect)); - - // Neither of the two quads should be occluded since mask occlusion is - // ignored. - ASSERT_EQ(2u, render_pass->quad_list.size()); - EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), + ASSERT_EQ(1u, render_pass->quad_list.size()); + EXPECT_EQ(gfx::Rect(0, 0, 200, 100).ToString(), render_pass->quad_list.front()->rect.ToString()); - EXPECT_EQ(gfx::Rect(100, 0, 100, 100).ToString(), - render_pass->quad_list.back()->rect.ToString()); } } // namespace
diff --git a/cc/test/fake_picture_layer.cc b/cc/test/fake_picture_layer.cc index e1f7440..c4ac536 100644 --- a/cc/test/fake_picture_layer.cc +++ b/cc/test/fake_picture_layer.cc
@@ -30,12 +30,8 @@ case Layer::LayerMaskType::NOT_MASK: layer_impl = FakePictureLayerImpl::Create(tree_impl, id()); break; - case Layer::LayerMaskType::MULTI_TEXTURE_MASK: - layer_impl = FakePictureLayerImpl::CreateMask(tree_impl, id()); - break; case Layer::LayerMaskType::SINGLE_TEXTURE_MASK: - layer_impl = - FakePictureLayerImpl::CreateSingleTextureMask(tree_impl, id()); + layer_impl = FakePictureLayerImpl::CreateMask(tree_impl, id()); break; default: NOTREACHED();
diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc index d6b54221..83f0e93 100644 --- a/cc/test/fake_picture_layer_impl.cc +++ b/cc/test/fake_picture_layer_impl.cc
@@ -107,6 +107,19 @@ pending_paint_worklet_records); } +void FakePictureLayerImpl::SetRasterSourceOnActive( + scoped_refptr<RasterSource> raster_source, + const Region& invalidation) { + DCHECK(layer_tree_impl()->IsActiveTree()); + Region invalidation_temp = invalidation; + const PictureLayerTilingSet* pending_set = nullptr; + const PaintWorkletRecordMap* pending_paint_worklet_records = nullptr; + set_gpu_raster_max_texture_size( + layer_tree_impl()->GetDeviceViewport().size()); + UpdateRasterSource(raster_source, &invalidation_temp, pending_set, + pending_paint_worklet_records); +} + void FakePictureLayerImpl::CreateAllTiles() { for (size_t i = 0; i < num_tilings(); ++i) tilings_->tiling_at(i)->CreateAllTilesForTesting();
diff --git a/cc/test/fake_picture_layer_impl.h b/cc/test/fake_picture_layer_impl.h index 703821cd..f2139ac 100644 --- a/cc/test/fake_picture_layer_impl.h +++ b/cc/test/fake_picture_layer_impl.h
@@ -28,13 +28,6 @@ static std::unique_ptr<FakePictureLayerImpl> CreateMask( LayerTreeImpl* tree_impl, int id) { - Layer::LayerMaskType mask_type = Layer::LayerMaskType::MULTI_TEXTURE_MASK; - return base::WrapUnique(new FakePictureLayerImpl(tree_impl, id, mask_type)); - } - - static std::unique_ptr<FakePictureLayerImpl> CreateSingleTextureMask( - LayerTreeImpl* tree_impl, - int id) { Layer::LayerMaskType mask_type = Layer::LayerMaskType::SINGLE_TEXTURE_MASK; return base::WrapUnique(new FakePictureLayerImpl(tree_impl, id, mask_type)); } @@ -66,16 +59,6 @@ LayerTreeImpl* tree_impl, int id, scoped_refptr<RasterSource> raster_source) { - Layer::LayerMaskType mask_type = Layer::LayerMaskType::MULTI_TEXTURE_MASK; - return base::WrapUnique( - new FakePictureLayerImpl(tree_impl, id, raster_source, mask_type)); - } - - static std::unique_ptr<FakePictureLayerImpl> - CreateSingleTextureMaskWithRasterSource( - LayerTreeImpl* tree_impl, - int id, - scoped_refptr<RasterSource> raster_source) { Layer::LayerMaskType mask_type = Layer::LayerMaskType::SINGLE_TEXTURE_MASK; return base::WrapUnique( new FakePictureLayerImpl(tree_impl, id, raster_source, mask_type)); @@ -132,6 +115,8 @@ RasterSource* raster_source() { return raster_source_.get(); } void SetRasterSourceOnPending(scoped_refptr<RasterSource> raster_source, const Region& invalidation); + void SetRasterSourceOnActive(scoped_refptr<RasterSource> raster_source, + const Region& invalidation); size_t append_quads_count() { return append_quads_count_; } const Region& invalidation() const { return invalidation_; }
diff --git a/cc/test/test_layer_tree_host_base.cc b/cc/test/test_layer_tree_host_base.cc index 2ab007ed..8210330 100644 --- a/cc/test/test_layer_tree_host_base.cc +++ b/cc/test/test_layer_tree_host_base.cc
@@ -119,10 +119,6 @@ pending_layer = FakePictureLayerImpl::Create(pending_tree, id_); break; case Layer::LayerMaskType::SINGLE_TEXTURE_MASK: - pending_layer = - FakePictureLayerImpl::CreateSingleTextureMask(pending_tree, id_); - break; - case Layer::LayerMaskType::MULTI_TEXTURE_MASK: pending_layer = FakePictureLayerImpl::CreateMask(pending_tree, id_); break; default:
diff --git a/cc/trees/layer_tree_host_pixeltest_blending.cc b/cc/trees/layer_tree_host_pixeltest_blending.cc index 14b5db5..bc1e6c5 100644 --- a/cc/trees/layer_tree_host_pixeltest_blending.cc +++ b/cc/trees/layer_tree_host_pixeltest_blending.cc
@@ -132,7 +132,7 @@ gfx::Size bounds = layer->bounds(); scoped_refptr<PictureImageLayer> mask = PictureImageLayer::Create(); mask->SetIsDrawable(true); - mask->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); + mask->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK); mask->SetBounds(bounds); sk_sp<SkSurface> surface =
diff --git a/cc/trees/layer_tree_host_pixeltest_masks.cc b/cc/trees/layer_tree_host_pixeltest_masks.cc index 8c7abdd9..930c38c0 100644 --- a/cc/trees/layer_tree_host_pixeltest_masks.cc +++ b/cc/trees/layer_tree_host_pixeltest_masks.cc
@@ -30,8 +30,7 @@ const std::vector<PixelResourceTestCase>& test_cases) { return ::testing::Combine( ::testing::ValuesIn(test_cases), - ::testing::Values(Layer::LayerMaskType::SINGLE_TEXTURE_MASK, - Layer::LayerMaskType::MULTI_TEXTURE_MASK)); + ::testing::Values(Layer::LayerMaskType::SINGLE_TEXTURE_MASK)); } // TODO(crbug.com/963446): Enable these tests for Vulkan.
diff --git a/cc/trees/layer_tree_host_unittest_masks.cc b/cc/trees/layer_tree_host_unittest_masks.cc index b0a8b0c9..3870aba 100644 --- a/cc/trees/layer_tree_host_unittest_masks.cc +++ b/cc/trees/layer_tree_host_unittest_masks.cc
@@ -50,7 +50,7 @@ gfx::Size mask_size(100, 100); mask_layer->SetBounds(mask_size); - mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); + mask_layer->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK); mask_layer_id_ = mask_layer->id(); layer_tree_host()->SetRootLayer(root); @@ -89,21 +89,9 @@ render_pass_quad->rect); EXPECT_EQ(gfx::Rect(0, 0, 50, 50).ToString(), rect_in_target_space.ToString()); - if (host_impl->settings().enable_mask_tiling) { - PictureLayerImpl* mask_layer_impl = static_cast<PictureLayerImpl*>( - host_impl->active_tree()->LayerById(mask_layer_id_)); - gfx::SizeF texture_size( - mask_layer_impl->CalculateTileSize(mask_layer_impl->bounds())); - EXPECT_EQ( - gfx::RectF(50.f / texture_size.width(), 50.f / texture_size.height(), - 50.f / texture_size.width(), 50.f / texture_size.height()) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } else { - EXPECT_EQ(gfx::ScaleRect(gfx::RectF(50.f, 50.f, 50.f, 50.f), 1.f / 100.f) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } + EXPECT_EQ(gfx::ScaleRect(gfx::RectF(50.f, 50.f, 50.f, 50.f), 1.f / 100.f) + .ToString(), + render_pass_quad->mask_uv_rect.ToString()); EndTest(); return draw_result; } @@ -114,27 +102,8 @@ FakeContentLayerClient client_; }; -class LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin_Untiled - : public LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = false; - } -}; - SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin_Untiled); - -class LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin_Tiled - : public LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin_Tiled); + LayerTreeTestMaskLayerForSurfaceWithContentRectNotAtOrigin); class LayerTreeTestMaskLayerForSurfaceWithClippedLayer : public LayerTreeTest { protected: @@ -191,7 +160,7 @@ gfx::Size mask_size(50, 50); mask_layer->SetBounds(mask_size); - mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); + mask_layer->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK); mask_layer_id_ = mask_layer->id(); layer_tree_host()->SetRootLayer(root); @@ -226,21 +195,9 @@ // coords in the mask are scaled by 10/50 and 20/50. // The surface is clipped to (20,10) so the mask texture coords are offset // by 20/50 and 10/50 - if (host_impl->settings().enable_mask_tiling) { - PictureLayerImpl* mask_layer_impl = static_cast<PictureLayerImpl*>( - host_impl->active_tree()->LayerById(mask_layer_id_)); - gfx::SizeF texture_size( - mask_layer_impl->CalculateTileSize(mask_layer_impl->bounds())); - EXPECT_EQ( - gfx::RectF(20.f / texture_size.width(), 10.f / texture_size.height(), - 10.f / texture_size.width(), 20.f / texture_size.height()) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } else { - EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 50.f) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } + EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 50.f) + .ToString(), + render_pass_quad->mask_uv_rect.ToString()); EndTest(); return draw_result; } @@ -251,27 +208,8 @@ FakeContentLayerClient client_; }; -class LayerTreeTestMaskLayerForSurfaceWithClippedLayer_Untiled - : public LayerTreeTestMaskLayerForSurfaceWithClippedLayer { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = false; - } -}; - SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithClippedLayer_Untiled); - -class LayerTreeTestMaskLayerForSurfaceWithClippedLayer_Tiled - : public LayerTreeTestMaskLayerForSurfaceWithClippedLayer { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithClippedLayer_Tiled); + LayerTreeTestMaskLayerForSurfaceWithClippedLayer); class LayerTreeTestMaskLayerForSurfaceWithDifferentScale : public LayerTreeTest { @@ -333,7 +271,7 @@ gfx::Size mask_size(50, 50); mask_layer->SetBounds(mask_size); - mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); + mask_layer->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK); // Setting will change transform on mask layer will make it not adjust // raster scale, which will remain 1. This means the mask_layer and render // surface will have a scale of 2 during draw time. @@ -378,21 +316,9 @@ // coords in the mask are scaled by 10/50 and 20/50. // The surface is clipped to (20,10) so the mask texture coords are offset // by 20/50 and 10/50 - if (host_impl->settings().enable_mask_tiling) { - PictureLayerImpl* mask_layer_impl = static_cast<PictureLayerImpl*>( - host_impl->active_tree()->LayerById(mask_layer_id_)); - gfx::SizeF texture_size( - mask_layer_impl->CalculateTileSize(mask_layer_impl->bounds())); - EXPECT_EQ( - gfx::RectF(20.f / texture_size.width(), 10.f / texture_size.height(), - 10.f / texture_size.width(), 20.f / texture_size.height()) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } else { - EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 50.f) - .ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } + EXPECT_EQ(gfx::ScaleRect(gfx::RectF(20.f, 10.f, 10.f, 20.f), 1.f / 50.f) + .ToString(), + render_pass_quad->mask_uv_rect.ToString()); EndTest(); return draw_result; } @@ -403,27 +329,8 @@ FakeContentLayerClient client_; }; -class LayerTreeTestMaskLayerForSurfaceWithDifferentScale_Untiled - : public LayerTreeTestMaskLayerForSurfaceWithDifferentScale { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = false; - } -}; - SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithDifferentScale_Untiled); - -class LayerTreeTestMaskLayerForSurfaceWithDifferentScale_Tiled - : public LayerTreeTestMaskLayerForSurfaceWithDifferentScale { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskLayerForSurfaceWithDifferentScale_Tiled); + LayerTreeTestMaskLayerForSurfaceWithDifferentScale); class LayerTreeTestMaskLayerWithScaling : public LayerTreeTest { protected: @@ -471,7 +378,7 @@ content_layer->SetBounds(scaling_layer_size); mask_layer->SetBounds(scaling_layer_size); - mask_layer->SetLayerMaskType(Layer::LayerMaskType::MULTI_TEXTURE_MASK); + mask_layer->SetLayerMaskType(Layer::LayerMaskType::SINGLE_TEXTURE_MASK); layer_tree_host()->SetRootLayer(root); LayerTreeTest::SetupTree(); @@ -495,34 +402,25 @@ root_pass->quad_list.front()->material); const viz::RenderPassDrawQuad* render_pass_quad = viz::RenderPassDrawQuad::MaterialCast(root_pass->quad_list.front()); + gfx::Rect rect_in_target_space = MathUtil::MapEnclosingClippedRect( + render_pass_quad->shared_quad_state->quad_to_target_transform, + render_pass_quad->rect); switch (host_impl->active_tree()->source_frame_number()) { case 0: // Check that the tree scaling is correctly taken into account for the // mask, that should fully map onto the quad. EXPECT_EQ(gfx::Rect(0, 0, 100, 100).ToString(), - render_pass_quad->rect.ToString()); - if (host_impl->settings().enable_mask_tiling) { - EXPECT_EQ( - gfx::RectF(0.f, 0.f, 100.f / 128.f, 100.f / 128.f).ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } else { - EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } + rect_in_target_space.ToString()); + EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), + render_pass_quad->mask_uv_rect.ToString()); break; case 1: // Applying a DSF should change the render surface size, but won't // affect which part of the mask is used. EXPECT_EQ(gfx::Rect(0, 0, 200, 200).ToString(), - render_pass_quad->rect.ToString()); - if (host_impl->settings().enable_mask_tiling) { - EXPECT_EQ( - gfx::RectF(0.f, 0.f, 100.f / 128.f, 100.f / 128.f).ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } else { - EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), - render_pass_quad->mask_uv_rect.ToString()); - } + rect_in_target_space.ToString()); + EXPECT_EQ(gfx::RectF(0.f, 0.f, 1.f, 1.f).ToString(), + render_pass_quad->mask_uv_rect.ToString()); EndTest(); break; } @@ -544,27 +442,7 @@ FakeContentLayerClient client_; }; -class LayerTreeTestMaskLayerWithScaling_Untiled - : public LayerTreeTestMaskLayerWithScaling { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = false; - settings->layer_transforms_should_scale_layer_contents = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeTestMaskLayerWithScaling_Untiled); - -class LayerTreeTestMaskLayerWithScaling_Tiled - : public LayerTreeTestMaskLayerWithScaling { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = true; - settings->layer_transforms_should_scale_layer_contents = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeTestMaskLayerWithScaling_Tiled); +SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeTestMaskLayerWithScaling); class LayerTreeTestMaskWithNonExactTextureSize : public LayerTreeTest { protected: @@ -642,26 +520,7 @@ FakeContentLayerClient client_; }; -class LayerTreeTestMaskWithNonExactTextureSize_Untiled - : public LayerTreeTestMaskWithNonExactTextureSize { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = false; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F( - LayerTreeTestMaskWithNonExactTextureSize_Untiled); - -class LayerTreeTestMaskWithNonExactTextureSize_Tiled - : public LayerTreeTestMaskWithNonExactTextureSize { - public: - void InitializeSettings(LayerTreeSettings* settings) override { - settings->enable_mask_tiling = true; - } -}; - -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeTestMaskWithNonExactTextureSize_Tiled); +SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeTestMaskWithNonExactTextureSize); } // namespace } // namespace cc
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h index 092fb1b..e2db0f24 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h
@@ -97,8 +97,6 @@ bool use_rgba_4444 = false; bool unpremultiply_and_dither_low_bit_depth_tiles = false; - bool enable_mask_tiling = true; - // If set to true, the compositor may selectively defer image decodes to the // Image Decode Service and raster tiles without images until the decode is // ready.
diff --git a/chrome/VERSION b/chrome/VERSION index 9acf9b3..f358afb7 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=77 MINOR=0 -BUILD=3840 +BUILD=3842 PATCH=0
diff --git a/chrome/android/chrome_test_java_sources.gni b/chrome/android/chrome_test_java_sources.gni index d21d763..d45c593 100644 --- a/chrome/android/chrome_test_java_sources.gni +++ b/chrome/android/chrome_test_java_sources.gni
@@ -460,7 +460,6 @@ "javatests/src/org/chromium/chrome/browser/tabmodel/TestTabModelDirectory.java", "javatests/src/org/chromium/chrome/browser/tabmodel/UndoTabModelTest.java", "javatests/src/org/chromium/chrome/browser/tasks/ReturnToChromeTest.java", - "javatests/src/org/chromium/chrome/browser/test/ChromeBrowserTestRule.java", "javatests/src/org/chromium/chrome/browser/test/CommandLineInitRule.java", "javatests/src/org/chromium/chrome/browser/test/ScreenShooter.java", "javatests/src/org/chromium/chrome/browser/toolbar/LocationBarModelTest.java",
diff --git a/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_bottom_sheet_content.xml b/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_bottom_sheet_content.xml index 1496545..103c3c00 100644 --- a/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_bottom_sheet_content.xml +++ b/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_bottom_sheet_content.xml
@@ -3,7 +3,6 @@ Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. --> <LinearLayout - xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/autofill_assistant" android:clickable="true" @@ -11,44 +10,6 @@ android:layout_width="match_parent" android:paddingTop="12dp" android:orientation="vertical"> - <LinearLayout - android:id="@+id/header" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="56dp" - android:gravity="center_vertical" - android:orientation="horizontal" - android:paddingStart="19dp" - android:paddingEnd="24dp"> - <TextView - android:id="@+id/status_message" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1.0" - android:gravity="center_vertical" - android:paddingStart="14dp" - android:paddingEnd="24dp" - android:maxLines="4" - android:ellipsize="end" - android:textAppearance="@style/TextAppearance.AssistantBlackTitle"/> - - <org.chromium.ui.widget.ChromeImageView - android:id="@+id/profile_image" - android:layout_width="24dp" - android:layout_height="24dp" - android:contentDescription="@string/preferences" - app:srcCompat="@drawable/logo_avatar_anonymous"/> - </LinearLayout> - - <org.chromium.chrome.browser.widget.MaterialProgressBar - android:id="@+id/progress_bar" - android:layout_width="match_parent" - android:layout_height="@dimen/autofill_assistant_progress_bar_height" - android:layout_marginStart="@dimen/autofill_assistant_bottombar_horizontal_spacing" - android:layout_marginEnd="@dimen/autofill_assistant_bottombar_horizontal_spacing" - app:colorBackground="@color/modern_secondary_color" - app:colorProgress="@color/default_text_color_blue"/> - <org.chromium.chrome.browser.widget.FadingEdgeScrollView android:id="@+id/scrollable_content" android:layout_width="match_parent"
diff --git a/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_header.xml b/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_header.xml new file mode 100644 index 0000000..09fe8c3 --- /dev/null +++ b/chrome/android/features/autofill_assistant/java/res/layout/autofill_assistant_header.xml
@@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/header" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="56dp" + android:gravity="center_vertical" + android:orientation="horizontal" + android:paddingStart="19dp" + android:paddingEnd="24dp"> + <TextView + android:id="@+id/status_message" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="1.0" + android:gravity="center_vertical" + android:paddingStart="14dp" + android:paddingEnd="24dp" + android:maxLines="4" + android:ellipsize="end" + android:textAppearance="@style/TextAppearance.AssistantBlackTitle"/> + + <org.chromium.ui.widget.ChromeImageView + android:id="@+id/profile_image" + android:layout_width="24dp" + android:layout_height="24dp" + android:contentDescription="@string/preferences" + app:srcCompat="@drawable/logo_avatar_anonymous"/> + </LinearLayout> + + <org.chromium.chrome.browser.widget.MaterialProgressBar + android:id="@+id/progress_bar" + android:layout_width="match_parent" + android:layout_height="2dp" + android:layout_marginStart="@dimen/autofill_assistant_bottombar_horizontal_spacing" + android:layout_marginEnd="@dimen/autofill_assistant_bottombar_horizontal_spacing" + app:colorBackground="@color/modern_secondary_color" + app:colorProgress="@color/default_text_color_blue"/> +</LinearLayout> \ No newline at end of file
diff --git a/chrome/android/features/autofill_assistant/java/res/values-v17/dimens.xml b/chrome/android/features/autofill_assistant/java/res/values-v17/dimens.xml index 29f0a6d7..fac59b8 100644 --- a/chrome/android/features/autofill_assistant/java/res/values-v17/dimens.xml +++ b/chrome/android/features/autofill_assistant/java/res/values-v17/dimens.xml
@@ -19,7 +19,6 @@ <dimen name="autofill_assistant_actions_spacing">8dp</dimen> <dimen name="autofill_assistant_actions_shadow_width">8dp</dimen> <dimen name="autofill_assistant_actions_gradient_width">160dp</dimen> - <dimen name="autofill_assistant_progress_bar_height">2dp</dimen> <dimen name="autofill_assistant_toolbar_vertical_padding">8dp</dimen> <dimen name="autofill_assistant_toolbar_swipe_handle_height">4dp</dimen> <dimen name="autofill_assistant_choicelist_edit_button_size">20dp</dimen>
diff --git a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantBottomBarCoordinator.java b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantBottomBarCoordinator.java index 1396985..ac3e29a 100644 --- a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantBottomBarCoordinator.java +++ b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantBottomBarCoordinator.java
@@ -102,8 +102,7 @@ setupAnimations(model, rootView); // Instantiate child components. - mHeaderCoordinator = - new AssistantHeaderCoordinator(activity, bottomBarView, model.getHeaderModel()); + mHeaderCoordinator = new AssistantHeaderCoordinator(activity, model.getHeaderModel()); mInfoBoxCoordinator = new AssistantInfoBoxCoordinator(activity, model.getInfoBoxModel()); mDetailsCoordinator = new AssistantDetailsCoordinator(activity, model.getDetailsModel()); mPaymentRequestCoordinator = @@ -115,8 +114,9 @@ new AssistantActionsCarouselCoordinator(activity, model.getActionsModel()); BottomSheet bottomSheet = controller.getBottomSheet(); mPeekHeightCoordinator = new AssistantPeekHeightCoordinator(activity, this, bottomSheet, - mContent.getToolbarView(), bottomBarView, mSuggestionsCoordinator.getView(), - mActionsCoordinator.getView(), AssistantPeekHeightCoordinator.PeekMode.HANDLE); + mContent.getToolbarView(), mHeaderCoordinator.getView(), + mSuggestionsCoordinator.getView(), mActionsCoordinator.getView(), + AssistantPeekHeightCoordinator.PeekMode.HANDLE); // We don't want to animate the carousels children views as they are already animated by the // recyclers ItemAnimator, so we exclude them to avoid a clash between the animations. @@ -125,6 +125,7 @@ // Add child views to bottom bar container. We put all child views in the scrollable // container, except the actions and suggestions. + bottomBarView.addView(mHeaderCoordinator.getView(), 0); scrollableContentContainer.addView(mInfoBoxCoordinator.getView()); scrollableContentContainer.addView(mDetailsCoordinator.getView()); scrollableContentContainer.addView(mPaymentRequestCoordinator.getView());
diff --git a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantPeekHeightCoordinator.java b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantPeekHeightCoordinator.java index febad9a..f6a8822b 100644 --- a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantPeekHeightCoordinator.java +++ b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/AssistantPeekHeightCoordinator.java
@@ -59,7 +59,6 @@ private final int mToolbarHeightWithoutPaddingBottom; private final int mDefaultToolbarPaddingBottom; - private final int mProgressBarHeight; private final int mChildrenVerticalSpacing; private final int mSuggestionsVerticalInset; @@ -68,10 +67,9 @@ private int mHeaderHeight; private int mSuggestionsHeight; private int mActionsHeight; - private int mToolbarPaddingBottom; AssistantPeekHeightCoordinator(Context context, Delegate delegate, BottomSheet bottomSheet, - View toolbarView, View contentView, View suggestionsView, View actionsView, + View toolbarView, View headerView, View suggestionsView, View actionsView, @PeekMode int initialMode) { mToolbarView = toolbarView; mDelegate = delegate; @@ -84,8 +82,6 @@ R.dimen.autofill_assistant_toolbar_swipe_handle_height); mDefaultToolbarPaddingBottom = context.getResources().getDimensionPixelSize( R.dimen.autofill_assistant_toolbar_vertical_padding); - mProgressBarHeight = context.getResources().getDimensionPixelSize( - R.dimen.autofill_assistant_progress_bar_height); mChildrenVerticalSpacing = context.getResources().getDimensionPixelSize( R.dimen.autofill_assistant_bottombar_vertical_spacing); mSuggestionsVerticalInset = @@ -101,11 +97,10 @@ // Listen for height changes in the header and carousel to make sure we always have the // correct peek height. - View header = contentView.findViewById(R.id.header); - mHeaderHeight = header.getHeight(); + mHeaderHeight = headerView.getHeight(); mSuggestionsHeight = suggestionsView.getHeight(); mActionsHeight = actionsView.getHeight(); - listenForHeightChange(header, this::onHeaderHeightChanged); + listenForHeightChange(headerView, this::onHeaderHeightChanged); listenForHeightChange(suggestionsView, this::onSuggestionsHeightChanged); listenForHeightChange(actionsView, this::onActionsHeightChanged); @@ -171,22 +166,23 @@ * Adapt the padding top of the toolbar such that header and carousel are visible if desired. */ private void updateToolbarPadding() { + int toolbarPaddingBottom; switch (mPeekMode) { case PeekMode.HANDLE: - mToolbarPaddingBottom = mDefaultToolbarPaddingBottom; + toolbarPaddingBottom = mDefaultToolbarPaddingBottom; break; case PeekMode.HANDLE_HEADER: - mToolbarPaddingBottom = mHeaderHeight + mProgressBarHeight; + toolbarPaddingBottom = mHeaderHeight; break; case PeekMode.HANDLE_HEADER_CAROUSELS: - mToolbarPaddingBottom = mHeaderHeight + mProgressBarHeight; + toolbarPaddingBottom = mHeaderHeight; if (mSuggestionsHeight > 0) { - mToolbarPaddingBottom += mSuggestionsHeight + mChildrenVerticalSpacing + toolbarPaddingBottom += mSuggestionsHeight + mChildrenVerticalSpacing - 2 * mSuggestionsVerticalInset; } if (mActionsHeight > 0) { - mToolbarPaddingBottom += mActionsHeight; + toolbarPaddingBottom += mActionsHeight; } // We decrease the artificial padding we add to the toolbar by 1 pixel to make sure @@ -196,16 +192,16 @@ // shown. An alternative would be to allow toolbarHeight == contentHeight and try to // detect swipe/touch events on the sheet, but this alternative is more complex and // feels less safe than the current workaround. - mToolbarPaddingBottom -= 1; + toolbarPaddingBottom -= 1; break; default: throw new IllegalStateException("Unsupported PeekMode: " + mPeekMode); } mToolbarView.setPadding(mToolbarView.getPaddingLeft(), mToolbarView.getPaddingTop(), - mToolbarView.getPaddingRight(), mToolbarPaddingBottom); + mToolbarView.getPaddingRight(), toolbarPaddingBottom); - int newHeight = mToolbarHeightWithoutPaddingBottom + mToolbarPaddingBottom; + int newHeight = mToolbarHeightWithoutPaddingBottom + toolbarPaddingBottom; if (mPeekHeight != newHeight) { mPeekHeight = newHeight; mDelegate.onPeekHeightChanged();
diff --git a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderCoordinator.java b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderCoordinator.java index be9cbe54..0313420 100644 --- a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderCoordinator.java +++ b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderCoordinator.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.autofill_assistant.header; import android.content.Context; +import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; @@ -22,31 +23,33 @@ */ public class AssistantHeaderCoordinator implements ProfileDataCache.Observer { private final ProfileDataCache mProfileCache; + private final ViewGroup mView; private final ImageView mProfileView; private final String mSignedInAccountName; - public AssistantHeaderCoordinator( - Context context, ViewGroup bottomBarView, AssistantHeaderModel model) { + public AssistantHeaderCoordinator(Context context, AssistantHeaderModel model) { // Create the poodle and insert it before the status message. We have to create a view // bigger than the desired poodle size (24dp) because the actual downstream implementation // needs extra space for the animation. + mView = (ViewGroup) LayoutInflater.from(context).inflate( + R.layout.autofill_assistant_header, /* root= */ null); AnimatedPoodle poodle = new AnimatedPoodle(context, context.getResources().getDimensionPixelSize( R.dimen.autofill_assistant_poodle_view_size), context.getResources().getDimensionPixelSize( R.dimen.autofill_assistant_poodle_size)); - addPoodle(bottomBarView, poodle.getView()); + addPoodle(mView, poodle.getView()); int imageSize = context.getResources().getDimensionPixelSize( R.dimen.autofill_assistant_profile_size); mProfileCache = new ProfileDataCache(context, imageSize); - mProfileView = bottomBarView.findViewById(R.id.profile_image); + mProfileView = mView.findViewById(R.id.profile_image); mSignedInAccountName = ChromeSigninController.get().getSignedInAccountName(); - setupProfileImage(context, bottomBarView); + setupProfileImage(); // Bind view and mediator through the model. AssistantHeaderViewBinder.ViewHolder viewHolder = - new AssistantHeaderViewBinder.ViewHolder(context, bottomBarView, poodle); + new AssistantHeaderViewBinder.ViewHolder(context, mView, poodle); AssistantHeaderViewBinder viewBinder = new AssistantHeaderViewBinder(); PropertyModelChangeProcessor.create(model, viewHolder, viewBinder); @@ -61,6 +64,11 @@ setProfileImageFor(mSignedInAccountName); } + /** Return the view associated to this coordinator. */ + public View getView() { + return mView; + } + /** * Cleanup resources when this goes out of scope. */ @@ -70,14 +78,14 @@ } } - private void addPoodle(ViewGroup root, View poodleView) { + private void addPoodle(View root, View poodleView) { View statusMessage = root.findViewById(R.id.status_message); ViewGroup parent = (ViewGroup) statusMessage.getParent(); parent.addView(poodleView, parent.indexOfChild(statusMessage)); } // TODO(b/130415092): Use image from AGSA if chrome is not signed in. - private void setupProfileImage(Context context, ViewGroup root) { + private void setupProfileImage() { if (mSignedInAccountName != null) { mProfileCache.addObserver(this); mProfileCache.update(Collections.singletonList(mSignedInAccountName));
diff --git a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderViewBinder.java b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderViewBinder.java index 8e6fc00..630d643 100644 --- a/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderViewBinder.java +++ b/chrome/android/features/autofill_assistant/java/src/org/chromium/chrome/browser/autofill_assistant/header/AssistantHeaderViewBinder.java
@@ -45,13 +45,13 @@ @Nullable TextBubble mTextBubble; - public ViewHolder(Context context, View bottomBarView, AnimatedPoodle poodle) { + public ViewHolder(Context context, ViewGroup headerView, AnimatedPoodle poodle) { mContext = context; mPoodle = poodle; - mHeader = bottomBarView.findViewById(R.id.header); - mStatusMessage = bottomBarView.findViewById(R.id.status_message); - mProgressBar = new AnimatedProgressBar(bottomBarView.findViewById(R.id.progress_bar)); - mProfileIconView = bottomBarView.findViewById(R.id.profile_image); + mHeader = headerView; + mStatusMessage = headerView.findViewById(R.id.status_message); + mProgressBar = new AnimatedProgressBar(headerView.findViewById(R.id.progress_bar)); + mProfileIconView = headerView.findViewById(R.id.profile_image); mProfileIconMenu = new PopupMenu(context, mProfileIconView); mProfileIconMenu.inflate(R.menu.profile_icon_menu); mProfileIconView.setOnClickListener(unusedView -> mProfileIconMenu.show()); @@ -110,8 +110,9 @@ int viewType = AssistantChipViewHolder.getViewType(chip); // If there is already a chip in the header but with incompatible type, remove it. + ViewGroup parent = (ViewGroup) view.mStatusMessage.getParent(); if (view.mChip != null && view.mChip.getType() != viewType) { - view.mHeader.removeView(view.mChip.getView()); + parent.removeView(view.mChip.getView()); view.mChip = null; } @@ -119,7 +120,7 @@ // header. if (view.mChip == null) { view.mChip = AssistantChipViewHolder.create(view.mHeader, viewType); - view.mHeader.addView(view.mChip.getView()); + parent.addView(view.mChip.getView()); } // Bind the chip to the view.
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 4518f58..9ed750be 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/IntentHandlerTest.java
@@ -28,9 +28,9 @@ import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Feature; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; import org.chromium.chrome.browser.test.CommandLineInitRule; import org.chromium.chrome.browser.util.UrlConstants; +import org.chromium.chrome.test.ChromeBrowserTestRule; import java.util.ArrayList; import java.util.List;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java index 7d10086..cfdaf62d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/WarmupManagerTest.java
@@ -24,7 +24,7 @@ import org.chromium.chrome.R; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.UiThreadTaskTraits; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContentsObserver;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java index 3601a5d..3075b6a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/accessibility/FontSizePrefsTest.java
@@ -19,7 +19,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.accessibility.FontSizePrefs.FontSizePrefsObserver; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java index f8093fb..9a28a09 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/PersonalDataManagerTest.java
@@ -17,7 +17,7 @@ import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import java.util.LinkedList; import java.util.List;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkBridgeTest.java index 52df5ab..d8ebef6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkBridgeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkBridgeTest.java
@@ -20,7 +20,7 @@ import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.BookmarkTestUtil; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkModelTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkModelTest.java index 8334384..34ed6ea 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkModelTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/BookmarkModelTest.java
@@ -20,7 +20,7 @@ import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.bookmarks.BookmarkBridge.BookmarkItem; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.BookmarkTestUtil; import org.chromium.components.bookmarks.BookmarkId; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/dynamicmodule/CustomTabsDynamicModuleLoaderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/dynamicmodule/CustomTabsDynamicModuleLoaderTest.java index 7a6d65a1..3a75f8d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/dynamicmodule/CustomTabsDynamicModuleLoaderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/dynamicmodule/CustomTabsDynamicModuleLoaderTest.java
@@ -29,7 +29,7 @@ import org.chromium.base.library_loader.LibraryProcessType; import org.chromium.base.test.util.CallbackHelper; import org.chromium.chrome.browser.customtabs.dynamicmodule.CustomTabsDynamicModuleTestUtils.FakeDexInputStreamProvider; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import java.util.ArrayList;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/datareduction/DataReductionPromoUtilsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/datareduction/DataReductionPromoUtilsTest.java index 53b6c04..404e92a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/datareduction/DataReductionPromoUtilsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/datareduction/DataReductionPromoUtilsTest.java
@@ -27,7 +27,7 @@ import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; import org.chromium.chrome.browser.preferences.PrefServiceBridge; import org.chromium.chrome.browser.preferences.PrefServiceBridge.AboutVersionStrings; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; /** * Unit test suite for DataReductionPromoUtils.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/DistilledPagePrefsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/DistilledPagePrefsTest.java index 42fc5b0..0b7564f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/DistilledPagePrefsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/dom_distiller/DistilledPagePrefsTest.java
@@ -20,7 +20,7 @@ import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.dom_distiller.core.DistilledPagePrefs; import org.chromium.components.dom_distiller.core.DomDistillerService; import org.chromium.components.dom_distiller.core.FontFamily;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadInfoBarControllerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadInfoBarControllerTest.java index 0ab2e567..85e1c70f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadInfoBarControllerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadInfoBarControllerTest.java
@@ -18,7 +18,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.ChromeFeatureList; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.offline_items_collection.LegacyHelpers; import org.chromium.components.offline_items_collection.OfflineItem;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java index afe466e9..4e5b3114 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadManagerServiceTest.java
@@ -29,7 +29,7 @@ import org.chromium.chrome.browser.download.DownloadInfo.Builder; import org.chromium.chrome.browser.download.DownloadManagerServiceTest.MockDownloadNotifier.MethodID; import org.chromium.chrome.browser.preferences.ChromePreferenceManager; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.offline_items_collection.ContentId; import org.chromium.components.offline_items_collection.OfflineItem.Progress; import org.chromium.components.offline_items_collection.OfflineItemProgressUnit;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadMediaParserTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadMediaParserTest.java index b9c1c145..292291c 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadMediaParserTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/DownloadMediaParserTest.java
@@ -17,7 +17,7 @@ import org.chromium.base.test.util.MinAndroidSdkLevel; import org.chromium.base.test.util.Restriction; import org.chromium.base.test.util.UrlUtils; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/OMADownloadHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/OMADownloadHandlerTest.java index 3b33473..63bc0134 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/OMADownloadHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/OMADownloadHandlerTest.java
@@ -27,7 +27,7 @@ import org.chromium.base.test.util.UrlUtils; import org.chromium.chrome.browser.download.DownloadManagerBridge.DownloadQueryResult; import org.chromium.chrome.browser.download.OMADownloadHandler.OMAInfo; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java index 0466d4e7..1be287a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/SystemDownloadNotifierTest.java
@@ -17,7 +17,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.download.DownloadInfo.Builder; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.offline_items_collection.ContentId; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeExperimentalTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeExperimentalTest.java index 2b79aaf..48633551 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeExperimentalTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeExperimentalTest.java
@@ -19,7 +19,7 @@ import org.chromium.base.Callback; import org.chromium.base.test.util.UrlUtils; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.net.test.EmbeddedTestServer;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedConfigurationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedConfigurationTest.java index fb657b7..75d96c89 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedConfigurationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedConfigurationTest.java
@@ -17,7 +17,7 @@ import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.ChromeFeatureList; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.browser.Features;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedContentStorageConformanceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedContentStorageConformanceTest.java index e9817347..62b05d2b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedContentStorageConformanceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedContentStorageConformanceTest.java
@@ -20,7 +20,7 @@ import org.junit.runner.RunWith; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedJournalStorageConformanceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedJournalStorageConformanceTest.java index 718c545..6153931 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedJournalStorageConformanceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedJournalStorageConformanceTest.java
@@ -20,7 +20,7 @@ import org.junit.runner.RunWith; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedNetworkBridgeConformanceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedNetworkBridgeConformanceTest.java index e74ae8d..bc911d2 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedNetworkBridgeConformanceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedNetworkBridgeConformanceTest.java
@@ -23,7 +23,7 @@ import org.chromium.base.Log; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.net.test.EmbeddedTestServer;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedSchedulerBridgeConformanceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedSchedulerBridgeConformanceTest.java index 42d2461..439e43d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedSchedulerBridgeConformanceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feed/FeedSchedulerBridgeConformanceTest.java
@@ -23,7 +23,7 @@ import org.chromium.base.test.params.ParameterSet; import org.chromium.base.test.params.ParameterizedRunner; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import java.util.Arrays;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/feedback/ConnectivityCheckerTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/feedback/ConnectivityCheckerTestRule.java index 3abee7a..e0eeaed 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/feedback/ConnectivityCheckerTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/feedback/ConnectivityCheckerTestRule.java
@@ -9,7 +9,7 @@ import org.junit.runner.Description; import org.junit.runners.model.Statement; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.net.test.EmbeddedTestServer; /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationServiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationServiceTest.java index 34f3086..77bca88 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationServiceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/invalidation/InvalidationServiceTest.java
@@ -23,7 +23,7 @@ import org.chromium.base.ContextUtils; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Feature; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.invalidation.IntentSavingContext; import org.chromium.components.invalidation.InvalidationService; import org.chromium.components.sync.AndroidSyncSettings;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java index eab40b7..5b6f003 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/notifications/channels/SiteChannelsManagerTest.java
@@ -33,7 +33,7 @@ import org.chromium.chrome.browser.notifications.NotificationSettingsBridge; import org.chromium.chrome.browser.preferences.website.ContentSettingValues; import org.chromium.chrome.browser.preferences.website.PermissionInfo; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; import java.util.ArrayList;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java index 1cf44ab..f959a54 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizerTest.java
@@ -26,7 +26,7 @@ import org.chromium.chrome.browser.omnibox.OmniboxUrlEmphasizer.UrlEmphasisSecurityErrorSpan; import org.chromium.chrome.browser.omnibox.OmniboxUrlEmphasizer.UrlEmphasisSpan; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.security_state.ConnectionSecurityLevel; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/suggestions/VoiceSuggestionProviderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/suggestions/VoiceSuggestionProviderTest.java index 998c626a..3f2db0e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/suggestions/VoiceSuggestionProviderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/suggestions/VoiceSuggestionProviderTest.java
@@ -21,7 +21,7 @@ import org.chromium.chrome.browser.omnibox.MatchClassificationStyle; import org.chromium.chrome.browser.omnibox.OmniboxSuggestionType; import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestion.MatchClassification; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import java.util.ArrayList; import java.util.List;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsSectionUnitTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsSectionUnitTest.java index 8ac20e68..bd4a77e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsSectionUnitTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestContactDetailsSectionUnitTest.java
@@ -17,8 +17,8 @@ import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; import org.chromium.chrome.browser.payments.ui.ContactDetailsSection; import org.chromium.chrome.browser.payments.ui.SectionInformation; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; import org.chromium.chrome.browser.widget.prefeditor.EditableOption; +import org.chromium.chrome.test.ChromeBrowserTestRule; import java.util.ArrayList; import java.util.List;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/NotificationsPreferencesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/NotificationsPreferencesTest.java index 03f8eeb..7f0a62f 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/NotificationsPreferencesTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/NotificationsPreferencesTest.java
@@ -26,8 +26,8 @@ import org.chromium.chrome.browser.preferences.website.ContentSettingsResources; import org.chromium.chrome.browser.preferences.website.SingleCategoryPreferences; import org.chromium.chrome.browser.preferences.website.SiteSettingsCategory; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; import org.chromium.chrome.browser.test.ScreenShooter; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java index 8fec810..adf91a47 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java
@@ -42,7 +42,7 @@ import org.chromium.chrome.browser.preferences.website.PermissionInfo; import org.chromium.chrome.browser.preferences.website.WebsitePreferenceBridge; import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ActivityUtils; import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill/AutofillTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill/AutofillTestRule.java index f493414..b5b4cdd 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill/AutofillTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill/AutofillTestRule.java
@@ -9,9 +9,9 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.test.util.CallbackHelper; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; import org.chromium.chrome.browser.widget.prefeditor.EditorDialog; import org.chromium.chrome.browser.widget.prefeditor.EditorObserverForTest; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.test.util.TestThreadUtils; import java.util.List;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferencesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferencesTest.java index 57d3b9a2..9535cf9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferencesTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/autofill_assistant/AutofillAssistantPreferencesTest.java
@@ -27,7 +27,7 @@ import org.chromium.chrome.browser.preferences.MainPreferences; import org.chromium.chrome.browser.preferences.Preferences; import org.chromium.chrome.browser.preferences.PreferencesTest; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.Features; import org.chromium.chrome.test.util.browser.Features.DisableFeatures; import org.chromium.chrome.test.util.browser.Features.EnableFeatures;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java index 13f050d..4788293d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreferenceTest.java
@@ -26,7 +26,7 @@ import org.chromium.base.test.util.AdvancedMockContext; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; /** * Unit test suite for DataReductionStatsPreference.
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java index 1f3527a..609cba9e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java
@@ -84,7 +84,7 @@ import org.chromium.chrome.browser.preferences.PrefServiceBridge; import org.chromium.chrome.browser.preferences.Preferences; import org.chromium.chrome.browser.preferences.PreferencesTest; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.Features; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManagerNativeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManagerNativeTest.java index 665fa818..77e6e3b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManagerNativeTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/PrivacyPreferencesManagerNativeTest.java
@@ -22,7 +22,7 @@ import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.preferences.PrefServiceBridge; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsiteAddressTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsiteAddressTest.java index 0fdf4da01..d21542a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsiteAddressTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsiteAddressTest.java
@@ -12,7 +12,7 @@ import org.junit.runner.RunWith; import org.chromium.base.test.util.Feature; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; /**
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcherTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcherTest.java index d56d4af..697e8431 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcherTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/website/WebsitePermissionsFetcherTest.java
@@ -16,7 +16,7 @@ import org.chromium.base.Callback; import org.chromium.base.test.util.CallbackHelper; import org.chromium.chrome.browser.ContentSettingsType; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandlerTest.java index 190500f..cc29579 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandlerTest.java
@@ -22,7 +22,7 @@ import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; import org.chromium.chrome.browser.profiles.Profile; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceTest.java index 4461222..697597d10 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceTest.java
@@ -18,7 +18,7 @@ import org.chromium.base.test.util.Restriction; import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.preferences.SearchEngineAdapter; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.search_engines.TemplateUrl; import org.chromium.components.search_engines.TemplateUrlService; import org.chromium.components.search_engines.TemplateUrlService.LoadListener;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareMenuActionHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareMenuActionHandlerTest.java index 7da8175..95814b0e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareMenuActionHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareMenuActionHandlerTest.java
@@ -13,7 +13,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.chrome.browser.tab.MockTab; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.SadTabRule; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.mock.MockRenderFrameHost;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java index 1c7e331..0ad1ff89 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/share/ShareUrlTest.java
@@ -15,7 +15,7 @@ import org.chromium.base.task.PostTask; import org.chromium.base.test.BaseJUnit4ClassRunner; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils; import org.chromium.content_public.browser.UiThreadTaskTraits;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseActivityTest.java index 08b10e8..9189279 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseActivityTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/ui/PassphraseActivityTest.java
@@ -24,7 +24,7 @@ import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.sync.FakeProfileSyncService; import org.chromium.chrome.browser.sync.ProfileSyncService; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.signin.SigninTestUtil; import org.chromium.components.signin.ChromeSigninController; import org.chromium.content_public.browser.test.util.TestThreadUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabStateTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabStateTest.java index 93651ce..cbdd1f1 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabStateTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tab/TabStateTest.java
@@ -19,7 +19,7 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.chrome.browser.tab.TabState.WebContentsState; import org.chromium.chrome.browser.tabmodel.TestTabModelDirectory; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import java.io.File; import java.nio.ByteBuffer;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorObserverTestRule.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorObserverTestRule.java index 7554438..0166839 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorObserverTestRule.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorObserverTestRule.java
@@ -12,7 +12,7 @@ import org.chromium.base.CommandLine; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.tab.Tab; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.base.WindowAndroid;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java index 7b678692..bc35eb8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java
@@ -39,8 +39,8 @@ import org.chromium.chrome.browser.tabmodel.TabPersistentStore.TabModelSelectorMetadata; import org.chromium.chrome.browser.tabmodel.TabPersistentStore.TabPersistentStoreObserver; import org.chromium.chrome.browser.tabmodel.TestTabModelDirectory.TabModelMetaDataInfo; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; import org.chromium.chrome.browser.widget.OverviewListLayout; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.util.browser.tabmodel.MockTabModelSelector; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.content_public.browser.WebContents;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/widget/RoundedIconGeneratorTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/widget/RoundedIconGeneratorTest.java index 2dbdb3b0..786b3ff 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/widget/RoundedIconGeneratorTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/widget/RoundedIconGeneratorTest.java
@@ -17,7 +17,7 @@ import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.test.util.Feature; import org.chromium.chrome.R; -import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; /**
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 59f8bd9..0cadc4e 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -8894,6 +8894,12 @@ <message name="IDS_TOOLTIP_TAB_ALERT_STATE_VR_PRESENTING" desc="Extra tool tip text, when the tab is presenting VR content to a headset."> This tab is presenting VR content to a headset. </message> + <message name="IDS_TOOLTIP_TAB_ALERT_STATE_NATIVE_FILE_SYSTEM_WRITABLE" desc="Extra tool tip text, when the tab can edit native files."> + This tab is allowed to save to original files. + </message> + <message name="IDS_TOOLTIP_TAB_ALERT_STATE_NATIVE_FILE_SYSTEM_DIRECTORY" desc="Extra tool tip text, when the tab can read directories from the native file system."> + This tab is allowed to read a folder on your device. + </message> <!-- Tab accessibility labels --> <message name="IDS_TAB_AX_LABEL_MEDIA_RECORDING_FORMAT" desc="Accessibility label text, when the tab is recording media. Example: 'Google Hangouts - Camera or microphone recording'"> @@ -8934,6 +8940,12 @@ $1<ex>A VR-enabled website</ex> </ph> - VR presenting to headset </message> + <message name="IDS_TAB_AX_LABEL_NATIVE_FILE_SYSTEM_WRITABLE_FORMAT" desc="Accessibility label text, when the tab has write access to the native file system. Example: 'Google Docs - is allowed to save to original files'"> + <ph name="WINDOW_TITLE">$1<ex>Google Docs</ex></ph> - is allowed to save to original files + </message> + <message name="IDS_TAB_AX_LABEL_NATIVE_FILE_SYSTEM_DIRECTORY_FORMAT" desc="Accessibility label text, when the tab has read access to directories on the native file system. Example: 'Google Docs - is allowed to read a folder on your device'"> + <ph name="WINDOW_TITLE">$1<ex>Google Docs</ex></ph> - is allowed to read a folder on your device + </message> <!-- ProcessSingleton --> <message name="IDS_PROFILE_IN_USE_LINUX_QUIT" desc="Text of button in profile in use dialog to quit without doing anything."> @@ -9487,6 +9499,35 @@ Save to original file </message> + <!-- Native File System usage indicator --> + <message name="IDS_NATIVE_FILE_SYSTEM_WRITE_USAGE_TOOLTIP" desc="Tooltip for native file system omnibox usage indicator."> + This page is allowed to save to original files. + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_DIRECTORY_USAGE_TOOLTIP" desc="Tooltip for native file system omnibox usage indicator."> + This page is allowed to read a folder on your device. + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_FILES_TEXT" desc="Text of the bubble showing what files and directories an origin can currently access"> + <ph name="ORIGIN">$1<ex>example.com</ex></ph> can save your changes directly to the following files. This site can save changes only while this tab is open. + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_DIRECTORIES_TEXT" desc="Text of the bubble showing what files and directories an origin can currently access"> + <ph name="ORIGIN">$1<ex>example.com</ex></ph> can save your changes directly to the files in the following folder. This site can save changes only while this tab is open. + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_READABLE_DIRECTORIES_TEXT" desc="Text of the bubble showing what files and directories an origin can currently access"> + <ph name="ORIGIN">$1<ex>example.com</ex></ph> can read all the files in the following folder. This site can see changes to the folder only while this tab is open. + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_FILES_TEXT" desc="Text to display a list of files in the native file system usage bubble"> + {0, plural, + =1 {File: <ph name="FILES">{1}<ex>README.md</ex></ph>} + other {Files: <ph name="FILES">{1}<ex>Chrome.png, README.md</ex></ph>} + } + </message> + <message name="IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT" desc="Text to display a list of directories in the native file system usage bubble"> + {0, plural, + =1 {Folder: <ph name="DIRECTORIES">{1}<ex>My Documents</ex></ph>} + other {Folders: <ph name="DIRECTORIES">{1}<ex>My Documents, Downloads</ex></ph>} + } + </message> + <!-- Relaunch notification bubble and dialog. --> <if expr="not is_android"> <if expr="not chromeos">
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_DIRECTORY_USAGE_TOOLTIP.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_DIRECTORY_USAGE_TOOLTIP.png.sha1 new file mode 100644 index 0000000..7783837 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_DIRECTORY_USAGE_TOOLTIP.png.sha1
@@ -0,0 +1 @@ +049a6d45394564470fc23a92bef7138820c44584 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT.png.sha1 new file mode 100644 index 0000000..0030c9a --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT.png.sha1
@@ -0,0 +1 @@ +42222fd6e07e85420c09d89e21dc44c577fc794a \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_FILES_TEXT.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_FILES_TEXT.png.sha1 new file mode 100644 index 0000000..cdd34c70 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_FILES_TEXT.png.sha1
@@ -0,0 +1 @@ +060e71d89d81eb76f0511f3531360326b747ead0 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_READABLE_DIRECTORIES_TEXT.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_READABLE_DIRECTORIES_TEXT.png.sha1 new file mode 100644 index 0000000..1ea3ed8 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_READABLE_DIRECTORIES_TEXT.png.sha1
@@ -0,0 +1 @@ +610a2f48441448e6b5402ba87aa7621b6936503f \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_DIRECTORIES_TEXT.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_DIRECTORIES_TEXT.png.sha1 new file mode 100644 index 0000000..0030c9a --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_DIRECTORIES_TEXT.png.sha1
@@ -0,0 +1 @@ +42222fd6e07e85420c09d89e21dc44c577fc794a \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_FILES_TEXT.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_FILES_TEXT.png.sha1 new file mode 100644 index 0000000..cdd34c70 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_FILES_TEXT.png.sha1
@@ -0,0 +1 @@ +060e71d89d81eb76f0511f3531360326b747ead0 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_WRITE_USAGE_TOOLTIP.png.sha1 b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_WRITE_USAGE_TOOLTIP.png.sha1 new file mode 100644 index 0000000..a8a1721a --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_NATIVE_FILE_SYSTEM_WRITE_USAGE_TOOLTIP.png.sha1
@@ -0,0 +1 @@ +69050329232ce379cccc6a17554ee70d4f18130c \ No newline at end of file
diff --git a/chrome/app/vector_icons/BUILD.gn b/chrome/app/vector_icons/BUILD.gn index 0266d597..39e942a 100644 --- a/chrome/app/vector_icons/BUILD.gn +++ b/chrome/app/vector_icons/BUILD.gn
@@ -80,6 +80,7 @@ "remove_box.icon", "resize_handle.icon", "sad_tab.icon", + "save_original_file.icon", "security.icon", "send_tab_to_self.icon", "sensors.icon",
diff --git a/chrome/app/vector_icons/save_original_file.icon b/chrome/app/vector_icons/save_original_file.icon new file mode 100644 index 0000000..05e9bfb --- /dev/null +++ b/chrome/app/vector_icons/save_original_file.icon
@@ -0,0 +1,34 @@ +// Copyright 2019 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. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 14.06f, 22.88f, +H_LINE_TO, 6, +CUBIC_TO, 4.9f, 22.88f, 4, 21.94f, 4, 20.79f, +R_LINE_TO, 0.01f, -16.7f, +CUBIC_TO, 4.01f, 2.94f, 4.91f, 2, 6.01f, 2, +R_H_LINE_TO, 8.05f, +R_LINE_TO, 6.04f, 6.26f, +R_V_LINE_TO, 4.18f, +R_H_LINE_TO, -2.01f, +R_V_LINE_TO, -3.13f, +R_H_LINE_TO, -5.03f, +R_V_LINE_TO, -5.22f, +H_LINE_TO, 6.01f, +R_V_LINE_TO, 16.7f, +R_H_LINE_TO, 4.02f, +R_V_LINE_TO, 2.09f, +R_H_LINE_TO, 4.02f, +CLOSE, +R_MOVE_TO, 7.58f, -6.16f, +LINE_TO, 23.11f, 18.2f, +R_LINE_TO, -4.18f, 4.2f, +R_LINE_TO, -4.18f, -4.2f, +R_LINE_TO, 1.47f, -1.48f, +R_LINE_TO, 1.66f, 1.66f, +V_LINE_TO, 14, +R_H_LINE_TO, 2.09f, +R_V_LINE_TO, 4.38f, +R_LINE_TO, 1.66f, -1.66f, +CLOSE,
diff --git a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm index 9f73165..8bb8c31 100644 --- a/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm +++ b/chrome/browser/apps/app_shim/app_shim_interactive_uitest_mac.mm
@@ -312,7 +312,7 @@ #else #define MAYBE_Launch DISABLED_Launch // http://crbug.com/913490 #define MAYBE_HostedAppLaunch DISABLED_HostedAppLaunch -#define MAYBE_ShowWindow ShowWindow +#define MAYBE_ShowWindow DISABLED_ShowWindow // https://crbug.com/980072 // http://crbug.com/517744 HostedAppLaunch fails with open as tab for apps // http://crbug.com/509774 this test is flaky so is disabled even in the // static build.
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.cc b/chrome/browser/chromeos/arc/arc_service_launcher.cc index 5350ac17..3c0a67d 100644 --- a/chrome/browser/chromeos/arc/arc_service_launcher.cc +++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -163,7 +163,6 @@ // Those services will be initialized lazily. // List in lexicographical order. ArcAccessibilityHelperBridge::GetForBrowserContext(profile); - ArcAppfuseBridge::GetForBrowserContext(profile); ArcAppPermissionsBridge::GetForBrowserContext(profile); ArcAudioBridge::GetForBrowserContext(profile); ArcAuthService::GetForBrowserContext(profile); @@ -191,7 +190,6 @@ ArcMidisBridge::GetForBrowserContext(profile); ArcNetHostImpl::GetForBrowserContext(profile)->SetPrefService( profile->GetPrefs()); - ArcObbMounterBridge::GetForBrowserContext(profile); ArcOemCryptoBridge::GetForBrowserContext(profile); ArcPipBridge::GetForBrowserContext(profile); ArcPolicyBridge::GetForBrowserContext(profile); @@ -219,6 +217,12 @@ } chromeos::ApkWebAppService::Get(profile); + // ARC Container-only services. + if (!arc::IsArcVmEnabled()) { + ArcAppfuseBridge::GetForBrowserContext(profile); + ArcObbMounterBridge::GetForBrowserContext(profile); + } + arc_session_manager_->Initialize(); arc_play_store_enabled_preference_handler_ = std::make_unique<ArcPlayStoreEnabledPreferenceHandler>(
diff --git a/chrome/browser/chromeos/arc/input_method_manager/DEPS b/chrome/browser/chromeos/arc/input_method_manager/DEPS index ea113443..cc628a8 100644 --- a/chrome/browser/chromeos/arc/input_method_manager/DEPS +++ b/chrome/browser/chromeos/arc/input_method_manager/DEPS
@@ -1,7 +1,7 @@ specific_include_rules = { # TODO(mash): Remove. http://crbug.com/890677 "arc_input_method_manager_service_unittest\.cc": [ - "+ash/keyboard/ash_keyboard_controller.h", + "+ash/keyboard/keyboard_controller_impl.h", "+ash/shell.h", ], }
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc index 0a5d994..29e981f 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -1066,7 +1066,8 @@ Breadcrumbs, /* breadcrumbs.js */ FilesAppBrowserTest, ::testing::Values(TestCase("breadcrumbsNavigate"), - TestCase("breadcrumbsLeafNoFocus"))); + TestCase("breadcrumbsLeafNoFocus"), + TestCase("breadcrumbsDownloadsTranslation"))); WRAPPED_INSTANTIATE_TEST_SUITE_P( FormatDialog, /* format_dialog.js */
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc index 519d79c..ce0772a6 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest_base.cc
@@ -29,6 +29,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h" #include "chrome/browser/chromeos/arc/fileapi/arc_media_view_util.h" +#include "chrome/browser/chromeos/base/locale_util.h" #include "chrome/browser/chromeos/crostini/crostini_manager.h" #include "chrome/browser/chromeos/crostini/crostini_pref_names.h" #include "chrome/browser/chromeos/crostini/crostini_util.h" @@ -2295,6 +2296,23 @@ return; } + if (name == "switchLanguage") { + std::string language; + ASSERT_TRUE(value.GetString("language", &language)); + base::RunLoop run_loop; + chromeos::locale_util::SwitchLanguage( + language, true, false, + base::BindRepeating( + [](base::RunLoop* run_loop, + const chromeos::locale_util::LanguageSwitchResult&) { + run_loop->Quit(); + }, + &run_loop), + profile()); + run_loop.Run(); + return; + } + if (name == "runLauncherSearch") { app_list::LauncherSearchProvider search_provider(profile()); base::string16 query;
diff --git a/chrome/browser/chromeos/file_manager/file_manager_string_util.cc b/chrome/browser/chromeos/file_manager/file_manager_string_util.cc index 450d73c..5329262 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_string_util.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_string_util.cc
@@ -747,6 +747,7 @@ SET_STRING("SELECT_ALL_COMMAND_LABEL", IDS_FILE_BROWSER_SELECT_ALL_COMMAND_LABEL); SET_STRING("TASKS_BUTTON_LABEL", IDS_FILE_BROWSER_TASKS_BUTTON_LABEL); + SET_STRING("TO_FOLDER_NAME", IDS_FILE_BROWSER_TO_FOLDER_NAME); SET_STRING("TOGGLE_HIDDEN_FILES_COMMAND_LABEL", IDS_FILE_BROWSER_TOGGLE_HIDDEN_FILES_COMMAND_LABEL); SET_STRING("SHARE_BUTTON_LABEL", IDS_FILE_BROWSER_SHARE_BUTTON_LABEL);
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc index 1b3f833..96794e0 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -67,7 +67,6 @@ #include "extensions/browser/api/file_handlers/app_file_handler_util.h" #include "extensions/browser/app_window/app_window.h" #include "extensions/browser/app_window/app_window_registry.h" -#include "extensions/browser/content_verifier.h" #include "extensions/browser/disable_reason.h" #include "extensions/browser/error_map.h" #include "extensions/browser/event_router_factory.h" @@ -1881,7 +1880,7 @@ // Also note that if we let |reinstaller| continue with the repair, this would // have uninstalled the extension but then we would have failed to reinstall // it for policy check (see PolicyCheck::Start()). - if (ContentVerifier::ShouldRepairIfCorrupted(management_policy, extension)) + if (management_policy->ShouldRepairIfCorrupted(extension)) return RespondNow(Error(kCannotRepairPolicyExtension)); content::WebContents* web_contents = GetSenderWebContents();
diff --git a/chrome/browser/extensions/chrome_content_verifier_delegate.cc b/chrome/browser/extensions/chrome_content_verifier_delegate.cc index 020d42aa..786592f 100644 --- a/chrome/browser/extensions/chrome_content_verifier_delegate.cc +++ b/chrome/browser/extensions/chrome_content_verifier_delegate.cc
@@ -25,7 +25,6 @@ #include "chrome/browser/extensions/policy_extension_reinstaller.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension_constants.h" -#include "extensions/browser/content_verifier.h" #include "extensions/browser/disable_reason.h" #include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_registry.h" @@ -209,8 +208,7 @@ ExtensionService* service = system->extension_service(); Mode mode = ShouldBeVerified(*extension); if (mode >= ContentVerifierDelegate::ENFORCE) { - if (ContentVerifier::ShouldRepairIfCorrupted(system->management_policy(), - extension)) { + if (system->management_policy()->ShouldRepairIfCorrupted(extension)) { PendingExtensionManager* pending_manager = service->pending_extension_manager(); if (pending_manager->IsPolicyReinstallForCorruptionExpected(extension_id))
diff --git a/chrome/browser/extensions/content_verifier_browsertest.cc b/chrome/browser/extensions/content_verifier_browsertest.cc index 5635e35..c76801d 100644 --- a/chrome/browser/extensions/content_verifier_browsertest.cc +++ b/chrome/browser/extensions/content_verifier_browsertest.cc
@@ -245,7 +245,7 @@ TestExtensionRegistryObserver registry_observer( ExtensionRegistry::Get(profile()), kExtensionId); ContentVerifier* verifier = system->content_verifier(); - verifier->VerifyFailed(kExtensionId, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(kExtensionId, ContentVerifyJob::HASH_MISMATCH); // Make sure the extension first got disabled due to corruption. EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); @@ -404,7 +404,7 @@ // at startup in the non-PRE test. ExtensionSystem* system = ExtensionSystem::Get(profile()); ContentVerifier* verifier = system->content_verifier(); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); ExtensionPrefs* prefs = ExtensionPrefs::Get(profile()); int reasons = prefs->GetDisableReasons(id_); @@ -450,7 +450,7 @@ const size_t iterations = 4; for (size_t i = 0; i < iterations; i++) { TestExtensionRegistryObserver registry_observer(registry, id_); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); // Resolve the request to |delay_tracker|, so the reinstallation can // proceed. @@ -493,7 +493,7 @@ content_verifier_test::DelayTracker delay_tracker; service->set_external_updates_disabled_for_test(true); TestExtensionRegistryObserver registry_observer(registry, id_); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); const std::vector<base::TimeDelta>& calls = delay_tracker.calls();
diff --git a/chrome/browser/extensions/updater/update_service_browsertest.cc b/chrome/browser/extensions/updater/update_service_browsertest.cc index 84970c1..044b02fd 100644 --- a/chrome/browser/extensions/updater/update_service_browsertest.cc +++ b/chrome/browser/extensions/updater/update_service_browsertest.cc
@@ -356,7 +356,7 @@ TestExtensionRegistryObserver registry_observer( ExtensionRegistry::Get(profile()), kExtensionId); ContentVerifier* verifier = system->content_verifier(); - verifier->VerifyFailed(kExtensionId, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(kExtensionId, ContentVerifyJob::HASH_MISMATCH); // Make sure the extension first got disabled due to corruption. EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); @@ -554,7 +554,7 @@ content_verifier_test::DelayTracker delay_tracker; service->set_external_updates_disabled_for_test(true); TestExtensionRegistryObserver registry_observer(registry, id_); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); const std::vector<base::TimeDelta>& calls = delay_tracker.calls(); @@ -618,7 +618,7 @@ const size_t iterations = 4; for (size_t i = 0; i < iterations; i++) { TestExtensionRegistryObserver registry_observer(registry, id_); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); // Resolve the request to |delay_tracker|, so the reinstallation can // proceed. @@ -665,7 +665,7 @@ // at startup in the non-PRE test. ContentVerifier* verifier = ExtensionSystem::Get(profile())->content_verifier(); - verifier->VerifyFailed(id_, ContentVerifyJob::HASH_MISMATCH); + verifier->VerifyFailedForTest(id_, ContentVerifyJob::HASH_MISMATCH); EXPECT_TRUE(registry_observer.WaitForExtensionUnloaded()); ExtensionPrefs* prefs = ExtensionPrefs::Get(profile());
diff --git a/chrome/browser/resources/bookmarks/dnd_manager.js b/chrome/browser/resources/bookmarks/dnd_manager.js index 4db582fcd..c5e6870 100644 --- a/chrome/browser/resources/bookmarks/dnd_manager.js +++ b/chrome/browser/resources/bookmarks/dnd_manager.js
@@ -392,13 +392,14 @@ let draggedNodes = []; if (isBookmarkItem(dragElement)) { - const displayingItems = - assert(state.nodes[state.selectedFolder].children); - + const displayingItems = assert(bookmarks.util.getDisplayedList(state)); + // TODO(crbug.com/980427): Make this search more time efficient to avoid + // delay on large amount of bookmark dragging. for (const itemId of displayingItems) { for (const element of dragData.elements) { if (element.id == itemId) { draggedNodes.push(element.id); + break; } } }
diff --git a/chrome/browser/resources/chromeos/arc_support/main.css b/chrome/browser/resources/chromeos/arc_support/main.css index 818413b0..05fe1be 100644 --- a/chrome/browser/resources/chromeos/arc_support/main.css +++ b/chrome/browser/resources/chromeos/arc_support/main.css
@@ -76,9 +76,6 @@ } .button-active-directory-auth { - border: 1px solid #e6e6e6; - border-radius: 2px; - color: #5a5a5a; margin: 26px 18px 0 26px; }
diff --git a/chrome/browser/resources/chromeos/arc_support/main.html b/chrome/browser/resources/chromeos/arc_support/main.html index d5d8074..82b786e 100644 --- a/chrome/browser/resources/chromeos/arc_support/main.html +++ b/chrome/browser/resources/chromeos/arc_support/main.html
@@ -8,49 +8,12 @@ <link rel="stylesheet" href="chrome://resources/css/controlled_indicator.css"> <link rel="stylesheet" href="chrome://resources/css/overlay.css"> <link rel="import" href="chrome://resources/html/polymer.html"> + <link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> - <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> + <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <custom-style> - <style include="iron-flex iron-flex-alignment"> - paper-button { - border-radius: 4px; - border-style: solid; - border-width: 2px; - height: 32px; /* = 28px + 2 * 2px border */ - margin: 0; - padding: 0; - } - paper-button.blue { - border-color: transparent; - } - paper-button.white { - border-color: rgba(0, 0, 0, 0.1); - } - paper-button[focused] { - border-color: rgba(66, 133, 244, 0.4); /* #4284f4 */ - } - paper-button .container { - align-items: center; - align-self: stretch; - border-radius: 2px; - display: flex; - font: Roboto, sans-serif; - font-size: 12px; - font-weight: 500; - justify-content: center; - padding: 0 16px; - text-transform: none; - } - paper-button.white .container { - background-color: white; - color: rgba(0, 0, 0, 0.54); - } - paper-button.blue .container { - background-color: rgb(66, 133, 244); /* #4285f4 */ - color: white; - } - </style> + <style include="iron-flex iron-flex-alignment cr-hidden-style"></style> </custom-style> <link rel="stylesheet" href="main.css"> <link rel="stylesheet" href="progressbar.css"> @@ -142,18 +105,15 @@ </div> <div class="layout horizontal center end-justified section-buttons"> <div class="flex"></div> - <paper-button class="white" id="button-cancel"> - <div class="container flex" i18n-content="buttonCancel"> - </div> - </paper-button> - <paper-button class="blue" id="button-next"> - <div class="container flex" i18n-content="buttonNext"> - </div> - </paper-button> - <paper-button class="blue" id="button-agree"> - <div class="container flex" i18n-content="buttonAgree"> - </div> - </paper-button> + <cr-button id="button-cancel"> + <div class="container flex" i18n-content="buttonCancel"></div> + </cr-button> + <cr-button class="action-button" id="button-next"> + <div class="container flex" i18n-content="buttonNext"></div> + </cr-button> + <cr-button class="action-button" id="button-agree"> + <div class="container flex" i18n-content="buttonAgree"></div> + </cr-button> </div> </div> </div> @@ -170,10 +130,9 @@ <webview id="active-directory-auth-view"></webview> </div> <div class="section-active-directory-auth-buttons"> - <paper-button class="button-active-directory-auth" + <cr-button class="button-active-directory-auth" id="button-active-directory-auth-cancel" - i18n-content="buttonCancel"> - </paper-button> + i18n-content="buttonCancel"></cr-button> </div> </div> </div> @@ -209,14 +168,12 @@ </div> <div class="layout horizontal center end-justified section-buttons"> <div class="flex"></div> - <paper-button class="white" id="button-send-feedback"> - <div class="container flex" i18n-content="buttonSendFeedback"> - </div> - </paper-button> - <paper-button class="blue" id="button-retry"> - <div class="container flex" i18n-content="buttonRetry"> - </div> - </paper-button> + <cr-button id="button-send-feedback"> + <div class="container flex" i18n-content="buttonSendFeedback"></div> + </cr-button> + <cr-button class="action-button" id="button-retry"> + <div class="container flex" i18n-content="buttonRetry"></div> + </cr-button> </div> </div> </div> @@ -235,10 +192,9 @@ <div class="action-area"> <div class="action-area-right"> <div class="button-strip"> - <paper-button class ="blue" id="overlay-close"> - <div class="container flex" i18n-content="overlayClose"> - </div> - </paper-button> + <cr-button class="action-button" id="overlay-close"> + <div class="container flex" i18n-content="overlayClose"></div> + </cr-button> </div> </div> </div>
diff --git a/chrome/browser/resources/user_manager/control_bar.html b/chrome/browser/resources/user_manager/control_bar.html index 840462c..ec00b56b 100644 --- a/chrome/browser/resources/user_manager/control_bar.html +++ b/chrome/browser/resources/user_manager/control_bar.html
@@ -3,9 +3,9 @@ <link rel="import" href="/profile_browser_proxy.html"> <link rel="import" href="/shared_styles.html"> <link rel="import" href="/strings.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <dom-module id="control-bar"> <template> @@ -25,17 +25,16 @@ user-select: none; } - paper-button + paper-button { + cr-button + cr-button { margin-inline-start: 8px; } </style> <div id="container" class="layout horizontal end-justified"> <div id="logo" class="product-logo" alt=""></div> - <paper-button id="launchGuest" - on-tap="onLaunchGuestTap_" - hidden="[[!showGuest]]">$i18n{browseAsGuest}</paper-button> - <paper-button id="addUser" on-tap="onAddUserTap_" - hidden="[[!showAddPerson]]">$i18n{addUser}</paper-button> + <cr-button id="launchGuest" on-click="onLaunchGuestTap_" + hidden="[[!showGuest]]">$i18n{browseAsGuest}</cr-button> + <cr-button id="addUser" on-click="onAddUserTap_" + hidden="[[!showAddPerson]]">$i18n{addUser}</cr-button> </div> </template> <script src="control_bar.js"></script>
diff --git a/chrome/browser/resources/user_manager/create_profile.html b/chrome/browser/resources/user_manager/create_profile.html index 151db114..f7f2e767 100644 --- a/chrome/browser/resources/user_manager/create_profile.html +++ b/chrome/browser/resources/user_manager/create_profile.html
@@ -2,6 +2,7 @@ <link rel="import" href="/profile_browser_proxy.html"> <link rel="import" href="/shared_styles.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> <link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html"> @@ -14,13 +15,11 @@ <link rel="import" href="chrome://resources/html/util.html"> <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html"> <dom-module id="create-profile"> <template> - <style - include="shared-styles iron-positioning md-select"> + <style include="shared-styles iron-positioning md-select"> :host { align-self: center; } @@ -140,14 +139,13 @@ <div id="actions"> <paper-spinner-lite active="[[isSpinnerActive_(createInProgress_)]]"> </paper-spinner-lite> - <paper-button id="cancel" class="cancel-button" - on-tap="onCancelTap_"> + <cr-button id="cancel" class="cancel-button" on-click="onCancelTap_"> $i18n{cancel} - </paper-button> - <paper-button id="save" class="action-button" on-tap="onSaveTap_" + </cr-button> + <cr-button id="save" class="action-button" on-click="onSaveTap_" disabled="[[isSaveDisabled_(createInProgress_, profileName_)]]"> $i18n{createProfileConfirm} - </paper-button> + </cr-button> </div> </div> </template>
diff --git a/chrome/browser/resources/user_manager/shared_styles.html b/chrome/browser/resources/user_manager/shared_styles.html index 914a64bc..3bc6fc4 100644 --- a/chrome/browser/resources/user_manager/shared_styles.html +++ b/chrome/browser/resources/user_manager/shared_styles.html
@@ -1,10 +1,9 @@ <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> -<link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <dom-module id="shared-styles"> <template> - <style include="paper-button-style"> + <style> html, :host { --error-color: var(--google-red-700);
diff --git a/chrome/browser/resources/user_manager/user_manager.html b/chrome/browser/resources/user_manager/user_manager.html index 3166b31b..7756199 100644 --- a/chrome/browser/resources/user_manager/user_manager.html +++ b/chrome/browser/resources/user_manager/user_manager.html
@@ -23,6 +23,8 @@ <link rel="import" href="/strings.html"> <link rel="import" href="/user_manager_pages.html"> <link rel="import" href="/user_manager_tutorial.html"> + <!-- Make sure cr-button is imported to use in user_pod_template.html --> + <link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/html/cr/ui.html"> <link rel="import" href="chrome://resources/html/util.html"> <!-- Make sure iron-icon and cr iconset are imported to use in @@ -30,8 +32,6 @@ <link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> - <!-- Make sure paper-button is imported to use in user_pod_template.html --> - <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <custom-style> <style is="custom-style" include="shared-styles"> @media (prefers-color-scheme: dark) {
diff --git a/chrome/browser/resources/user_manager/user_manager_tutorial.html b/chrome/browser/resources/user_manager/user_manager_tutorial.html index 743ca93..bdffe55 100644 --- a/chrome/browser/resources/user_manager/user_manager_tutorial.html +++ b/chrome/browser/resources/user_manager/user_manager_tutorial.html
@@ -1,9 +1,9 @@ <link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="/shared_styles.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <dom-module id="user-manager-tutorial"> <template> @@ -104,6 +104,7 @@ border-top: 10px solid transparent; bottom: -10px; box-shadow: var(--cr-card-shadow); + clip-path: inset(0 0 -5px -5px); height: 0; position: absolute; right: 40px; @@ -200,9 +201,9 @@ <div class="slide-text">$i18n{slideYourChromeText}</div> </div> <div class="slide-buttons"> - <paper-button on-tap="onNextTap_" data-next$="[[steps_.GUESTS]]"> + <cr-button on-click="onNextClick_" data-next$="[[steps_.GUESTS]]"> $i18n{tutorialNext} - </paper-button> + </cr-button> </div> </div> </template> @@ -215,9 +216,9 @@ <div class="slide-text">$i18n{slideGuestsText}</div> </div> <div class="slide-buttons"> - <paper-button on-tap="onNextTap_" data-next$="[[steps_.FRIENDS]]"> + <cr-button on-click="onNextClick_" data-next$="[[steps_.FRIENDS]]"> $i18n{tutorialNext} - </paper-button> + </cr-button> </div> <div class="arrow-down"></div> </div> @@ -231,9 +232,9 @@ <div class="slide-text">$i18n{slideFriendsText}</div> </div> <div class="slide-buttons"> - <paper-button on-tap="onNextTap_" data-next$="[[steps_.COMPLETE]]"> + <cr-button on-click="onNextClick_" data-next$="[[steps_.COMPLETE]]"> $i18n{tutorialNext} - </paper-button> + </cr-button> </div> <div class="arrow-down"></div> </div> @@ -247,9 +248,9 @@ <div class="slide-text">$i18n{slideCompleteText}</div> </div> <div class="slide-buttons"> - <paper-button on-tap="onNextTap_" data-next$="[[steps_.NOT_YOU]]"> + <cr-button on-click="onNextClick_" data-next$="[[steps_.NOT_YOU]]"> $i18n{tutorialDone} - </paper-button> + </cr-button> </div> </div> </template>
diff --git a/chrome/browser/resources/user_manager/user_manager_tutorial.js b/chrome/browser/resources/user_manager/user_manager_tutorial.js index d365ca5b..8fb553f 100644 --- a/chrome/browser/resources/user_manager/user_manager_tutorial.js +++ b/chrome/browser/resources/user_manager/user_manager_tutorial.js
@@ -55,9 +55,9 @@ * @param {!Event} event * @private */ - onNextTap_: function(event) { - const element = Polymer.dom(event).rootTarget; - this.currentStep_ = element.dataset.next; + onNextClick_: function(event) { + this.currentStep_ = + event.composedPath().find(e => e.tagName == 'CR-BUTTON').dataset.next; }, /**
diff --git a/chrome/browser/signin/signin_error_notifier_ash.cc b/chrome/browser/signin/signin_error_notifier_ash.cc index 5b140ba1..ec1589aa 100644 --- a/chrome/browser/signin/signin_error_notifier_ash.cc +++ b/chrome/browser/signin/signin_error_notifier_ash.cc
@@ -23,6 +23,8 @@ #include "chrome/browser/notifications/notification_display_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/signin/identity_manager_factory.h" +#include "chrome/browser/supervised_user/supervised_user_service.h" +#include "chrome/browser/supervised_user/supervised_user_service_factory.h" #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_window.h" @@ -134,6 +136,13 @@ } void SigninErrorNotifier::HandleDeviceAccountError() { + // If this error has occurred because a user's account has just been converted + // to a Family Link Supervised account, then suppress the notificaiton. + SupervisedUserService* service = + SupervisedUserServiceFactory::GetForProfile(profile_); + if (service->signout_required_after_supervision_enabled()) + return; + // Add an accept button to sign the user out. message_center::RichNotificationData data; data.buttons.push_back(message_center::ButtonInfo(
diff --git a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc index 51d41ff..452411c 100644 --- a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc +++ b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
@@ -17,6 +17,8 @@ #include "chrome/browser/notifications/notification_display_service_tester.h" #include "chrome/browser/signin/identity_test_environment_profile_adaptor.h" #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" +#include "chrome/browser/supervised_user/supervised_user_service.h" +#include "chrome/browser/supervised_user/supervised_user_service_factory.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/testing_profile.h" #include "components/user_manager/scoped_user_manager.h" @@ -85,6 +87,27 @@ EXPECT_FALSE(display_service_->GetNotification(kNotificationId)); } +// Verify that if Supervision has just been added for the current user +// the notification isn't shown. This is because the Add Supervision +// flow itself will prompt the user to sign out, so the notification +// is unnecessary. +TEST_F(SigninErrorNotifierTest, NoNotificationAfterAddSupervisionEnabled) { + std::string account_id = + identity_test_env()->MakeAccountAvailable(kTestEmail).account_id; + identity_test_env()->SetPrimaryAccount(kTestEmail); + + // Mark signout required. + SupervisedUserService* service = + SupervisedUserServiceFactory::GetForProfile(profile()); + service->set_signout_required_after_supervision_enabled(); + + SetAuthError( + identity_test_env()->identity_manager()->GetPrimaryAccountId(), + GoogleServiceAuthError(GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS)); + + EXPECT_FALSE(display_service_->GetNotification(kNotificationId)); +} + TEST_F(SigninErrorNotifierTest, ErrorReset) { EXPECT_FALSE(display_service_->GetNotification(kNotificationId));
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index f05fb60..412921d 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -2821,8 +2821,12 @@ "views/media_router/presentation_receiver_window_view.h", "views/media_router/web_contents_display_observer_view.cc", "views/media_router/web_contents_display_observer_view.h", + "views/native_file_system/native_file_system_access_icon_view.cc", + "views/native_file_system/native_file_system_access_icon_view.h", "views/native_file_system/native_file_system_permission_view.cc", "views/native_file_system/native_file_system_permission_view.h", + "views/native_file_system/native_file_system_usage_bubble_view.cc", + "views/native_file_system/native_file_system_usage_bubble_view.h", "views/omnibox/omnibox_match_cell_view.cc", "views/omnibox/omnibox_match_cell_view.h", "views/omnibox/omnibox_popup_contents_view.cc",
diff --git a/chrome/browser/ui/ash/chrome_new_window_client.cc b/chrome/browser/ui/ash/chrome_new_window_client.cc index 2ca790ff..c622160 100644 --- a/chrome/browser/ui/ash/chrome_new_window_client.cc +++ b/chrome/browser/ui/ash/chrome_new_window_client.cc
@@ -181,15 +181,15 @@ UMA_HISTOGRAM_ENUMERATION("Arc.CustomTabs.SessionEndReason", session_end_reason); auto elapsed = lifetime_timer_.Elapsed(); - UMA_HISTOGRAM_MEDIUM_TIMES("Arc.CustomTabs.SessionLifetime.All", elapsed); + UMA_HISTOGRAM_LONG_TIMES("Arc.CustomTabs.SessionLifetime2.All", elapsed); switch (session_end_reason) { case SessionEndReason::CLOSED: - UMA_HISTOGRAM_MEDIUM_TIMES("Arc.CustomTabs.SessionLifetime.Closed", - elapsed); + UMA_HISTOGRAM_LONG_TIMES("Arc.CustomTabs.SessionLifetime2.Closed", + elapsed); break; case SessionEndReason::FORWARDED_TO_NORMAL_TAB: - UMA_HISTOGRAM_MEDIUM_TIMES( - "Arc.CustomTabs.SessionLifetime.ForwardedToNormalTab", elapsed); + UMA_HISTOGRAM_LONG_TIMES( + "Arc.CustomTabs.SessionLifetime2.ForwardedToNormalTab", elapsed); break; } }
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client_test_helper.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client_test_helper.cc index eb48b68..8156ee7 100644 --- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client_test_helper.cc +++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client_test_helper.cc
@@ -8,7 +8,6 @@ #include <utility> #include <vector> -#include "ash/keyboard/ash_keyboard_controller.h" #include "ash/public/cpp/keyboard/keyboard_controller.h" #include "ash/public/interfaces/constants.mojom.h" #include "ash/shell.h"
diff --git a/chrome/browser/ui/autofill/payments/autofill_ui_util.cc b/chrome/browser/ui/autofill/payments/autofill_ui_util.cc index f01daa7..f66aef3 100644 --- a/chrome/browser/ui/autofill/payments/autofill_ui_util.cc +++ b/chrome/browser/ui/autofill/payments/autofill_ui_util.cc
@@ -60,6 +60,7 @@ case PageActionIconType::kSendTabToSelf: case PageActionIconType::kTranslate: case PageActionIconType::kZoom: + case PageActionIconType::kNativeFileSystemAccess: NOTREACHED(); } }
diff --git a/chrome/browser/ui/page_action/page_action_icon_container.h b/chrome/browser/ui/page_action/page_action_icon_container.h index e2a76c4..62636af 100644 --- a/chrome/browser/ui/page_action/page_action_icon_container.h +++ b/chrome/browser/ui/page_action/page_action_icon_container.h
@@ -17,6 +17,7 @@ kSendTabToSelf, kTranslate, kZoom, + kNativeFileSystemAccess, }; class PageActionIconContainer {
diff --git a/chrome/browser/ui/tabs/tab_utils.cc b/chrome/browser/ui/tabs/tab_utils.cc index da380e4..987124e9 100644 --- a/chrome/browser/ui/tabs/tab_utils.cc +++ b/chrome/browser/ui/tabs/tab_utils.cc
@@ -51,9 +51,15 @@ if (contents->IsConnectedToSerialPort()) return TabAlertState::SERIAL_CONNECTED; + if (contents->HasWritableNativeFileSystemHandles()) + return TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES; + if (contents->HasNativeFileSystemDirectoryHandles()) + return TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS; + // Check if VR content is being presented in a headset. // NOTE: This icon must take priority over the audio alert ones - // because most VR content has audio and its usage is implied by the VR icon. + // because most VR content has audio and its usage is implied by the VR + // icon. if (vr::VrTabHelper::IsContentDisplayedInHeadset(contents)) return TabAlertState::VR_PRESENTING_IN_HEADSET; @@ -90,6 +96,8 @@ case TabAlertState::USB_CONNECTED: case TabAlertState::SERIAL_CONNECTED: case TabAlertState::DESKTOP_CAPTURING: + case TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES: + case TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS: // The new Audio Service implements muting separately from the tab audio // capture infrastructure; so the mute state can be toggled independently // at all times.
diff --git a/chrome/browser/ui/tabs/tab_utils.h b/chrome/browser/ui/tabs/tab_utils.h index e9ff577..54eaed3 100644 --- a/chrome/browser/ui/tabs/tab_utils.h +++ b/chrome/browser/ui/tabs/tab_utils.h
@@ -32,6 +32,8 @@ PIP_PLAYING, // Tab contains a video in Picture-in-Picture mode. DESKTOP_CAPTURING, // Desktop contents being recorded, consumed by tab. VR_PRESENTING_IN_HEADSET, // VR content is being presented in a headset. + WRITABLE_NATIVE_FILE_SYSTEM_HANDLES, // Tab can write to files on disk. + NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS, // Tab can read/monitor directories. }; enum class TabMutedReason {
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 3b1c87a..7902f84b 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1998,6 +1998,12 @@ IDS_TAB_AX_LABEL_DESKTOP_CAPTURING_FORMAT, title); case TabAlertState::VR_PRESENTING_IN_HEADSET: return l10n_util::GetStringFUTF16(IDS_TAB_AX_LABEL_VR_PRESENTING, title); + case TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES: + return l10n_util::GetStringFUTF16( + IDS_TAB_AX_LABEL_NATIVE_FILE_SYSTEM_WRITABLE_FORMAT, title); + case TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS: + return l10n_util::GetStringFUTF16( + IDS_TAB_AX_LABEL_NATIVE_FILE_SYSTEM_DIRECTORY_FORMAT, title); case TabAlertState::NONE: return title; }
diff --git a/chrome/browser/ui/views/frame/browser_view_unittest.cc b/chrome/browser/ui/views/frame/browser_view_unittest.cc index da78100..b8a4bc09 100644 --- a/chrome/browser/ui/views/frame/browser_view_unittest.cc +++ b/chrome/browser/ui/views/frame/browser_view_unittest.cc
@@ -22,6 +22,7 @@ #include "chrome/grit/chromium_strings.h" #include "chrome/test/base/testing_profile_manager.h" #include "components/version_info/channel.h" +#include "content/public/test/test_service_manager_context.h" #include "ui/base/accelerators/accelerator.h" #include "ui/base/l10n/l10n_util.h" #include "ui/views/controls/webview/webview.h" @@ -52,7 +53,32 @@ } // namespace -typedef TestWithBrowserView BrowserViewTest; +class BrowserViewTest : public TestWithBrowserView { + public: + BrowserViewTest() = default; + ~BrowserViewTest() override = default; + + void SetUp() override { + TestWithBrowserView::SetUp(); + test_service_manager_context_ = + std::make_unique<content::TestServiceManagerContext>(); + } + + void TearDown() override { + // Must be reset before browser thread teardown. + test_service_manager_context_.reset(); + TestWithBrowserView::TearDown(); + } + + private: + // WebContentsImpl accesses + // content::ServiceManagerConnection::GetForProcess(), so we must make sure it + // is instantiated. + std::unique_ptr<content::TestServiceManagerContext> + test_service_manager_context_; + + DISALLOW_COPY_AND_ASSIGN(BrowserViewTest); +}; // Test basic construction and initialization. TEST_F(BrowserViewTest, BrowserView) {
diff --git a/chrome/browser/ui/views/frame/hosted_app_button_container.cc b/chrome/browser/ui/views/frame/hosted_app_button_container.cc index 95e60d3..d77910b 100644 --- a/chrome/browser/ui/views/frame/hosted_app_button_container.cc +++ b/chrome/browser/ui/views/frame/hosted_app_button_container.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/views/frame/hosted_app_button_container.h" +#include "base/feature_list.h" #include "base/metrics/histogram_macros.h" #include "base/task_runner.h" #include "base/threading/sequenced_task_runner_handle.h" @@ -19,6 +20,7 @@ #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h" #include "chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.h" #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" +#include "third_party/blink/public/common/features.h" #include "ui/base/hit_test.h" #include "ui/compositor/layer_animation_element.h" #include "ui/compositor/layer_animation_sequence.h" @@ -212,6 +214,8 @@ params.types_enabled.push_back(PageActionIconType::kManagePasswords); params.types_enabled.push_back(PageActionIconType::kTranslate); params.types_enabled.push_back(PageActionIconType::kZoom); + if (base::FeatureList::IsEnabled(blink::features::kNativeFileSystemAPI)) + params.types_enabled.push_back(PageActionIconType::kNativeFileSystemAccess); params.icon_size = GetLayoutConstant(HOSTED_APP_PAGE_ACTION_ICON_SIZE); params.icon_color = GetCaptionColor(); params.between_icon_spacing = HorizontalPaddingBetweenItems();
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc index 6eaed85..3ee9d3e 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -85,6 +85,7 @@ #include "content/public/common/url_constants.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/feature_switch.h" +#include "third_party/blink/public/common/features.h" #include "third_party/metrics_proto/omnibox_event.pb.h" #include "ui/accessibility/ax_node_data.h" #include "ui/base/clipboard/clipboard.h" @@ -237,6 +238,10 @@ params.types_enabled.push_back(PageActionIconType::kFind); params.types_enabled.push_back(PageActionIconType::kTranslate); params.types_enabled.push_back(PageActionIconType::kZoom); + if (base::FeatureList::IsEnabled(blink::features::kNativeFileSystemAPI)) { + params.types_enabled.push_back( + PageActionIconType::kNativeFileSystemAccess); + } } params.icon_size = GetLayoutConstant(LOCATION_BAR_ICON_SIZE); params.icon_color = icon_color;
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc new file mode 100644 index 0000000..b3b4b86f --- /dev/null +++ b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc
@@ -0,0 +1,68 @@ +// Copyright 2019 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/native_file_system/native_file_system_access_icon_view.h" + +#include "base/strings/utf_string_conversions.h" +#include "chrome/app/vector_icons/vector_icons.h" +#include "chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.h" +#include "chrome/grit/generated_resources.h" +#include "components/vector_icons/vector_icons.h" +#include "content/public/browser/web_contents.h" +#include "ui/base/l10n/l10n_util.h" + +NativeFileSystemAccessIconView::NativeFileSystemAccessIconView( + Delegate* delegate) + : PageActionIconView(nullptr, 0, delegate) { + SetVisible(false); +} + +views::BubbleDialogDelegateView* NativeFileSystemAccessIconView::GetBubble() + const { + return NativeFileSystemUsageBubbleView::GetBubble(); +} + +bool NativeFileSystemAccessIconView::Update() { + const bool was_visible = GetVisible(); + const bool had_write_access = has_write_access_; + + SetVisible(GetWebContents() && + (GetWebContents()->HasWritableNativeFileSystemHandles() || + GetWebContents()->HasNativeFileSystemDirectoryHandles())); + + has_write_access_ = GetWebContents() && + GetWebContents()->HasWritableNativeFileSystemHandles(); + if (has_write_access_ != had_write_access) + UpdateIconImage(); + return GetVisible() != was_visible || had_write_access != has_write_access_; +} + +base::string16 +NativeFileSystemAccessIconView::GetTextForTooltipAndAccessibleName() const { + return has_write_access_ + ? l10n_util::GetStringUTF16( + IDS_NATIVE_FILE_SYSTEM_WRITE_USAGE_TOOLTIP) + : l10n_util::GetStringUTF16( + IDS_NATIVE_FILE_SYSTEM_DIRECTORY_USAGE_TOOLTIP); +} + +void NativeFileSystemAccessIconView::OnExecuting(ExecuteSource execute_source) { + url::Origin origin = + url::Origin::Create(GetWebContents()->GetLastCommittedURL()); + + // TODO(https://crbug.com/979684): Display actual files and directories, + // rather than these random hard coded values. + NativeFileSystemUsageBubbleView::Usage usage; + usage.readable_directories.emplace_back(FILE_PATH_LITERAL("My Fonts")); + usage.writable_files.emplace_back(FILE_PATH_LITERAL("/foo/bar/demo.txt")); + usage.writable_files.emplace_back(FILE_PATH_LITERAL("README.md")); + usage.writable_directories.emplace_back(FILE_PATH_LITERAL("My Project")); + NativeFileSystemUsageBubbleView::ShowBubble(GetWebContents(), origin, + std::move(usage)); +} + +const gfx::VectorIcon& NativeFileSystemAccessIconView::GetVectorIcon() const { + return has_write_access_ ? kSaveOriginalFileIcon + : vector_icons::kInsertDriveFileOutlineIcon; +}
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.h b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.h new file mode 100644 index 0000000..b9fc1c4a --- /dev/null +++ b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.h
@@ -0,0 +1,30 @@ +// Copyright 2019 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_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_ACCESS_ICON_VIEW_H_ +#define CHROME_BROWSER_UI_VIEWS_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_ACCESS_ICON_VIEW_H_ + +#include "chrome/browser/ui/views/page_action/page_action_icon_view.h" + +// Page action icon indicating if the current page is using the native file +// system API. Shows different icons for read access to directories and write +// access to files or directories. +class NativeFileSystemAccessIconView : public PageActionIconView { + public: + explicit NativeFileSystemAccessIconView(Delegate* delegate); + + // PageActionIconView: + views::BubbleDialogDelegateView* GetBubble() const override; + bool Update() override; + base::string16 GetTextForTooltipAndAccessibleName() const override; + void OnExecuting(ExecuteSource execute_source) override; + const gfx::VectorIcon& GetVectorIcon() const override; + + private: + bool has_write_access_ = false; + + DISALLOW_COPY_AND_ASSIGN(NativeFileSystemAccessIconView); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_ACCESS_ICON_VIEW_H_
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc new file mode 100644 index 0000000..7e1c283 --- /dev/null +++ b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc
@@ -0,0 +1,202 @@ +// Copyright 2019 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/native_file_system/native_file_system_usage_bubble_view.h" + +#include "base/i18n/message_formatter.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/browser_window.h" +#include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "chrome/browser/ui/views/chrome_typography.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/page_action/omnibox_page_action_icon_container_view.h" +#include "chrome/grit/generated_resources.h" +#include "components/strings/grit/components_strings.h" +#include "components/url_formatter/elide_url.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/views/controls/label.h" +#include "ui/views/controls/styled_label.h" +#include "ui/views/layout/box_layout.h" + +NativeFileSystemUsageBubbleView::Usage::Usage() = default; +NativeFileSystemUsageBubbleView::Usage::~Usage() = default; +NativeFileSystemUsageBubbleView::Usage::Usage(Usage&&) = default; +NativeFileSystemUsageBubbleView::Usage& NativeFileSystemUsageBubbleView::Usage:: +operator=(Usage&&) = default; + +// static +NativeFileSystemUsageBubbleView* NativeFileSystemUsageBubbleView::bubble_ = + nullptr; + +// static +void NativeFileSystemUsageBubbleView::ShowBubble( + content::WebContents* web_contents, + const url::Origin& origin, + Usage usage) { + Browser* browser = chrome::FindBrowserWithWebContents(web_contents); + if (!browser) + return; + + OmniboxPageActionIconContainerView* anchor_view = + BrowserView::GetBrowserViewForBrowser(browser) + ->toolbar_button_provider() + ->GetOmniboxPageActionIconContainerView(); + + bubble_ = new NativeFileSystemUsageBubbleView( + anchor_view, gfx::Point(), web_contents, origin, std::move(usage)); + + bubble_->SetHighlightedButton(anchor_view->GetPageActionIconView( + PageActionIconType::kNativeFileSystemAccess)); + views::BubbleDialogDelegateView::CreateBubble(bubble_); + + bubble_->ShowForReason(DisplayReason::USER_GESTURE, + /*allow_refocus_alert=*/true); +} + +// static +void NativeFileSystemUsageBubbleView::CloseCurrentBubble() { + if (bubble_) + bubble_->CloseBubble(); +} + +// static +NativeFileSystemUsageBubbleView* NativeFileSystemUsageBubbleView::GetBubble() { + return bubble_; +} + +NativeFileSystemUsageBubbleView::NativeFileSystemUsageBubbleView( + views::View* anchor_view, + const gfx::Point& anchor_point, + content::WebContents* web_contents, + const url::Origin& origin, + Usage usage) + : LocationBarBubbleDelegateView(anchor_view, anchor_point, web_contents), + origin_(origin), + usage_(std::move(usage)) {} + +NativeFileSystemUsageBubbleView::~NativeFileSystemUsageBubbleView() = default; + +base::string16 NativeFileSystemUsageBubbleView::GetAccessibleWindowTitle() + const { + Browser* browser = chrome::FindBrowserWithWebContents(web_contents()); + // Don't crash if the web_contents is destroyed/unloaded. + if (!browser) + return {}; + + OmniboxPageActionIconContainerView* page_action_icon_container_view = + BrowserView::GetBrowserViewForBrowser(browser) + ->toolbar_button_provider() + ->GetOmniboxPageActionIconContainerView(); + if (!page_action_icon_container_view) + return {}; + + PageActionIconView* icon_view = + page_action_icon_container_view->GetPageActionIconView( + PageActionIconType::kNativeFileSystemAccess); + return icon_view->GetTextForTooltipAndAccessibleName(); +} + +int NativeFileSystemUsageBubbleView::GetDialogButtons() const { + return ui::DIALOG_BUTTON_OK; +} + +base::string16 NativeFileSystemUsageBubbleView::GetDialogButtonLabel( + ui::DialogButton button) const { + return l10n_util::GetStringUTF16(IDS_DONE); +} + +bool NativeFileSystemUsageBubbleView::ShouldShowCloseButton() const { + return false; +} + +void NativeFileSystemUsageBubbleView::Init() { + // Set up the layout of the bubble. + const views::LayoutProvider* provider = ChromeLayoutProvider::Get(); + SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, + provider->GetDialogInsetsForContentType(views::TEXT, views::TEXT), + provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL))); + set_margins( + gfx::Insets(provider->GetDistanceMetric( + views::DISTANCE_DIALOG_CONTENT_MARGIN_TOP_TEXT), + 0, + provider->GetDistanceMetric( + views::DISTANCE_DIALOG_CONTENT_MARGIN_BOTTOM_CONTROL), + 0)); + + AddPathList(IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_FILES_TEXT, + IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_FILES_TEXT, + usage_.writable_files); + AddPathList(IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_WRITABLE_DIRECTORIES_TEXT, + IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT, + usage_.writable_directories); + AddPathList(IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_READABLE_DIRECTORIES_TEXT, + IDS_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_DIRECTORIES_TEXT, + usage_.readable_directories); +} + +void NativeFileSystemUsageBubbleView::WindowClosing() { + // |bubble_| can be a new bubble by this point (as Close(); doesn't + // call this right away). Only set to nullptr when it's this bubble. + if (bubble_ == this) + bubble_ = nullptr; +} + +void NativeFileSystemUsageBubbleView::CloseBubble() { + // Widget's Close() is async, but we don't want to use bubble_ after + // this. Additionally web_contents() may have been destroyed. + bubble_ = nullptr; + LocationBarBubbleDelegateView::CloseBubble(); +} + +gfx::Size NativeFileSystemUsageBubbleView::CalculatePreferredSize() const { + const int width = ChromeLayoutProvider::Get()->GetDistanceMetric( + DISTANCE_MODAL_DIALOG_PREFERRED_WIDTH) - + margins().width(); + return gfx::Size(width, GetHeightForWidth(width)); +} + +void NativeFileSystemUsageBubbleView::AddPathList( + int caption_message_id, + int details_message_id, + const std::vector<base::FilePath>& paths) { + if (paths.empty()) + return; + + base::string16 formatted_origin = + url_formatter::FormatOriginForSecurityDisplay( + origin_, url_formatter::SchemeDisplay::OMIT_CRYPTOGRAPHIC); + size_t offset; + auto label = std::make_unique<views::StyledLabel>( + l10n_util::GetStringFUTF16(caption_message_id, formatted_origin, &offset), + nullptr); + label->SetTextContext(CONTEXT_BODY_TEXT_LARGE); + label->SetDefaultTextStyle(STYLE_SECONDARY); + label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + + views::StyledLabel::RangeStyleInfo origin_style; + origin_style.text_style = STYLE_EMPHASIZED_SECONDARY; + label->AddStyleRange(gfx::Range(offset, offset + formatted_origin.length()), + origin_style); + + AddChildView(std::move(label)); + + // TODO(https://crbug.com/980269): Properly localize this list. + base::string16 path_list; + for (const auto& f : paths) { + path_list.append(f.BaseName().LossyDisplayName()); + path_list.append(base::ASCIIToUTF16(", ")); + } + DCHECK_GE(path_list.size(), 2u); + path_list.resize(path_list.size() - 2); + auto paths_label = std::make_unique<views::Label>( + base::i18n::MessageFormatter::FormatWithNumberedArgs( + l10n_util::GetStringUTF16(details_message_id), int64_t{paths.size()}, + path_list), + CONTEXT_BODY_TEXT_SMALL, STYLE_EMPHASIZED_SECONDARY); + paths_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + AddChildView(std::move(paths_label)); +}
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.h b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.h new file mode 100644 index 0000000..c977915 --- /dev/null +++ b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.h
@@ -0,0 +1,69 @@ +// Copyright 2019 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_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_VIEW_H_ +#define CHROME_BROWSER_UI_VIEWS_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_VIEW_H_ + +#include <vector> + +#include "base/files/file_path.h" +#include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h" +#include "url/origin.h" + +class NativeFileSystemUsageBubbleView : public LocationBarBubbleDelegateView { + public: + struct Usage { + Usage(); + ~Usage(); + Usage(Usage&&); + Usage& operator=(Usage&&); + + std::vector<base::FilePath> readable_directories; + std::vector<base::FilePath> writable_files; + std::vector<base::FilePath> writable_directories; + }; + static void ShowBubble(content::WebContents* web_contents, + const url::Origin& origin, + Usage usage); + + // Closes the showing bubble (if one exists). + static void CloseCurrentBubble(); + + // Returns the bubble if the bubble is showing. Returns null otherwise. + static NativeFileSystemUsageBubbleView* GetBubble(); + + private: + NativeFileSystemUsageBubbleView(views::View* anchor_view, + const gfx::Point& anchor_point, + content::WebContents* web_contents, + const url::Origin& origin, + Usage usage); + ~NativeFileSystemUsageBubbleView() override; + + // LocationBarBubbleDelegateView: + base::string16 GetAccessibleWindowTitle() const override; + int GetDialogButtons() const override; + base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; + bool ShouldShowCloseButton() const override; + void Init() override; + void WindowClosing() override; + void CloseBubble() override; + gfx::Size CalculatePreferredSize() const override; + + void AddPathList(int caption_message_id, + int details_message_id, + const std::vector<base::FilePath>& paths); + + // Singleton instance of the bubble. The bubble can only be shown on the + // active browser window, so there is no case in which it will be shown + // twice at the same time. + static NativeFileSystemUsageBubbleView* bubble_; + + const url::Origin origin_; + const Usage usage_; + + DISALLOW_COPY_AND_ASSIGN(NativeFileSystemUsageBubbleView); +}; + +#endif // CHROME_BROWSER_UI_VIEWS_NATIVE_FILE_SYSTEM_NATIVE_FILE_SYSTEM_USAGE_BUBBLE_VIEW_H_
diff --git a/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc b/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc index 97bd5ab1..4dc6e36 100644 --- a/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc +++ b/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.cc
@@ -8,6 +8,7 @@ #include "chrome/browser/ui/views/location_bar/find_bar_icon.h" #include "chrome/browser/ui/views/location_bar/intent_picker_view.h" #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" +#include "chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.h" #include "chrome/browser/ui/views/page_action/pwa_install_view.h" #include "chrome/browser/ui/views/page_action/zoom_view.h" #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" @@ -72,6 +73,11 @@ params.command_updater, params.page_action_icon_delegate); page_action_icons_.push_back(send_tab_to_self_icon_view_); break; + case PageActionIconType::kNativeFileSystemAccess: + native_file_system_icon_ = new NativeFileSystemAccessIconView( + params.page_action_icon_delegate); + page_action_icons_.push_back(native_file_system_icon_); + break; case PageActionIconType::kLocalCardMigration: case PageActionIconType::kSaveCard: NOTREACHED(); @@ -114,6 +120,8 @@ return zoom_view_; case PageActionIconType::kSendTabToSelf: return send_tab_to_self_icon_view_; + case PageActionIconType::kNativeFileSystemAccess: + return native_file_system_icon_; case PageActionIconType::kLocalCardMigration: case PageActionIconType::kSaveCard: NOTREACHED();
diff --git a/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.h b/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.h index 01496529..0857e09e 100644 --- a/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.h +++ b/chrome/browser/ui/views/page_action/omnibox_page_action_icon_container_view.h
@@ -20,6 +20,7 @@ class FindBarIcon; class IntentPickerView; class ManagePasswordsIconViews; +class NativeFileSystemAccessIconView; class PwaInstallView; class TranslateIconView; class ZoomView; @@ -88,6 +89,7 @@ send_tab_to_self::SendTabToSelfIconView* send_tab_to_self_icon_view_ = nullptr; TranslateIconView* translate_icon_ = nullptr; + NativeFileSystemAccessIconView* native_file_system_icon_ = nullptr; std::vector<PageActionIconView*> page_action_icons_; ScopedObserver<zoom::ZoomEventManager, zoom::ZoomEventManagerObserver>
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc index 1a532ca..566dfef 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -825,6 +825,7 @@ #if defined(GOOGLE_CHROME_BUILD) void ProfileChooserView::AddManageGoogleAccountButton() { + AddMenuGroup(false); manage_google_account_button_ = CreateAndAddButton( GetGoogleIconForUserMenu(GetDefaultIconSize()), l10n_util::GetStringUTF16(IDS_SETTINGS_MANAGE_GOOGLE_ACCOUNT));
diff --git a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc index 4d9dc614..6eb3d50 100644 --- a/chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ b/chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -345,7 +345,9 @@ contents_view->SetLayoutManager(std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kVertical, gfx::Insets())); - for (MenuItems& group : menu_item_groups_) { + for (unsigned group_index = 0; group_index < menu_item_groups_.size(); + group_index++) { + MenuItems& group = menu_item_groups_[group_index]; if (group.items.empty()) { // An empty group represents a separator. contents_view->AddChildView(new views::Separator()); @@ -380,6 +382,16 @@ child_spacing = kLarge; } + // Reduce margins if previous/next group is not a separator. + if (group_index + 1 < menu_item_groups_.size() && + !menu_item_groups_[group_index + 1].items.empty()) { + bottom_margin = kTiny; + } + if (group_index > 0 && + !menu_item_groups_[group_index - 1].items.empty()) { + top_margin = kTiny; + } + sub_view->SetLayoutManager(std::make_unique<views::BoxLayout>( views::BoxLayout::Orientation::kVertical, gfx::Insets(GetMarginSize(top_margin), 0,
diff --git a/chrome/browser/ui/views/tabs/alert_indicator.cc b/chrome/browser/ui/views/tabs/alert_indicator.cc index e9920120..d5cc008 100644 --- a/chrome/browser/ui/views/tabs/alert_indicator.cc +++ b/chrome/browser/ui/views/tabs/alert_indicator.cc
@@ -115,6 +115,12 @@ case TabAlertState::VR_PRESENTING_IN_HEADSET: icon = &kVrHeadsetIcon; break; + case TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES: + icon = &kSaveOriginalFileIcon; + break; + case TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS: + icon = &vector_icons::kInsertDriveFileOutlineIcon; + break; case TabAlertState::NONE: return gfx::Image(); }
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc index 604f659b..d59b4b5 100644 --- a/chrome/browser/ui/views/tabs/tab.cc +++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -720,6 +720,8 @@ case TabAlertState::SERIAL_CONNECTED: case TabAlertState::NONE: case TabAlertState::VR_PRESENTING_IN_HEADSET: + case TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES: + case TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS: return button_color_; default: NOTREACHED(); @@ -858,6 +860,14 @@ result.append( l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_ALERT_STATE_VR_PRESENTING)); break; + case TabAlertState::WRITABLE_NATIVE_FILE_SYSTEM_HANDLES: + result.append(l10n_util::GetStringUTF16( + IDS_TOOLTIP_TAB_ALERT_STATE_NATIVE_FILE_SYSTEM_WRITABLE)); + break; + case TabAlertState::NATIVE_FILE_SYSTEM_DIRECTORY_ACCESS: + result.append(l10n_util::GetStringUTF16( + IDS_TOOLTIP_TAB_ALERT_STATE_NATIVE_FILE_SYSTEM_DIRECTORY)); + break; case TabAlertState::NONE: NOTREACHED(); break;
diff --git a/chrome/browser/web_applications/test/test_data_retriever.cc b/chrome/browser/web_applications/test/test_data_retriever.cc index c5d893c..1db514ad 100644 --- a/chrome/browser/web_applications/test/test_data_retriever.cc +++ b/chrome/browser/web_applications/test/test_data_retriever.cc
@@ -24,8 +24,10 @@ content::WebContents* web_contents, GetWebApplicationInfoCallback callback) { DCHECK(web_contents); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), std::move(web_app_info_))); + + completion_callback_ = + base::BindOnce(std::move(callback), std::move(web_app_info_)); + ScheduleCompletionCallback(); } void TestDataRetriever::CheckInstallabilityAndRetrieveManifest( @@ -34,10 +36,10 @@ CheckInstallabilityCallback callback) { DCHECK(manifest_); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, + completion_callback_ = base::BindOnce(std::move(callback), *manifest_, - /*valid_manifest_for_web_app=*/true, is_installable_)); + /*valid_manifest_for_web_app=*/true, is_installable_); + ScheduleCompletionCallback(); } void TestDataRetriever::GetIcons(content::WebContents* web_contents, @@ -50,8 +52,10 @@ get_icons_delegate_.Run(web_contents, icon_urls, skip_page_favicons); } - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), std::move(icons_map_))); + completion_callback_ = + base::BindOnce(std::move(callback), std::move(icons_map_)); + ScheduleCompletionCallback(); + icons_map_.clear(); } @@ -94,4 +98,15 @@ SetIcons(IconsMap{}); } +void TestDataRetriever::ScheduleCompletionCallback() { + // If |this| DataRetriever destroyed, the completion callback gets cancelled. + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(&TestDataRetriever::CallCompletionCallback, + weak_ptr_factory_.GetWeakPtr())); +} + +void TestDataRetriever::CallCompletionCallback() { + std::move(completion_callback_).Run(); +} + } // namespace web_app
diff --git a/chrome/browser/web_applications/test/test_data_retriever.h b/chrome/browser/web_applications/test/test_data_retriever.h index 149cce1..8f07aa5 100644 --- a/chrome/browser/web_applications/test/test_data_retriever.h +++ b/chrome/browser/web_applications/test/test_data_retriever.h
@@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "chrome/browser/web_applications/components/web_app_data_retriever.h" #include "chrome/browser/web_applications/components/web_app_install_utils.h" @@ -61,6 +62,10 @@ void BuildDefaultDataToRetrieve(const GURL& url, const GURL& scope); private: + void ScheduleCompletionCallback(); + void CallCompletionCallback(); + + base::OnceClosure completion_callback_; std::unique_ptr<WebApplicationInfo> web_app_info_; std::unique_ptr<blink::Manifest> manifest_; @@ -71,6 +76,8 @@ base::OnceClosure destruction_callback_; + base::WeakPtrFactory<TestDataRetriever> weak_ptr_factory_{this}; + DISALLOW_COPY_AND_ASSIGN(TestDataRetriever); };
diff --git a/chrome/browser/web_applications/test/test_install_finalizer.cc b/chrome/browser/web_applications/test/test_install_finalizer.cc index 4521912..b937b8a 100644 --- a/chrome/browser/web_applications/test/test_install_finalizer.cc +++ b/chrome/browser/web_applications/test/test_install_finalizer.cc
@@ -108,7 +108,7 @@ bool TestInstallFinalizer::CanSkipAppUpdateForSync( const AppId& app_id, const WebApplicationInfo& web_app_info) const { - return false; + return next_can_skip_app_update_for_sync_; } void TestInstallFinalizer::SetNextFinalizeInstallResult( @@ -125,4 +125,9 @@ next_uninstall_external_web_app_results_[app_url] = uninstalled; } +void TestInstallFinalizer::SetNextCanSkipAppUpdateForSync( + bool can_skip_app_update_for_sync) { + next_can_skip_app_update_for_sync_ = can_skip_app_update_for_sync; +} + } // namespace web_app
diff --git a/chrome/browser/web_applications/test/test_install_finalizer.h b/chrome/browser/web_applications/test/test_install_finalizer.h index 6cf9fa95..a0e71f0 100644 --- a/chrome/browser/web_applications/test/test_install_finalizer.h +++ b/chrome/browser/web_applications/test/test_install_finalizer.h
@@ -51,6 +51,7 @@ InstallResultCode code); void SetNextUninstallExternalWebAppResult(const GURL& app_url, bool uninstalled); + void SetNextCanSkipAppUpdateForSync(bool can_skip_app_update_for_sync); std::unique_ptr<WebApplicationInfo> web_app_info() { return std::move(web_app_info_copy_); @@ -77,6 +78,7 @@ base::Optional<AppId> next_app_id_; base::Optional<InstallResultCode> next_result_code_; std::map<GURL, bool> next_uninstall_external_web_app_results_; + bool next_can_skip_app_update_for_sync_ = false; int num_create_os_shortcuts_calls_ = 0; int num_reparent_tab_calls_ = 0;
diff --git a/chrome/browser/web_applications/web_app_install_manager.cc b/chrome/browser/web_applications/web_app_install_manager.cc index e4be72f..d36a25c 100644 --- a/chrome/browser/web_applications/web_app_install_manager.cc +++ b/chrome/browser/web_applications/web_app_install_manager.cc
@@ -34,8 +34,9 @@ WebAppInstallManager::~WebAppInstallManager() = default; void WebAppInstallManager::Shutdown() { - InstallManager::Shutdown(); + is_shutting_down_ = true; + InstallManager::Shutdown(); { TaskQueue empty; task_queue_.swap(empty); @@ -120,6 +121,9 @@ const AppId& app_id, std::unique_ptr<WebApplicationInfo> web_application_info, OnceInstallCallback callback) { + if (is_shutting_down_) + return; + if (install_finalizer_->CanSkipAppUpdateForSync(app_id, *web_application_info)) { std::move(callback).Run(app_id, InstallResultCode::kAlreadyInstalled); @@ -169,6 +173,9 @@ } void WebAppInstallManager::MaybeStartQueuedTask() { + if (is_shutting_down_) + return; + DCHECK(web_contents_ready_); DCHECK(!task_queue_.empty()); @@ -221,6 +228,7 @@ return; DCHECK(!web_contents_ready_); + DCHECK(!is_shutting_down_); web_contents_ = content::WebContents::Create( content::WebContents::CreateParams(profile()));
diff --git a/chrome/browser/web_applications/web_app_install_manager.h b/chrome/browser/web_applications/web_app_install_manager.h index cbc84347..e7a2f2f66 100644 --- a/chrome/browser/web_applications/web_app_install_manager.h +++ b/chrome/browser/web_applications/web_app_install_manager.h
@@ -111,6 +111,8 @@ AppRegistrar* app_registrar_; InstallFinalizer* install_finalizer_; + bool is_shutting_down_ = false; + base::WeakPtrFactory<WebAppInstallManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebAppInstallManager);
diff --git a/chrome/browser/web_applications/web_app_install_manager_unittest.cc b/chrome/browser/web_applications/web_app_install_manager_unittest.cc index 89fd019..f0522fe 100644 --- a/chrome/browser/web_applications/web_app_install_manager_unittest.cc +++ b/chrome/browser/web_applications/web_app_install_manager_unittest.cc
@@ -45,6 +45,10 @@ profile(), registrar_.get(), install_finalizer_.get()); auto test_url_loader = std::make_unique<TestWebAppUrlLoader>(); + + test_url_loader->SetNextLoadUrlResult(GURL("about:blank"), + WebAppUrlLoader::Result::kUrlLoaded); + test_url_loader_ = test_url_loader.get(); install_manager_->SetUrlLoaderForTesting(std::move(test_url_loader)); } @@ -63,6 +67,15 @@ return web_app_info; } + void DestroyManagers() { + // The reverse order of creation: + install_manager_.reset(); + install_finalizer_.reset(); + registrar_.reset(); + + test_url_loader_ = nullptr; + } + private: std::unique_ptr<TestAppRegistrar> registrar_; std::unique_ptr<WebAppInstallManager> install_manager_; @@ -80,9 +93,6 @@ const GURL url2{"https://example.org/path"}; const AppId app2_id = GenerateAppIdFromURL(url2); - url_loader().SetNextLoadUrlResult(GURL("about:blank"), - WebAppUrlLoader::Result::kUrlLoaded); - // 1 InstallTask == 1 DataRetriever, their lifetime matches. base::flat_set<TestDataRetriever*> task_data_retrievers; @@ -194,4 +204,100 @@ EXPECT_EQ(expected_event_order, event_order); } +TEST_F(WebAppInstallManagerTest, + InstallOrUpdateWebAppFromSync_InstallManagerShutdown) { + const GURL app_url("https://example.com/path"); + const AppId app_id = GenerateAppIdFromURL(app_url); + NavigateAndCommit(app_url); + + base::RunLoop run_loop; + + install_manager().SetDataRetrieverFactoryForTesting( + base::BindLambdaForTesting([&]() { + auto data_retriever = std::make_unique<TestDataRetriever>(); + + // Every InstallTask starts with WebAppDataRetriever::GetIcons step. + data_retriever->SetGetIconsDelegate(base::BindLambdaForTesting( + [&](content::WebContents* web_contents, + const std::vector<GURL>& icon_urls, bool skip_page_favicons) { + run_loop.Quit(); + + IconsMap icons_map; + AddIconToIconsMap(kIconUrl, icon_size::k256, SK_ColorBLUE, + &icons_map); + return icons_map; + })); + + return std::unique_ptr<WebAppDataRetriever>(std::move(data_retriever)); + })); + + install_manager().InstallOrUpdateWebAppFromSync( + app_id, CreateWebAppInfo(app_url), + base::BindLambdaForTesting( + [](const web_app::AppId& installed_app_id, + web_app::InstallResultCode code) { NOTREACHED(); })); + EXPECT_TRUE(install_manager().has_web_contents_for_testing()); + + // Wait for the task started. + run_loop.Run(); + EXPECT_TRUE(install_manager().has_web_contents_for_testing()); + + // Destroy InstallManager: Call Shutdown as if Profile gets destroyed. + install_manager().Shutdown(); + EXPECT_FALSE(install_manager().has_web_contents_for_testing()); + + // Delete InstallManager object. + DestroyManagers(); +} + +TEST_F(WebAppInstallManagerTest, + InstallOrUpdateWebAppFromSync_InstallAfterShutdown) { + const GURL app1_url("https://example.com/path"); + const AppId app1_id = GenerateAppIdFromURL(app1_url); + + install_manager().InstallOrUpdateWebAppFromSync( + app1_id, CreateWebAppInfo(app1_url), + base::BindLambdaForTesting( + [&](const web_app::AppId& installed_app_id, + web_app::InstallResultCode code) { NOTREACHED(); })); + EXPECT_TRUE(install_manager().has_web_contents_for_testing()); + + // Destroy InstallManager: Call Shutdown as if Profile gets destroyed. + install_manager().Shutdown(); + EXPECT_FALSE(install_manager().has_web_contents_for_testing()); + + const GURL app2_url("https://example.org/path"); + const AppId app2_id = GenerateAppIdFromURL(app2_url); + + install_manager().InstallOrUpdateWebAppFromSync( + app2_id, CreateWebAppInfo(app2_url), + base::BindLambdaForTesting( + [&](const web_app::AppId& installed_app_id, + web_app::InstallResultCode code) { NOTREACHED(); })); + EXPECT_FALSE(install_manager().has_web_contents_for_testing()); + + // Delete InstallManager object. + DestroyManagers(); +} + +TEST_F(WebAppInstallManagerTest, + InstallOrUpdateWebAppFromSync_CanSkipAppUpdateForSync) { + const GURL app_url("https://example.com/path"); + const AppId app_id = GenerateAppIdFromURL(app_url); + NavigateAndCommit(app_url); + + finalizer().SetNextCanSkipAppUpdateForSync(true); + + base::RunLoop run_loop; + install_manager().InstallOrUpdateWebAppFromSync( + app_id, CreateWebAppInfo(app_url), + base::BindLambdaForTesting([&](const web_app::AppId& installed_app_id, + web_app::InstallResultCode code) { + EXPECT_EQ(InstallResultCode::kAlreadyInstalled, code); + EXPECT_EQ(app_id, installed_app_id); + run_loop.Quit(); + })); + run_loop.Run(); +} + } // namespace web_app
diff --git a/chrome/services/cups_ipp_parser/BUILD.gn b/chrome/services/cups_ipp_parser/BUILD.gn index bccae5f1e..c390c5b79 100644 --- a/chrome/services/cups_ipp_parser/BUILD.gn +++ b/chrome/services/cups_ipp_parser/BUILD.gn
@@ -7,7 +7,7 @@ enable_service = use_cups && is_chromeos -source_set("lib") { +source_set("cups_ipp_parser") { sources = [ "cups_ipp_parser_service.cc", "cups_ipp_parser_service.h",
diff --git a/chrome/services/cups_ipp_parser/ipp_parser.cc b/chrome/services/cups_ipp_parser/ipp_parser.cc index 4bd2863..c0c6576 100644 --- a/chrome/services/cups_ipp_parser/ipp_parser.cc +++ b/chrome/services/cups_ipp_parser/ipp_parser.cc
@@ -4,7 +4,7 @@ #include "chrome/services/cups_ipp_parser/ipp_parser.h" -#include <cups/cups.h> +#include <cups/ipp.h> #include <memory> #include <string> #include <utility> @@ -65,23 +65,6 @@ return idx - end_of_headers_delimiter_size; } -// Return the starting index of the IPP data/payload (pdf). -// Returns |ipp_metadata|.size() on empty IPP data and -1 on failure. -int LocateStartOfIppData(base::span<const uint8_t> ipp_metadata) { - std::vector<uint8_t> sentinel_wrapper( - ipp_converter::ConvertToByteBuffer(kIppSentinel)); - auto it = std::search(ipp_metadata.begin(), ipp_metadata.end(), - sentinel_wrapper.begin(), sentinel_wrapper.end()); - if (it == ipp_metadata.end()) { - return -1; - } - - // Advance to the start of IPP data and check existence or end of request. - it += strlen(kIppSentinel); - return it <= ipp_metadata.end() ? std::distance(ipp_metadata.begin(), it) - : -1; -} - // Returns the starting index of the IPP metadata, -1 on failure. int LocateStartOfIppMetadata(base::span<const uint8_t> request) { std::vector<char> char_buffer = ipp_converter::ConvertToCharBuffer(request); @@ -132,24 +115,27 @@ return ipp_converter::ParseHeaders(headers_slice); } -mojom::IppMessagePtr ExtractIppMessage(base::span<const uint8_t> ipp_metadata) { +// Parses |ipp_metadata| and sets |ipp_message| and |ipp_data| accordingly. +// Returns false and leaves the outputs unchanged on failure. +bool ExtractIppMetadata(base::span<const uint8_t> ipp_metadata, + mojom::IppMessagePtr* ipp_message, + std::vector<uint8_t>* ipp_data) { printing::ScopedIppPtr ipp = ipp_converter::ParseIppMessage(ipp_metadata); if (!ipp) { - return nullptr; + return false; } - return ipp_converter::ConvertIppToMojo(ipp.get()); -} - -base::Optional<std::vector<uint8_t>> ExtractIppData( - base::span<const uint8_t> ipp_metadata) { - auto start_of_ipp_data = LocateStartOfIppData(ipp_metadata); - if (start_of_ipp_data < 0) { - return base::nullopt; + mojom::IppMessagePtr message = ipp_converter::ConvertIppToMojo(ipp.get()); + if (!message) { + return false; } - ipp_metadata = ipp_metadata.subspan(start_of_ipp_data); - return std::vector<uint8_t>{ipp_metadata.begin(), ipp_metadata.end()}; + size_t ipp_message_length = ippLength(ipp.get()); + ipp_metadata = ipp_metadata.subspan(ipp_message_length); + *ipp_data = std::vector<uint8_t>(ipp_metadata.begin(), ipp_metadata.end()); + + *ipp_message = std::move(message); + return true; } } // namespace @@ -182,16 +168,11 @@ return Fail("Failed to parse headers", std::move(callback)); } - // Parse IPP message. - auto ipp_message = ExtractIppMessage(ipp_metadata); - if (!ipp_message) { - return Fail("Failed to parse IPP message", std::move(callback)); - } - - // Parse IPP data. - auto ipp_data = ExtractIppData(ipp_metadata); - if (!ipp_data) { - return Fail("Failed to parse IPP data", std::move(callback)); + // Parse IPP message and IPP data. + mojom::IppMessagePtr ipp_message; + std::vector<uint8_t> ipp_data; + if (!ExtractIppMetadata(ipp_metadata, &ipp_message, &ipp_data)) { + return Fail("Failed to parse IPP metadata", std::move(callback)); } // Marshall response. @@ -204,7 +185,7 @@ parsed_request->headers = std::move(*headers); parsed_request->ipp = std::move(ipp_message); - parsed_request->data = std::move(*ipp_data); + parsed_request->data = std::move(ipp_data); DVLOG(1) << "Finished parsing IPP request."; std::move(callback).Run(std::move(parsed_request));
diff --git a/chrome/services/cups_ipp_parser/public/cpp/BUILD.gn b/chrome/services/cups_ipp_parser/public/cpp/BUILD.gn index 6bf1de6e..0c3b4ff 100644 --- a/chrome/services/cups_ipp_parser/public/cpp/BUILD.gn +++ b/chrome/services/cups_ipp_parser/public/cpp/BUILD.gn
@@ -8,7 +8,7 @@ if (use_cups) { source_set("cpp") { sources = [ - "ipp_converter.cpp", + "ipp_converter.cc", "ipp_converter.h", ] @@ -26,7 +26,8 @@ } # Fuzzer target only available on fuzzing builds. - if (use_fuzzing_engine) { + # TODO(crbug.com/831914): Enable this fuzzer once its running on CrOS only. + if (use_fuzzing_engine && is_chromeos) { fuzzer_test("ipp_message_parser_fuzzer") { sources = [ "ipp_message_parser_fuzzer.cc",
diff --git a/chrome/services/cups_ipp_parser/public/cpp/ipp_converter.cpp b/chrome/services/cups_ipp_parser/public/cpp/ipp_converter.cc similarity index 100% rename from chrome/services/cups_ipp_parser/public/cpp/ipp_converter.cpp rename to chrome/services/cups_ipp_parser/public/cpp/ipp_converter.cc
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn index 881c9dc..f0c64b2a0 100644 --- a/chrome/test/android/BUILD.gn +++ b/chrome/test/android/BUILD.gn
@@ -50,6 +50,7 @@ "javatests/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinatorTestUtils.java", "javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java", "javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java", + "javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java", "javatests/src/org/chromium/chrome/test/ChromeJUnit4ClassRunner.java", "javatests/src/org/chromium/chrome/test/ChromeJUnit4RunnerDelegate.java", "javatests/src/org/chromium/chrome/test/ChromeTabbedActivityTestRule.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/test/ChromeBrowserTestRule.java b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java similarity index 96% rename from chrome/android/javatests/src/org/chromium/chrome/browser/test/ChromeBrowserTestRule.java rename to chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java index 06120a16..5bf8d65 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/test/ChromeBrowserTestRule.java +++ b/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeBrowserTestRule.java
@@ -2,7 +2,7 @@ // 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.test; +package org.chromium.chrome.test; import org.junit.runner.Description; import org.junit.runners.model.Statement;
diff --git a/chrome/test/data/webui/bookmarks/dnd_manager_test.js b/chrome/test/data/webui/bookmarks/dnd_manager_test.js index 6e0231ab..524b5438 100644 --- a/chrome/test/data/webui/bookmarks/dnd_manager_test.js +++ b/chrome/test/data/webui/bookmarks/dnd_manager_test.js
@@ -280,6 +280,14 @@ assertDeepEquals(['11'], getDragIds()); }); + test('drag multiple list items preserve displaying order', function() { + // Dragging multiple items with different selection order. + store.data.selection.items = new Set(['15', '13']); + let dragElement = getListItem('13'); + simulateDragStart(dragElement); + assertDeepEquals(['13', '15'], getDragIds()); + }); + test('bookmarks from different profiles', function() { dndManager.handleChromeDragEnter_(createDragData(['11'], false)); @@ -352,6 +360,20 @@ DropPosition.NONE, dndManager.calculateValidDropPositions_(list)); }); + // This is a regression test for https://crbug.com/974525. + test( + 'drag bookmark that is not in selected folder but in search result', + function() { + store.data.search.term = 'Asgore'; + store.data.search.results = ['11', '13', '2']; + store.data.selectedFolder = null; + store.notifyObservers(); + + simulateDragStart(getListItem('13')); + + assertDeepEquals(['13'], getDragIds()); + }); + test('calculateDropInfo_', function() { function assertDropInfo(parentId, index, element, position) { assertDeepEquals(
diff --git a/chrome/test/data/webui/multidevice_setup/multidevice_setup_browsertest.js b/chrome/test/data/webui/multidevice_setup/multidevice_setup_browsertest.js index 3eb4217..e272a7a 100644 --- a/chrome/test/data/webui/multidevice_setup/multidevice_setup_browsertest.js +++ b/chrome/test/data/webui/multidevice_setup/multidevice_setup_browsertest.js
@@ -23,7 +23,7 @@ ...PolymerTest.prototype.extraLibraries, '../test_browser_proxy.js', '../fake_chrome_event.js', // Necessary for fake_quick_unlock_private.js - '../settings/fake_quick_unlock_private.js', + '../settings/chromeos/fake_quick_unlock_private.js', '../settings/test_util.js', 'integration_test.js', 'setup_succeeded_page_test.js',
diff --git a/chrome/test/data/webui/settings/add_users_tests.js b/chrome/test/data/webui/settings/chromeos/add_users_tests.js similarity index 100% rename from chrome/test/data/webui/settings/add_users_tests.js rename to chrome/test/data/webui/settings/chromeos/add_users_tests.js
diff --git a/chrome/test/data/webui/settings/android_apps_page_test.js b/chrome/test/data/webui/settings/chromeos/android_apps_page_test.js similarity index 99% rename from chrome/test/data/webui/settings/android_apps_page_test.js rename to chrome/test/data/webui/settings/chromeos/android_apps_page_test.js index 468d7ddb..c2104a1 100644 --- a/chrome/test/data/webui/settings/android_apps_page_test.js +++ b/chrome/test/data/webui/settings/chromeos/android_apps_page_test.js
@@ -187,5 +187,4 @@ return promise; }); }); - });
diff --git a/chrome/test/data/webui/settings/bluetooth_page_tests.js b/chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js similarity index 100% rename from chrome/test/data/webui/settings/bluetooth_page_tests.js rename to chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js
diff --git a/chrome/test/data/webui/settings/crostini_page_test.js b/chrome/test/data/webui/settings/chromeos/crostini_page_test.js similarity index 100% rename from chrome/test/data/webui/settings/crostini_page_test.js rename to chrome/test/data/webui/settings/chromeos/crostini_page_test.js
diff --git a/chrome/test/data/webui/settings/cups_printer_page_tests.js b/chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js similarity index 100% rename from chrome/test/data/webui/settings/cups_printer_page_tests.js rename to chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js
diff --git a/chrome/test/data/webui/settings/device_page_tests.js b/chrome/test/data/webui/settings/chromeos/device_page_tests.js similarity index 100% rename from chrome/test/data/webui/settings/device_page_tests.js rename to chrome/test/data/webui/settings/chromeos/device_page_tests.js
diff --git a/chrome/test/data/webui/settings/fake_bluetooth.js b/chrome/test/data/webui/settings/chromeos/fake_bluetooth.js similarity index 100% rename from chrome/test/data/webui/settings/fake_bluetooth.js rename to chrome/test/data/webui/settings/chromeos/fake_bluetooth.js
diff --git a/chrome/test/data/webui/settings/fake_bluetooth_private.js b/chrome/test/data/webui/settings/chromeos/fake_bluetooth_private.js similarity index 100% rename from chrome/test/data/webui/settings/fake_bluetooth_private.js rename to chrome/test/data/webui/settings/chromeos/fake_bluetooth_private.js
diff --git a/chrome/test/data/webui/settings/fake_input_method_private.js b/chrome/test/data/webui/settings/chromeos/fake_input_method_private.js similarity index 100% rename from chrome/test/data/webui/settings/fake_input_method_private.js rename to chrome/test/data/webui/settings/chromeos/fake_input_method_private.js
diff --git a/chrome/test/data/webui/settings/fake_quick_unlock_private.js b/chrome/test/data/webui/settings/chromeos/fake_quick_unlock_private.js similarity index 100% rename from chrome/test/data/webui/settings/fake_quick_unlock_private.js rename to chrome/test/data/webui/settings/chromeos/fake_quick_unlock_private.js
diff --git a/chrome/test/data/webui/settings/fake_quick_unlock_uma.js b/chrome/test/data/webui/settings/chromeos/fake_quick_unlock_uma.js similarity index 100% rename from chrome/test/data/webui/settings/fake_quick_unlock_uma.js rename to chrome/test/data/webui/settings/chromeos/fake_quick_unlock_uma.js
diff --git a/chrome/test/data/webui/settings/fake_system_display.js b/chrome/test/data/webui/settings/chromeos/fake_system_display.js similarity index 100% rename from chrome/test/data/webui/settings/fake_system_display.js rename to chrome/test/data/webui/settings/chromeos/fake_system_display.js
diff --git a/chrome/test/data/webui/settings/fingerprint_browsertest_chromeos.js b/chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js similarity index 100% rename from chrome/test/data/webui/settings/fingerprint_browsertest_chromeos.js rename to chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js
diff --git a/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js b/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js new file mode 100644 index 0000000..3256734 --- /dev/null +++ b/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js
@@ -0,0 +1,82 @@ +// Copyright 2019 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 Suite of tests for the OS Settings advanced page. */ + +suite('OSSettingsPage', function() { + /** @type {?OsSettingsMainElement} */ + let settingsMain = null; + + setup(async () => { + settingsMain = + document.querySelector('os-settings-ui').$$('os-settings-main'); + assert(!!settingsMain); + settingsMain.advancedToggleExpanded = !settingsMain.advancedToggleExpanded; + await PolymerTest.flushTasks(); + }); + + function getSection(page, section) { + const sections = page.shadowRoot.querySelectorAll('settings-section'); + assertTrue(!!sections); + for (let i = 0; i < sections.length; ++i) { + const s = sections[i]; + if (s.section == section) { + return s; + } + } + return undefined; + } + + /** + * Verifies the section has a visible #main element and that any possible + * sub-pages are hidden. + * @param {!Node} The DOM node for the section. + */ + function verifySubpagesHidden(section) { + // Check if there are sub-pages to verify. + const pages = section.firstElementChild.shadowRoot.querySelector( + 'settings-animated-pages'); + if (!pages) { + return; + } + + const children = pages.getContentChildren(); + const stampedChildren = children.filter(function(element) { + return element.tagName != 'TEMPLATE'; + }); + + // The section's main child should be stamped and visible. + const main = stampedChildren.filter(function(element) { + return element.getAttribute('route-path') == 'default'; + }); + assertEquals( + main.length, 1, + 'default card not found for section ' + section.section); + assertGT(main[0].offsetHeight, 0); + + // Any other stamped subpages should not be visible. + const subpages = stampedChildren.filter(function(element) { + return element.getAttribute('route-path') != 'default'; + }); + for (const subpage of subpages) { + assertEquals( + subpage.offsetHeight, 0, + 'Expected subpage #' + subpage.id + ' in ' + section.section + + ' not to be visible.'); + } + } + + test('AdvancedSections', function() { + const page = settingsMain.$$('os-settings-page'); + assertTrue(!!page); + let sections = + ['privacy', 'languages', 'downloads', 'reset', 'dateTime', 'a11y']; + + for (let i = 0; i < sections.length; i++) { + const section = getSection(page, sections[i]); + assertTrue(!!section); + verifySubpagesHidden(section); + } + }); +});
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 4235ad15..edc2f1e 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js +++ b/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js
@@ -61,12 +61,32 @@ // Settings tests are flaky on debug. See https://crbug.com/968608. GEN('#if !defined(NDEBUG)'); -GEN('#define MAYBE_All DISABLED_All'); +GEN('#define MAYBE_AllJavascriptTests DISABLED_AllJavascriptTests'); GEN('#else'); -GEN('#define MAYBE_All All'); +GEN('#define MAYBE_AllJavascriptTests AllJavascriptTests'); GEN('#endif'); -TEST_F('OSSettingsSmbPageTest', 'MAYBE_All', function() { +TEST_F('OSSettingsSmbPageTest', 'MAYBE_AllJavascriptTests', function() { + mocha.run(); +}); + +// Test fixture for the chrome://os-settings/accounts page +// eslint-disable-next-line no-var +var OSSettingsAddUsersTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'accounts.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + 'add_users_tests.js', + ]); + } +}; + +TEST_F('OSSettingsAddUsersTest', 'MAYBE_AllJavascriptTests', function() { mocha.run(); }); @@ -89,7 +109,7 @@ } }; -TEST_F('OSSettingsMainTest', 'MAYBE_All', function() { +TEST_F('OSSettingsMainTest', 'MAYBE_AllJavascriptTests', function() { mocha.run(); }); @@ -105,7 +125,7 @@ } }; -TEST_F('OSSettingsMenuTest', 'MAYBE_All', function() { +TEST_F('OSSettingsMenuTest', 'MAYBE_AllJavascriptTests', function() { mocha.run(); }); @@ -124,10 +144,11 @@ } }; -TEST_F('OSSettingsPeoplePageTest', 'MAYBE_All', function() { +TEST_F('OSSettingsPeoplePageTest', 'MAYBE_AllJavascriptTests', function() { mocha.run(); }); +// Tests for the About section. // eslint-disable-next-line no-var var OSSettingsAboutPageTest = class extends OSSettingsBrowserTest { /** @override */ @@ -159,10 +180,179 @@ }); GEN('#endif'); +// Tests for the App section. +// eslint-disable-next-line no-var +var OSSettingsAndroidAppsPageTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'android_apps_page/android_apps_page.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + '//ui/webui/resources/js/promise_resolver.js', + BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', + BROWSER_SETTINGS_PATH + 'test_android_apps_browser_proxy.js', + BROWSER_SETTINGS_PATH + 'android_apps_page_test.js', + 'android_apps_page_test.js', + ]); + } +}; + +TEST_F('OSSettingsAndroidAppsPageTest', 'DISABLED_All', function() { + mocha.run(); +}); + +// Tests for the Device page. +// eslint-disable-next-line no-var +var OSSettingsBluetoothPageTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'bluetooth_page/bluetooth_page.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + '//ui/webui/resources/js/assert.js', + BROWSER_SETTINGS_PATH + '../fake_chrome_event.js', + 'fake_bluetooth.js', + 'fake_bluetooth_private.js', + 'bluetooth_page_tests.js', + ]); + } +}; + +TEST_F('OSSettingsBluetoothPageTest', 'AllJavascriptTests', function() { + mocha.run(); +}); + +// Tests for the Crostini page. +// eslint-disable-next-line no-var +var OSSettingsCrostiniPageTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'crostini_page/crostini_page.html'; + } + + /** @override */ + get featureList() { + return {enabled: ['features::kCrostini']}; + } + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + '//ui/webui/resources/js/promise_resolver.js', + BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', + BROWSER_SETTINGS_PATH + 'test_crostini_browser_proxy.js', + 'crostini_page_test.js', + ]); + } +}; + +// TODO(crbug.com/962114): Disabled due to flakes on linux-chromeos-rel. +TEST_F('OSSettingsCrostiniPageTest', 'DISABLED_AllJavascriptTests', function() { + mocha.run(); +}); + +// Tests for the CUPS page. +// eslint-disable-next-line no-var +var OSSettingsPrintingPageTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'printing_page/cups_printers.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + '//ui/webui/resources/js/assert.js', + BROWSER_SETTINGS_PATH + 'test_util.js', + BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', + 'cups_printer_page_tests.js', + ]); + } +}; + +TEST_F('OSSettingsPrintingPageTest', 'AllJavascriptTests', function() { + mocha.run(); +}); + +// Tests for the Device page. +// eslint-disable-next-line no-var +var OSSettingsDevicePageTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'device_page/device_page.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + '//ui/webui/resources/js/assert.js', + BROWSER_SETTINGS_PATH + '../fake_chrome_event.js', + BROWSER_SETTINGS_PATH + 'fake_settings_private.js', + 'fake_system_display.js', + 'device_page_tests.js', + ]); + } +}; + +TEST_F('OSSettingsDevicePageTest', 'DevicePageTest', function() { + mocha.grep(assert(device_page_tests.TestNames.DevicePage)).run(); +}); + +TEST_F('OSSettingsDevicePageTest', 'DisplayTest', function() { + mocha.grep(assert(device_page_tests.TestNames.Display)).run(); +}); + +TEST_F('OSSettingsDevicePageTest', 'KeyboardTest', function() { + mocha.grep(assert(device_page_tests.TestNames.Keyboard)).run(); +}); + +TEST_F('OSSettingsDevicePageTest', 'PointersTest', function() { + mocha.grep(assert(device_page_tests.TestNames.Pointers)).run(); +}); + +TEST_F('OSSettingsDevicePageTest', 'PowerTest', function() { + mocha.grep(assert(device_page_tests.TestNames.Power)).run(); +}); + +TEST_F('OSSettingsDevicePageTest', 'StylusTest', function() { + mocha.grep(assert(device_page_tests.TestNames.Stylus)).run(); +}); + +// Tests for the Fingerprint page. +// eslint-disable-next-line no-var +var OSSettingsFingerprintListTest = class extends OSSettingsBrowserTest { + /** @override */ + get browsePreload() { + return super.browsePreload + 'people_page/fingerprint_list.html'; + } + + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', + 'fingerprint_browsertest_chromeos.js', + ]); + } +}; + +TEST_F('OSSettingsFingerprintListTest', 'AllJavascriptTests', function() { + mocha.run(); +}); + // Tests for the Reset section. // eslint-disable-next-line no-var var OSSettingsResetPageTest = class extends OSSettingsBrowserTest { /** @override */ + get browsePreload() { + return super.browsePreload + 'reset_page/reset_page.html'; + } + + /** @override */ get extraLibraries() { return super.extraLibraries.concat([ BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', @@ -177,3 +367,24 @@ TEST_F('OSSettingsResetPageTest', 'AllJavascriptTests', function() { mocha.run(); }); + +// eslint-disable-next-line no-var +var OSSettingsAdvancedPageBrowserTest = class extends OSSettingsBrowserTest { + /** @override */ + get extraLibraries() { + return super.extraLibraries.concat([ + BROWSER_SETTINGS_PATH + 'test_util.js', + 'os_advanced_page_browsertest.js', + ]); + } +}; + +// Times out on debug builders because the Settings page can take several +// seconds to load in a Release build and several times that in a Debug build. +// See https://crbug.com/558434. +TEST_F( + 'OSSettingsAdvancedPageBrowserTest', 'MAYBE_AllJavascriptTests', + function() { + // Run all registered tests. + mocha.run(); + });
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js index 6ed691b..1a96e3caa 100644 --- a/chrome/test/data/webui/settings/cr_settings_browsertest.js +++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -451,8 +451,8 @@ /** @override */ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ - '../fake_chrome_event.js', 'fake_quick_unlock_private.js', - 'fake_quick_unlock_uma.js', + '../fake_chrome_event.js', 'chromeos/fake_quick_unlock_private.js', + 'chromeos/fake_quick_unlock_uma.js', 'quick_unlock_authenticate_browsertest_chromeos.js' ]), }; @@ -479,8 +479,8 @@ /** @override */ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ - '../fake_chrome_event.js', 'fake_quick_unlock_private.js', - 'fake_settings_private.js', 'fake_quick_unlock_uma.js', + '../fake_chrome_event.js', 'chromeos/fake_quick_unlock_private.js', + 'fake_settings_private.js', 'chromeos/fake_quick_unlock_uma.js', 'quick_unlock_authenticate_browsertest_chromeos.js', 'test_util.js' ]), }; @@ -508,8 +508,8 @@ /** @override */ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ - '../fake_chrome_event.js', 'fake_quick_unlock_private.js', - 'fake_settings_private.js', 'fake_quick_unlock_uma.js', + '../fake_chrome_event.js', 'chromeos/fake_quick_unlock_private.js', + 'fake_settings_private.js', 'chromeos/fake_quick_unlock_uma.js', 'quick_unlock_authenticate_browsertest_chromeos.js' ]), }; @@ -538,7 +538,7 @@ /** @override */ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ '../test_browser_proxy.js', - 'fingerprint_browsertest_chromeos.js', + 'chromeos/fingerprint_browsertest_chromeos.js', ]), }; @@ -1592,8 +1592,8 @@ '//ui/webui/resources/js/assert.js', '../fake_chrome_event.js', 'fake_settings_private.js', - 'fake_system_display.js', - 'device_page_tests.js', + 'chromeos/fake_system_display.js', + 'chromeos/device_page_tests.js', ]), }; @@ -1638,9 +1638,9 @@ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ '//ui/webui/resources/js/assert.js', '../fake_chrome_event.js', - 'fake_bluetooth.js', - 'fake_bluetooth_private.js', - 'bluetooth_page_tests.js', + 'chromeos/fake_bluetooth.js', + 'chromeos/fake_bluetooth_private.js', + 'chromeos/bluetooth_page_tests.js', ]), }; @@ -1852,7 +1852,7 @@ '../test_browser_proxy.js', 'fake_language_settings_private.js', 'fake_settings_private.js', - 'fake_input_method_private.js', + 'chromeos/fake_input_method_private.js', 'test_languages_browser_proxy.js', 'languages_tests.js', ]), @@ -1881,7 +1881,7 @@ '../test_browser_proxy.js', 'fake_settings_private.js', 'fake_language_settings_private.js', - 'fake_input_method_private.js', + 'chromeos/fake_input_method_private.js', 'test_languages_browser_proxy.js', 'languages_page_tests.js', ]), @@ -2143,7 +2143,7 @@ '//ui/webui/resources/js/assert.js', 'test_util.js', '../test_browser_proxy.js', - 'cups_printer_page_tests.js', + 'chromeos/cups_printer_page_tests.js', ]), }; @@ -2321,7 +2321,7 @@ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'test_crostini_browser_proxy.js', - 'crostini_page_test.js', + 'chromeos/crostini_page_test.js', ]), }; @@ -2371,7 +2371,7 @@ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'test_android_apps_browser_proxy.js', - 'android_apps_page_test.js', + 'chromeos/android_apps_page_test.js', ]), }; @@ -2533,6 +2533,7 @@ * Test fixture for the chrome://settings/accounts page * @constructor * @extends {CrSettingsBrowserTest} + * TODO(hsuregan): Remove when SplitSettings complete. */ function CrSettingsAddUsersTest() {} @@ -2544,12 +2545,17 @@ /** @override */ extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ - 'add_users_tests.js', + 'chromeos/add_users_tests.js', ]), }; // Test is consistently failing. http://crbug.com/960837 -TEST_F('CrSettingsAddUsersTest', 'DISABLED_All', function() { +GEN('#if !defined(NDEBUG)'); +GEN('#define MAYBE_AddUsers DISABLED_AddUsers'); +GEN('#else'); +GEN('#define MAYBE_AddUsers AddUsers'); +GEN('#endif'); +TEST_F('CrSettingsAddUsersTest', 'MAYBE_AddUsers', function() { mocha.run(); });
diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn index 39b8f4a..a160ec5 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn
@@ -182,7 +182,7 @@ if (is_chromeos) { deps += [ - "//chrome/services/cups_ipp_parser:lib", + "//chrome/services/cups_ipp_parser", "//chrome/services/cups_ipp_parser/public/mojom", ] }
diff --git a/chromeos/constants/chromeos_features.cc b/chromeos/constants/chromeos_features.cc index 5fcf978a..625ee5ff 100644 --- a/chromeos/constants/chromeos_features.cc +++ b/chromeos/constants/chromeos_features.cc
@@ -58,7 +58,7 @@ // If enabled shows the visual signals feedback panel. const base::Feature kEnableFileManagerFeedbackPanel{ - "EnableFeedbackPanel", base::FEATURE_DISABLED_BY_DEFAULT}; + "EnableFeedbackPanel", base::FEATURE_ENABLED_BY_DEFAULT}; // Enables the enhanced external media formatting dialog in the file manager, // with support for labelling and also NTFS/exFAT filesystems.
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc index 8ff15899..9522e53 100644 --- a/components/autofill/core/common/autofill_payments_features.cc +++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -81,7 +81,7 @@ // import the card. const base::Feature kAutofillImportNonFocusableCreditCardForms{ "AutofillImportNonFocusableCreditCardForms", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Controls whether offering to migrate cards will consider data from the // Autofill strike database (new version).
diff --git a/components/autofill_assistant/browser/actions/show_form_action.cc b/components/autofill_assistant/browser/actions/show_form_action.cc index cc41d15d..4a3402a 100644 --- a/components/autofill_assistant/browser/actions/show_form_action.cc +++ b/components/autofill_assistant/browser/actions/show_form_action.cc
@@ -54,7 +54,7 @@ user_action.callback = base::BindOnce(&ShowFormAction::OnButtonClicked, weak_ptr_factory_.GetWeakPtr()); - std::unique_ptr<std::vector<UserAction>> user_actions; + auto user_actions = std::make_unique<std::vector<UserAction>>(); user_actions->emplace_back(std::move(user_action)); delegate_->Prompt(std::move(user_actions)); }
diff --git a/components/cronet/PRESUBMIT.py b/components/cronet/PRESUBMIT.py index bbd0918..3c02298 100644 --- a/components/cronet/PRESUBMIT.py +++ b/components/cronet/PRESUBMIT.py
@@ -33,6 +33,8 @@ 'third_party', 'catapult', 'telemetry'), input_api.os_path.join(chromium_src_dir, 'third_party', 'catapult', 'devil'), + input_api.os_path.join(chromium_src_dir, + 'third_party', 'catapult', 'common', 'py_utils'), ]
diff --git a/components/cronet/tools/android_rndis_forwarder.py b/components/cronet/tools/android_rndis_forwarder.py index 44166e6e..6ee32e92 100644 --- a/components/cronet/tools/android_rndis_forwarder.py +++ b/components/cronet/tools/android_rndis_forwarder.py
@@ -19,12 +19,13 @@ # pylint: disable=wrong-import-position from telemetry.core import platform -from telemetry.core import util from telemetry.internal.platform import android_device from telemetry.internal.util import binary_manager from devil.android import device_errors from devil.android import device_utils + +import py_utils # pylint: enable=wrong-import-position @@ -450,7 +451,7 @@ self._WriteProtectedFile(interface_conf_file, interface_conf) subprocess.check_call(['/usr/bin/sudo', 'ifup', host_iface]) logging.info('Waiting for RNDIS connectivity...') - util.WaitFor(HasHostAddress, 30) + py_utils.WaitFor(HasHostAddress, 30) addresses, host_address = self._GetHostAddresses(host_iface) assert host_address, 'Interface %s could not be configured.' % host_iface
diff --git a/components/policy/proto/device_management_backend.proto b/components/policy/proto/device_management_backend.proto index a07d646c..a327bbc4 100644 --- a/components/policy/proto/device_management_backend.proto +++ b/components/policy/proto/device_management_backend.proto
@@ -564,6 +564,8 @@ optional string command_invalidation_topic = 27; // Whether the device needs to upload an enrollment identifier to the cloud. + // TODO(b/136188860) migrates to enrollment_certificate_needed under + // client_action_required. optional bool enrollment_id_needed = 28; // Gaia id of the user the policy is intended for. @@ -595,7 +597,7 @@ // This field is used for asking client to perform some actions. For instance, // server asks client to re-upload enrollment certificate. In long term, new - // added field which asks client to perform an acion in policy data should be + // added field which asks client to perform an action in policy data should be // put in ClientActionRequired message. optional ClientActionRequired client_action_required = 33; }
diff --git a/components/signin/core/browser/BUILD.gn b/components/signin/core/browser/BUILD.gn index 9527105..ab5bc9ad 100644 --- a/components/signin/core/browser/BUILD.gn +++ b/components/signin/core/browser/BUILD.gn
@@ -129,13 +129,7 @@ } if (is_chromeos) { - deps += [ - "//chromeos/components/account_manager", - - # TODO(crbug.com/816954): Remove this line when Account Manager is - # launched. - "//chromeos/constants", - ] + deps += [ "//chromeos/components/account_manager" ] } }
diff --git a/components/signin/core/browser/DEPS b/components/signin/core/browser/DEPS index ea7de62b..278e73a 100644 --- a/components/signin/core/browser/DEPS +++ b/components/signin/core/browser/DEPS
@@ -1,8 +1,5 @@ include_rules = [ "+chromeos/components/account_manager", - # TODO(crbug.com/816954): Remove this line when Account Manager is - # launched. - "+chromeos/constants", "+components/account_id", "+components/image_fetcher/core", "+components/metrics",
diff --git a/components/signin/core/browser/gaia_cookie_manager_service.cc b/components/signin/core/browser/gaia_cookie_manager_service.cc index ac5c6c8..f50601e 100644 --- a/components/signin/core/browser/gaia_cookie_manager_service.cc +++ b/components/signin/core/browser/gaia_cookie_manager_service.cc
@@ -39,10 +39,6 @@ #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/simple_url_loader.h" -#if defined(OS_CHROMEOS) -#include "chromeos/constants/chromeos_switches.h" -#endif - namespace { // The maximum number of retries for a fetcher used in this class. @@ -945,17 +941,7 @@ RecordLogoutRequestState(LogoutRequestState::kStarted); gaia_auth_fetcher_ = signin_client_->CreateGaiaAuthFetcher(this, requests_.front().source()); - bool use_continue_url = false; -#if defined(OS_ANDROID) - use_continue_url = base::FeatureList::IsEnabled(signin::kMiceFeature); -#elif defined(OS_CHROMEOS) - use_continue_url = chromeos::switches::IsAccountManagerEnabled(); -#endif - if (use_continue_url) { - gaia_auth_fetcher_->StartLogOutWithBlankContinueURL(); - } else { - gaia_auth_fetcher_->StartLogOut(); - } + gaia_auth_fetcher_->StartLogOut(); } void GaiaCookieManagerService::StartFetchingListAccounts() {
diff --git a/components/signin/ios/browser/BUILD.gn b/components/signin/ios/browser/BUILD.gn index 07fd4e1..35495db9 100644 --- a/components/signin/ios/browser/BUILD.gn +++ b/components/signin/ios/browser/BUILD.gn
@@ -7,11 +7,11 @@ sources = [ "account_consistency_service.h", "account_consistency_service.mm", + "device_accounts_provider.h", + "device_accounts_provider.mm", "manage_accounts_delegate.h", "profile_oauth2_token_service_ios_delegate.h", "profile_oauth2_token_service_ios_delegate.mm", - "profile_oauth2_token_service_ios_provider.h", - "profile_oauth2_token_service_ios_provider.mm", "wait_for_network_callback_helper.cc", "wait_for_network_callback_helper.h", ] @@ -49,8 +49,8 @@ configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ - "fake_profile_oauth2_token_service_ios_provider.h", - "fake_profile_oauth2_token_service_ios_provider.mm", + "fake_device_accounts_provider.h", + "fake_device_accounts_provider.mm", ] public_deps = [
diff --git a/components/signin/ios/browser/account_consistency_service.mm b/components/signin/ios/browser/account_consistency_service.mm index 66f2a500..043e016 100644 --- a/components/signin/ios/browser/account_consistency_service.mm +++ b/components/signin/ios/browser/account_consistency_service.mm
@@ -42,7 +42,8 @@ "document.cookie=\"X-CHROME-CONNECTED=; path=/; domain=\" + domain + \";" " expires=Thu, 01-Jan-1970 00:00:01 GMT\";" "document.cookie=\"CHROME_CONNECTED=%@; path=/; domain=\" + domain + \";" - " expires=\" + new Date(%f).toGMTString() + \"; secure;\"</script></html>"; + " expires=\" + new Date(%f).toGMTString() + \"; secure;" + " samesite=lax;\"</script></html>"; // WebStatePolicyDecider that monitors the HTTP headers on Gaia responses, // reacting on the X-Chrome-Manage-Accounts header and notifying its delegate.
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h b/components/signin/ios/browser/device_accounts_provider.h similarity index 75% rename from components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h rename to components/signin/ios/browser/device_accounts_provider.h index 2696f19c..1d9268ac 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h +++ b/components/signin/ios/browser/device_accounts_provider.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_H_ -#define COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_H_ +#ifndef COMPONENTS_SIGNIN_IOS_BROWSER_DEVICE_ACCOUNTS_PROVIDER_H_ +#define COMPONENTS_SIGNIN_IOS_BROWSER_DEVICE_ACCOUNTS_PROVIDER_H_ #if defined(__OBJC__) @class NSDate; @@ -37,8 +37,9 @@ kAuthenticationErrorCategoryUnknownIdentityErrors, }; -// Interface that provides support for ProfileOAuth2TokenServiceIOS. -class ProfileOAuth2TokenServiceIOSProvider { +// Interface that provides a mechanism for interacting with the underlying +// device accounts support. +class DeviceAccountsProvider { public: // Account information. struct AccountInfo { @@ -46,12 +47,12 @@ std::string email; }; - typedef base::Callback<void(NSString* token, - NSDate* expiration, - NSError* error)> AccessTokenCallback; + typedef base::Callback< + void(NSString* token, NSDate* expiration, NSError* error)> + AccessTokenCallback; - ProfileOAuth2TokenServiceIOSProvider() {} - virtual ~ProfileOAuth2TokenServiceIOSProvider() {} + DeviceAccountsProvider() {} + virtual ~DeviceAccountsProvider() {} // Returns the ids of all accounts. virtual std::vector<AccountInfo> GetAllAccounts() const; @@ -70,4 +71,4 @@ NSError* error) const; }; -#endif // COMPONENTS_SIGNIN_IOS_BROWSER_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_H_ +#endif // COMPONENTS_SIGNIN_IOS_BROWSER_DEVICE_ACCOUNTS_PROVIDER_H_
diff --git a/components/signin/ios/browser/device_accounts_provider.mm b/components/signin/ios/browser/device_accounts_provider.mm new file mode 100644 index 0000000..38d9c60 --- /dev/null +++ b/components/signin/ios/browser/device_accounts_provider.mm
@@ -0,0 +1,27 @@ +// Copyright 2016 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/signin/ios/browser/device_accounts_provider.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +std::vector<DeviceAccountsProvider::AccountInfo> +DeviceAccountsProvider::GetAllAccounts() const { + return std::vector<DeviceAccountsProvider::AccountInfo>(); +} + +void DeviceAccountsProvider::GetAccessToken( + const std::string& gaia_id, + const std::string& client_id, + const std::set<std::string>& scopes, + const AccessTokenCallback& callback) {} + +AuthenticationErrorCategory +DeviceAccountsProvider::GetAuthenticationErrorCategory( + const std::string& gaia_id, + NSError* error) const { + return kAuthenticationErrorCategoryUnknownErrors; +}
diff --git a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h b/components/signin/ios/browser/fake_device_accounts_provider.h similarity index 62% rename from components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h rename to components/signin/ios/browser/fake_device_accounts_provider.h index 9fabc72..15342a8e 100644 --- a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h +++ b/components/signin/ios/browser/fake_device_accounts_provider.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef IOS_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_ -#define IOS_TEST_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_ +#ifndef COMPONENTS_SIGNIN_IOS_BROWSER_FAKE_DEVICE_ACCOUNTS_PROVIDER_H_ +#define COMPONENTS_SIGNIN_IOS_BROWSER_FAKE_DEVICE_ACCOUNTS_PROVIDER_H_ #include <memory> #include <string> @@ -11,16 +11,15 @@ #include <vector> #include "base/macros.h" -#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" +#include "components/signin/ios/browser/device_accounts_provider.h" -// Mock class of ProfileOAuth2TokenServiceIOSProvider for testing. -class FakeProfileOAuth2TokenServiceIOSProvider - : public ProfileOAuth2TokenServiceIOSProvider { +// Mock class of DeviceAccountsProvider for testing. +class FakeDeviceAccountsProvider : public DeviceAccountsProvider { public: - FakeProfileOAuth2TokenServiceIOSProvider(); - ~FakeProfileOAuth2TokenServiceIOSProvider() override; + FakeDeviceAccountsProvider(); + ~FakeDeviceAccountsProvider() override; - // ProfileOAuth2TokenServiceIOSProvider + // DeviceAccountsProvider void GetAccessToken(const std::string& account_id, const std::string& client_id, const std::set<std::string>& scopes, @@ -44,7 +43,7 @@ std::vector<AccountInfo> accounts_; std::vector<AccessTokenRequest> requests_; - DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenServiceIOSProvider); + DISALLOW_COPY_AND_ASSIGN(FakeDeviceAccountsProvider); }; -#endif // IOS_TEST_PROVIDER_CHROME_BROWSER_SIGNIN_MOCK_PROFILE_OAUTH2_TOKEN_SERVICE_PROVIDER_IOS_H_ +#endif // COMPONENTS_SIGNIN_IOS_BROWSER_FAKE_DEVICE_ACCOUNTS_PROVIDER_H_
diff --git a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.mm b/components/signin/ios/browser/fake_device_accounts_provider.mm similarity index 62% rename from components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.mm rename to components/signin/ios/browser/fake_device_accounts_provider.mm index ceed68e..d313875 100644 --- a/components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.mm +++ b/components/signin/ios/browser/fake_device_accounts_provider.mm
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h" +#include "components/signin/ios/browser/fake_device_accounts_provider.h" #import <Foundation/Foundation.h> @@ -13,15 +13,11 @@ #error "This file requires ARC support." #endif -FakeProfileOAuth2TokenServiceIOSProvider:: - FakeProfileOAuth2TokenServiceIOSProvider() { -} +FakeDeviceAccountsProvider::FakeDeviceAccountsProvider() {} -FakeProfileOAuth2TokenServiceIOSProvider:: - ~FakeProfileOAuth2TokenServiceIOSProvider() { -} +FakeDeviceAccountsProvider::~FakeDeviceAccountsProvider() {} -void FakeProfileOAuth2TokenServiceIOSProvider::GetAccessToken( +void FakeDeviceAccountsProvider::GetAccessToken( const std::string& account_id, const std::string& client_id, const std::set<std::string>& scopes, @@ -29,27 +25,26 @@ requests_.push_back(AccessTokenRequest(account_id, callback)); } -std::vector<ProfileOAuth2TokenServiceIOSProvider::AccountInfo> -FakeProfileOAuth2TokenServiceIOSProvider::GetAllAccounts() const { +std::vector<DeviceAccountsProvider::AccountInfo> +FakeDeviceAccountsProvider::GetAllAccounts() const { return accounts_; } -ProfileOAuth2TokenServiceIOSProvider::AccountInfo -FakeProfileOAuth2TokenServiceIOSProvider::AddAccount(const std::string& gaia, - const std::string& email) { - ProfileOAuth2TokenServiceIOSProvider::AccountInfo account; +DeviceAccountsProvider::AccountInfo FakeDeviceAccountsProvider::AddAccount( + const std::string& gaia, + const std::string& email) { + DeviceAccountsProvider::AccountInfo account; account.gaia = gaia; account.email = email; accounts_.push_back(account); return account; } -void FakeProfileOAuth2TokenServiceIOSProvider::ClearAccounts() { +void FakeDeviceAccountsProvider::ClearAccounts() { accounts_.clear(); } -void FakeProfileOAuth2TokenServiceIOSProvider:: - IssueAccessTokenForAllRequests() { +void FakeDeviceAccountsProvider::IssueAccessTokenForAllRequests() { for (auto i = requests_.begin(); i != requests_.end(); ++i) { std::string account_id = i->first; AccessTokenCallback callback = i->second; @@ -61,8 +56,7 @@ requests_.clear(); } -void FakeProfileOAuth2TokenServiceIOSProvider:: - IssueAccessTokenErrorForAllRequests() { +void FakeDeviceAccountsProvider::IssueAccessTokenErrorForAllRequests() { for (auto i = requests_.begin(); i != requests_.end(); ++i) { std::string account_id = i->first; AccessTokenCallback callback = i->second; @@ -75,7 +69,7 @@ } AuthenticationErrorCategory -FakeProfileOAuth2TokenServiceIOSProvider::GetAuthenticationErrorCategory( +FakeDeviceAccountsProvider::GetAuthenticationErrorCategory( const std::string& gaia_id, NSError* error) const { DCHECK(error);
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h index 12605e4..f5cdef5d0 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h
@@ -12,14 +12,14 @@ #include "google_apis/gaia/oauth2_token_service_delegate.h" class AccountTrackerService; -class ProfileOAuth2TokenServiceIOSProvider; +class DeviceAccountsProvider; class SigninClient; class ProfileOAuth2TokenServiceIOSDelegate : public OAuth2TokenServiceDelegate { public: ProfileOAuth2TokenServiceIOSDelegate( SigninClient* client, - std::unique_ptr<ProfileOAuth2TokenServiceIOSProvider> provider, + std::unique_ptr<DeviceAccountsProvider> provider, AccountTrackerService* account_tracker_service); ~ProfileOAuth2TokenServiceIOSDelegate() override; @@ -103,7 +103,7 @@ // The client with which this instance was initialied, or NULL. SigninClient* client_ = nullptr; - std::unique_ptr<ProfileOAuth2TokenServiceIOSProvider> provider_; + std::unique_ptr<DeviceAccountsProvider> provider_; AccountTrackerService* account_tracker_service_; DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOSDelegate);
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm index d4c4c7c..5f6da62 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm
@@ -22,7 +22,7 @@ #include "components/signin/core/browser/account_tracker_service.h" #include "components/signin/core/browser/signin_client.h" #include "components/signin/core/browser/signin_pref_names.h" -#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" +#include "components/signin/ios/browser/device_accounts_provider.h" #include "google_apis/gaia/oauth2_access_token_fetcher.h" #include "net/url_request/url_request_status.h" @@ -35,7 +35,7 @@ // Match the way Chromium handles authentication errors in // google_apis/gaia/oauth2_access_token_fetcher.cc: GoogleServiceAuthError GetGoogleServiceAuthErrorFromNSError( - ProfileOAuth2TokenServiceIOSProvider* provider, + DeviceAccountsProvider* provider, const std::string& gaia_id, NSError* error) { if (!error) @@ -73,7 +73,7 @@ class SSOAccessTokenFetcher : public OAuth2AccessTokenFetcher { public: SSOAccessTokenFetcher(OAuth2AccessTokenConsumer* consumer, - ProfileOAuth2TokenServiceIOSProvider* provider, + DeviceAccountsProvider* provider, const AccountInfo& account); ~SSOAccessTokenFetcher() override; @@ -89,7 +89,7 @@ NSError* error); private: - ProfileOAuth2TokenServiceIOSProvider* provider_; // weak + DeviceAccountsProvider* provider_; // weak AccountInfo account_; bool request_was_cancelled_; base::WeakPtrFactory<SSOAccessTokenFetcher> weak_factory_; @@ -99,7 +99,7 @@ SSOAccessTokenFetcher::SSOAccessTokenFetcher( OAuth2AccessTokenConsumer* consumer, - ProfileOAuth2TokenServiceIOSProvider* provider, + DeviceAccountsProvider* provider, const AccountInfo& account) : OAuth2AccessTokenFetcher(consumer), provider_(provider), @@ -149,7 +149,7 @@ ProfileOAuth2TokenServiceIOSDelegate::ProfileOAuth2TokenServiceIOSDelegate( SigninClient* client, - std::unique_ptr<ProfileOAuth2TokenServiceIOSProvider> provider, + std::unique_ptr<DeviceAccountsProvider> provider, AccountTrackerService* account_tracker_service) : client_(client), provider_(std::move(provider)),
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm index 1bb5ef3..6ba1739 100644 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm +++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate_unittest.mm
@@ -13,7 +13,7 @@ #include "components/signin/core/browser/profile_oauth2_token_service.h" #include "components/signin/core/browser/signin_pref_names.h" #include "components/signin/core/browser/test_signin_client.h" -#include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h" +#include "components/signin/ios/browser/fake_device_accounts_provider.h" #include "google_apis/gaia/gaia_urls.h" #include "google_apis/gaia/oauth2_access_token_consumer.h" #include "google_apis/gaia/oauth2_access_token_fetcher.h" @@ -25,7 +25,7 @@ #error "This file requires ARC support." #endif -typedef ProfileOAuth2TokenServiceIOSProvider::AccountInfo ProviderAccount; +typedef DeviceAccountsProvider::AccountInfo ProviderAccount; class ProfileOAuth2TokenServiceIOSDelegateTest : public testing::Test, @@ -52,7 +52,7 @@ prefs_.registry()->RegisterListPref( prefs::kTokenServiceExcludedSecondaryAccounts); - fake_provider_ = new FakeProfileOAuth2TokenServiceIOSProvider(); + fake_provider_ = new FakeDeviceAccountsProvider(); factory_.SetFakeResponse(GaiaUrls::GetInstance()->oauth2_revoke_url(), "", net::HTTP_OK, net::URLRequestStatus::SUCCESS); oauth2_delegate_.reset(new ProfileOAuth2TokenServiceIOSDelegate( @@ -109,7 +109,7 @@ TestingPrefServiceSimple prefs_; TestSigninClient client_; AccountTrackerService account_tracker_; - FakeProfileOAuth2TokenServiceIOSProvider* fake_provider_; + FakeDeviceAccountsProvider* fake_provider_; std::unique_ptr<ProfileOAuth2TokenServiceIOSDelegate> oauth2_delegate_; TestingOAuth2TokenServiceConsumer consumer_; int token_available_count_;
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_provider.mm b/components/signin/ios/browser/profile_oauth2_token_service_ios_provider.mm deleted file mode 100644 index f7b51191..0000000 --- a/components/signin/ios/browser/profile_oauth2_token_service_ios_provider.mm +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2016 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/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" - -#if !defined(__has_feature) || !__has_feature(objc_arc) -#error "This file requires ARC support." -#endif - -std::vector<ProfileOAuth2TokenServiceIOSProvider::AccountInfo> -ProfileOAuth2TokenServiceIOSProvider::GetAllAccounts() const { - return std::vector<ProfileOAuth2TokenServiceIOSProvider::AccountInfo>(); -} - -void ProfileOAuth2TokenServiceIOSProvider::GetAccessToken( - const std::string& gaia_id, - const std::string& client_id, - const std::set<std::string>& scopes, - const AccessTokenCallback& callback) {} - -AuthenticationErrorCategory -ProfileOAuth2TokenServiceIOSProvider::GetAuthenticationErrorCategory( - const std::string& gaia_id, - NSError* error) const { - return kAuthenticationErrorCategoryUnknownErrors; -} -
diff --git a/content/browser/frame_host/mixed_content_navigation_throttle.cc b/content/browser/frame_host/mixed_content_navigation_throttle.cc index 7dde101e..07fb785 100644 --- a/content/browser/frame_host/mixed_content_navigation_throttle.cc +++ b/content/browser/frame_host/mixed_content_navigation_throttle.cc
@@ -205,7 +205,8 @@ handle_impl->GetURL()); GetContentClient()->browser()->RecordURLMetric( "ContentSettings.MixedScript.RanMixedScript", origin_url); - mixed_content_features_.insert(MIXED_CONTENT_BLOCKABLE_ALLOWED); + mixed_content_features_.insert( + blink::mojom::WebFeature::kMixedContentBlockableAllowed); } break; } @@ -271,13 +272,15 @@ // make sure we're not breaking the world without realizing it. if (mixed_content_node->current_origin().scheme() != url::kHttpsScheme) { mixed_content_features_.insert( - MIXED_CONTENT_IN_NON_HTTPS_FRAME_THAT_RESTRICTS_MIXED_CONTENT); + blink::mojom::WebFeature:: + kMixedContentInNonHTTPSFrameThatRestrictsMixedContent); } } else if (!IsOriginSecure(url) && (IsSecureScheme(root->current_origin().scheme()) || IsSecureScheme(parent->current_origin().scheme()))) { mixed_content_features_.insert( - MIXED_CONTENT_IN_SECURE_FRAME_THAT_DOES_NOT_RESTRICT_MIXED_CONTENT); + blink::mojom::WebFeature:: + kMixedContentInSecureFrameThatDoesNotRestrictMixedContent); } return mixed_content_node; } @@ -297,25 +300,27 @@ void MixedContentNavigationThrottle::ReportBasicMixedContentFeatures( blink::mojom::RequestContextType request_context_type, blink::WebMixedContentContextType mixed_content_context_type) { - mixed_content_features_.insert(MIXED_CONTENT_PRESENT); + mixed_content_features_.insert( + blink::mojom::WebFeature::kMixedContentPresent); // Report any blockable content. if (mixed_content_context_type == blink::WebMixedContentContextType::kBlockable) { - mixed_content_features_.insert(MIXED_CONTENT_BLOCKABLE); + mixed_content_features_.insert( + blink::mojom::WebFeature::kMixedContentBlockable); return; } // Note: as there's no mixed content checks for sub-resources on the browser // side there should only be a subset of RequestContextType values that could // ever be found here. - UseCounterFeature feature; + blink::mojom::WebFeature feature; switch (request_context_type) { case blink::mojom::RequestContextType::INTERNAL: - feature = MIXED_CONTENT_INTERNAL; + feature = blink::mojom::WebFeature::kMixedContentInternal; break; case blink::mojom::RequestContextType::PREFETCH: - feature = MIXED_CONTENT_PREFETCH; + feature = blink::mojom::WebFeature::kMixedContentPrefetch; break; case blink::mojom::RequestContextType::AUDIO:
diff --git a/content/browser/frame_host/mixed_content_navigation_throttle.h b/content/browser/frame_host/mixed_content_navigation_throttle.h index dac3f05..b0b5977 100644 --- a/content/browser/frame_host/mixed_content_navigation_throttle.h +++ b/content/browser/frame_host/mixed_content_navigation_throttle.h
@@ -13,17 +13,17 @@ #include "content/public/browser/navigation_handle.h" #include "content/public/browser/navigation_throttle.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" +#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h" #include "third_party/blink/public/platform/web_mixed_content_context_type.h" namespace content { class FrameTreeNode; -// Responsible for browser-process-side mixed content security checks. It is -// only enabled if PlzNavigate is and checks only for frame-level resource loads -// (aka navigation loads). Sub-resources fetches are checked in the renderer -// process by MixedContentChecker. Changes to this class might need to be -// reflected on its renderer counterpart. +// Responsible for browser-process-side mixed content security checks. It checks +// only for frame-level resource loads (aka navigation loads). Sub-resources +// fetches are checked in the renderer process by MixedContentChecker. Changes +// to this class might need to be reflected on its renderer counterpart. // // Current mixed content W3C draft that drives this implementation: // https://w3c.github.io/webappsec-mixed-content/ @@ -44,18 +44,6 @@ private: FRIEND_TEST_ALL_PREFIXES(MixedContentNavigationThrottleTest, IsMixedContent); - // Copy of mixed content related values from the blink::UseCounter enum that - // are needed to report feature usage during browser side checks. - enum UseCounterFeature { - MIXED_CONTENT_PRESENT = 609, - MIXED_CONTENT_BLOCKABLE = 610, - MIXED_CONTENT_INTERNAL = 615, - MIXED_CONTENT_PREFETCH = 617, - MIXED_CONTENT_IN_NON_HTTPS_FRAME_THAT_RESTRICTS_MIXED_CONTENT = 661, - MIXED_CONTENT_IN_SECURE_FRAME_THAT_DOES_NOT_RESTRICT_MIXED_CONTENT = 662, - MIXED_CONTENT_BLOCKABLE_ALLOWED = 896, - }; - // Checks if a navigation should be blocked or not due to mixed content. bool ShouldBlockNavigation(bool for_redirect); @@ -76,11 +64,10 @@ static bool CONTENT_EXPORT IsMixedContentForTesting(const GURL& origin_url, const GURL& url); - // Keeps track of mixed content features (as defined in blink::UseCounter) - // encountered while running one of the navigation throttling steps. These - // values are reported to the respective renderer process after each mixed - // content check is finished. - std::set<int> mixed_content_features_; + // Keeps track of mixed content features encountered while running one of the + // navigation throttling steps. These values are reported to the respective + // renderer process after each mixed content check is finished. + std::set<blink::mojom::WebFeature> mixed_content_features_; DISALLOW_COPY_AND_ASSIGN(MixedContentNavigationThrottle); };
diff --git a/content/browser/native_file_system/native_file_system_directory_handle_impl.cc b/content/browser/native_file_system/native_file_system_directory_handle_impl.cc index 56c4f07..c45d279 100644 --- a/content/browser/native_file_system/native_file_system_directory_handle_impl.cc +++ b/content/browser/native_file_system/native_file_system_directory_handle_impl.cc
@@ -57,7 +57,11 @@ const BindingContext& context, const storage::FileSystemURL& url, const SharedHandleState& handle_state) - : NativeFileSystemHandleBase(manager, context, url, handle_state) {} + : NativeFileSystemHandleBase(manager, + context, + url, + handle_state, + /*is_directory=*/true) {} NativeFileSystemDirectoryHandleImpl::~NativeFileSystemDirectoryHandleImpl() = default;
diff --git a/content/browser/native_file_system/native_file_system_file_handle_impl.cc b/content/browser/native_file_system/native_file_system_file_handle_impl.cc index eab8434..f0f7838 100644 --- a/content/browser/native_file_system/native_file_system_file_handle_impl.cc +++ b/content/browser/native_file_system/native_file_system_file_handle_impl.cc
@@ -26,7 +26,11 @@ const BindingContext& context, const storage::FileSystemURL& url, const SharedHandleState& handle_state) - : NativeFileSystemHandleBase(manager, context, url, handle_state) {} + : NativeFileSystemHandleBase(manager, + context, + url, + handle_state, + /*is_directory=*/false) {} NativeFileSystemFileHandleImpl::~NativeFileSystemFileHandleImpl() = default;
diff --git a/content/browser/native_file_system/native_file_system_file_writer_impl.cc b/content/browser/native_file_system/native_file_system_file_writer_impl.cc index f3f33fa..fb0bddfa 100644 --- a/content/browser/native_file_system/native_file_system_file_writer_impl.cc +++ b/content/browser/native_file_system/native_file_system_file_writer_impl.cc
@@ -25,7 +25,11 @@ const BindingContext& context, const storage::FileSystemURL& url, const SharedHandleState& handle_state) - : NativeFileSystemHandleBase(manager, context, url, handle_state) {} + : NativeFileSystemHandleBase(manager, + context, + url, + handle_state, + /*is_directory=*/false) {} NativeFileSystemFileWriterImpl::~NativeFileSystemFileWriterImpl() = default;
diff --git a/content/browser/native_file_system/native_file_system_handle_base.cc b/content/browser/native_file_system/native_file_system_handle_base.cc index 28aa2d8..5f9ec024 100644 --- a/content/browser/native_file_system/native_file_system_handle_base.cc +++ b/content/browser/native_file_system/native_file_system_handle_base.cc
@@ -4,13 +4,60 @@ #include "content/browser/native_file_system/native_file_system_handle_base.h" +#include "base/task/post_task.h" +#include "content/browser/web_contents/web_contents_impl.h" +#include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/web_contents_observer.h" + namespace content { +class NativeFileSystemHandleBase::UsageIndicatorTracker + : public WebContentsObserver { + public: + UsageIndicatorTracker(int process_id, int frame_id, bool is_directory) + : WebContentsObserver( + WebContentsImpl::FromRenderFrameHostID(process_id, frame_id)), + is_directory_(is_directory) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + if (web_contents() && is_directory_) + web_contents()->IncrementNativeFileSystemDirectoryHandleCount(); + } + + ~UsageIndicatorTracker() override { + if (web_contents()) { + if (is_directory_) + web_contents()->DecrementNativeFileSystemDirectoryHandleCount(); + if (is_writable_) + web_contents()->DecrementWritableNativeFileSystemHandleCount(); + } + } + + void SetWritable(bool writable) { + if (writable == is_writable_ || !web_contents()) + return; + + is_writable_ = writable; + if (is_writable_) + web_contents()->IncrementWritableNativeFileSystemHandleCount(); + else + web_contents()->DecrementWritableNativeFileSystemHandleCount(); + } + + WebContentsImpl* web_contents() const { + return static_cast<WebContentsImpl*>(WebContentsObserver::web_contents()); + } + + private: + const bool is_directory_; + bool is_writable_ = false; +}; + NativeFileSystemHandleBase::NativeFileSystemHandleBase( NativeFileSystemManagerImpl* manager, const BindingContext& context, const storage::FileSystemURL& url, - const SharedHandleState& handle_state) + const SharedHandleState& handle_state, + bool is_directory) : manager_(manager), context_(context), url_(url), @@ -25,6 +72,13 @@ url_.type() == storage::kFileSystemTypeTemporary || url_.type() == storage::kFileSystemTypeTest) << url_.type(); + if (url_.type() == storage::kFileSystemTypeNativeLocal) { + DCHECK_EQ(url_.mount_type(), storage::kFileSystemTypeIsolated); + usage_indicator_tracker_ = base::SequenceBound<UsageIndicatorTracker>( + base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}), + context_.process_id, context_.frame_id, bool{is_directory}); + UpdateWritableUsage(); + } } NativeFileSystemHandleBase::~NativeFileSystemHandleBase() = default; @@ -36,6 +90,7 @@ NativeFileSystemHandleBase::PermissionStatus NativeFileSystemHandleBase::GetWritePermissionStatus() { + UpdateWritableUsage(); // It is not currently possible to have write only handles, so first check the // read permission status. See also: // http://wicg.github.io/native-file-system/#api-filesystemhandle-querypermission @@ -80,4 +135,17 @@ AsWeakPtr(), writable, std::move(callback))); } +void NativeFileSystemHandleBase::UpdateWritableUsage() { + if (!usage_indicator_tracker_) + return; + bool is_writable = + handle_state_.read_grant->GetStatus() == PermissionStatus::GRANTED && + handle_state_.write_grant->GetStatus() == PermissionStatus::GRANTED; + if (is_writable != was_writable_at_last_check_) { + was_writable_at_last_check_ = is_writable; + usage_indicator_tracker_.Post( + FROM_HERE, &UsageIndicatorTracker::SetWritable, is_writable); + } +} + } // namespace content
diff --git a/content/browser/native_file_system/native_file_system_handle_base.h b/content/browser/native_file_system/native_file_system_handle_base.h index 8da0b11a..77de6a3 100644 --- a/content/browser/native_file_system/native_file_system_handle_base.h +++ b/content/browser/native_file_system/native_file_system_handle_base.h
@@ -8,6 +8,7 @@ #include <vector> #include "base/memory/weak_ptr.h" +#include "base/threading/sequence_bound.h" #include "content/browser/native_file_system/native_file_system_manager_impl.h" #include "content/common/content_export.h" #include "storage/browser/fileapi/file_system_url.h" @@ -40,7 +41,8 @@ NativeFileSystemHandleBase(NativeFileSystemManagerImpl* manager, const BindingContext& context, const storage::FileSystemURL& url, - const SharedHandleState& handle_state); + const SharedHandleState& handle_state, + bool is_directory); virtual ~NativeFileSystemHandleBase(); const storage::FileSystemURL& url() const { return url_; } @@ -93,6 +95,12 @@ const storage::FileSystemURL url_; const SharedHandleState handle_state_; + class UsageIndicatorTracker; + base::SequenceBound<UsageIndicatorTracker> usage_indicator_tracker_; + bool was_writable_at_last_check_ = false; + + void UpdateWritableUsage(); + DISALLOW_COPY_AND_ASSIGN(NativeFileSystemHandleBase); };
diff --git a/content/browser/native_file_system/native_file_system_handle_base_unittest.cc b/content/browser/native_file_system/native_file_system_handle_base_unittest.cc index 101bd42..48e79d7 100644 --- a/content/browser/native_file_system/native_file_system_handle_base_unittest.cc +++ b/content/browser/native_file_system/native_file_system_handle_base_unittest.cc
@@ -28,7 +28,11 @@ const BindingContext& context, const storage::FileSystemURL& url, const SharedHandleState& handle_state) - : NativeFileSystemHandleBase(manager, context, url, handle_state) {} + : NativeFileSystemHandleBase(manager, + context, + url, + handle_state, + /*is_directory=*/false) {} private: base::WeakPtr<NativeFileSystemHandleBase> AsWeakPtr() override {
diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc index 07e8d6e1..0042e01 100644 --- a/content/browser/service_worker/service_worker_provider_host.cc +++ b/content/browser/service_worker/service_worker_provider_host.cc
@@ -46,6 +46,7 @@ #include "net/base/url_util.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/resource_request_body.h" +#include "third_party/blink/public/common/features.h" #include "third_party/blink/public/common/messaging/message_port_channel.h" #include "third_party/blink/public/common/service_worker/service_worker_utils.h" #include "third_party/blink/public/mojom/service_worker/service_worker_client.mojom.h" @@ -224,7 +225,8 @@ blink::mojom::ServiceWorkerProviderType provider_type, blink::mojom::ServiceWorkerProviderInfoForWorkerPtr* out_provider_info) { using ServiceWorkerProviderType = blink::mojom::ServiceWorkerProviderType; - DCHECK(provider_type == ServiceWorkerProviderType::kForDedicatedWorker || + DCHECK((blink::features::IsPlzDedicatedWorkerEnabled() && + provider_type == ServiceWorkerProviderType::kForDedicatedWorker) || provider_type == ServiceWorkerProviderType::kForSharedWorker); blink::mojom::ServiceWorkerContainerAssociatedPtrInfo client_ptr_info; (*out_provider_info)->client_request = mojo::MakeRequest(&client_ptr_info);
diff --git a/content/browser/service_worker/service_worker_provider_host_unittest.cc b/content/browser/service_worker/service_worker_provider_host_unittest.cc index 8076856..291f0c5 100644 --- a/content/browser/service_worker/service_worker_provider_host_unittest.cc +++ b/content/browser/service_worker/service_worker_provider_host_unittest.cc
@@ -29,7 +29,9 @@ #include "content/test/test_content_browser_client.h" #include "content/test/test_content_client.h" #include "mojo/core/embedder/embedder.h" +#include "services/network/public/cpp/features.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom.h" #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h" @@ -298,6 +300,26 @@ DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHostTest); }; +// Run tests with PlzDedicatedWorker. +// TODO(https://crbug.com/906991): Merge this test fixture into +// ServiceWorkerProviderHostTest once PlzDedicatedWorker is enabled by default. +class ServiceWorkerProviderHostTestWithPlzDedicatedWorker + : public ServiceWorkerProviderHostTest { + public: + ServiceWorkerProviderHostTestWithPlzDedicatedWorker() { + // ServiceWorkerProviderHost for dedicated workers is available only when + // PlzDedicatedWorker is enabled. + scoped_feature_list_.InitWithFeatures( + {blink::features::kOffMainThreadDedicatedWorkerScriptFetch, + blink::features::kPlzDedicatedWorker, + network::features::kNetworkService} /* enabled_features */, + {} /* disabled_features */); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + TEST_F(ServiceWorkerProviderHostTest, MatchRegistration) { ServiceWorkerProviderHost* provider_host1 = CreateProviderHost(GURL("https://www.example.com/example1.html")); @@ -901,8 +923,9 @@ } } -TEST_F(ServiceWorkerProviderHostTest, +TEST_F(ServiceWorkerProviderHostTestWithPlzDedicatedWorker, ReservedClientsAreNotExposedToClientsApiForDedicatedWorker) { + ASSERT_TRUE(blink::features::IsPlzDedicatedWorkerEnabled()); TestReservedClientsAreNotExposed( blink::mojom::ServiceWorkerProviderType::kForDedicatedWorker, GURL("https://www.example.com/dedicated_worker.js")); @@ -958,7 +981,9 @@ EXPECT_TRUE(host->is_execution_ready()); } -TEST_F(ServiceWorkerProviderHostTest, ClientPhaseForDedicatedWorker) { +TEST_F(ServiceWorkerProviderHostTestWithPlzDedicatedWorker, + ClientPhaseForDedicatedWorker) { + ASSERT_TRUE(blink::features::IsPlzDedicatedWorkerEnabled()); TestClientPhaseTransition( blink::mojom::ServiceWorkerProviderType::kForDedicatedWorker, GURL("https://www.example.com/dedicated_worker.js"));
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 11c83d2..b504f37 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1554,6 +1554,14 @@ return serial_active_frame_count_ > 0; } +bool WebContentsImpl::HasNativeFileSystemDirectoryHandles() { + return native_file_system_directory_handle_count_ > 0; +} + +bool WebContentsImpl::HasWritableNativeFileSystemHandles() { + return native_file_system_writable_handle_count_ > 0; +} + bool WebContentsImpl::HasPictureInPictureVideo() { return has_picture_in_picture_video_; } @@ -6818,6 +6826,72 @@ NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); } +void WebContentsImpl::IncrementNativeFileSystemDirectoryHandleCount() { + // Trying to invalidate the tab state while being destroyed could result in a + // use after free. + if (IsBeingDestroyed()) + return; + + // Notify for UI updates if the state changes. Need both TYPE_TAB and TYPE_URL + // to update both the tab-level usage indicator and the usage indicator in the + // omnibox. + native_file_system_directory_handle_count_++; + if (native_file_system_directory_handle_count_ == 1) { + NotifyNavigationStateChanged(static_cast<content::InvalidateTypes>( + INVALIDATE_TYPE_TAB | INVALIDATE_TYPE_URL)); + } +} + +void WebContentsImpl::DecrementNativeFileSystemDirectoryHandleCount() { + // Trying to invalidate the tab state while being destroyed could result in a + // use after free. + if (IsBeingDestroyed()) + return; + + // Notify for UI updates if the state changes. Need both TYPE_TAB and TYPE_URL + // to update both the tab-level usage indicator and the usage indicator in the + // omnibox. + DCHECK_NE(0u, native_file_system_directory_handle_count_); + native_file_system_directory_handle_count_--; + if (native_file_system_directory_handle_count_ == 0) { + NotifyNavigationStateChanged(static_cast<content::InvalidateTypes>( + INVALIDATE_TYPE_TAB | INVALIDATE_TYPE_URL)); + } +} + +void WebContentsImpl::IncrementWritableNativeFileSystemHandleCount() { + // Trying to invalidate the tab state while being destroyed could result in a + // use after free. + if (IsBeingDestroyed()) + return; + + // Notify for UI updates if the state changes. Need both TYPE_TAB and TYPE_URL + // to update both the tab-level usage indicator and the usage indicator in the + // omnibox. + native_file_system_writable_handle_count_++; + if (native_file_system_writable_handle_count_ == 1) { + NotifyNavigationStateChanged(static_cast<content::InvalidateTypes>( + INVALIDATE_TYPE_TAB | INVALIDATE_TYPE_URL)); + } +} + +void WebContentsImpl::DecrementWritableNativeFileSystemHandleCount() { + // Trying to invalidate the tab state while being destroyed could result in a + // use after free. + if (IsBeingDestroyed()) + return; + + // Notify for UI updates if the state changes. Need both TYPE_TAB and TYPE_URL + // to update both the tab-level usage indicator and the usage indicator in the + // omnibox. + DCHECK_NE(0u, native_file_system_writable_handle_count_); + native_file_system_writable_handle_count_--; + if (native_file_system_writable_handle_count_ == 0) { + NotifyNavigationStateChanged(static_cast<content::InvalidateTypes>( + INVALIDATE_TYPE_TAB | INVALIDATE_TYPE_URL)); + } +} + void WebContentsImpl::SetHasPersistentVideo(bool has_persistent_video) { if (has_persistent_video_ == has_persistent_video) return;
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index f996bf7..b82411c 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -347,6 +347,8 @@ bool IsCurrentlyAudible() override; bool IsConnectedToBluetoothDevice() override; bool IsConnectedToSerialPort() override; + bool HasNativeFileSystemDirectoryHandles() override; + bool HasWritableNativeFileSystemHandles() override; bool HasPictureInPictureVideo() override; bool IsCrashed() override; void SetIsCrashed(base::TerminationStatus status, int error_code) override; @@ -954,6 +956,16 @@ void IncrementSerialActiveFrameCount(); void DecrementSerialActiveFrameCount(); + // Modify the counter of native file system directory handles for this + // WebContents. + void IncrementNativeFileSystemDirectoryHandleCount(); + void DecrementNativeFileSystemDirectoryHandleCount(); + + // Modify the counter of native file system handles with write access for this + // WebContents. + void IncrementWritableNativeFileSystemHandleCount(); + void DecrementWritableNativeFileSystemHandleCount(); + // Called when the WebContents gains or loses a persistent video. void SetHasPersistentVideo(bool has_persistent_video); @@ -1783,6 +1795,9 @@ size_t bluetooth_connected_device_count_ = 0; size_t serial_active_frame_count_ = 0; + size_t native_file_system_directory_handle_count_ = 0; + size_t native_file_system_writable_handle_count_ = 0; + bool has_picture_in_picture_video_ = false; // Notifies ResourceDispatcherHostImpl of various events related to loading.
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 2a8039dc..de68f01 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -544,6 +544,9 @@ WebRuntimeFeatures::EnableMouseSubframeNoImplicitCapture( base::FeatureList::IsEnabled(features::kMouseSubframeNoImplicitCapture)); + + if (base::FeatureList::IsEnabled(features::kTrustedDOMTypes)) + WebRuntimeFeatures::EnableFeatureFromString("TrustedDOMTypes", true); } } // namespace
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h index 5c51807..ec5376b 100644 --- a/content/common/frame_messages.h +++ b/content/common/frame_messages.h
@@ -65,6 +65,7 @@ #include "third_party/blink/public/mojom/devtools/console_message.mojom.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" #include "third_party/blink/public/mojom/frame/lifecycle.mojom.h" +#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h" #include "third_party/blink/public/platform/web_focus_type.h" #include "third_party/blink/public/platform/web_insecure_request_policy.h" #include "third_party/blink/public/platform/web_intrinsic_sizing_info.h" @@ -165,6 +166,8 @@ blink::FrameOcclusionState::kMaxValue) IPC_ENUM_TRAITS_MAX_VALUE(blink::NavigationBlockedReason, blink::NavigationBlockedReason::kMaxValue) +IPC_ENUM_TRAITS_MAX_VALUE(blink::mojom::WebFeature, + blink::mojom::WebFeature::kMaxValue) IPC_STRUCT_TRAITS_BEGIN(content::NavigationDownloadPolicy) IPC_STRUCT_TRAITS_MEMBER(observed_types) @@ -1052,11 +1055,11 @@ IPC_MESSAGE_ROUTED1(FrameMsg_SetHasReceivedUserGestureBeforeNavigation, bool /* value */) -// Updates the renderer with a list of unique blink::UseCounter::Feature values -// representing Blink features used, performed or encountered by the browser -// during the current page load happening on the frame. +// Updates the renderer with a list of unique WebFeature values representing +// Blink features used, performed or encountered by the browser during the +// current page load happening on the frame. IPC_MESSAGE_ROUTED1(FrameMsg_BlinkFeatureUsageReport, - std::set<int>) /* features */ + std::set<blink::mojom::WebFeature>) /* features */ // Informs the renderer that mixed content was found by the browser. The // included data is used for instance to report to the CSP policy and to log to
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index d8bfa51..06536cf6 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h
@@ -478,6 +478,14 @@ // port. virtual bool IsConnectedToSerialPort() = 0; + // Indicates whether any frame in the WebContents has native file system + // directory handles. + virtual bool HasNativeFileSystemDirectoryHandles() = 0; + + // Indicates whether any frame in the WebContents has writable native file + // system handles. + virtual bool HasWritableNativeFileSystemHandles() = 0; + // Indicates whether a video is in Picture-in-Picture for |this|. virtual bool HasPictureInPictureVideo() = 0;
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index f12d4c0d..630b3ac 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -42,7 +42,7 @@ // Creates audio output and input streams using the audio service. const base::Feature kAudioServiceAudioStreams{ "AudioServiceAudioStreams", -#if defined(OS_LINUX) +#if defined(OS_MACOSX) || defined(OS_LINUX) base::FEATURE_ENABLED_BY_DEFAULT #else base::FEATURE_DISABLED_BY_DEFAULT @@ -732,6 +732,10 @@ const base::Feature kScriptStreamingOnPreload{ "ScriptStreamingOnPreload", base::FEATURE_DISABLED_BY_DEFAULT}; +// Controls whether the Trusted Types API is available. +const base::Feature kTrustedDOMTypes{"TrustedDOMTypes", + base::FEATURE_DISABLED_BY_DEFAULT}; + #if defined(OS_ANDROID) // Autofill Accessibility in Android. // crbug.com/627860
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 75e3ff21..88262cda 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -153,6 +153,7 @@ CONTENT_EXPORT extern const base::Feature kWebXrHitTest; CONTENT_EXPORT extern const base::Feature kWebXrPlaneDetection; CONTENT_EXPORT extern const base::Feature kScriptStreamingOnPreload; +CONTENT_EXPORT extern const base::Feature kTrustedDOMTypes; #if defined(OS_ANDROID) CONTENT_EXPORT extern const base::Feature kAndroidAutofillAccessibility;
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 7602b05..03ad3a2 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -6702,7 +6702,8 @@ webview->ClearFocusedElement(); } -void RenderFrameImpl::OnBlinkFeatureUsageReport(const std::set<int>& features) { +void RenderFrameImpl::OnBlinkFeatureUsageReport( + const std::set<blink::mojom::WebFeature>& features) { frame_->BlinkFeatureUsageReport(features); }
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 7af2230..635b09e 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -1152,7 +1152,8 @@ void OnEnableViewSourceMode(); void OnSuppressFurtherDialogs(); void OnClearFocusedElement(); - void OnBlinkFeatureUsageReport(const std::set<int>& features); + void OnBlinkFeatureUsageReport( + const std::set<blink::mojom::WebFeature>& features); void OnMixedContentFound(const FrameMsg_MixedContentFound_Params& params); void OnSetOverlayRoutingToken(const base::UnguessableToken& token); void OnNotifyUserActivation();
diff --git a/content/renderer/service_worker/service_worker_network_provider_for_frame.cc b/content/renderer/service_worker/service_worker_network_provider_for_frame.cc index f30e2b7..d2abdc3 100644 --- a/content/renderer/service_worker/service_worker_network_provider_for_frame.cc +++ b/content/renderer/service_worker/service_worker_network_provider_for_frame.cc
@@ -45,6 +45,10 @@ owner_->NotifyExecutionReady(); } + void ReportFeatureUsage(blink::mojom::WebFeature feature) { + render_frame()->GetWebFrame()->BlinkFeatureUsageReport(feature); + } + void OnDestruct() override { // Deletes |this|. owner_->observer_.reset(); @@ -126,6 +130,14 @@ if (request.GetSkipServiceWorker()) return nullptr; + // Record use counter for intercepting requests from opaque stylesheets. + // TODO(crbug.com/898497): Remove this feature usage once we have enough data. + if (observer_ && request.IsFromOriginDirtyStyleSheet()) { + observer_->ReportFeatureUsage( + blink::mojom::WebFeature:: + kServiceWorkerInterceptedRequestFromOriginDirtyStyleSheet); + } + // Create our own SubresourceLoader to route the request to the controller // ServiceWorker. // TODO(crbug.com/796425): Temporarily wrap the raw mojom::URLLoaderFactory
diff --git a/content/test/data/accessibility/aria/aria-autocomplete-expected-auralinux.txt b/content/test/data/accessibility/aria/aria-autocomplete-expected-auralinux.txt index cdaca49..9a9e51f 100644 --- a/content/test/data/accessibility/aria/aria-autocomplete-expected-auralinux.txt +++ b/content/test/data/accessibility/aria/aria-autocomplete-expected-auralinux.txt
@@ -4,4 +4,4 @@ ++++[combo box] supports-autocompletion selectable-text autocomplete:list haspopup:listbox ++++[combo box] supports-autocompletion selectable-text autocomplete:both haspopup:listbox ++++[combo box] selectable-text haspopup:listbox -++++[autocomplete] supports-autocompletion selectable-text autocomplete:inline +++++[entry] supports-autocompletion selectable-text autocomplete:inline
diff --git a/content/test/data/accessibility/aria/aria-illegal-val-expected-auralinux.txt b/content/test/data/accessibility/aria/aria-illegal-val-expected-auralinux.txt index 430178d..8bd32e29 100644 --- a/content/test/data/accessibility/aria/aria-illegal-val-expected-auralinux.txt +++ b/content/test/data/accessibility/aria/aria-illegal-val-expected-auralinux.txt
@@ -1,6 +1,6 @@ [document web] ++[log] name='Atomic illegal' atomic:true live:polite relevant:additions text -++[autocomplete] name='Autocomplete illegal' selectable-text autocomplete:x-illegal +++[entry] name='Autocomplete illegal' selectable-text autocomplete:x-illegal ++[log] name='Busy illegal' busy atomic:false busy:true live:polite relevant:additions text ++[tree item] name='Checked illegal' checked selectable checkable:true ++[section] name='Current illegal' current:true
diff --git a/extensions/browser/content_verifier.cc b/extensions/browser/content_verifier.cc index 388f3273..0c402d1b 100644 --- a/extensions/browser/content_verifier.cc +++ b/extensions/browser/content_verifier.cc
@@ -26,7 +26,6 @@ #include "extensions/browser/content_verifier_delegate.h" #include "extensions/browser/extension_file_task_runner.h" #include "extensions/browser/extension_registry.h" -#include "extensions/browser/management_policy.h" #include "extensions/common/constants.h" #include "extensions/common/extension_l10n_util.h" #include "extensions/common/file_util.h" @@ -385,14 +384,6 @@ }; // static -bool ContentVerifier::ShouldRepairIfCorrupted( - const ManagementPolicy* management_policy, - const Extension* extension) { - return management_policy->MustRemainEnabled(extension, nullptr) || - management_policy->MustRemainInstalled(extension, nullptr); -} - -// static void ContentVerifier::SetObserverForTests(TestObserver* observer) { g_content_verifier_test_observer = observer; } @@ -591,6 +582,12 @@ return delegate_->GetSignatureFetchUrl(extension_id, extension_version); } +void ContentVerifier::VerifyFailedForTest( + const ExtensionId& extension_id, + ContentVerifyJob::FailureReason reason) { + VerifyFailed(extension_id, reason); +} + void ContentVerifier::OnExtensionUnloadedOnIO( const ExtensionId& extension_id, const base::Version& extension_version) {
diff --git a/extensions/browser/content_verifier.h b/extensions/browser/content_verifier.h index 8780385..1b6601b 100644 --- a/extensions/browser/content_verifier.h +++ b/extensions/browser/content_verifier.h
@@ -32,7 +32,6 @@ namespace extensions { class Extension; -class ManagementPolicy; // Used for managing overall content verification - both fetching content // hashes as needed, and supplying job objects to verify file contents as they @@ -45,11 +44,6 @@ virtual void OnFetchComplete(const std::string& extension_id, bool success) = 0; }; - // Returns true if content verifier should repair the extension (|id|) if it - // became courrpted. - // Note that this method doesn't check whether |id| is corrupted or not. - static bool ShouldRepairIfCorrupted(const ManagementPolicy* management_policy, - const Extension* id); static void SetObserverForTests(TestObserver* observer); @@ -64,11 +58,6 @@ const base::FilePath& extension_root, const base::FilePath& relative_path); - // Called (typically by a verification job) to indicate that verification - // failed while reading some file in |extension_id|. - void VerifyFailed(const ExtensionId& extension_id, - ContentVerifyJob::FailureReason reason); - // ExtensionRegistryObserver interface void OnExtensionLoaded(content::BrowserContext* browser_context, const Extension* extension) override; @@ -98,6 +87,10 @@ GURL GetSignatureFetchUrlForTest(const ExtensionId& extension_id, const base::Version& extension_version); + // Exposes VerifyFailed for tests. + void VerifyFailedForTest(const ExtensionId& extension_id, + ContentVerifyJob::FailureReason reason); + // Test helper to recompute |io_data_| for |extension| without having to // call |OnExtensionLoaded|. void ResetIODataForTesting(const Extension* extension); @@ -149,6 +142,11 @@ const base::FilePath& extension_root, const std::set<base::FilePath>& relative_unix_paths); + // Called (typically by a verification job) to indicate that verification + // failed while reading some file in |extension_id|. + void VerifyFailed(const ExtensionId& extension_id, + ContentVerifyJob::FailureReason reason); + // Returns the HashHelper instance, making sure we create it at most once. // Must *not* be called after |shutdown_on_io_| is set to true. HashHelper* GetOrCreateHashHelper();
diff --git a/extensions/browser/management_policy.cc b/extensions/browser/management_policy.cc index 7bf6a45..be4f815 100644 --- a/extensions/browser/management_policy.cc +++ b/extensions/browser/management_policy.cc
@@ -155,6 +155,11 @@ false, extension, error); } +bool ManagementPolicy::ShouldRepairIfCorrupted(const Extension* extension) { + return MustRemainEnabled(extension, nullptr) || + MustRemainInstalled(extension, nullptr); +} + void ManagementPolicy::UnregisterAllProviders() { providers_.clear(); }
diff --git a/extensions/browser/management_policy.h b/extensions/browser/management_policy.h index f3e77191..9335f6a9 100644 --- a/extensions/browser/management_policy.h +++ b/extensions/browser/management_policy.h
@@ -169,6 +169,11 @@ bool ShouldForceUninstall(const Extension* extension, base::string16* error) const; + // Returns true if the |extension| should be repaired upon corruption. + // Note that this method doesn't check whether extension is corrupted or not + // (it's job of ContentVerifier). + bool ShouldRepairIfCorrupted(const Extension* extension); + // For use in testing. void UnregisterAllProviders(); int GetNumProviders() const;
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc index e90efabf..1e8b4e5 100644 --- a/google_apis/gaia/gaia_auth_fetcher.cc +++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -214,8 +214,6 @@ list_accounts_gurl_( GaiaUrls::GetInstance()->ListAccountsURLWithSource(source_)), logout_gurl_(GaiaUrls::GetInstance()->LogOutURLWithSource(source_)), - logout_with_continue_gurl_( - GaiaUrls::GetInstance()->LogOutURLWithSourceAndContinueURL(source_)), get_check_connection_info_url_( GaiaUrls::GetInstance()->GetCheckConnectionInfoURLWithSource( source_)) {} @@ -789,14 +787,6 @@ } void GaiaAuthFetcher::StartLogOut() { - StartLogOutInternal(logout_gurl_); -} - -void GaiaAuthFetcher::StartLogOutWithBlankContinueURL() { - StartLogOutInternal(logout_with_continue_gurl_); -} - -void GaiaAuthFetcher::StartLogOutInternal(const GURL& logout_gurl) { DCHECK(!fetch_pending_) << "Tried to fetch two things at once!"; net::NetworkTrafficAnnotationTag traffic_annotation = @@ -826,7 +816,7 @@ } } })"); - CreateAndStartGaiaFetcher(std::string(), std::string(), logout_gurl, + CreateAndStartGaiaFetcher(std::string(), std::string(), logout_gurl_, net::LOAD_NORMAL, traffic_annotation); } @@ -1105,7 +1095,7 @@ OnOAuth2RevokeTokenFetched(data, net_error, response_code); } else if (url == list_accounts_gurl_) { OnListAccountsFetched(data, net_error, response_code); - } else if (url == logout_gurl_ || url == logout_with_continue_gurl_) { + } else if (url == logout_gurl_) { OnLogOutFetched(data, net_error, response_code); } else if (url == get_check_connection_info_url_) { OnGetCheckConnectionInfoFetched(data, net_error, response_code);
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h index f6aa443..7cf915e 100644 --- a/google_apis/gaia/gaia_auth_fetcher.h +++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -160,10 +160,6 @@ // Starts a request to log out the accounts in the GAIA cookie. void StartLogOut(); - // Starts a request to log out the accounts in the GAIA cookie. Uses Logout - // endpoint with continue URL. - void StartLogOutWithBlankContinueURL(); - // Starts a request to get the list of URLs to check for connection info. // Returns token/URL pairs to check, and the resulting status can be given to // /MergeSession requests. @@ -250,9 +246,6 @@ static const char kOAuth2BearerHeaderFormat[]; static const char kOAuthMultiBearerHeaderFormat[]; - // Starts logout flow with an explicit GURL. - void StartLogOutInternal(const GURL& logout_gurl); - void OnURLLoadComplete(std::unique_ptr<std::string> response_body); void OnOAuth2TokenPairFetched(const std::string& data, @@ -351,7 +344,6 @@ const GURL oauth_multilogin_gurl_; const GURL list_accounts_gurl_; const GURL logout_gurl_; - const GURL logout_with_continue_gurl_; const GURL get_check_connection_info_url_; // While a fetch is going on:
diff --git a/google_apis/gaia/gaia_urls.cc b/google_apis/gaia/gaia_urls.cc index c464feb..f7796e2d 100644 --- a/google_apis/gaia/gaia_urls.cc +++ b/google_apis/gaia/gaia_urls.cc
@@ -294,12 +294,6 @@ } GURL GaiaUrls::LogOutURLWithSource(const std::string& source) { - return source.empty() ? service_logout_url_ - : service_logout_url_.Resolve( - base::StringPrintf("?source=%s", source.c_str())); -} - -GURL GaiaUrls::LogOutURLWithSourceAndContinueURL(const std::string& source) { std::string params = source.empty() ? base::StringPrintf("?continue=%s",
diff --git a/google_apis/gaia/gaia_urls.h b/google_apis/gaia/gaia_urls.h index 68455c9..76974fe 100644 --- a/google_apis/gaia/gaia_urls.h +++ b/google_apis/gaia/gaia_urls.h
@@ -52,7 +52,6 @@ GURL ListAccountsURLWithSource(const std::string& source); GURL LogOutURLWithSource(const std::string& source); - GURL LogOutURLWithSourceAndContinueURL(const std::string& source); GURL GetCheckConnectionInfoURLWithSource(const std::string& source); private:
diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg index 2a794ad..591774c 100644 --- a/infra/config/cr-buildbucket.cfg +++ b/infra/config/cr-buildbucket.cfg
@@ -1446,6 +1446,7 @@ name: "linux-chromeos-rel" mixins: "chromeos-ci" mixins: "linux-xenial" + mixins: "builderless" } builders { @@ -1509,6 +1510,9 @@ builders { name: "Cast Audio Linux" mixins: "linux-ci" + mixins: "linux-xenial" + mixins: "builderless" + dimensions: "ssd:1" } builders { @@ -1685,7 +1689,8 @@ builders { name: "Linux Builder (dbg)(32)" mixins: "linux-ci-goma-rbe-prod" - dimensions: "cores:32" + mixins: "linux-xenial" + mixins: "builderless" } builders { @@ -2519,9 +2524,10 @@ } builders { name: "Linux CFI" - dimensions: "os:Ubuntu-14.04" dimensions: "cores:32" mixins: "memory-ci-goma-rbe-prod" + mixins: "linux-xenial" + mixins: "builderless" # TODO(thakis): Remove once https://crbug.com/927738 is resolved. execution_timeout_secs: 14400 # 4 hours @@ -2660,9 +2666,10 @@ } builders { name: "android-archive-rel" - dimensions: "os:Ubuntu-14.04" dimensions: "cores:32" mixins: "chromium-ci" + mixins: "linux-xenial" + mixins: "builderless" } builders { name: "Oreo Phone Tester" @@ -2853,9 +2860,10 @@ } builders { name: "linux-archive-rel" - dimensions: "os:Ubuntu-14.04" dimensions: "cores:32" mixins: "chromium-ci" + mixins: "linux-xenial" + mixins: "builderless" } builders { name: "Libfuzzer Upload Linux ASan"
diff --git a/ios/chrome/browser/signin/BUILD.gn b/ios/chrome/browser/signin/BUILD.gn index 2996fbe..84cd425 100644 --- a/ios/chrome/browser/signin/BUILD.gn +++ b/ios/chrome/browser/signin/BUILD.gn
@@ -20,6 +20,8 @@ "chrome_identity_service_observer_bridge.mm", "constants.h", "constants.mm", + "device_accounts_provider_impl.h", + "device_accounts_provider_impl.mm", "gaia_auth_fetcher_ios.h", "gaia_auth_fetcher_ios.mm", "gaia_auth_fetcher_ios_bridge.h", @@ -37,8 +39,6 @@ "ios_chrome_signin_client.mm", "ios_chrome_signin_status_metrics_provider_delegate.cc", "ios_chrome_signin_status_metrics_provider_delegate.h", - "profile_oauth2_token_service_ios_provider_impl.h", - "profile_oauth2_token_service_ios_provider_impl.mm", "signin_browser_state_info_updater.h", "signin_browser_state_info_updater.mm", "signin_browser_state_info_updater_factory.h",
diff --git a/ios/chrome/browser/signin/device_accounts_provider_impl.h b/ios/chrome/browser/signin/device_accounts_provider_impl.h new file mode 100644 index 0000000..e270a2c0 --- /dev/null +++ b/ios/chrome/browser/signin/device_accounts_provider_impl.h
@@ -0,0 +1,34 @@ +// Copyright 2016 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 IOS_CHROME_BROWSER_SIGNIN_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_ +#define IOS_CHROME_BROWSER_SIGNIN_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_ + +#include <string> +#include <vector> + +#include "base/macros.h" +#include "components/signin/ios/browser/device_accounts_provider.h" + +// Implementation of DeviceAccountsProvider. +class DeviceAccountsProviderImpl : public DeviceAccountsProvider { + public: + DeviceAccountsProviderImpl(); + ~DeviceAccountsProviderImpl() override; + + // ios::DeviceAccountsProvider + void GetAccessToken(const std::string& gaia_id, + const std::string& client_id, + const std::set<std::string>& scopes, + const AccessTokenCallback& callback) override; + std::vector<AccountInfo> GetAllAccounts() const override; + AuthenticationErrorCategory GetAuthenticationErrorCategory( + const std::string& gaia_id, + NSError* error) const override; + + private: + DISALLOW_COPY_AND_ASSIGN(DeviceAccountsProviderImpl); +}; + +#endif // IOS_CHROME_BROWSER_SIGNIN_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_
diff --git a/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.mm b/ios/chrome/browser/signin/device_accounts_provider_impl.mm similarity index 84% rename from ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.mm rename to ios/chrome/browser/signin/device_accounts_provider_impl.mm index 47624c6..958072a 100644 --- a/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.mm +++ b/ios/chrome/browser/signin/device_accounts_provider_impl.mm
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h" +#include "ios/chrome/browser/signin/device_accounts_provider_impl.h" #include "base/logging.h" #include "base/strings/sys_string_conversions.h" @@ -20,9 +20,8 @@ namespace { // Returns the account info for |identity|. // Returns an empty account info if |identity| is nil. -ProfileOAuth2TokenServiceIOSProvider::AccountInfo GetAccountInfo( - ChromeIdentity* identity) { - ProfileOAuth2TokenServiceIOSProvider::AccountInfo account_info; +DeviceAccountsProvider::AccountInfo GetAccountInfo(ChromeIdentity* identity) { + DeviceAccountsProvider::AccountInfo account_info; if (identity) { account_info.gaia = base::SysNSStringToUTF8([identity gaiaID]); account_info.email = base::SysNSStringToUTF8([identity userEmail]); @@ -31,13 +30,11 @@ } } -ProfileOAuth2TokenServiceIOSProviderImpl:: - ProfileOAuth2TokenServiceIOSProviderImpl() {} +DeviceAccountsProviderImpl::DeviceAccountsProviderImpl() {} -ProfileOAuth2TokenServiceIOSProviderImpl:: - ~ProfileOAuth2TokenServiceIOSProviderImpl() {} +DeviceAccountsProviderImpl::~DeviceAccountsProviderImpl() {} -void ProfileOAuth2TokenServiceIOSProviderImpl::GetAccessToken( +void DeviceAccountsProviderImpl::GetAccessToken( const std::string& gaia_id, const std::string& client_id, const std::set<std::string>& scopes, @@ -53,8 +50,8 @@ }); } -std::vector<ProfileOAuth2TokenServiceIOSProvider::AccountInfo> -ProfileOAuth2TokenServiceIOSProviderImpl::GetAllAccounts() const { +std::vector<DeviceAccountsProvider::AccountInfo> +DeviceAccountsProviderImpl::GetAllAccounts() const { std::vector<AccountInfo> accounts; NSArray* identities = ios::GetChromeBrowserProvider() ->GetChromeIdentityService() @@ -66,7 +63,7 @@ } AuthenticationErrorCategory -ProfileOAuth2TokenServiceIOSProviderImpl::GetAuthenticationErrorCategory( +DeviceAccountsProviderImpl::GetAuthenticationErrorCategory( const std::string& gaia_id, NSError* error) const { DCHECK(error);
diff --git a/ios/chrome/browser/signin/identity_manager_factory.cc b/ios/chrome/browser/signin/identity_manager_factory.cc index a334470..fde725a 100644 --- a/ios/chrome/browser/signin/identity_manager_factory.cc +++ b/ios/chrome/browser/signin/identity_manager_factory.cc
@@ -22,8 +22,8 @@ #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h" #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" +#include "ios/chrome/browser/signin/device_accounts_provider_impl.h" #include "ios/chrome/browser/signin/identity_manager_factory_observer.h" -#include "ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h" #include "ios/chrome/browser/signin/signin_client_factory.h" #include "services/identity/public/cpp/accounts_cookie_mutator_impl.h" #include "services/identity/public/cpp/accounts_mutator.h" @@ -38,8 +38,7 @@ AccountTrackerService* account_tracker_service) { auto delegate = std::make_unique<ProfileOAuth2TokenServiceIOSDelegate>( SigninClientFactory::GetForBrowserState(chrome_browser_state), - std::make_unique<ProfileOAuth2TokenServiceIOSProviderImpl>(), - account_tracker_service); + std::make_unique<DeviceAccountsProviderImpl>(), account_tracker_service); return std::make_unique<ProfileOAuth2TokenService>( chrome_browser_state->GetPrefs(), std::move(delegate)); }
diff --git a/ios/chrome/browser/signin/identity_test_environment_chrome_browser_state_adaptor.cc b/ios/chrome/browser/signin/identity_test_environment_chrome_browser_state_adaptor.cc index f782dce..b01844c 100644 --- a/ios/chrome/browser/signin/identity_test_environment_chrome_browser_state_adaptor.cc +++ b/ios/chrome/browser/signin/identity_test_environment_chrome_browser_state_adaptor.cc
@@ -11,8 +11,8 @@ #include "components/signin/core/browser/identity_manager_wrapper.h" #include "components/signin/core/browser/test_signin_client.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" +#include "ios/chrome/browser/signin/device_accounts_provider_impl.h" #include "ios/chrome/browser/signin/identity_manager_factory.h" -#include "ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h" #include "ios/chrome/browser/signin/signin_client_factory.h" namespace { @@ -105,7 +105,7 @@ identity::IdentityTestEnvironment::ExtraParams extra_params; extra_params.token_service_provider = - std::make_unique<ProfileOAuth2TokenServiceIOSProviderImpl>(); + std::make_unique<DeviceAccountsProviderImpl>(); return identity::IdentityTestEnvironment::BuildIdentityManagerForTests( SigninClientFactory::GetForBrowserState(chrome_browser_state),
diff --git a/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h b/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h deleted file mode 100644 index 50625de..0000000 --- a/ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_impl.h +++ /dev/null
@@ -1,35 +0,0 @@ -// Copyright 2016 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 IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_ -#define IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_ - -#include <string> -#include <vector> - -#include "base/macros.h" -#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" - -// Implementation of ProfileOAuth2TokenServiceIOSProvider. -class ProfileOAuth2TokenServiceIOSProviderImpl - : public ProfileOAuth2TokenServiceIOSProvider { - public: - ProfileOAuth2TokenServiceIOSProviderImpl(); - ~ProfileOAuth2TokenServiceIOSProviderImpl() override; - - // ios::ProfileOAuth2TokenServiceIOSProvider - void GetAccessToken(const std::string& gaia_id, - const std::string& client_id, - const std::set<std::string>& scopes, - const AccessTokenCallback& callback) override; - std::vector<AccountInfo> GetAllAccounts() const override; - AuthenticationErrorCategory GetAuthenticationErrorCategory( - const std::string& gaia_id, - NSError* error) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOSProviderImpl); -}; - -#endif // IOS_CHROME_BROWSER_SIGNIN_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_
diff --git a/ios/chrome/browser/ui/authentication/cells/BUILD.gn b/ios/chrome/browser/ui/authentication/cells/BUILD.gn index 93f9e30..d42ce9a 100644 --- a/ios/chrome/browser/ui/authentication/cells/BUILD.gn +++ b/ios/chrome/browser/ui/authentication/cells/BUILD.gn
@@ -36,7 +36,6 @@ "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/common/colors", "//ios/chrome/common/ui_util", - "//ios/chrome/common/ui_util:semantic_colors", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/signin", "//ui/base", @@ -82,7 +81,7 @@ "//ios/chrome/browser/ui/table_view:styler", "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/unified_consent", - "//ios/chrome/common/ui_util:semantic_colors", + "//ios/chrome/common/colors", "//ios/chrome/test:test_support", "//ios/public/provider/chrome/browser/signin:test_support", "//ios/third_party/material_components_ios",
diff --git a/ios/chrome/browser/ui/authentication/cells/account_control_item.mm b/ios/chrome/browser/ui/authentication/cells/account_control_item.mm index 1cc956b4..1048a4c4 100644 --- a/ios/chrome/browser/ui/authentication/cells/account_control_item.mm +++ b/ios/chrome/browser/ui/authentication/cells/account_control_item.mm
@@ -6,7 +6,7 @@ #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/authentication/cells/account_control_item_unittest.mm b/ios/chrome/browser/ui/authentication/cells/account_control_item_unittest.mm index 78299eec..f10dcbb4 100644 --- a/ios/chrome/browser/ui/authentication/cells/account_control_item_unittest.mm +++ b/ios/chrome/browser/ui/authentication/cells/account_control_item_unittest.mm
@@ -7,7 +7,7 @@ #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "testing/gtest/include/gtest/gtest.h" #import "testing/gtest_mac.h" #include "testing/platform_test.h"
diff --git a/ios/chrome/browser/ui/authentication/cells/signin_promo_view.mm b/ios/chrome/browser/ui/authentication/cells/signin_promo_view.mm index babe087..57e2b11 100644 --- a/ios/chrome/browser/ui/authentication/cells/signin_promo_view.mm +++ b/ios/chrome/browser/ui/authentication/cells/signin_promo_view.mm
@@ -9,6 +9,7 @@ #import "ios/chrome/browser/ui/authentication/cells/signin_promo_view_delegate.h" #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/colors/semantic_color_names.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #include "ios/chrome/grit/ios_chromium_strings.h" @@ -26,8 +27,6 @@ const CGFloat kProfileImageFixedSize = 48; // UI Refresh Constants: -// Text label gray color. -const CGFloat kGrayHexColor = 0x6d6d72; // Vertical spacing between stackView and cell contentView. const CGFloat kStackViewVerticalPadding = 11.0; // Horizontal spacing between stackView and cell contentView. @@ -98,7 +97,7 @@ _textLabel.lineBreakMode = NSLineBreakByWordWrapping; _textLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote]; - _textLabel.textColor = UIColorFromRGB(kGrayHexColor); + _textLabel.textColor = UIColor.cr_labelColor; // Create and setup primary button. UIButton* primaryButton;
diff --git a/ios/chrome/browser/ui/authentication/cells/table_view_account_item.mm b/ios/chrome/browser/ui/authentication/cells/table_view_account_item.mm index 89dfe70f..31fe0bb 100644 --- a/ios/chrome/browser/ui/authentication/cells/table_view_account_item.mm +++ b/ios/chrome/browser/ui/authentication/cells/table_view_account_item.mm
@@ -8,7 +8,7 @@ #import "ios/chrome/browser/ui/settings/cells/settings_cells_constants.h" #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/settings/BUILD.gn b/ios/chrome/browser/ui/settings/BUILD.gn index 4f2a6c4..94fd0fb 100644 --- a/ios/chrome/browser/ui/settings/BUILD.gn +++ b/ios/chrome/browser/ui/settings/BUILD.gn
@@ -29,8 +29,8 @@ "//ios/chrome/browser/ui/table_view:styler", "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/ui/util", + "//ios/chrome/common/colors", "//ios/chrome/common/ui_util", - "//ios/chrome/common/ui_util:semantic_colors", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/user_feedback", "//ios/third_party/material_components_ios", @@ -176,9 +176,9 @@ "//ios/chrome/browser/voice", "//ios/chrome/browser/web:web", "//ios/chrome/common", + "//ios/chrome/common/colors", "//ios/chrome/common/favicon", "//ios/chrome/common/ui_util", - "//ios/chrome/common/ui_util:semantic_colors", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/images", "//ios/public/provider/chrome/browser/mailto",
diff --git a/ios/chrome/browser/ui/settings/about_chrome_table_view_controller.mm b/ios/chrome/browser/ui/settings/about_chrome_table_view_controller.mm index b6e7263..ef43991 100644 --- a/ios/chrome/browser/ui/settings/about_chrome_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/about_chrome_table_view_controller.mm
@@ -18,7 +18,7 @@ #include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/util/uikit_ui_util.h" #include "ios/chrome/common/channel_info.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_chromium_strings.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/third_party/material_components_ios/src/components/Snackbar/src/MaterialSnackbar.h"
diff --git a/ios/chrome/browser/ui/settings/cells/BUILD.gn b/ios/chrome/browser/ui/settings/cells/BUILD.gn index dcf02b9..9bfb744 100644 --- a/ios/chrome/browser/ui/settings/cells/BUILD.gn +++ b/ios/chrome/browser/ui/settings/cells/BUILD.gn
@@ -51,8 +51,8 @@ "//ios/chrome/browser/ui/table_view:styler", "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/ui/util", + "//ios/chrome/common/colors", "//ios/chrome/common/ui_util", - "//ios/chrome/common/ui_util:semantic_colors", "//ios/public/provider/chrome/browser", "//ios/public/provider/chrome/browser/signin", "//ios/third_party/material_roboto_font_loader_ios",
diff --git a/ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm b/ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm index 9d89155..855ff19 100644 --- a/ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm +++ b/ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm
@@ -7,7 +7,7 @@ #include "components/strings/grit/components_strings.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #include "ios/chrome/grit/ios_chromium_strings.h" #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.mm b/ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.mm index 12b862b..a22cee6 100644 --- a/ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.mm +++ b/ios/chrome/browser/ui/settings/cells/settings_image_detail_text_cell.mm
@@ -7,7 +7,7 @@ #include "base/logging.h" #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/settings/cells/settings_multiline_detail_item.mm b/ios/chrome/browser/ui/settings/cells/settings_multiline_detail_item.mm index a4e50f1..5ed80f0 100644 --- a/ios/chrome/browser/ui/settings/cells/settings_multiline_detail_item.mm +++ b/ios/chrome/browser/ui/settings/cells/settings_multiline_detail_item.mm
@@ -7,7 +7,7 @@ #import "ios/chrome/browser/ui/settings/cells/settings_cells_constants.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/settings/cells/settings_switch_cell.mm b/ios/chrome/browser/ui/settings/cells/settings_switch_cell.mm index 3fb91cb..197aac2 100644 --- a/ios/chrome/browser/ui/settings/cells/settings_switch_cell.mm +++ b/ios/chrome/browser/ui/settings/cells/settings_switch_cell.mm
@@ -7,7 +7,7 @@ #import "ios/chrome/browser/ui/settings/cells/settings_cells_constants.h" #include "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/ui/settings/dataplan_usage_table_view_controller.mm b/ios/chrome/browser/ui/settings/dataplan_usage_table_view_controller.mm index 86f5e17..228ac3b 100644 --- a/ios/chrome/browser/ui/settings/dataplan_usage_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/dataplan_usage_table_view_controller.mm
@@ -12,7 +12,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_text_item.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #include "ios/chrome/browser/ui/ui_feature_flags.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/ui/settings/settings_root_collection_view_controller.mm b/ios/chrome/browser/ui/settings/settings_root_collection_view_controller.mm index 8f5f215..5e9bb68 100644 --- a/ios/chrome/browser/ui/settings/settings_root_collection_view_controller.mm +++ b/ios/chrome/browser/ui/settings/settings_root_collection_view_controller.mm
@@ -16,7 +16,7 @@ #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" #include "ios/chrome/browser/ui/util/ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/third_party/material_components_ios/src/components/Collections/src/MaterialCollections.h" #include "ui/base/l10n/l10n_util.h"
diff --git a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm index df18314..9ec36c9 100644 --- a/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/settings_root_table_view_controller.mm
@@ -14,7 +14,7 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #include "ios/chrome/browser/ui/ui_feature_flags.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util.h"
diff --git a/ios/chrome/browser/ui/settings/settings_table_view_controller.mm b/ios/chrome/browser/ui/settings/settings_table_view_controller.mm index 00eb0352..0998b9e9 100644 --- a/ios/chrome/browser/ui/settings/settings_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/settings_table_view_controller.mm
@@ -69,7 +69,7 @@ #include "ios/chrome/browser/ui/ui_feature_flags.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" #include "ios/chrome/browser/voice/speech_input_locale_config.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_chromium_strings.h" #include "ios/chrome/grit/ios_strings.h" #import "ios/public/provider/chrome/browser/chrome_browser_provider.h"
diff --git a/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm b/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm index 5a699e0d..7ebddf1 100644 --- a/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm +++ b/ios/chrome/browser/ui/settings/table_cell_catalog_view_controller.mm
@@ -28,7 +28,7 @@ #import "ios/chrome/browser/ui/table_view/table_view_model.h" #include "ios/chrome/browser/ui/ui_feature_flags.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/public/provider/chrome/browser/chrome_browser_provider.h" #import "ios/public/provider/chrome/browser/signin/signin_resources_provider.h" #include "url/gurl.h"
diff --git a/ios/chrome/browser/ui/table_view/cells/BUILD.gn b/ios/chrome/browser/ui/table_view/cells/BUILD.gn index 85c721b..67305a9 100644 --- a/ios/chrome/browser/ui/table_view/cells/BUILD.gn +++ b/ios/chrome/browser/ui/table_view/cells/BUILD.gn
@@ -59,7 +59,6 @@ "//ios/chrome/common/colors", "//ios/chrome/common/favicon", "//ios/chrome/common/ui_util", - "//ios/chrome/common/ui_util:semantic_colors", "//ios/third_party/material_components_ios:material_components_ios", "//net", "//ui/base", @@ -87,7 +86,7 @@ ":cells", "//base", "//ios/chrome/browser/ui/table_view:styler", - "//ios/chrome/common/ui_util:semantic_colors", + "//ios/chrome/common/colors", "//net:net", "//testing/gtest", "//third_party/ocmock:ocmock",
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_activity_indicator_header_footer_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_activity_indicator_header_footer_item.mm index 27c83f8..6bf3fdfe 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_activity_indicator_header_footer_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_activity_indicator_header_footer_item.mm
@@ -9,7 +9,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/third_party/material_components_ios/src/components/ActivityIndicator/src/MaterialActivityIndicator.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm b/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm index ec6aac94..32fa9c4 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_cell.mm
@@ -7,7 +7,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_detail_icon_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_detail_icon_item.mm index bb83e904..8beacf1 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_detail_icon_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_detail_icon_item.mm
@@ -10,7 +10,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item.mm index e14339d..3202841 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item.mm
@@ -7,7 +7,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item_unittest.mm b/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item_unittest.mm index 63d4918..30adfa2 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item_unittest.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_detail_text_item_unittest.mm
@@ -8,7 +8,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest_mac.h" #include "testing/platform_test.h"
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm index 8bb0525e..6bd69c8f 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_disclosure_header_footer_item.mm
@@ -10,7 +10,7 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/rtl_geometry.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_image_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_image_item.mm index 62da64b..da6b41c 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_image_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_image_item.mm
@@ -9,7 +9,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_link_header_footer_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_link_header_footer_item.mm index 3610ce9..2c52cb12 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_link_header_footer_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_link_header_footer_item.mm
@@ -6,8 +6,8 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/string_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" #import "net/base/mac/url_conversions.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_multi_detail_text_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_multi_detail_text_item.mm index 02b7c7c..c166f665 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_multi_detail_text_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_multi_detail_text_item.mm
@@ -6,7 +6,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_button_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_button_item.mm index a8f6fa2..794fd1b 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_button_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_button_item.mm
@@ -7,8 +7,8 @@ #include "base/mac/foundation_util.h" #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/colors/semantic_color_names.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_edit_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_edit_item.mm index a74801196..0f587c8b 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_edit_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_edit_item.mm
@@ -9,7 +9,7 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/rtl_geometry.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm index 0704c39..643e90d1 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm
@@ -8,7 +8,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util_mac.h"
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_item_unittest.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_item_unittest.mm index 1a547dd8..4ce6373 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_item_unittest.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_item_unittest.mm
@@ -8,7 +8,7 @@ #import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest_mac.h" #include "testing/platform_test.h"
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.mm index f5c2034..7841d43 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_link_item.mm
@@ -9,8 +9,8 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/util/label_link_controller.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/string_util.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" #include "url/gurl.h" #if !defined(__has_feature) || !__has_feature(objc_arc)
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_url_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_url_item.mm index 4dd3046..18cc993 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_url_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_url_item.mm
@@ -11,8 +11,8 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #include "ios/chrome/browser/ui/util/ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/favicon/favicon_view.h" -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" #include "url/gurl.h"
diff --git a/ios/chrome/common/colors/BUILD.gn b/ios/chrome/common/colors/BUILD.gn index bfd76501..b88969d 100644 --- a/ios/chrome/common/colors/BUILD.gn +++ b/ios/chrome/common/colors/BUILD.gn
@@ -6,6 +6,8 @@ source_set("colors") { sources = [ + "UIColor+cr_semantic_colors.h", + "UIColor+cr_semantic_colors.mm", "semantic_color_names.h", "semantic_color_names.mm", ]
diff --git a/ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h b/ios/chrome/common/colors/UIColor+cr_semantic_colors.h similarity index 83% rename from ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h rename to ios/chrome/common/colors/UIColor+cr_semantic_colors.h index f9c644d..458c365 100644 --- a/ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h +++ b/ios/chrome/common/colors/UIColor+cr_semantic_colors.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef IOS_CHROME_COMMON_UI_UTIL_UICOLOR_CR_SEMANTIC_COLORS_H_ -#define IOS_CHROME_COMMON_UI_UTIL_UICOLOR_CR_SEMANTIC_COLORS_H_ +#ifndef IOS_CHROME_COMMON_COLORS_UICOLOR_CR_SEMANTIC_COLORS_H_ +#define IOS_CHROME_COMMON_COLORS_UICOLOR_CR_SEMANTIC_COLORS_H_ #import <UIKit/UIKit.h> @@ -29,4 +29,4 @@ @end -#endif // IOS_CHROME_COMMON_UI_UTIL_UICOLOR_CR_SEMANTIC_COLORS_H_ +#endif // IOS_CHROME_COMMON_COLORS_UICOLOR_CR_SEMANTIC_COLORS_H_
diff --git a/ios/chrome/common/ui_util/UIColor+cr_semantic_colors.mm b/ios/chrome/common/colors/UIColor+cr_semantic_colors.mm similarity index 97% rename from ios/chrome/common/ui_util/UIColor+cr_semantic_colors.mm rename to ios/chrome/common/colors/UIColor+cr_semantic_colors.mm index d713a07..0731791 100644 --- a/ios/chrome/common/ui_util/UIColor+cr_semantic_colors.mm +++ b/ios/chrome/common/colors/UIColor+cr_semantic_colors.mm
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import "ios/chrome/common/ui_util/UIColor+cr_semantic_colors.h" +#import "ios/chrome/common/colors/UIColor+cr_semantic_colors.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support."
diff --git a/ios/chrome/common/ui_util/BUILD.gn b/ios/chrome/common/ui_util/BUILD.gn index 0160b004..5d6452b 100644 --- a/ios/chrome/common/ui_util/BUILD.gn +++ b/ios/chrome/common/ui_util/BUILD.gn
@@ -15,11 +15,3 @@ ] configs += [ "//build/config/compiler:enable_arc" ] } - -source_set("semantic_colors") { - sources = [ - "UIColor+cr_semantic_colors.h", - "UIColor+cr_semantic_colors.mm", - ] - configs += [ "//build/config/compiler:enable_arc" ] -}
diff --git a/ios/web_view/BUILD.gn b/ios/web_view/BUILD.gn index 283340a..7d6b1cb 100644 --- a/ios/web_view/BUILD.gn +++ b/ios/web_view/BUILD.gn
@@ -44,6 +44,7 @@ # These are defined as vars so they can be shared with different targets below. ios_web_view_public_headers = [ + "public/cwv_download_task.h", "public/cwv_export.h", "public/cwv_favicon.h", "public/cwv_flags.h", @@ -66,7 +67,6 @@ "public/cwv_user_script.h", "public/cwv_web_view.h", "public/cwv_web_view_configuration.h", - "public/cwv_download_task.h", ] if (ios_web_view_enable_sync) { ios_web_view_public_headers += [ @@ -101,10 +101,10 @@ "internal/app/application_context.mm", "internal/app/web_view_io_thread.h", "internal/app/web_view_io_thread.mm", - "internal/autofill/web_view_autofill_client_ios.h", - "internal/autofill/web_view_autofill_client_ios.mm", "internal/autofill/web_view_autocomplete_history_manager_factory.h", "internal/autofill/web_view_autocomplete_history_manager_factory.mm", + "internal/autofill/web_view_autofill_client_ios.h", + "internal/autofill/web_view_autofill_client_ios.mm", "internal/autofill/web_view_personal_data_manager_factory.h", "internal/autofill/web_view_personal_data_manager_factory.mm", "internal/autofill/web_view_strike_database_factory.h", @@ -113,6 +113,8 @@ "internal/content_settings/web_view_cookie_settings_factory.mm", "internal/content_settings/web_view_host_content_settings_map_factory.h", "internal/content_settings/web_view_host_content_settings_map_factory.mm", + "internal/cwv_download_task.mm", + "internal/cwv_download_task_internal.h", "internal/cwv_favicon.mm", "internal/cwv_favicon_internal.h", "internal/cwv_flags.mm", @@ -121,6 +123,7 @@ "internal/cwv_html_element_internal.h", "internal/cwv_navigation_action.mm", "internal/cwv_navigation_action_internal.h", + "internal/cwv_navigation_delegate.mm", "internal/cwv_navigation_type.mm", "internal/cwv_navigation_type_internal.h", "internal/cwv_preferences.mm", @@ -131,12 +134,11 @@ "internal/cwv_script_command_internal.h", "internal/cwv_scroll_view.mm", "internal/cwv_scroll_view_internal.h", - "internal/cwv_ssl_status_internal.h", "internal/cwv_ssl_status.mm", + "internal/cwv_ssl_status_internal.h", "internal/cwv_user_content_controller.mm", "internal/cwv_user_content_controller_internal.h", "internal/cwv_user_script.mm", - "internal/cwv_navigation_delegate.mm", "internal/cwv_web_view.mm", "internal/cwv_web_view_configuration.mm", "internal/cwv_web_view_configuration_internal.h", @@ -162,20 +164,20 @@ "internal/pref_names.mm", "internal/signin/ios_web_view_signin_client.h", "internal/signin/ios_web_view_signin_client.mm", + "internal/signin/web_view_device_accounts_provider_impl.h", + "internal/signin/web_view_device_accounts_provider_impl.mm", "internal/signin/web_view_identity_manager_factory.h", "internal/signin/web_view_identity_manager_factory.mm", - "internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h", - "internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.mm", "internal/signin/web_view_signin_client_factory.h", "internal/signin/web_view_signin_client_factory.mm", "internal/signin/web_view_signin_error_controller_factory.h", "internal/signin/web_view_signin_error_controller_factory.mm", "internal/sync/web_view_device_info_sync_service_factory.h", "internal/sync/web_view_device_info_sync_service_factory.mm", - "internal/sync/web_view_model_type_store_service_factory.h", - "internal/sync/web_view_model_type_store_service_factory.mm", "internal/sync/web_view_gcm_profile_service_factory.h", "internal/sync/web_view_gcm_profile_service_factory.mm", + "internal/sync/web_view_model_type_store_service_factory.h", + "internal/sync/web_view_model_type_store_service_factory.mm", "internal/sync/web_view_profile_invalidation_provider_factory.h", "internal/sync/web_view_profile_invalidation_provider_factory.mm", "internal/sync/web_view_profile_sync_service_factory.h", @@ -184,8 +186,8 @@ "internal/sync/web_view_sync_client.mm", "internal/translate/cwv_translation_controller.mm", "internal/translate/cwv_translation_controller_internal.h", - "internal/translate/cwv_translation_language_internal.h", "internal/translate/cwv_translation_language.mm", + "internal/translate/cwv_translation_language_internal.h", "internal/translate/cwv_translation_policy.mm", "internal/translate/web_view_translate_accept_languages_factory.h", "internal/translate/web_view_translate_accept_languages_factory.mm", @@ -197,6 +199,8 @@ "internal/translate/web_view_translate_service.mm", "internal/web_view_browser_state.h", "internal/web_view_browser_state.mm", + "internal/web_view_download_manager.h", + "internal/web_view_download_manager.mm", "internal/web_view_early_page_script_provider.h", "internal/web_view_early_page_script_provider.mm", "internal/web_view_global_state_util.h", @@ -217,10 +221,6 @@ "internal/web_view_web_state_policy_decider.mm", "internal/webdata_services/web_view_web_data_service_wrapper_factory.h", "internal/webdata_services/web_view_web_data_service_wrapper_factory.mm", - "internal/web_view_download_manager.h", - "internal/web_view_download_manager.mm", - "internal/cwv_download_task_internal.h", - "internal/cwv_download_task.mm", ] ios_web_view_sources += ios_web_view_public_headers if (ios_web_view_enable_sync) { @@ -247,8 +247,8 @@ "internal/autofill/cwv_credit_card_internal.h", "internal/autofill/cwv_credit_card_verifier.mm", "internal/autofill/cwv_credit_card_verifier_internal.h", - "internal/passwords/cwv_password_controller.mm", "internal/passwords/cwv_password_controller.h", + "internal/passwords/cwv_password_controller.mm", ] }
diff --git a/ios/web_view/internal/signin/ios_web_view_signin_client.h b/ios/web_view/internal/signin/ios_web_view_signin_client.h index e447fb48..9d1795284 100644 --- a/ios/web_view/internal/signin/ios_web_view_signin_client.h +++ b/ios/web_view/internal/signin/ios_web_view_signin_client.h
@@ -69,7 +69,7 @@ scoped_refptr<content_settings::CookieSettings> cookie_settings_; // Used to add and remove content settings observers. scoped_refptr<HostContentSettingsMap> host_content_settings_map_; - // Used by WebViewProfileOAuth2TokenServiceIOSProviderImpl to fetch access + // Used by WebViewDeviceAccountsProviderImpl to fetch access // tokens. Also used to notify of signout events. Held weak so this class // does not determine |sync_controller_|'s lifetime. __weak CWVSyncController* sync_controller_ = nil;
diff --git a/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h new file mode 100644 index 0000000..b996d88 --- /dev/null +++ b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h
@@ -0,0 +1,41 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_ +#define IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_ + +#include <string> +#include <vector> + +#include "base/macros.h" +#include "components/signin/ios/browser/device_accounts_provider.h" + +class IOSWebViewSigninClient; + +// Implementation of DeviceAccountsProvider. +class WebViewDeviceAccountsProviderImpl : public DeviceAccountsProvider { + public: + // |signin_client| used to fetch access tokens. + explicit WebViewDeviceAccountsProviderImpl( + IOSWebViewSigninClient* signin_client); + ~WebViewDeviceAccountsProviderImpl() override; + + // ios::DeviceAccountsProvider + void GetAccessToken(const std::string& gaia_id, + const std::string& client_id, + const std::set<std::string>& scopes, + const AccessTokenCallback& callback) override; + std::vector<AccountInfo> GetAllAccounts() const override; + AuthenticationErrorCategory GetAuthenticationErrorCategory( + const std::string& gaia_id, + NSError* error) const override; + + private: + // Used to obtain access tokens in |GetAccessToken|. + IOSWebViewSigninClient* const signin_client_ = nullptr; + + DISALLOW_COPY_AND_ASSIGN(WebViewDeviceAccountsProviderImpl); +}; + +#endif // IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_DEVICE_ACCOUNTS_PROVIDER_IMPL_H_
diff --git a/ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.mm b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.mm similarity index 73% rename from ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.mm rename to ios/web_view/internal/signin/web_view_device_accounts_provider_impl.mm index a0b4684a..52355a1 100644 --- a/ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.mm +++ b/ios/web_view/internal/signin/web_view_device_accounts_provider_impl.mm
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h" +#include "ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h" #include "base/logging.h" #include "base/strings/sys_string_conversions.h" @@ -14,15 +14,14 @@ #error "This file requires ARC support." #endif -WebViewProfileOAuth2TokenServiceIOSProviderImpl:: - WebViewProfileOAuth2TokenServiceIOSProviderImpl( - IOSWebViewSigninClient* signin_client) +WebViewDeviceAccountsProviderImpl::WebViewDeviceAccountsProviderImpl( + IOSWebViewSigninClient* signin_client) : signin_client_(signin_client) {} -WebViewProfileOAuth2TokenServiceIOSProviderImpl:: - ~WebViewProfileOAuth2TokenServiceIOSProviderImpl() = default; +WebViewDeviceAccountsProviderImpl::~WebViewDeviceAccountsProviderImpl() = + default; -void WebViewProfileOAuth2TokenServiceIOSProviderImpl::GetAccessToken( +void WebViewDeviceAccountsProviderImpl::GetAccessToken( const std::string& gaia_id, const std::string& client_id, const std::set<std::string>& scopes, @@ -34,8 +33,8 @@ [sync_controller fetchAccessTokenForScopes:scopes callback:callback]; } -std::vector<ProfileOAuth2TokenServiceIOSProvider::AccountInfo> -WebViewProfileOAuth2TokenServiceIOSProviderImpl::GetAllAccounts() const { +std::vector<DeviceAccountsProvider::AccountInfo> +WebViewDeviceAccountsProviderImpl::GetAllAccounts() const { // |sync_controller| may still be nil if this is called too early. That's OK // because this will be called again after it has been set. CWVSyncController* sync_controller = signin_client_->GetSyncController(); @@ -50,7 +49,7 @@ } AuthenticationErrorCategory -WebViewProfileOAuth2TokenServiceIOSProviderImpl::GetAuthenticationErrorCategory( +WebViewDeviceAccountsProviderImpl::GetAuthenticationErrorCategory( const std::string& gaia_id, NSError* error) const { // TODO(crbug.com/780937): Implement fully.
diff --git a/ios/web_view/internal/signin/web_view_identity_manager_factory.mm b/ios/web_view/internal/signin/web_view_identity_manager_factory.mm index 1d6504b8..53554b6 100644 --- a/ios/web_view/internal/signin/web_view_identity_manager_factory.mm +++ b/ios/web_view/internal/signin/web_view_identity_manager_factory.mm
@@ -23,7 +23,7 @@ #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h" #include "ios/web_view/internal/app/application_context.h" #include "ios/web_view/internal/signin/ios_web_view_signin_client.h" -#include "ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h" +#include "ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h" #include "ios/web_view/internal/signin/web_view_signin_client_factory.h" #include "ios/web_view/internal/web_view_browser_state.h" #include "services/identity/public/cpp/accounts_cookie_mutator_impl.h" @@ -46,8 +46,7 @@ IOSWebViewSigninClient* signin_client = WebViewSigninClientFactory::GetForBrowserState(browser_state); auto token_service_provider = - std::make_unique<WebViewProfileOAuth2TokenServiceIOSProviderImpl>( - signin_client); + std::make_unique<WebViewDeviceAccountsProviderImpl>(signin_client); auto delegate = std::make_unique<ProfileOAuth2TokenServiceIOSDelegate>( signin_client, std::move(token_service_provider), account_tracker_service);
diff --git a/ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h b/ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h deleted file mode 100644 index 26a69a7..0000000 --- a/ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h +++ /dev/null
@@ -1,42 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_ -#define IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_ - -#include <string> -#include <vector> - -#include "base/macros.h" -#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" - -class IOSWebViewSigninClient; - -// Implementation of ProfileOAuth2TokenServiceIOSProvider. -class WebViewProfileOAuth2TokenServiceIOSProviderImpl - : public ProfileOAuth2TokenServiceIOSProvider { - public: - // |signin_client| used to fetch access tokens. - explicit WebViewProfileOAuth2TokenServiceIOSProviderImpl( - IOSWebViewSigninClient* signin_client); - ~WebViewProfileOAuth2TokenServiceIOSProviderImpl() override; - - // ios::ProfileOAuth2TokenServiceIOSProvider - void GetAccessToken(const std::string& gaia_id, - const std::string& client_id, - const std::set<std::string>& scopes, - const AccessTokenCallback& callback) override; - std::vector<AccountInfo> GetAllAccounts() const override; - AuthenticationErrorCategory GetAuthenticationErrorCategory( - const std::string& gaia_id, - NSError* error) const override; - - private: - // Used to obtain access tokens in |GetAccessToken|. - IOSWebViewSigninClient* const signin_client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(WebViewProfileOAuth2TokenServiceIOSProviderImpl); -}; - -#endif // IOS_WEB_VIEW_INTERNAL_SIGNIN_WEB_VIEW_PROFILE_OAUTH2_TOKEN_SERVICE_IOS_PROVIDER_IMPL_H_
diff --git a/ios/web_view/internal/sync/cwv_sync_controller.mm b/ios/web_view/internal/sync/cwv_sync_controller.mm index a095b171..16e9824 100644 --- a/ios/web_view/internal/sync/cwv_sync_controller.mm +++ b/ios/web_view/internal/sync/cwv_sync_controller.mm
@@ -203,15 +203,16 @@ #pragma mark - Internal Methods -- (void)fetchAccessTokenForScopes:(const std::set<std::string>&)scopes - callback:(const ProfileOAuth2TokenServiceIOSProvider:: - AccessTokenCallback&)callback { +- (void) + fetchAccessTokenForScopes:(const std::set<std::string>&)scopes + callback: + (const DeviceAccountsProvider::AccessTokenCallback&) + callback { NSMutableArray<NSString*>* scopesArray = [NSMutableArray array]; for (const auto& scope : scopes) { [scopesArray addObject:base::SysUTF8ToNSString(scope)]; } - ProfileOAuth2TokenServiceIOSProvider::AccessTokenCallback scopedCallback = - callback; + DeviceAccountsProvider::AccessTokenCallback scopedCallback = callback; [_dataSource syncController:self getAccessTokenForScopes:[scopesArray copy] completionHandler:^(NSString* accessToken, NSDate* expirationDate,
diff --git a/ios/web_view/internal/sync/cwv_sync_controller_internal.h b/ios/web_view/internal/sync/cwv_sync_controller_internal.h index 0a389b4..c51f07b 100644 --- a/ios/web_view/internal/sync/cwv_sync_controller_internal.h +++ b/ios/web_view/internal/sync/cwv_sync_controller_internal.h
@@ -9,7 +9,7 @@ #include "components/signin/core/browser/signin_metrics.h" #include "google_apis/gaia/google_service_auth_error.h" -#include "ios/web_view/internal/signin/web_view_profile_oauth2_token_service_ios_provider_impl.h" +#include "ios/web_view/internal/signin/web_view_device_accounts_provider_impl.h" #import "ios/web_view/public/cwv_sync_controller.h" NS_ASSUME_NONNULL_BEGIN @@ -33,11 +33,13 @@ (SigninErrorController*)SigninErrorController NS_DESIGNATED_INITIALIZER; -// Called by WebViewProfileOAuth2TokenServiceIOSProviderImpl to obtain +// Called by WebViewDeviceAccountsProviderImpl to obtain // access tokens for |scopes| to be passed back in |callback|. -- (void)fetchAccessTokenForScopes:(const std::set<std::string>&)scopes - callback:(const ProfileOAuth2TokenServiceIOSProvider:: - AccessTokenCallback&)callback; +- (void) + fetchAccessTokenForScopes:(const std::set<std::string>&)scopes + callback: + (const DeviceAccountsProvider::AccessTokenCallback&) + callback; // Called by IOSWebViewSigninClient when signing out. - (void)didSignoutWithSourceMetric:(signin_metrics::ProfileSignout)metric;
diff --git a/ios/web_view/internal/sync/cwv_sync_controller_unittest.mm b/ios/web_view/internal/sync/cwv_sync_controller_unittest.mm index 0013cf7..5ca956c 100644 --- a/ios/web_view/internal/sync/cwv_sync_controller_unittest.mm +++ b/ios/web_view/internal/sync/cwv_sync_controller_unittest.mm
@@ -12,7 +12,7 @@ #include "base/files/file_path.h" #include "base/test/bind_test_util.h" #include "components/signin/core/browser/signin_error_controller.h" -#include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_provider.h" +#include "components/signin/ios/browser/fake_device_accounts_provider.h" #include "components/sync/driver/mock_sync_service.h" #include "components/sync/driver/sync_service_observer.h" #include "google_apis/gaia/google_service_auth_error.h" @@ -86,8 +86,7 @@ } static identity::IdentityTestEnvironment::ExtraParams CreateExtraParams() { - auto provider = - std::make_unique<FakeProfileOAuth2TokenServiceIOSProvider>(); + auto provider = std::make_unique<FakeDeviceAccountsProvider>(); provider->AddAccount(kTestGaiaId, kTestEmail); identity::IdentityTestEnvironment::ExtraParams extra_params; extra_params.token_service_provider = std::move(provider); @@ -126,7 +125,7 @@ [sync_controller_ startSyncWithIdentity:identity dataSource:data_source]; std::set<std::string> scopes = {kTestScope1, kTestScope2}; - ProfileOAuth2TokenServiceIOSProvider::AccessTokenCallback callback; + DeviceAccountsProvider::AccessTokenCallback callback; [sync_controller_ fetchAccessTokenForScopes:scopes callback:callback]; [data_source verify];
diff --git a/media/gpu/libyuv_image_processor.cc b/media/gpu/libyuv_image_processor.cc index 09c053f..2f86597 100644 --- a/media/gpu/libyuv_image_processor.cc +++ b/media/gpu/libyuv_image_processor.cc
@@ -221,6 +221,7 @@ NotifyError(); return; } + output_frame->set_timestamp(input_frame->timestamp()); std::move(cb).Run(std::move(output_frame)); }
diff --git a/media/gpu/video_encode_accelerator_unittest.cc b/media/gpu/video_encode_accelerator_unittest.cc index a695ef7..e34fe80 100644 --- a/media/gpu/video_encode_accelerator_unittest.cc +++ b/media/gpu/video_encode_accelerator_unittest.cc
@@ -124,11 +124,16 @@ const unsigned int kMinFramesForBitrateTests = 300; // The percentiles to measure for encode latency. const unsigned int kLoggedLatencyPercentiles[] = {50, 75, 95}; -// Timeout for the flush is completed. In the multiple encoder test case, the -// FPS might be lower than expected. Let us assume that the lowest FPS is 5, -// then the period per frame is 200 milliseconds. Here we set the timeout 10x -// periods considering that there might be some pending frames. -const unsigned int kFlushTimeoutMs = 2000; +// Timeout for the flush is completed. The period starts from passing the last +// frame to the encoder, to the flush callback is called. There might be many +// pending frames in the encoder, so the timeout might be larger than a frame +// period. +// In the multiple encoder test case, the FPS might be lower than expected. +// Currently the largest resolution we run at lab is 4K. The FPS of the slowest +// device in single encoder is about 10. In MultipleEncoders test case, the +// measured time period on the slowest device is about 5 seconds. Here we set +// the timeout 2x of the measured period. +const unsigned int kFlushTimeoutMs = 10000; // The syntax of multiple test streams is: // test-stream1;test-stream2;test-stream3
diff --git a/net/BUILD.gn b/net/BUILD.gn index f5f0bd6..ae69336d 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn
@@ -6441,6 +6441,17 @@ ] } +fuzzer_test("net_canonical_cookie_fuzzer") { + sources = [ + "cookies/canonical_cookie_fuzzer.cc", + ] + deps = [ + ":net_fuzzer_test_support", + "//net", + ] + seed_corpus = "data/fuzzer_data/net_canonical_cookie_fuzzer/" +} + fuzzer_test("net_parse_cookie_line_fuzzer") { sources = [ "cookies/parse_cookie_line_fuzzer.cc",
diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h index 894282176..e38fa12 100644 --- a/net/cookies/canonical_cookie.h +++ b/net/cookies/canonical_cookie.h
@@ -83,9 +83,10 @@ }; // Creates a new |CanonicalCookie| from the |cookie_line| and the - // |creation_time|. Canonicalizes and validates inputs. May return NULL if - // an attribute value is invalid. |creation_time| may not be null. Sets - // optional |status| to the relevent CookieInclusionStatus if provided + // |creation_time|. Canonicalizes and validates inputs. May return NULL if + // an attribute value is invalid. |url| must be valid. |creation_time| may + // not be null. Sets optional |status| to the relevant CookieInclusionStatus + // if provided static std::unique_ptr<CanonicalCookie> Create( const GURL& url, const std::string& cookie_line,
diff --git a/net/cookies/canonical_cookie_fuzzer.cc b/net/cookies/canonical_cookie_fuzzer.cc new file mode 100644 index 0000000..816b0a9 --- /dev/null +++ b/net/cookies/canonical_cookie_fuzzer.cc
@@ -0,0 +1,58 @@ +// Copyright 2019 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 <stddef.h> +#include <stdint.h> + +#include <limits> +#include <memory> + +#include "net/cookies/canonical_cookie.h" +#include "net/cookies/cookie_constants.h" +#include "net/cookies/cookie_util.h" +#include "net/cookies/parsed_cookie.h" +#include "third_party/libFuzzer/src/utils/FuzzedDataProvider.h" + +namespace net { +const base::Time getRandomTime(FuzzedDataProvider* data_provider) { + const uint64_t max = std::numeric_limits<uint64_t>::max(); + return base::Time::FromTimeT( + data_provider->ConsumeIntegralInRange<uint64_t>(0, max)); +} + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + FuzzedDataProvider data_provider(data, size); + + const std::string name = data_provider.ConsumeRandomLengthString(800); + const std::string value = data_provider.ConsumeRandomLengthString(800); + const std::string domain = data_provider.ConsumeRandomLengthString(800); + const std::string path = data_provider.ConsumeRandomLengthString(800); + + const GURL url(data_provider.ConsumeRandomLengthString(800)); + if (!url.is_valid()) + return 0; + + const base::Time creation = getRandomTime(&data_provider); + const base::Time expiration = getRandomTime(&data_provider); + const base::Time last_access = getRandomTime(&data_provider); + + const std::unique_ptr<const CanonicalCookie> sanitized_cookie = + CanonicalCookie::CreateSanitizedCookie( + url, name, value, domain, path, creation, expiration, last_access, + data_provider.ConsumeBool(), data_provider.ConsumeBool(), + CookieSameSite::UNSPECIFIED, CookiePriority::COOKIE_PRIORITY_DEFAULT); + + if (sanitized_cookie) { + CHECK(sanitized_cookie->IsCanonical()); + + // Check identity property of various comparison functions + const CanonicalCookie copied_cookie = *sanitized_cookie; + CHECK(sanitized_cookie->IsEquivalent(copied_cookie)); + CHECK(sanitized_cookie->IsEquivalentForSecureCookieMatching(copied_cookie)); + CHECK(!sanitized_cookie->PartialCompare(copied_cookie)); + } + + return 0; +} +} // namespace net
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01148e9defeae5891c99f04544ea331a0e5289ec b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01148e9defeae5891c99f04544ea331a0e5289ec new file mode 100644 index 0000000..bc8627e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01148e9defeae5891c99f04544ea331a0e5289ec
@@ -0,0 +1 @@ +OptanonConsent=landingPath=https%3A%2F%2Fwww.cnn.com%2F&datestamp=Fri+Jun+28+2019+13%3A58%3A37+GMT-0400+(Eastern+Daylight+Time)&version=4.5.0&EU=false&groups=1%3A1%2C2%3A1%2C3%3A1%2C4%3A1%2C0_37182%3A1%2C0_37178%3A1%2C0_37174%3A1%2C0_37190%3A1%2C0_37186%3A1%2C0_37183%3A1%2C0_37179%3A1%2C0_37175%3A1%2C0_37171%3A1%2C0_37195%3A1%2C0_37191%3A1%2C0_37187%3A1%2C0_37184%3A1%2C0_37180%3A1%2C0_37176%3A1%2C0_37172%3A1%2C0_37192%3A1%2C0_37188%3A1%2C0_37185%3A1%2C0_37181%3A1%2C0_53714%3A1%2C0_37177%3A1%2C0_37173%3A1%2C0_37193%3A1%2C0_37189%3A1%2C8%3A1%2C101%3A1%2C102%3A1%2C103%3A1%2C104%3A1%2C105%3A1%2C106%3A1%2C107%3A1%2C108%3A1%2C109%3A1%2C110%3A1%2C112%3A1%2C113%3A1%2C114%3A1%2C115%3A1%2C116%3A1%2C117%3A1%2C118%3A1%2C119%3A1%2C120%3A1%2C121%3A1%2C122%3A1%2C123%3A1%2C124%3A1%2C125%3A1%2C126%3A1%2C127%3A1%2C128%3A1%2C129%3A1%2C131%3A1%2C132%3A1%2C133%3A1; expires=Sat, 27 Jun 2020 17:58:37 GMT; path=/; domain=.cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01dee8260b70f2e55c4f4fbf40c073a800adfa6e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01dee8260b70f2e55c4f4fbf40c073a800adfa6e new file mode 100644 index 0000000..526f889 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/01dee8260b70f2e55c4f4fbf40c073a800adfa6e
@@ -0,0 +1 @@ +w-units=f;expires=Invalid Date;path=/;domain=.cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0284b34ab88997023d70112f8a094b56ef8bfef0 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0284b34ab88997023d70112f8a094b56ef8bfef0 new file mode 100644 index 0000000..0948ce8 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0284b34ab88997023d70112f8a094b56ef8bfef0
@@ -0,0 +1 @@ +s_sq=%5B%5BB%5D%5D; path=/; domain=.cnn.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03429a858215bba11994af0abdf0912d9c14ee0c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03429a858215bba11994af0abdf0912d9c14ee0c new file mode 100644 index 0000000..13d050d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03429a858215bba11994af0abdf0912d9c14ee0c
@@ -0,0 +1 @@ +ONPLFTRH=38497|XRZVS; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03a79f27987511c315b984d435dfc15ae78254a3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03a79f27987511c315b984d435dfc15ae78254a3 new file mode 100644 index 0000000..d241eab6 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/03a79f27987511c315b984d435dfc15ae78254a3
@@ -0,0 +1 @@ +ab._gd1561745919583=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=.wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/04d51c85a2491ce50c566002a3bdfaf3106a6b47 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/04d51c85a2491ce50c566002a3bdfaf3106a6b47 new file mode 100644 index 0000000..6c72fb7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/04d51c85a2491ce50c566002a3bdfaf3106a6b47
@@ -0,0 +1 @@ +tuuid=77628149-b504-456e-abe8-f3bc26811980; path=/; expires=Sat, 27-Jun-2020 17:59:07 GMT; domain=.bidswitch.net \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0506230a41aca38bb0ffb5de3f55058d41a498af b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0506230a41aca38bb0ffb5de3f55058d41a498af new file mode 100644 index 0000000..a328a4aa --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0506230a41aca38bb0ffb5de3f55058d41a498af
@@ -0,0 +1 @@ +jkidd-l=uid=0&sessionIndex=1&sessionStart=1561745691631&isNewSession=1&lastRequest=1561745691631&prevRequest=0&activeDays=%5B0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C0%2C1%5D&firstReferrer=&firstLanding=&firstSeen=1561745691631&browserSession=1&pageIndex=1&totalSessionTime=0&avgSessionTime=0&adv=1&a7dv=1&a14dv=1&a21dv=1&lastKnownType=anon; Path=/; Domain=a.nytimes.com; Max-Age=31536000; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05b4801f8b8dfbd1769c4fa871bb183b61456c4e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05b4801f8b8dfbd1769c4fa871bb183b61456c4e new file mode 100644 index 0000000..df73da3 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05b4801f8b8dfbd1769c4fa871bb183b61456c4e
@@ -0,0 +1 @@ +_dbefe=http://10.204.67.75:8080; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05e36c1756f2385dfd7f9b62e906163b0fd11de1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05e36c1756f2385dfd7f9b62e906163b0fd11de1 new file mode 100644 index 0000000..690ee27 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/05e36c1756f2385dfd7f9b62e906163b0fd11de1
@@ -0,0 +1 @@ +PUBMDCID=1; domain=pubmatic.com; expires=Thu, 26-Sep-2019 18:16:22 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06a27e351cddd2a49703ba85bd8f007c9aa44086 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06a27e351cddd2a49703ba85bd8f007c9aa44086 new file mode 100644 index 0000000..a471626 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06a27e351cddd2a49703ba85bd8f007c9aa44086
@@ -0,0 +1 @@ +optimizelyPPID=null;domain=.com;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06f1e5d8c336b82473abed2c49fb41ad6834e079 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06f1e5d8c336b82473abed2c49fb41ad6834e079 new file mode 100644 index 0000000..1ce5bc98 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/06f1e5d8c336b82473abed2c49fb41ad6834e079
@@ -0,0 +1 @@ +gig_hasGmid=ver2; path=/; expires=Sat, 27 Jun 2020 17:58:32 GMT; domain=cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/07c9c06643ad6cb58fdedca83573f7ebd0406e3e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/07c9c06643ad6cb58fdedca83573f7ebd0406e3e new file mode 100644 index 0000000..de61eecd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/07c9c06643ad6cb58fdedca83573f7ebd0406e3e
@@ -0,0 +1 @@ +_cb_ls=1; expires=Mon, 27 Jul 2020 17:58:37 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/087b52f241d0f932dc3abcf6a343514f7fc24854 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/087b52f241d0f932dc3abcf6a343514f7fc24854 new file mode 100644 index 0000000..cd58d057 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/087b52f241d0f932dc3abcf6a343514f7fc24854
@@ -0,0 +1 @@ +__cfduid=d324dcf75e766aa6df481cc9ff92e32e71561745782; expires=Sat, 27-Jun-20 18:16:22 GMT; path=/; domain=.adsymptotic.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/08aa1ae92143a6d4e4aa3df3157497d250b0d04b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/08aa1ae92143a6d4e4aa3df3157497d250b0d04b new file mode 100644 index 0000000..19c5972 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/08aa1ae92143a6d4e4aa3df3157497d250b0d04b
@@ -0,0 +1 @@ +ad-privacy=0; Domain=.amazon-adsystem.com; Expires=Wed, 01-Jan-2020 17:59:07 GMT; Path=/; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/09ecf26720791d33b4f4f53d50b1c89b6393e2d6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/09ecf26720791d33b4f4f53d50b1c89b6393e2d6 new file mode 100644 index 0000000..81016ca7a5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/09ecf26720791d33b4f4f53d50b1c89b6393e2d6
@@ -0,0 +1 @@ +d=EEIBEAH2HZEP68wQ; expires=Thu, 26-Sep-2019 17:58:35 GMT; path=/; domain=.quantserve.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0a911b70d892516fe5baa26d9fcb74df857491c4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0a911b70d892516fe5baa26d9fcb74df857491c4 new file mode 100644 index 0000000..677c50f2 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0a911b70d892516fe5baa26d9fcb74df857491c4
@@ -0,0 +1 @@ +_gat=1; path=/; expires=Fri, 28 Jun 2019 18:19:40 GMT; domain=wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0ab0209635f1475211b92f8a0918902a8020e173 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0ab0209635f1475211b92f8a0918902a8020e173 new file mode 100644 index 0000000..3e23d6b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0ab0209635f1475211b92f8a0918902a8020e173
@@ -0,0 +1 @@ +_cb_svref=null; expires=Fri, 28 Jun 2019 18:27:52 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0b7074781b589cb299157f79bb9eaa377f06fcac b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0b7074781b589cb299157f79bb9eaa377f06fcac new file mode 100644 index 0000000..f51f0bc5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0b7074781b589cb299157f79bb9eaa377f06fcac
@@ -0,0 +1 @@ +ad-id=AycGHXzj-kTTmnAz6jvyj9k; Domain=.amazon-adsystem.com; Expires=Wed, 01-Jan-2020 17:59:07 GMT; Path=/; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0cca316d9c5dfe90bb72147e1e19061ed3d74d48 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0cca316d9c5dfe90bb72147e1e19061ed3d74d48 new file mode 100644 index 0000000..b3d77016 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0cca316d9c5dfe90bb72147e1e19061ed3d74d48
@@ -0,0 +1 @@ +rmuid=1cd21260-f2c0-4d95-a4a5-631c4e6ea12e; Expires=Sat, 27 Jun 2020 18:16:21 UTC; Domain=.linksynergy.com; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d100cbf03c876c74fc13e15e9704fd77422aee9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d100cbf03c876c74fc13e15e9704fd77422aee9 new file mode 100644 index 0000000..293b447 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d100cbf03c876c74fc13e15e9704fd77422aee9
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 18:16:20 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d4451b8d57c4c24c91e0c758837b89e2bf01f43 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d4451b8d57c4c24c91e0c758837b89e2bf01f43 new file mode 100644 index 0000000..1aee3dd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0d4451b8d57c4c24c91e0c758837b89e2bf01f43
@@ -0,0 +1 @@ +aax-vsid=2047473794683464000V10; Expires=Sat, 27 Jun 2020 18:16:19 GMT; domain=.aaxads.com; Path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e74d4a5af628f624f6ca2847f727a7bed9b46a2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e74d4a5af628f624f6ca2847f727a7bed9b46a2 new file mode 100644 index 0000000..abf4cda --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e74d4a5af628f624f6ca2847f727a7bed9b46a2
@@ -0,0 +1 @@ +ab._gd1561745919581=ab._gd1561745919581;domain=.wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e7aa5c3fb119a3da31670208e374ee4caab4710 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e7aa5c3fb119a3da31670208e374ee4caab4710 new file mode 100644 index 0000000..9e0d9ef9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0e7aa5c3fb119a3da31670208e374ee4caab4710
@@ -0,0 +1 @@ +PUBMDCID=1; domain=pubmatic.com; expires=Thu, 26-Sep-2019 18:18:42 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0eb6de4cdbcf481c51ca734011bac450a2035f9b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0eb6de4cdbcf481c51ca734011bac450a2035f9b new file mode 100644 index 0000000..f8ac382a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0eb6de4cdbcf481c51ca734011bac450a2035f9b
@@ -0,0 +1 @@ +mnet_session_depth=1%7C1561745688860;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0f04f1a8a1ede89a3105435ae3eefe8ca9a5229f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0f04f1a8a1ede89a3105435ae3eefe8ca9a5229f new file mode 100644 index 0000000..c710bde7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/0f04f1a8a1ede89a3105435ae3eefe8ca9a5229f
@@ -0,0 +1 @@ +edgebucket=ysInsjLYjOF5XIlV1f; Domain=reddit.com; Max-Age=63071999; Path=/; secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/108c5233426c644c01cf2a03fd9e899e8091ba32 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/108c5233426c644c01cf2a03fd9e899e8091ba32 new file mode 100644 index 0000000..756c292 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/108c5233426c644c01cf2a03fd9e899e8091ba32
@@ -0,0 +1 @@ +anj=dTM7k!M4/bhK:95ghqdmU(3$'jT0oo#[2R$_pfg*Y80?bGKwmnSIgo8Z4bYOf2vtq*k>H[gw[qN)o3w7/bM^i5LGQ/CcD9u<$[_SnU1/C!<?G<jbjt6@pOIQ*r5Bo-*v0JR7?nKRO`':THp_LTOg`]JaSJ5(u=HiR3EDGSv_?F?u</oiWcQ]ckrFPKwV!I=e?jan!*q)3KL9D3I?.>OR'cM; SameSite=None; Path=/; Max-Age=7776000; Expires=Thu, 26-Sep-2019 17:58:37 GMT; Domain=.adnxs.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/11f6c5d0b45e0630b719301d7daa3c3e5ade0f2d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/11f6c5d0b45e0630b719301d7daa3c3e5ade0f2d new file mode 100644 index 0000000..575a76798 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/11f6c5d0b45e0630b719301d7daa3c3e5ade0f2d
@@ -0,0 +1 @@ +IDE=AHWqTUkV0CXgQxfA-UYbBAMvmqVyESzG5e9CFLK9aEUcqEC6fzcKKqOuSCx49r_T; expires=Sun, 27-Jun-2021 18:18:41 GMT; path=/; domain=.doubleclick.net; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/12e2ed512bf4fce6788a3029bf345132e314e03d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/12e2ed512bf4fce6788a3029bf345132e314e03d new file mode 100644 index 0000000..ffc457fc --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/12e2ed512bf4fce6788a3029bf345132e314e03d
@@ -0,0 +1 @@ +repi=;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/;domain=ads.pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1301c1b5fd4c6699783779dc6dff1f55fe216f91 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1301c1b5fd4c6699783779dc6dff1f55fe216f91 new file mode 100644 index 0000000..0c069c33 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1301c1b5fd4c6699783779dc6dff1f55fe216f91
@@ -0,0 +1 @@ +ab._gd1561745919583=ab._gd1561745919583;domain=.wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/143933e4dbf3a1009a19ea3a6cb448232c2254b9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/143933e4dbf3a1009a19ea3a6cb448232c2254b9 new file mode 100644 index 0000000..64950b4 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/143933e4dbf3a1009a19ea3a6cb448232c2254b9
@@ -0,0 +1 @@ +nyt-geo=US; Expires=Fri, 28 Jun 2019 23:57:46 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1520d489150e0d97a8cc44becf4bb69897a08605 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1520d489150e0d97a8cc44becf4bb69897a08605 new file mode 100644 index 0000000..aacefd7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1520d489150e0d97a8cc44becf4bb69897a08605
@@ -0,0 +1 @@ +s_vi=[CS]v1|2E8B2AA385079024-6000011C600CAA42[CE]; Expires=Sun, 27 Jun 2021 17:58:31 GMT; Domain=cnn.com; Path=/; SameSite=None \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/15ddba174a983013fce407cc4bb1f3e0ee428ae3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/15ddba174a983013fce407cc4bb1f3e0ee428ae3 new file mode 100644 index 0000000..0d00f99f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/15ddba174a983013fce407cc4bb1f3e0ee428ae3
@@ -0,0 +1 @@ +KRTBCOOKIE_377=6810-9679f403-e304-42bd-bf2c-1b52c9f13e14&KRTB&22918-9679f403-e304-42bd-bf2c-1b52c9f13e14&KRTB&23031-9679f403-e304-42bd-bf2c-1b52c9f13e14; domain=pubmatic.com; expires=Thu, 26-Sep-2019 18:18:42 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/172558c88170d65ef44569ee9372d53ed25628c9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/172558c88170d65ef44569ee9372d53ed25628c9 new file mode 100644 index 0000000..5bbbb15a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/172558c88170d65ef44569ee9372d53ed25628c9
@@ -0,0 +1 @@ +session_tracker=9ISbKWIJvWb6bPPbuC.0.1561745776000.Z0FBQUFBQmRGbGx3ajlpM09iY1J3a0lqcl9PNXpWbHE1MnZaX2FlSGJ5OFYxQzlZNFRjRXJJM2dmbG9VRU55Q05jWmU1aGg4ZjNpUDVGZ25Lc3B0bV84OUF2TTlqQURBbU0yazIxZExtaXI0WjBESjFyR2dPU08wcTZ5OUpVVGhKRUNsVUxXMF9yR1A; path=/; domain=.reddit.com; secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1993bb226fc2e675a68802ebcef4f79604ea53a2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1993bb226fc2e675a68802ebcef4f79604ea53a2 new file mode 100644 index 0000000..e78e8ccf --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1993bb226fc2e675a68802ebcef4f79604ea53a2
@@ -0,0 +1 @@ +anj=dTM7k!M40Lf5$P.ghqdmU(3$'jT0oo#[2R$_pfg*Y80?bGKwmnSIgo8Z4bYOf2vtq*k>H[gw[qN)o3w7/bM^i5LGQ/CcD9u<$[_SnU1/C!<?G<jbjt6@iKfe*t=*#Ys(R6O6etaJNMZW9DMA5?ONsSd`SJb4JiJt#n+YbqCTGY3Ly8tnN=g^sX.T<9C!$H.wL4W1Qw2%TB[s5; SameSite=None; Path=/; Max-Age=7776000; Expires=Thu, 26-Sep-2019 17:58:37 GMT; Domain=.adnxs.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/19aedc04372b6f042832c3b7d61ed5044fa74b7b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/19aedc04372b6f042832c3b7d61ed5044fa74b7b new file mode 100644 index 0000000..8c5a3e7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/19aedc04372b6f042832c3b7d61ed5044fa74b7b
@@ -0,0 +1 @@ +ad-id=Ax5FHlqHB09PvM00wspP770; Domain=.amazon-adsystem.com; Expires=Wed, 01-Jan-2020 17:57:48 GMT; Path=/; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1afd397fc7d7c6e7d68ef6d1a96599083a014f43 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1afd397fc7d7c6e7d68ef6d1a96599083a014f43 new file mode 100644 index 0000000..dbffda1 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1afd397fc7d7c6e7d68ef6d1a96599083a014f43
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 18:14:49 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1f87d4962ece5125f8f37cb79e0ec9c56db07bff b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1f87d4962ece5125f8f37cb79e0ec9c56db07bff new file mode 100644 index 0000000..ac3246e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/1f87d4962ece5125f8f37cb79e0ec9c56db07bff
@@ -0,0 +1 @@ +_cb=D_Q5ElO_825BnZrIN; expires=Mon, 27 Jul 2020 17:58:37 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/21d80e7e6d99989d333cf6ef09612a63bd475cbd b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/21d80e7e6d99989d333cf6ef09612a63bd475cbd new file mode 100644 index 0000000..c883d231 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/21d80e7e6d99989d333cf6ef09612a63bd475cbd
@@ -0,0 +1 @@ +bkdc=phx; expires=Wed, 25-Dec-2019 17:58:32 GMT; path=/; domain=.bluekai.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22196204b3de049525621cfa872aa869554f7c98 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22196204b3de049525621cfa872aa869554f7c98 new file mode 100644 index 0000000..6df1469 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22196204b3de049525621cfa872aa869554f7c98
@@ -0,0 +1 @@ +cd=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/225906da4bbfe1957593e2f5cc15dfa2dcb47e95 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/225906da4bbfe1957593e2f5cc15dfa2dcb47e95 new file mode 100644 index 0000000..bae5071 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/225906da4bbfe1957593e2f5cc15dfa2dcb47e95
@@ -0,0 +1 @@ +__gads=ID=e113f55c6aedee8f:T=1561744667:S=ALNI_MYEbRi8e7Tej16MouF3ew8Fgtqc8w; expires=Sun, 27 Jun 2021 17:57:47 GMT; path=/; domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22731b8b044b9fbc0097e043cc81911dbbeba916 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22731b8b044b9fbc0097e043cc81911dbbeba916 new file mode 100644 index 0000000..8a3cbb5b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/22731b8b044b9fbc0097e043cc81911dbbeba916
@@ -0,0 +1 @@ +KCCH=YES;expires=Sat, 29 Jun 2019 18:18:41 GMT;path=/;domain=ads.pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/24474bec6890334ccb6eb7b49d915c22ceb6846e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/24474bec6890334ccb6eb7b49d915c22ceb6846e new file mode 100644 index 0000000..000311d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/24474bec6890334ccb6eb7b49d915c22ceb6846e
@@ -0,0 +1 @@ +KTPCACOOKIE=YES;expires=Thu, 26 Sep 2019 17:58:32 GMT;path=/;domain=pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/25345cb4bfaddc21cfb8f3dd3b39c9a2284c8fb5 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/25345cb4bfaddc21cfb8f3dd3b39c9a2284c8fb5 new file mode 100644 index 0000000..7f37a95 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/25345cb4bfaddc21cfb8f3dd3b39c9a2284c8fb5
@@ -0,0 +1 @@ +anj=dTM7k!M4/bh.v04ghqdmU(3$'jT0oo#[2R$_pfg*Y80?bGKwmnSIgo8Z4bYOf2vtq*k>H[gw[qN)o3w7/bM^i5LGQ/CcD9u<$[_SnU1/C!<?G<jbjt6@pOIQ*kDj=SPaG6(U67K+IKjT$%y3O00A!#!Q3sJ6X_QDv<uDV#dk%[!FvV0P$uZNo`HNq.Xh'[I51p=.hLg=PlZ[C[-kX-b1iAM; SameSite=None; Path=/; Max-Age=7776000; Expires=Thu, 26-Sep-2019 17:58:37 GMT; Domain=.adnxs.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/28012f4d7aaca4f5d608d2facbfd5ad2929932ae b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/28012f4d7aaca4f5d608d2facbfd5ad2929932ae new file mode 100644 index 0000000..c4c7c68 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/28012f4d7aaca4f5d608d2facbfd5ad2929932ae
@@ -0,0 +1 @@ +ugs=1; expires=Sat, 29 Jun 2019 19:58:31 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/292ac1731b2b54f4907f5f3bee6be5d12b81421d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/292ac1731b2b54f4907f5f3bee6be5d12b81421d new file mode 100644 index 0000000..d42a75c --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/292ac1731b2b54f4907f5f3bee6be5d12b81421d
@@ -0,0 +1 @@ +cookies.js=undefined;path=/;expires=Fri, 28 Jun 2019 18:18:39 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/2c29369ca4e15acef98ca5714ecaf51ab6cc0b95 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/2c29369ca4e15acef98ca5714ecaf51ab6cc0b95 new file mode 100644 index 0000000..56d3a85 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/2c29369ca4e15acef98ca5714ecaf51ab6cc0b95
@@ -0,0 +1 @@ +MR=0; domain=c.bing.com; expires=Wed, 25-Dec-2019 17:57:53 GMT; path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/30f38084cb9a3b9cf85c5a26d1eb9e4db03c12ae b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/30f38084cb9a3b9cf85c5a26d1eb9e4db03c12ae new file mode 100644 index 0000000..ccfb541 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/30f38084cb9a3b9cf85c5a26d1eb9e4db03c12ae
@@ -0,0 +1 @@ +KTPCACOOKIE=YES; domain=.pubmatic.com; path=/; max-age=7776000; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/31b176e486ea95bcc24ad077e7e66c9c289a8747 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/31b176e486ea95bcc24ad077e7e66c9c289a8747 new file mode 100644 index 0000000..57585083 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/31b176e486ea95bcc24ad077e7e66c9c289a8747
@@ -0,0 +1 @@ +AKA_A2=A; expires=Fri, 28-Jun-2019 18:58:33 GMT; path=/; domain=cdn.turner.com; secure; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/331b1d65a67050945e7abcf6b859063b5f5dbe9f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/331b1d65a67050945e7abcf6b859063b5f5dbe9f new file mode 100644 index 0000000..286d249e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/331b1d65a67050945e7abcf6b859063b5f5dbe9f
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 17:58:30 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/34b8439cdcab61b693b00a6981189db9c83fd581 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/34b8439cdcab61b693b00a6981189db9c83fd581 new file mode 100644 index 0000000..6cb220d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/34b8439cdcab61b693b00a6981189db9c83fd581
@@ -0,0 +1 @@ +nyt-a=m-a3EFJKIrIGZaX3DvUw15; Expires=Sat, 27 Jun 2020 18:14:47 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3639f5b822ca5628cf56f423d980680109b1ae1a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3639f5b822ca5628cf56f423d980680109b1ae1a new file mode 100644 index 0000000..c5127ffa --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3639f5b822ca5628cf56f423d980680109b1ae1a
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 17:58:32 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/37229e3a20bf1feb2cedb868c9a0039733f595b9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/37229e3a20bf1feb2cedb868c9a0039733f595b9 new file mode 100644 index 0000000..81cd211 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/37229e3a20bf1feb2cedb868c9a0039733f595b9
@@ -0,0 +1 @@ +_ga=GA1.2.1843357983.1561745920; path=/; expires=Sun, 27 Jun 2021 18:18:40 GMT; domain=wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3862571ca3ead4beb0c987fa237f010b89a2d7e1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3862571ca3ead4beb0c987fa237f010b89a2d7e1 new file mode 100644 index 0000000..27c558d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3862571ca3ead4beb0c987fa237f010b89a2d7e1
@@ -0,0 +1 @@ +icts=2019-06-28T18:18:41Z; Expires=Sat, 27 Jun 2020 18:18:40 UTC; Domain=.linksynergy.com; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3974ec234f5e0fcad2da5b443841741d0d004d8e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3974ec234f5e0fcad2da5b443841741d0d004d8e new file mode 100644 index 0000000..aed093f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3974ec234f5e0fcad2da5b443841741d0d004d8e
@@ -0,0 +1 @@ +KCCH=YES;expires=Sat, 29 Jun 2019 18:16:22 GMT;path=/;domain=ads.pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3a7d56be05b607dc8855938f3facbd98b279af5e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3a7d56be05b607dc8855938f3facbd98b279af5e new file mode 100644 index 0000000..d0d6fad --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3a7d56be05b607dc8855938f3facbd98b279af5e
@@ -0,0 +1 @@ +fr=06jwhahuUB6aOmYc1..BdFlVO...1.0.BdFlVO.; expires=Thursday, 26-Sep-2019 17:58:38 GMT; path=/; domain=.facebook.com; HttpOnly; secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3bb70a085018d271eb16afee05de6d0645eb0d19 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3bb70a085018d271eb16afee05de6d0645eb0d19 new file mode 100644 index 0000000..85503af --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3bb70a085018d271eb16afee05de6d0645eb0d19
@@ -0,0 +1 @@ +ab._gd1561745919581=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=.wcvb.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3c89f813069bc9cba07d02cc38282321951eefd2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3c89f813069bc9cba07d02cc38282321951eefd2 new file mode 100644 index 0000000..9093ccc --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3c89f813069bc9cba07d02cc38282321951eefd2
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 18:18:40 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3f6834d53c555de6db8dc9ff78d477726247ebbe b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3f6834d53c555de6db8dc9ff78d477726247ebbe new file mode 100644 index 0000000..d3d062c --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/3f6834d53c555de6db8dc9ff78d477726247ebbe
@@ -0,0 +1 @@ +TapAd_TS=1561744712362;Expires=Tue, 27 Aug 2019 17:58:35 GMT;Path=/;Domain=.tapad.com;SameSite=None \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/40810cdd634c8d8fb54a523e9ad0c0bc88cc1147 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/40810cdd634c8d8fb54a523e9ad0c0bc88cc1147 new file mode 100644 index 0000000..464fbf31 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/40810cdd634c8d8fb54a523e9ad0c0bc88cc1147
@@ -0,0 +1 @@ +_cc_cc=ctst;Path=/;Domain=crwdcntrl.net;SameSite=None \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/41845281adcde5e78493c709962179a066cd73d3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/41845281adcde5e78493c709962179a066cd73d3 new file mode 100644 index 0000000..afae6fd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/41845281adcde5e78493c709962179a066cd73d3
@@ -0,0 +1 @@ +cto_writeable=1;expires=Fri, 28 Jun 2019 18:58:29 GMT;domain=.cnn.com;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/42f3bd0fb1ece69f762f018eb58bebb9f2ac5836 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/42f3bd0fb1ece69f762f018eb58bebb9f2ac5836 new file mode 100644 index 0000000..6eea1da --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/42f3bd0fb1ece69f762f018eb58bebb9f2ac5836
@@ -0,0 +1 @@ +rx= ; path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; Domain=; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/46582500b95a2b1592fc2d12470e69dfac2d29f4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/46582500b95a2b1592fc2d12470e69dfac2d29f4 new file mode 100644 index 0000000..26b6853 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/46582500b95a2b1592fc2d12470e69dfac2d29f4
@@ -0,0 +1 @@ +cookies.js_dtest=1;path=/;domain=wcvb.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4788a8f6103e590553694d34981c5bce2c5261a3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4788a8f6103e590553694d34981c5bce2c5261a3 new file mode 100644 index 0000000..02a6b5a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4788a8f6103e590553694d34981c5bce2c5261a3
@@ -0,0 +1 @@ +AWSELB=278D5FF30CD72C2931379E62C1C0D7A47489D8EF09E2CEE29A1539DB017828BD07D7BE3098392A2D35C951D22FD31136A81EA77353957412C76ABD07D3ABF66150DB44C25B;PATH=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/47f8e3ebadbf34b9561c03a56c4f45746602c64a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/47f8e3ebadbf34b9561c03a56c4f45746602c64a new file mode 100644 index 0000000..02b7ffe9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/47f8e3ebadbf34b9561c03a56c4f45746602c64a
@@ -0,0 +1 @@ +univ_id=537072971|28a8e1b7-2e9a-4666-b602-d6d1a7c32394|1561745782228915; Version=1; Expires=Sat, 13-Jul-2019 18:16:22 GMT; Max-Age=1296000; Domain=.openx.net; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/483505ae5f32600c62a0ea81f27854303ff9ef59 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/483505ae5f32600c62a0ea81f27854303ff9ef59 new file mode 100644 index 0000000..f13004c --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/483505ae5f32600c62a0ea81f27854303ff9ef59
@@ -0,0 +1 @@ +uid=99429775829749817; expires=Tue, 27 Aug 2019 17:58:35 GMT; domain=adform.net; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/49e4dcb225a3ee35420bfb250fed17651fc132fb b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/49e4dcb225a3ee35420bfb250fed17651fc132fb new file mode 100644 index 0000000..838799c8 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/49e4dcb225a3ee35420bfb250fed17651fc132fb
@@ -0,0 +1 @@ +aasd=1%7C1561745780169;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a3a0a03705536f91f423c540a7c9cd0ff192575 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a3a0a03705536f91f423c540a7c9cd0ff192575 new file mode 100644 index 0000000..2ed29d6 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a3a0a03705536f91f423c540a7c9cd0ff192575
@@ -0,0 +1 @@ +et-a1=%257B%2522agentId%2522%253A%2522MS0QrKWr9qp_XkQmvjSS3B%2522%252C%2522agentStarted%2522%253A1561744478315%252C%2522sessionIndex%2522%253A1%252C%2522sessionStarted%2522%253A1561744478315%252C%2522lastModified%2522%253A1561744551904%252C%2522lastUpdate%2522%253A1561744698968%257D; Domain=et.nytimes.com; Path=/; Expires=Sat, 27 Jun 2020 17:55:51 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a6ee003c0a2081d0ea0a3dd5121fb807992749a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a6ee003c0a2081d0ea0a3dd5121fb807992749a new file mode 100644 index 0000000..c11f3f3e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4a6ee003c0a2081d0ea0a3dd5121fb807992749a
@@ -0,0 +1 @@ +put_2307=33b5eb2b-c79e-486a-bf3b-2cafed6d8fe1; Domain=.rubiconproject.com; Expires=Fri, 26-Jul-2019 17:58:35 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4b3fb438a10e86dbf70b15ab144eb3fde2472220 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4b3fb438a10e86dbf70b15ab144eb3fde2472220 new file mode 100644 index 0000000..27d7a6c5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4b3fb438a10e86dbf70b15ab144eb3fde2472220
@@ -0,0 +1 @@ +_rxuuid=%7B%22rx_uuid%22%3A%22RX-1ce47117-fc9f-4c4c-8ca4-29ade25774a0%22%2C%22zdxidn%22%3A%222069.5%22%2C%22nxtrdr%22%3A%22https%3A%2F%2Fs.amazon-adsystem.com%2Fecm3%3Fid%3D%5BRX_UUID%5D%26ex%3Drhythmone.com%22%7D; path=/; expires=Sat, 27 Jun 2020 17:59:07 GMT; domain=.1rx.io; httponly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4c42ad64c160d61e899f9d28ef0285372de06e5b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4c42ad64c160d61e899f9d28ef0285372de06e5b new file mode 100644 index 0000000..2acf4764 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4c42ad64c160d61e899f9d28ef0285372de06e5b
@@ -0,0 +1 @@ +data=||||||||||||||||||||||||||||||||||||||||||||||||||;expires=Sat, 27 Jun 2020 17:57:47 GMT;path=/;domain=.media.net \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4dbe8da9ff0c924b39cfa4bf79d980577348068a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4dbe8da9ff0c924b39cfa4bf79d980577348068a new file mode 100644 index 0000000..3495e3b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4dbe8da9ff0c924b39cfa4bf79d980577348068a
@@ -0,0 +1 @@ +data-r=JXGEGA70-1S-A83O~~1;Expires=Wed, 25 Dec 2019 17:57:48 GMT;path=/;domain=.media.net \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4e5b007d86df496f7230527124d47f9ec15e86a8 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4e5b007d86df496f7230527124d47f9ec15e86a8 new file mode 100644 index 0000000..2496d3547 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4e5b007d86df496f7230527124d47f9ec15e86a8
@@ -0,0 +1 @@ +ajs%3Atest=null; path=/; domain=.cnn.com; expires=Fri, 28 Jun 2019 17:58:31 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4f5029d0bed2d665cc3453e98d33557b77e57702 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4f5029d0bed2d665cc3453e98d33557b77e57702 new file mode 100644 index 0000000..018e5907 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4f5029d0bed2d665cc3453e98d33557b77e57702
@@ -0,0 +1 @@ +uid-bp-30833=1; Expires=Fri, 12-Jul-2019 17:59:07 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fa0f1bcefdfb9beee62de4ca07e4a8bf7fa35e1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fa0f1bcefdfb9beee62de4ca07e4a8bf7fa35e1 new file mode 100644 index 0000000..03a5c3e0 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fa0f1bcefdfb9beee62de4ca07e4a8bf7fa35e1
@@ -0,0 +1 @@ +_cb_svref=null; expires=Fri, 28 Jun 2019 18:27:53 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fad3a1bd6bcbfc62360d8a1a09c87848e1f3bed b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fad3a1bd6bcbfc62360d8a1a09c87848e1f3bed new file mode 100644 index 0000000..5a72986 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fad3a1bd6bcbfc62360d8a1a09c87848e1f3bed
@@ -0,0 +1 @@ +anj=dTM7k!M40mgN>u2ghqdmU(3$'jT0oo#[2R$_pfg*Y80?bGKwmnSIgo8Z4bYOf2vtq*k>H[gw[qN)o3w7/bM^i5LGQ/CcD9u<$[_SnU1/C!<?G<jbjt6@pOIQ*kDj=SP`Ms(Pek/Up<%UP)[Q]P)j.g-kIM8; SameSite=None; Path=/; Max-Age=7776000; Expires=Thu, 26-Sep-2019 17:58:37 GMT; Domain=.adnxs.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fd1f6196c115fae6744d3916ce634056ce166a9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fd1f6196c115fae6744d3916ce634056ce166a9 new file mode 100644 index 0000000..c1f2e8dc --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/4fd1f6196c115fae6744d3916ce634056ce166a9
@@ -0,0 +1 @@ +gpt_av=1;expires=Fri, 28 Jun 2019 18:48:39 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/503ef1e70ca276089d258d8e009d0466c17db3b3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/503ef1e70ca276089d258d8e009d0466c17db3b3 new file mode 100644 index 0000000..043578c6 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/503ef1e70ca276089d258d8e009d0466c17db3b3
@@ -0,0 +1 @@ +_sp_v1_ss=1:H4sIAAAAAAAAAItWqq5V0gERsQBDxyH_CwAAAA%3D%3D;Path=/;Expires=Sun, 28-Jul-2019 17:58:38 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/50c20aec7ff464a1764692b56369f0e10623a5d8 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/50c20aec7ff464a1764692b56369f0e10623a5d8 new file mode 100644 index 0000000..9fc68418 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/50c20aec7ff464a1764692b56369f0e10623a5d8
@@ -0,0 +1 @@ +_t_tests=eyJuY1RlRDNBTDJXTmVZIjp7ImNob3NlblZhcmlhbnQiOiJCIiwic3BlY2lmaWNMb2NhdGlvbiI6WyJDU0l2a08iXX0sIk9Td1RUM1hVY202MlUiOnsiY2hvc2VuVmFyaWFudCI6IkEiLCJzcGVjaWZpY0xvY2F0aW9uIjpbIkI1ZTktMyJdfSwiWXJRMTJLTWR6YmhOWCI6eyJjaG9zZW5WYXJpYW50IjoiQSIsInNwZWNpZmljTG9jYXRpb24iOlsiQ3BpRXpZIl19LCJsZ3ZoSUpPQmtWYlFpIjp7ImNob3NlblZhcmlhbnQiOiJCIiwic3BlY2lmaWNMb2NhdGlvbiI6WyJEXzI1azIiXX0sIlJuMmJVYndoN2lQb2giOnsiY2hvc2VuVmFyaWFudCI6IkEiLCJzcGVjaWZpY0xvY2F0aW9uIjpbIkRPbzRVSyJdfSwiOTBaWHg3b0V6cXdpZCI6eyJjaG9zZW5WYXJpYW50IjoiQiIsInNwZWNpZmljTG9jYXRpb24iOlsiREZvM2VOIl19LCIwMlZUMVBaY2V6QUJZIjp7ImNob3NlblZhcmlhbnQiOiJDIiwic3BlY2lmaWNMb2NhdGlvbiI6WyJrb0pLbyJdfSwiUGdUeG9IeHpDM2ZoYyI6eyJjaG9zZW5WYXJpYW50IjoiQiIsInNwZWNpZmljTG9jYXRpb24iOlsiRDNUa040Il19LCJsaWZ0X2V4cCI6Im0ifQ==; expires=Fri, 28 Jun 2019 18:58:38 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5100775ff55709c7a73253160210c911903b5fbe b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5100775ff55709c7a73253160210c911903b5fbe new file mode 100644 index 0000000..3ae5cea --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5100775ff55709c7a73253160210c911903b5fbe
@@ -0,0 +1 @@ +PUBMDCID=1; domain=pubmatic.com; expires=Thu, 26-Sep-2019 17:58:33 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/51962c160bd17c5ce0132537f1b3d96f4a3625da b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/51962c160bd17c5ce0132537f1b3d96f4a3625da new file mode 100644 index 0000000..80ce8b3 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/51962c160bd17c5ce0132537f1b3d96f4a3625da
@@ -0,0 +1 @@ +sailthru_visitor=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/53b88bd8b0f4d9912e466e583a2085ff984e6240 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/53b88bd8b0f4d9912e466e583a2085ff984e6240 new file mode 100644 index 0000000..59fdac5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/53b88bd8b0f4d9912e466e583a2085ff984e6240
@@ -0,0 +1 @@ +B=dvbdf01ehcla8&b=3&s=4l;Path=/;Domain=yahoo.com;Expires=Sat, 27-Jun-2020 17:58:35 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/552b9175113106037c5ebb2f3415039bb16ac2d7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/552b9175113106037c5ebb2f3415039bb16ac2d7 new file mode 100644 index 0000000..404b324a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/552b9175113106037c5ebb2f3415039bb16ac2d7
@@ -0,0 +1 @@ +ucs=lnct=1561745714; expires=Saloid=000000000041a3vxmn.2.1561745776260.Z0FBQUFBQmRGbGx3dWRQY1UwaXlIWFU2b3NIYXhJR3RGUE0xSnBvSlhxVVN5dTlnMEt3TGRsSTk2MlF4ZW0xYjIzWk05QTI5Vk9kUHltbVR0aTdrVXlxXzl2TGxNZmVPdUJRbURWQWdFem9MY1cwSmxsQUFNWW02ZEQtVlh1dkpoVHVvaHRRdmpuRkM; path=/; expires=Mon, 28 Jun 2021 18:16:16 GMT; domain=.reddit.com; secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/562c88df1ab3e5861b2077bdb236b64307a8af49 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/562c88df1ab3e5861b2077bdb236b64307a8af49 new file mode 100644 index 0000000..87d63815 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/562c88df1ab3e5861b2077bdb236b64307a8af49
@@ -0,0 +1 @@ +tosAgreed=true;expires=Tue, 01 Sep 2015 00:00:00 UTC;path=/;domain=.cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5b3d5fb36667f1c3371004c91e4d068fd9466373 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5b3d5fb36667f1c3371004c91e4d068fd9466373 new file mode 100644 index 0000000..941d6fd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5b3d5fb36667f1c3371004c91e4d068fd9466373
@@ -0,0 +1 @@ +cookies.js=1;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5c8ea5d0acd626f4486ca1df63b57f2c01ea58f6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5c8ea5d0acd626f4486ca1df63b57f2c01ea58f6 new file mode 100644 index 0000000..3110a30 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5c8ea5d0acd626f4486ca1df63b57f2c01ea58f6
@@ -0,0 +1 @@ +_sp_v1_csv=2.0.1115;Path=/;Expires=Sun, 28-Jul-2019 17:58:38 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5e816c1477a71b0927b098bae801c194d8450d42 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5e816c1477a71b0927b098bae801c194d8450d42 new file mode 100644 index 0000000..6712834f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5e816c1477a71b0927b098bae801c194d8450d42
@@ -0,0 +1 @@ +ta-octane.id=c5d0cbdc-b9a3-47dc-a2ef-e9ed674e1ff7|0ccba92a-8e59-43a6-b40f-6cf1d7e7f54a|0|; expires=Sun, 27 Jun 2021 17:58:38 GMT; path= /; domain= cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f2bc9ad1b08bd657c1cf7d574a80aa3c4bce0af b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f2bc9ad1b08bd657c1cf7d574a80aa3c4bce0af new file mode 100644 index 0000000..83c5b2e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f2bc9ad1b08bd657c1cf7d574a80aa3c4bce0af
@@ -0,0 +1 @@ +__aaxsc=0;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f4be9aba695bcd285b5556d09f72dcf47171e83 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f4be9aba695bcd285b5556d09f72dcf47171e83 new file mode 100644 index 0000000..01864a2 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/5f4be9aba695bcd285b5556d09f72dcf47171e83
@@ -0,0 +1 @@ +rpx=191940%3D83170%2C0%2C1%2C%2C%264222%3D83170%2C0%2C1%2C%2C%267751%3D83170%2C0%2C1%2C%2C; Domain=.pixel.rubiconproject.com; Expires=Sun, 28-Jul-2019 18:18:44 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/60d5bdd3be81fb3223919e405ec217b51658573a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/60d5bdd3be81fb3223919e405ec217b51658573a new file mode 100644 index 0000000..4ee43d8e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/60d5bdd3be81fb3223919e405ec217b51658573a
@@ -0,0 +1 @@ +cto_writeable=;expires=Fri, 28 Jun 2019 17:58:29 GMT;domain=.www.cnn.com;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/63aff027c3be93e49a859f283eaf399f4ff4a047 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/63aff027c3be93e49a859f283eaf399f4ff4a047 new file mode 100644 index 0000000..4b3d1b7c --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/63aff027c3be93e49a859f283eaf399f4ff4a047
@@ -0,0 +1 @@ +nyt-geo=US; Expires=Sat, 29 Jun 2019 00:14:47 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/64073c0a644c5a0c8bd726017654ee383632be99 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/64073c0a644c5a0c8bd726017654ee383632be99 new file mode 100644 index 0000000..91354ef --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/64073c0a644c5a0c8bd726017654ee383632be99
@@ -0,0 +1 @@ +loid=000000000041a3vxmn.2.1561745776260.Z0FBQUFBQmRGbGx3dWRQY1UwaXlIWFU2b3NIYXhJR3RGUE0xSnBvSlhxVVN5dTlnMEt3TGRsSTk2MlF4ZW0xYjIzWk05QTI5Vk9kUHltbVR0aTdrVXlxXzl2TGxNZmVPdUJRbURWQWdFem9MY1cwSmxsQUFNWW02ZEQtVlh1dkpoVHVvaHRRdmpuRkM; path=/; expires=Mon, 28 Jun 2021 18:16:16 GMT; domain=.reddit.com; secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6442aec070c4820805d864f353b1d1b5e345b726 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6442aec070c4820805d864f353b1d1b5e345b726 new file mode 100644 index 0000000..e36b1aaf --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6442aec070c4820805d864f353b1d1b5e345b726
@@ -0,0 +1 @@ +nyt-a=MS0QrKWr9qp_XkQmvjSS3B; Path=/; Domain=nytimes.com; Expires=Sat, 27 Jun 2020 17:57:28 GMT; Max-Age=31536000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/654546257dc2678ee6c6c2e4b12606b63f22dc26 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/654546257dc2678ee6c6c2e4b12606b63f22dc26 new file mode 100644 index 0000000..397efd1 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/654546257dc2678ee6c6c2e4b12606b63f22dc26
@@ -0,0 +1 @@ +C6=; expires=Thu, 26-Sep-2019 14:14:50 GMT; domain=.serving-sys.com; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66c4df28a485f3000a3d53ac912d933604ea4adb b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66c4df28a485f3000a3d53ac912d933604ea4adb new file mode 100644 index 0000000..e8da5d93f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66c4df28a485f3000a3d53ac912d933604ea4adb
@@ -0,0 +1 @@ +_kuid_=MxcjZsah; domskin=noskin; path=/; domain=.amazon.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66ff8ee9c7520c24a81b5ba20d4e19464338af8b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66ff8ee9c7520c24a81b5ba20d4e19464338af8b new file mode 100644 index 0000000..16198d6 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/66ff8ee9c7520c24a81b5ba20d4e19464338af8b
@@ -0,0 +1 @@ +nexagesd=1;expires=Fri, 28 Jun 2019 18:29:36 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/67b8af2d8181b851bd9d42bc7679b522b6518e83 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/67b8af2d8181b851bd9d42bc7679b522b6518e83 new file mode 100644 index 0000000..418c307 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/67b8af2d8181b851bd9d42bc7679b522b6518e83
@@ -0,0 +1 @@ +apeaf=userintent%3D%257B%2522tooltipViews%2522%253A1%257D=undefined&td-applet-stream=%7B%22tmpl%22%3A%22items%22%7D; expires=Sun, 28 Jun 2020 18:15:14 GMT; path=/; domain=www.yahoo.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/684aba2bacbb9573889886c402b4643df839a6db b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/684aba2bacbb9573889886c402b4643df839a6db new file mode 100644 index 0000000..c908e6e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/684aba2bacbb9573889886c402b4643df839a6db
@@ -0,0 +1 @@ +SyncRTB2=1562889600%3A21_22_54_64_7%7C1562284800%3A2; domain=pubmatic.com; path=/; max-age=7776000; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/68d44311484a876232c13354a48d4a9d8a56a93d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/68d44311484a876232c13354a48d4a9d8a56a93d new file mode 100644 index 0000000..ff8fc527 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/68d44311484a876232c13354a48d4a9d8a56a93d
@@ -0,0 +1 @@ +nyt-a=MS0QrKWr9qp_XkQmvjSS3B; Domain=.nytimes.com; Path=/; Expires=Sat, 27 Jun 2020 17:56:31 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/699618333cda1edee5e0197c432e7eb57957919f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/699618333cda1edee5e0197c432e7eb57957919f new file mode 100644 index 0000000..9715926b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/699618333cda1edee5e0197c432e7eb57957919f
@@ -0,0 +1 @@ +didts=1561745922; Path=/; Domain=pippio.com; Expires=Sat, 27 Jun 2020 18:18:42 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6c27b97c4d8e88c0384f49275c12ca8dfec3f2b1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6c27b97c4d8e88c0384f49275c12ca8dfec3f2b1 new file mode 100644 index 0000000..50d0f667 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6c27b97c4d8e88c0384f49275c12ca8dfec3f2b1
@@ -0,0 +1 @@ +syncdata_TAP=1; Domain=.mookie1.com; Expires=Mon, 08-Jul-2019 17:58:35 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6caf8ec2667c504fe740589d8724225cb5c066af b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6caf8ec2667c504fe740589d8724225cb5c066af new file mode 100644 index 0000000..d11a5ce --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6caf8ec2667c504fe740589d8724225cb5c066af
@@ -0,0 +1 @@ +univ_id=537072971|cea427bf-cec5-479d-bab6-be9b3d47654b|1561745690860645; Version=1; Expires=Sat, 13-Jul-2019 18:14:50 GMT; Max-Age=1296000; Domain=.openx.net; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6cdcd6da0cb200c3990b4261dbd37c84751f6a19 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6cdcd6da0cb200c3990b4261dbd37c84751f6a19 new file mode 100644 index 0000000..6feb3399 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6cdcd6da0cb200c3990b4261dbd37c84751f6a19
@@ -0,0 +1 @@ +ACXID="CASHID=&V=3&ID=6ee2a0c2-8ddb-4599-99e1-6b2df7ea0a03";Domain=acxiomapac.com;Path=/;Max-Age=31536000;Expires=Sat, 27 Jun 2020 17:58:32 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6deb439d6eaa004c80c84b949dd24cd6620be600 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6deb439d6eaa004c80c84b949dd24cd6620be600 new file mode 100644 index 0000000..0079b6ff --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6deb439d6eaa004c80c84b949dd24cd6620be600
@@ -0,0 +1 @@ +session-token=8TL0jMHZ8p706J82y3voKV7B8rL5CUj7PowZD6ITbFfiFgfezRcrmyfalvcb9GwtBDDy14BSv4dEV2sy6BTZ2AW+xg+mta6cJWhCAIU80WiwocR0V2xHpo+RhlqnS2QXyWPzImtcXvUxaE8QRTs8BlOTsdzIzS93gddQmxW/pmikP7a8FgQ+WlTAzhuiju0a; Domain=.amazon.com; Expires=Tue, 01-Jan-2036 08:00:01 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6ee1ce43df2be4847406862ff4d71586bb0f224d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6ee1ce43df2be4847406862ff4d71586bb0f224d new file mode 100644 index 0000000..f4ebefe --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6ee1ce43df2be4847406862ff4d71586bb0f224d
@@ -0,0 +1 @@ +OptanonConsent=; Domain=.cnn.com; Path=/; Expires=Thu, 01 Jan 2000 00:00:01 GMT; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6f7ac6743f97cc2ac23e0a02f48c25b9f47a4df7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6f7ac6743f97cc2ac23e0a02f48c25b9f47a4df7 new file mode 100644 index 0000000..c503de9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6f7ac6743f97cc2ac23e0a02f48c25b9f47a4df7
@@ -0,0 +1 @@ +_kuid_=MxcjZsah; Expires=Wed, 25-Dec-19 17:58:32 GMT; Max-Age=15552000; Domain=.krxd.net; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fb957ea7bdf44acafa9341f0dc870e00312fbfd b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fb957ea7bdf44acafa9341f0dc870e00312fbfd new file mode 100644 index 0000000..88ff308 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fb957ea7bdf44acafa9341f0dc870e00312fbfd
@@ -0,0 +1 @@ +ad-id=Ax9AgIEDs0dxp2wwR9WPMow|t; Domain=.amazon-adsystem.com; Expires=Wed, 01-Jan-2020 18:18:40 GMT; Path=/; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fba37a06b13f6dfc8d2b54ceb60adf7fab51d30 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fba37a06b13f6dfc8d2b54ceb60adf7fab51d30 new file mode 100644 index 0000000..0c3fc39 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/6fba37a06b13f6dfc8d2b54ceb60adf7fab51d30
@@ -0,0 +1 @@ +cnprevpage_pn=cnn%3Ain%3A%2F; path=/; expires=Fri, 28 Jun 2019 18:28:38 GMT; domain=.cnn.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/712129608f08467f6b10733824b4a71ed722e0a9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/712129608f08467f6b10733824b4a71ed722e0a9 new file mode 100644 index 0000000..5baf5b7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/712129608f08467f6b10733824b4a71ed722e0a9
@@ -0,0 +1 @@ +ajs%3Acookies=true; path=/; domain=.cnn.com; expires=Sat, 27 Jun 2020 17:58:31 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/72c7e26ca5ddcde6c7af72f6d6809a273cb502c6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/72c7e26ca5ddcde6c7af72f6d6809a273cb502c6 new file mode 100644 index 0000000..309c46e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/72c7e26ca5ddcde6c7af72f6d6809a273cb502c6
@@ -0,0 +1 @@ +ad-id=Ax9AgIEDs0dxp2wwR9WPMow; Domain=.amazon-adsystem.com; Expires=Wed, 01-Jan-2020 18:18:40 GMT; Path=/; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/799e1331771bae0c65ba8ebf1a9217fdd3c7d6e1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/799e1331771bae0c65ba8ebf1a9217fdd3c7d6e1 new file mode 100644 index 0000000..0330480c --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/799e1331771bae0c65ba8ebf1a9217fdd3c7d6e1
@@ -0,0 +1 @@ +ab=0001%3AxZzci%2FiHMjH83UzyJQxtyao3Ac%2FZfMyr; Domain=.agkn.com; Expires=Fri, 28 Jun 2020 17:58:32 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/79b5e3f7b48148dcb745743e35dbd007cda9fdf5 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/79b5e3f7b48148dcb745743e35dbd007cda9fdf5 new file mode 100644 index 0000000..36e327b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/79b5e3f7b48148dcb745743e35dbd007cda9fdf5
@@ -0,0 +1 @@ +skin=noskin; path=/; domain=.amazon.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7a95bb483c6b50d6ab8c5311f5a232179ca6d2a4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7a95bb483c6b50d6ab8c5311f5a232179ca6d2a4 new file mode 100644 index 0000000..6c7140f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7a95bb483c6b50d6ab8c5311f5a232179ca6d2a4
@@ -0,0 +1 @@ +test_cookie=CheckForPermission; expires=Fri, 28-Jun-2019 18:29:49 GMT; path=/; domain=.doubleclick.net \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7bbb7121c24214cb9dc8c9817f043409ba2f02ac b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7bbb7121c24214cb9dc8c9817f043409ba2f02ac new file mode 100644 index 0000000..3d32de52 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7bbb7121c24214cb9dc8c9817f043409ba2f02ac
@@ -0,0 +1 @@ +NID=186=X4834nbnh2g7Pp4tAPXoRgCeiLbdkRmQRSBRR2f08qEGX6GG4odUJuZMV-MpZdoEbgbzBtNi-HCwOf5TeqpGwjBICJPK4iQhuSADluOJ_MmO6D13Q1iU3qyFOJ1Vnf_1BzC1WKK8kiokP6Z2KQW4O2pI85GTIUCCoD9zMfG-kH0; expires=Sat, 28-Dec-2019 18:14:48 GMT; path=/; domain=.google.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7d6a16550506d166e4aa837f14624dd8674f1a5c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7d6a16550506d166e4aa837f14624dd8674f1a5c new file mode 100644 index 0000000..93a6477 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7d6a16550506d166e4aa837f14624dd8674f1a5c
@@ -0,0 +1 @@ +rpx=31950%3D83169%2C0%2C1%2C%2C%267751%3D83169%2C0%2C1%2C%2C; Domain=.pixel.rubiconproject.com; Expires=Sun, 28-Jul-2019 17:57:49 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7df362478575dcf2483209b8f57bba31d0964319 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7df362478575dcf2483209b8f57bba31d0964319 new file mode 100644 index 0000000..fbfb580 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7df362478575dcf2483209b8f57bba31d0964319
@@ -0,0 +1 @@ +rabt=; path=/; expires=Sun, 28 Jul 2019 18:16:17 GMT; domain=.reddit.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e57c07b2c66a4d13931f5c7b6cf089355d6a322 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e57c07b2c66a4d13931f5c7b6cf089355d6a322 new file mode 100644 index 0000000..1e0b3d4 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e57c07b2c66a4d13931f5c7b6cf089355d6a322
@@ -0,0 +1 @@ +nyt-check3pc=true; expires=Fri, 28 Jun 2019 18:19:48 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e7bfb391ef30a6ce2e73d2fd6cbf6da2892ac0b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e7bfb391ef30a6ce2e73d2fd6cbf6da2892ac0b new file mode 100644 index 0000000..ed95994 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/7e7bfb391ef30a6ce2e73d2fd6cbf6da2892ac0b
@@ -0,0 +1 @@ +IDE=AHWqTUnSncnX_-NitwxUBQ_CoMaP7ccYONzEZdzE6aDLyvBxgDJe5fs-QUEmhFen; expires=Sun, 27-Jun-2021 17:59:08 GMT; path=/; domain=.doubleclick.net; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/83f95b16737e62733ca9dd33615c5b4b8691e1da b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/83f95b16737e62733ca9dd33615c5b4b8691e1da new file mode 100644 index 0000000..1daf46bb --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/83f95b16737e62733ca9dd33615c5b4b8691e1da
@@ -0,0 +1 @@ +__gads=ID=2c1437ff1fb83473:T=1561745689:S=ALNI_Mag2L0i6jMnJ1OWwKuaWFx7tN3nxw; expires=Sun, 27 Jun 2021 18:14:49 GMT; path=/; domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8549e6688c60c294b832f113e941158ea7c50d29 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8549e6688c60c294b832f113e941158ea7c50d29 new file mode 100644 index 0000000..84f1a27 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8549e6688c60c294b832f113e941158ea7c50d29
@@ -0,0 +1 @@ +et-a1=%257B%2522agentId%2522%253A%2522MS0QrKWr9qp_XkQmvjSS3B%2522%252C%2522agentStarted%2522%253A1561744478315%252C%2522sessionIndex%2522%253A1%252C%2522sessionStarted%2522%253A1561744478315%252C%2522lastModified%2522%253A1561744552326%252C%2522lastUpdate%2522%253A1561744698968%257D; Domain=et.nytimes.com; Path=/; Expires=Sat, 27 Jun 2020 17:55:52 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/87c7756c358d3e07c3905fd5b8e8422554312417 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/87c7756c358d3e07c3905fd5b8e8422554312417 new file mode 100644 index 0000000..4092e1b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/87c7756c358d3e07c3905fd5b8e8422554312417
@@ -0,0 +1 @@ +f5_cspm=1234; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/883d2f0ea7240fe7aa628c68f07f64602fbed739 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/883d2f0ea7240fe7aa628c68f07f64602fbed739 new file mode 100644 index 0000000..b7944fd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/883d2f0ea7240fe7aa628c68f07f64602fbed739
@@ -0,0 +1 @@ +_parsely_visitor={%22id%22:%22pid=ee469061b64964e078d850a1d1095701%22%2C%22last_session_ts%22:1561745920431};path=/;domain=wcvb.com;expires=Tue, 28 Jul 2020 04:18:40 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/88d246284f834fc97cbf96e70d276a2c6b9fc1e9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/88d246284f834fc97cbf96e70d276a2c6b9fc1e9 new file mode 100644 index 0000000..06c8614 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/88d246284f834fc97cbf96e70d276a2c6b9fc1e9
@@ -0,0 +1 @@ +nnls=; Path=/; Domain=pippio.com; Expires=Tue, 27 Aug 2019 17:58:32 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8a1ebe0170c6f65078913460be67226aa57e99ef b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8a1ebe0170c6f65078913460be67226aa57e99ef new file mode 100644 index 0000000..058f909 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8a1ebe0170c6f65078913460be67226aa57e99ef
@@ -0,0 +1 @@ +cd=false; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d54ebdd62bc33498ab147f2d1148392669e52cd b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d54ebdd62bc33498ab147f2d1148392669e52cd new file mode 100644 index 0000000..f529595 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d54ebdd62bc33498ab147f2d1148392669e52cd
@@ -0,0 +1 @@ +bkdc=phx; expires=Wed, 25-Dec-2019 17:57:52 GMT; path=/; domain=.bluekai.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d9420f68cd0e613da95bc4ad29b2b411be226e6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d9420f68cd0e613da95bc4ad29b2b411be226e6 new file mode 100644 index 0000000..9e10276 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/8d9420f68cd0e613da95bc4ad29b2b411be226e6
@@ -0,0 +1 @@ +SERVERID=prod,0(2021858012907611337)Dockerhost; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9105147695d0e6b84e7b7545499bb81e1f83ebc3 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9105147695d0e6b84e7b7545499bb81e1f83ebc3 new file mode 100644 index 0000000..e8d6103 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9105147695d0e6b84e7b7545499bb81e1f83ebc3
@@ -0,0 +1 @@ +KTPCACOOKIE=YES;expires=Thu, 26 Sep 2019 18:16:22 GMT;path=/;domain=pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/930b27bcc02ceb39a7600d2d8f2ee3f549f558c6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/930b27bcc02ceb39a7600d2d8f2ee3f549f558c6 new file mode 100644 index 0000000..53ba223 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/930b27bcc02ceb39a7600d2d8f2ee3f549f558c6
@@ -0,0 +1 @@ +uuidc=n2yxtYvkkO4EWclM3lki/55+F/zdetDBJZqTLY3ZdHi2NY33S1AzWlXc702Yt8wboc8iNT49ssSBM8c6PGNI6cY4ReWENFPKD4InSOzMln0=; Expires=Sat, 25-Jul-20 17:58:32 GMT; Domain=.mathtag.com; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/966b75f066a952191642ec1e0a86b8f238e25c08 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/966b75f066a952191642ec1e0a86b8f238e25c08 new file mode 100644 index 0000000..681edcd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/966b75f066a952191642ec1e0a86b8f238e25c08
@@ -0,0 +1 @@ +pid=ee469061b64964e078d850a1d1095701; expires=Sat, 27-Jun-20 18:18:40 GMT; domain=pixel.parsely.com; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/980a052dcd298c300b8a85eea0f48ab95ebda001 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/980a052dcd298c300b8a85eea0f48ab95ebda001 new file mode 100644 index 0000000..76a3142 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/980a052dcd298c300b8a85eea0f48ab95ebda001
@@ -0,0 +1 @@ +_cb=BcQNP7CAFBQ4alp6n; expires=Mon, 27 Jul 2020 17:57:52 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/98136a439b95331861d76e34badde628daac0ae6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/98136a439b95331861d76e34badde628daac0ae6 new file mode 100644 index 0000000..b299f467 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/98136a439b95331861d76e34badde628daac0ae6
@@ -0,0 +1 @@ +obuid=ad79f9ce-21bf-4c67-8fda-55b67e65a869; Max-Age=7776000; Expires=Thu, 26 Sep 2019 17:58:32 GMT; Path=/; Domain=outbrain.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9b613a83c35dc05b11fce08afcadde9471c7e11d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9b613a83c35dc05b11fce08afcadde9471c7e11d new file mode 100644 index 0000000..f4fd41a4 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9b613a83c35dc05b11fce08afcadde9471c7e11d
@@ -0,0 +1 @@ +uid=9162711922873884088; Domain=.turn.com; Expires=Wed, 25-Dec-2019 18:16:22 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9baaac27c51a8e252694fcfee5de56a959f58812 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9baaac27c51a8e252694fcfee5de56a959f58812 new file mode 100644 index 0000000..28bf6fd --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9baaac27c51a8e252694fcfee5de56a959f58812
@@ -0,0 +1 @@ +_GFT=;max-age=0 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9c5bffd6e16ab51ab600ffd41bd673d55b73227f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9c5bffd6e16ab51ab600ffd41bd673d55b73227f new file mode 100644 index 0000000..79941fc --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9c5bffd6e16ab51ab600ffd41bd673d55b73227f
@@ -0,0 +1 @@ +nyt-check3pc=true; expires=Fri, 28 Jun 2019 18:02:46 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9daf222acc36cfe241f0e660431bb5760aab59f6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9daf222acc36cfe241f0e660431bb5760aab59f6 new file mode 100644 index 0000000..f9312f5eb --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9daf222acc36cfe241f0e660431bb5760aab59f6
@@ -0,0 +1 @@ +optimizelyDomainTestCookie=null;domain=.nytimes.com;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9e5dc9555de669ac997ae888fae3548662ffa508 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9e5dc9555de669ac997ae888fae3548662ffa508 new file mode 100644 index 0000000..9991637 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9e5dc9555de669ac997ae888fae3548662ffa508
@@ -0,0 +1 @@ +test=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;domain=.bounceexchange.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9f686fa12180f8aae8c8a696eb3525ff18620fea b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9f686fa12180f8aae8c8a696eb3525ff18620fea new file mode 100644 index 0000000..b0f22883 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/9f686fa12180f8aae8c8a696eb3525ff18620fea
@@ -0,0 +1 @@ +flash_enabled=0; expires=Sun, 28 Jul 2019 18:15:13 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a006c363ccdbc4121f0734bd7f93898bf0101c5e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a006c363ccdbc4121f0734bd7f93898bf0101c5e new file mode 100644 index 0000000..4bb4b58b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a006c363ccdbc4121f0734bd7f93898bf0101c5e
@@ -0,0 +1 @@ +GoogleAdServingTest=Good \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a2b111008c37bde96280f6eb34f1cc182edba9c7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a2b111008c37bde96280f6eb34f1cc182edba9c7 new file mode 100644 index 0000000..acdd01e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a2b111008c37bde96280f6eb34f1cc182edba9c7
@@ -0,0 +1 @@ +gpt_origref=;expires=Fri, 28 Jun 2019 18:48:39 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a3812a8554575845ec323258c1f4cc72529ae7a1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a3812a8554575845ec323258c1f4cc72529ae7a1 new file mode 100644 index 0000000..8ee2999b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a3812a8554575845ec323258c1f4cc72529ae7a1
@@ -0,0 +1 @@ +d=EGMBDQH2HZjMwQA; expires=Thu, 26-Sep-2019 17:58:32 GMT; path=/; domain=.quantserve.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a387680027e3c79201c6ecd9c1598ab70da687d0 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a387680027e3c79201c6ecd9c1598ab70da687d0 new file mode 100644 index 0000000..3206287 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a387680027e3c79201c6ecd9c1598ab70da687d0
@@ -0,0 +1 @@ +tryThing01=8773; Domain=.cnn.com; Path=/; Expires=Sun Mar 01 2020 00:00:00 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a5e269a9df8c9bd955bba6a55fee5a7389d5083a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a5e269a9df8c9bd955bba6a55fee5a7389d5083a new file mode 100644 index 0000000..c06e20f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a5e269a9df8c9bd955bba6a55fee5a7389d5083a
@@ -0,0 +1 @@ +edu_cig_opt_jk=%7B%22isEduUser%22:false%7D; Path=/; Domain=nytimes.com; Max-Age=86400; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a602e6486b4f1d610becb8fc5e516e732f1f3981 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a602e6486b4f1d610becb8fc5e516e732f1f3981 new file mode 100644 index 0000000..f34a987 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a602e6486b4f1d610becb8fc5e516e732f1f3981
@@ -0,0 +1 @@ +gpt_av=2;expires=Fri, 28 Jun 2019 18:48:40 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a967d0eff334c245ba15b2df413b191c8d6f4c06 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a967d0eff334c245ba15b2df413b191c8d6f4c06 new file mode 100644 index 0000000..dce2a32a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a967d0eff334c245ba15b2df413b191c8d6f4c06
@@ -0,0 +1 @@ +UIDR=1561745919; expires=Thu, 17-Jun-2021 18:18:39 GMT; path=/; domain=.scorecardresearch.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a9ae8af071d9a9e33687e99a9f7c1257a30c33b0 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a9ae8af071d9a9e33687e99a9f7c1257a30c33b0 new file mode 100644 index 0000000..97f57f1f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/a9ae8af071d9a9e33687e99a9f7c1257a30c33b0
@@ -0,0 +1 @@ +_cc_id=3e7e611389ab526d80c6c0dfb92d8f5d;Path=/;Domain=crwdcntrl.net;Expires=Tue, 24-Mar-2020 18:03:00 GMT;SameSite=None \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aa8c3612aa5d1fded530841fceea34368430b1d9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aa8c3612aa5d1fded530841fceea34368430b1d9 new file mode 100644 index 0000000..7dc2e3f2 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aa8c3612aa5d1fded530841fceea34368430b1d9
@@ -0,0 +1 @@ +dpm=47370908578061537481364230825956456471;Path=/;Domain=.dpm.demdex.net;Expires=Wed, 25-Dec-2019 17:58:32 GMT;Max-Age=15552000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ab45fd913c24c5b0c8777d53a5f2a5ed97d4b33a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ab45fd913c24c5b0c8777d53a5f2a5ed97d4b33a new file mode 100644 index 0000000..fb1a7e5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ab45fd913c24c5b0c8777d53a5f2a5ed97d4b33a
@@ -0,0 +1 @@ +nnls=; Path=/; Domain=pippio.com; Expires=Tue, 27 Aug 2019 18:18:42 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/abd345c64fcdda7d228a16452d1b0fd0fdf87c92 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/abd345c64fcdda7d228a16452d1b0fd0fdf87c92 new file mode 100644 index 0000000..6850fd9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/abd345c64fcdda7d228a16452d1b0fd0fdf87c92
@@ -0,0 +1 @@ +GUCS=Ae8hZ6tW; Max-Age=1800; Domain=yahoo.com; Path=/; Secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ae577cfcac4a264d2fdcfd10672ed8660a3744a9 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ae577cfcac4a264d2fdcfd10672ed8660a3744a9 new file mode 100644 index 0000000..76db12a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ae577cfcac4a264d2fdcfd10672ed8660a3744a9
@@ -0,0 +1 @@ +MR=0; domain=bat.bing.com; expires=Wed, 25-Dec-2019 17:58:30 GMT; path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aed35c0ef545c3208e2704126951375145b216e1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aed35c0ef545c3208e2704126951375145b216e1 new file mode 100644 index 0000000..3a24b34 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/aed35c0ef545c3208e2704126951375145b216e1
@@ -0,0 +1 @@ +syncdata_DAT=1; Domain=.mookie1.com; Expires=Mon, 08-Jul-2019 17:58:36 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b059f387b1c09a7eceeaa81b25081bcc66063f47 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b059f387b1c09a7eceeaa81b25081bcc66063f47 new file mode 100644 index 0000000..0e186e1 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b059f387b1c09a7eceeaa81b25081bcc66063f47
@@ -0,0 +1 @@ +pi=156011:2;expires=Sat, 29 Jun 2019 17:58:32 GMT;path=/;domain=pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b0df406eea85a70bb1324627f2ee8c90a36da71c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b0df406eea85a70bb1324627f2ee8c90a36da71c new file mode 100644 index 0000000..072379e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b0df406eea85a70bb1324627f2ee8c90a36da71c
@@ -0,0 +1 @@ +pxrc=CAA=; Path=/; Domain=pippio.com; Expires=Tue, 27 Aug 2019 18:16:23 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b1a43c3e4b8555d4852d6753d9f4591585d56f12 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b1a43c3e4b8555d4852d6753d9f4591585d56f12 new file mode 100644 index 0000000..1fb0918 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b1a43c3e4b8555d4852d6753d9f4591585d56f12
@@ -0,0 +1 @@ +cnnWebPushSessionCount=1;expires=Tue, 01 Jan 2115 00:00:00 UTC;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b3598cc6126ca46c297fee25a1126891da3248fa b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b3598cc6126ca46c297fee25a1126891da3248fa new file mode 100644 index 0000000..dd775be5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b3598cc6126ca46c297fee25a1126891da3248fa
@@ -0,0 +1 @@ +walley=GA1.2.922291446.1561744668; path=/; expires=Sun, 27 Jun 2021 17:57:52 GMT; domain=nytimes.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b4a4b331511573b1cba6212bcfcfcfce76c9a1d2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b4a4b331511573b1cba6212bcfcfcfce76c9a1d2 new file mode 100644 index 0000000..d88e574 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b4a4b331511573b1cba6212bcfcfcfce76c9a1d2
@@ -0,0 +1 @@ +mnet_session_depth=1%7C1561744667077;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b61ce67a71cdca8adde870205457ddc1b34726cf b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b61ce67a71cdca8adde870205457ddc1b34726cf new file mode 100644 index 0000000..4016f14 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b61ce67a71cdca8adde870205457ddc1b34726cf
@@ -0,0 +1 @@ +IDE=AHWqTUnSncnX_-NitwxUBQ_CoMaP7ccYONzEZdzE6aDLyvBxgDJe5fs-QUEmhFnyt-a=m-a3EFJKIrIGZaX3DvUw15; Expires=Sat, 27 Jun 2020 18:14:47 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b6b88352b38b73b8251b9ee3a49e87013678c2a8 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b6b88352b38b73b8251b9ee3a49e87013678c2a8 new file mode 100644 index 0000000..2d0322b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b6b88352b38b73b8251b9ee3a49e87013678c2a8
@@ -0,0 +1 @@ +D3=; expires=Thu, 26-Sep-2019 14:14:50 GMT; domain=.serving-sys.com; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b9068d648a12bdd59916d36aabaa5028d428ca3a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b9068d648a12bdd59916d36aabaa5028d428ca3a new file mode 100644 index 0000000..db70070 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/b9068d648a12bdd59916d36aabaa5028d428ca3a
@@ -0,0 +1 @@ +akacd_widgets_stg=3739197509~rv=54~id=7069da08bd24173826eec0459d3a071d; path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bab3e37371e0e1b75eebb05a72268c5ff1899c19 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bab3e37371e0e1b75eebb05a72268c5ff1899c19 new file mode 100644 index 0000000..614600f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bab3e37371e0e1b75eebb05a72268c5ff1899c19
@@ -0,0 +1 @@ +bounceClientVisit340v=N4IgNgDiBcIBYBcEQM4FIDMBBNAmAYnvgO6kB0AxgHZWUD2AtkSADQgBOMIIAvkA; expires=Fri, 28 Jun 2019 18:28:38 GMT;path=/;domain=.Cnn.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/baf73c2f692eab8f7a763b6143c1785c94ddce0f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/baf73c2f692eab8f7a763b6143c1785c94ddce0f new file mode 100644 index 0000000..d9ff28b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/baf73c2f692eab8f7a763b6143c1785c94ddce0f
@@ -0,0 +1 @@ +_gat_UA1168580691=1; path=/; expires=Fri, 28 Jun 2019 18:15:49 GMT; domain=pay.google.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bc6b09cf7a516ebd8e871816dea62c233e62cfbf b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bc6b09cf7a516ebd8e871816dea62c233e62cfbf new file mode 100644 index 0000000..b62a828 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bc6b09cf7a516ebd8e871816dea62c233e62cfbf
@@ -0,0 +1 @@ +s_cc=true; path=/; domain=.cnn.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bd202c1f7047d50eb61966b03f7ad22b5ae2786b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bd202c1f7047d50eb61966b03f7ad22b5ae2786b new file mode 100644 index 0000000..e514256 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bd202c1f7047d50eb61966b03f7ad22b5ae2786b
@@ -0,0 +1 @@ +NID=186=cO_7F-gAJvG8cg7fM9e_WvJpqQFJb28RmqymLwl3RHe__2lK5TcsVDGldviq5tBuOuVVywwUUzIs8aDrc1e20wSR4jdAeolp8pcbCa-3sNk5UxhtymR6Rcc7N9_xBGMoqykjQhAn1VdY3b91SDfn5jap7eFs0L52BwLh0kcMhZE; expires=Sat, 28-Dec-2019 18:14:48 GMT; path=/; domain=.google.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bde300efbe573f13a8cb6a31c284f5884558a083 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bde300efbe573f13a8cb6a31c284f5884558a083 new file mode 100644 index 0000000..becb461 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bde300efbe573f13a8cb6a31c284f5884558a083
@@ -0,0 +1 @@ +vis15=26792^1; Domain=.rubiconproject.com; Path=/; Expires=Sat, 29-Jun-2019 14:59:59 GMT; Max-Age=75688 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bee3b3eab3a566eead02de9473d3987ee418918e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bee3b3eab3a566eead02de9473d3987ee418918e new file mode 100644 index 0000000..b1505562 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/bee3b3eab3a566eead02de9473d3987ee418918e
@@ -0,0 +1 @@ +KCCH=YES;expires=Sat, 29 Jun 2019 17:58:32 GMT;path=/;domain=ads.pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c035fa19f7758f1e2b24f93bd0af005a35f64d51 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c035fa19f7758f1e2b24f93bd0af005a35f64d51 new file mode 100644 index 0000000..d325c93 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c035fa19f7758f1e2b24f93bd0af005a35f64d51
@@ -0,0 +1 @@ +apeaf=userintent%3D%257B%2522tooltipViews%2522%253A1%257D=undefined&td-applet-stream=%7B%22tmpl%22%3A%22items%22%2C%22lv%22%3A1561747514362%7D; expires=Sun, 28 Jun 2020 18:15:14 GMT; path=/; domain=www.yahoo.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c16921c200c10c04d94f858c0061b6807b52b9d6 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c16921c200c10c04d94f858c0061b6807b52b9d6 new file mode 100644 index 0000000..0b65e46 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c16921c200c10c04d94f858c0061b6807b52b9d6
@@ -0,0 +1 @@ +token=eyJhY2Nlc3NUb2tlbiI6Ii0yRDJhV1lhYzFNUERkaDBFZlBLRWMwVFEyMVUiLCJ0b2tlblR5cGUiOiJiZWFyZXIiLCJleHBpcmVzIjoiMjAxOS0wNi0yOFQxOToxNjoxNi4yNzNaIiwic2NvcGUiOiIqIiwidW5zYWZlTG9nZ2VkT3V0Ijp0cnVlfQ==.2; path=/; expires=Mon, 28 Jun 2021 18:16:16 GMT; domain=.reddit.com; secure; httponly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1a11b69a334883638a59a9a4f46ea8011ca62bd b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1a11b69a334883638a59a9a4f46ea8011ca62bd new file mode 100644 index 0000000..de18462 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1a11b69a334883638a59a9a4f46ea8011ca62bd
@@ -0,0 +1 @@ +AA003=AXxQ5BNxBze8Kli9OLFYc7zXkZmHXTfnd4XofAOYvYYiwpSIuA6bA_yCRiri9IKjKqk; expires=Thursday, 26-Sep-2019 17:58:38 GMT; path=/; domain=.atdmt.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1e5431d0d29b6c1bf7e43195001edd6ddc16930 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1e5431d0d29b6c1bf7e43195001edd6ddc16930 new file mode 100644 index 0000000..4b42651 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c1e5431d0d29b6c1bf7e43195001edd6ddc16930
@@ -0,0 +1 @@ +_sp_v1_opt=1:;Path=/;Expires=Sun, 28-Jul-2019 17:58:38 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5bb577b01c9d403ac38cc096f68e9cf636a70a5 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5bb577b01c9d403ac38cc096f68e9cf636a70a5 new file mode 100644 index 0000000..2176703 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5bb577b01c9d403ac38cc096f68e9cf636a70a5
@@ -0,0 +1 @@ +_GFT=1; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5c4788bc7ee1890b8e9d93c2663b1a218ac887e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5c4788bc7ee1890b8e9d93c2663b1a218ac887e new file mode 100644 index 0000000..2507757 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5c4788bc7ee1890b8e9d93c2663b1a218ac887e
@@ -0,0 +1 @@ +fbsr_80401312489=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;Secure \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5e3f4980f8fae067de684bb1145f8f29bccd4ff b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5e3f4980f8fae067de684bb1145f8f29bccd4ff new file mode 100644 index 0000000..3cfdd8c1 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c5e3f4980f8fae067de684bb1145f8f29bccd4ff
@@ -0,0 +1 @@ +sessionId=69108187afea38183e1772bcbb815ca; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c6cd3f070eae98856c1e258950fcc289b683a19b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c6cd3f070eae98856c1e258950fcc289b683a19b new file mode 100644 index 0000000..4558958 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c6cd3f070eae98856c1e258950fcc289b683a19b
@@ -0,0 +1 @@ +KRTBCOOKIE_27=16735-uid:b30d5d16-577d-4200-a099-65719dfa9d97&KRTB&16736-uid:b30d5d16-577d-4200-a099-65719dfa9d97; domain=pubmatic.com; expires=Sun, 28-Jul-2019 18:18:42 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c7977a8a3aefa635c80cfa8bca2d1fb3d3e26a25 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c7977a8a3aefa635c80cfa8bca2d1fb3d3e26a25 new file mode 100644 index 0000000..38e7a9e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c7977a8a3aefa635c80cfa8bca2d1fb3d3e26a25
@@ -0,0 +1 @@ +icu=ChgI7f9MEAoYASABKAEwyarZ6AU4AUABSAEQyarZ6AUYAA..; SameSite=None; Path=/; Max-Age=7776000; Expires=Thu, 26-Sep-2019 17:58:33 GMT; Domain=.adnxs.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c848478dfa63274d82e5185d73d24b7e1b67744e b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c848478dfa63274d82e5185d73d24b7e1b67744e new file mode 100644 index 0000000..539f1f31 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c848478dfa63274d82e5185d73d24b7e1b67744e
@@ -0,0 +1 @@ +rseor3=true; path=/; expires=Sun, 28 Jul 2019 18:16:17 GMT; domain=.reddit.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c9781b22777b843d2edc9c008d09a0b7ce18c63c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c9781b22777b843d2edc9c008d09a0b7ce18c63c new file mode 100644 index 0000000..8863d3a --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/c9781b22777b843d2edc9c008d09a0b7ce18c63c
@@ -0,0 +1 @@ +s_ppv=22; path=/; domain=.cnn.com; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ca44506cddacce4558ccd4e988e9097d23b62c4b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ca44506cddacce4558ccd4e988e9097d23b62c4b new file mode 100644 index 0000000..5169049 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ca44506cddacce4558ccd4e988e9097d23b62c4b
@@ -0,0 +1 @@ +uid=3472132661712431412; Domain=.turn.com; Expires=Wed, 25-Dec-2019 17:58:32 GMT; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ce0a43bed8d76d5e1345efb0dffd87760de01419 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ce0a43bed8d76d5e1345efb0dffd87760de01419 new file mode 100644 index 0000000..85c975c5 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ce0a43bed8d76d5e1345efb0dffd87760de01419
@@ -0,0 +1 @@ +thamba=0; expires=Fri, 28 Jun 2019 18:15:13 GMT; domain=www.yahoo.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d067e2ce2fb24e91781a9d2dba39789bc640ba58 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d067e2ce2fb24e91781a9d2dba39789bc640ba58 new file mode 100644 index 0000000..39b9b19 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d067e2ce2fb24e91781a9d2dba39789bc640ba58
@@ -0,0 +1 @@ +KTPCACOOKIE=YES;expires=Thu, 26 Sep 2019 18:18:41 GMT;path=/;domain=pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d1de6143e8f6bf4dd6cdeb221500978e574a373f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d1de6143e8f6bf4dd6cdeb221500978e574a373f new file mode 100644 index 0000000..949f7bf9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d1de6143e8f6bf4dd6cdeb221500978e574a373f
@@ -0,0 +1 @@ +TDCPM=CAESEwoEa3J1eBILCJzY1b-I_703EAUSFAoFb3BlbngSCwimvvzBiP-9NxAFEhcKCHB1Ym1hdGljEgsIsuHFxIj_vTcQBRIZCgpkcmF3YnJpZGdlEgsI2sWCy4j_vTcQBRIXCghhcHBuZXh1cxILCMrFjd2I_703EAUYASABKAIyCwjKvZCKn_-9NxAFOAFaCGFwcG5leHVzYAI.; domain=.adsrvr.org; expires=Sun, 28-Jun-2020 17:58:35 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d31490cc2692f21b7ef0cee6d1b55d2a6f2774ce b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d31490cc2692f21b7ef0cee6d1b55d2a6f2774ce new file mode 100644 index 0000000..daba1af --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d31490cc2692f21b7ef0cee6d1b55d2a6f2774ce
@@ -0,0 +1 @@ +nyt-a=m-a3EFJKIrIGZaX3DvUw15; Path=/; Domain=nytimes.com; Expires=Sat, 27 Jun 2020 18:13:18 GMT; Max-Age=31536000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d3ec18e49be8b10c8d7e139ef542e2d503ab74bf b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d3ec18e49be8b10c8d7e139ef542e2d503ab74bf new file mode 100644 index 0000000..277d69580 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d3ec18e49be8b10c8d7e139ef542e2d503ab74bf
@@ -0,0 +1 @@ +cto_writeable=;expires=Fri, 28 Jun 2019 17:58:29 GMT;domain=.cnn.com;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d4a65f0a8a24afc644a0ad256a1f40ecddf744d7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d4a65f0a8a24afc644a0ad256a1f40ecddf744d7 new file mode 100644 index 0000000..a33e3e26 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d4a65f0a8a24afc644a0ad256a1f40ecddf744d7
@@ -0,0 +1 @@ +TDCPM=CAESEwoEa3J1eBILCJzY1b-I_703EAUSFAoFb3BlbngSCwimvvzBiP-9NxAFEhcKCHB1Ym1hdGljEgsIsuHFxIj_vTcQBRIZCgpkcmF3YnJpZGdlEgsI2sWCy4j_vTcQBRgBIAEoAjILCNq9hfie_703EAU4AVoKZHJhd2JyaWRnZWAC; domain=.adsrvr.org; expires=Sun, 28-Jun-2020 17:58:33 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5455421116feadc30e84eb0953da843dca7d531 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5455421116feadc30e84eb0953da843dca7d531 new file mode 100644 index 0000000..ac04b74 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5455421116feadc30e84eb0953da843dca7d531
@@ -0,0 +1 @@ +bounceClientVisit340=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5b0ac144a5f4f4ca14dd76540a705d3e6ff040b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5b0ac144a5f4f4ca14dd76540a705d3e6ff040b new file mode 100644 index 0000000..48fca89 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d5b0ac144a5f4f4ca14dd76540a705d3e6ff040b
@@ -0,0 +1 @@ +gatewayHit=false; path=/; domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d6292a8df3a8870b9e0f79d2e00f28747032313c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d6292a8df3a8870b9e0f79d2e00f28747032313c new file mode 100644 index 0000000..9fbca96 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/d6292a8df3a8870b9e0f79d2e00f28747032313c
@@ -0,0 +1 @@ +__tld__=1; domain=.cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/da71635721b412900255c668d89658436ae893c0 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/da71635721b412900255c668d89658436ae893c0 new file mode 100644 index 0000000..9584ee7 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/da71635721b412900255c668d89658436ae893c0
@@ -0,0 +1 @@ +khaos=JXGF76Z2-9-FOP7; Max-Age=31536000; Expires=Sat, 27 Jun 2020 18:18:43 GMT; Path=/; Domain=.rubiconproject.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/daa754829b5cf410d82eb1a1347912907bdd4fe2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/daa754829b5cf410d82eb1a1347912907bdd4fe2 new file mode 100644 index 0000000..f86cab2 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/daa754829b5cf410d82eb1a1347912907bdd4fe2
@@ -0,0 +1 @@ +V=ibojkFwabmRZ;Path=/;Domain=.contextweb.com;Expires=Mon, 22-Jun-2020 17:59:07 GMT;Max-Age=31104000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/db21ed57b9957be739e288f3f3df7e37469fd4c5 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/db21ed57b9957be739e288f3f3df7e37469fd4c5 new file mode 100644 index 0000000..393cfce --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/db21ed57b9957be739e288f3f3df7e37469fd4c5
@@ -0,0 +1 @@ +_cb_svref=null; expires=Fri, 28 Jun 2019 18:28:37 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de5f6cb9286f0faa29e22afae207e842f7203f68 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de5f6cb9286f0faa29e22afae207e842f7203f68 new file mode 100644 index 0000000..e5ae8221 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de5f6cb9286f0faa29e22afae207e842f7203f68
@@ -0,0 +1 @@ +ATN=1.1561744718.9433984798704498216.AYI-wy_AdhUVIVzZpao; expires=Sunday, 27-Jun-2021 17:58:38 GMT; path=/; domain=.atdmt.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de98b6c77ee3b3568754214cdc77dfd1d1cc1fb7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de98b6c77ee3b3568754214cdc77dfd1d1cc1fb7 new file mode 100644 index 0000000..df3a984 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/de98b6c77ee3b3568754214cdc77dfd1d1cc1fb7
@@ -0,0 +1 @@ +countryCode=US; Domain=.cnn.com; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/deeb5777a37fb09150c1dcd9ed8178fcfc2f5965 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/deeb5777a37fb09150c1dcd9ed8178fcfc2f5965 new file mode 100644 index 0000000..139df2af --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/deeb5777a37fb09150c1dcd9ed8178fcfc2f5965
@@ -0,0 +1 @@ +gig3pctest=true;expires=Fri, 28 Jun 2019 17:58:33 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/df73098143170c180a39a623c462b7543f0492ad b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/df73098143170c180a39a623c462b7543f0492ad new file mode 100644 index 0000000..42d99db0 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/df73098143170c180a39a623c462b7543f0492ad
@@ -0,0 +1 @@ +_cc_cc="ACZ4nGNQME41TzUzNDS2sExMMjUyS7EwSDZLNkhJS7I0SrFIM01hAIJYsSjG%2F0DAzwADvPfbvwowvlJi%2BM%2FIyLDu9jp2GPtNw324%2BPnFc1hg7HNHDzHD2A%2Bm9jDC2IeR1Gz68FEexr5x6hEbjN3wXxPGvIQk%2FAHJqndIbACgREZR";Version=1;Path=/;Domain=crwdcntrl.net;Expires=Tue, 24-Mar-2020 18:03:00 GMT;Max-Age=23328000;SameSite=None \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e04f62817d06ed80ce6f156e5a6bc77bb5639af1 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e04f62817d06ed80ce6f156e5a6bc77bb5639af1 new file mode 100644 index 0000000..beb97e9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e04f62817d06ed80ce6f156e5a6bc77bb5639af1
@@ -0,0 +1 @@ +cto_writeable=1;expires=Fri, 28 Jun 2019 18:58:29 GMT;domain=.com;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e17f34e9fca3b7abcdf00766120e1f11d62ba0f4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e17f34e9fca3b7abcdf00766120e1f11d62ba0f4 new file mode 100644 index 0000000..2ff3b0e --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e17f34e9fca3b7abcdf00766120e1f11d62ba0f4
@@ -0,0 +1 @@ +KCCH=;expires=Thu, 01-Jan-1970 00:00:01 GMT;path=/;domain=ads.pubmatic.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1992da7965c21c43dd232a1a66c0ae9e65419c7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1992da7965c21c43dd232a1a66c0ae9e65419c7 new file mode 100644 index 0000000..99a57a6 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1992da7965c21c43dd232a1a66c0ae9e65419c7
@@ -0,0 +1 @@ +_sp_v1_lt=1:;Path=/;Expires=Sun, 28-Jul-2019 17:58:38 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1af2e3bef5a200a4759be73c2cf4483826c5cda b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1af2e3bef5a200a4759be73c2cf4483826c5cda new file mode 100644 index 0000000..6c6832f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e1af2e3bef5a200a4759be73c2cf4483826c5cda
@@ -0,0 +1 @@ +iter_id=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhaWQiOiI1ZDE2NTUyMTBiOTUwMDAwMDE0MTAwNTQiLCJjb21wYW55X2lkIjoiNWMwOThiM2QxNjU0YzEwMDAxMmM2OGY5IiwiaWF0IjoxNTYxNzQ0NjczfQ.sF_0o4vkXEMBEI3NDI-0lYShUO5ToZSLTFkT-a5OgZE; path=/; expires=Mon, 25 Jun 2029 17:57:53 GMT; domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e40231ef2f3143dde83067ed24d47313c758a745 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e40231ef2f3143dde83067ed24d47313c758a745 new file mode 100644 index 0000000..bb7d2b2 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e40231ef2f3143dde83067ed24d47313c758a745
@@ -0,0 +1 @@ +_cb_ls=1; expires=Mon, 27 Jul 2020 17:57:52 GMT; path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e486dc80398ed1368e2f14543a7d262a823faa33 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e486dc80398ed1368e2f14543a7d262a823faa33 new file mode 100644 index 0000000..cdd3113 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e486dc80398ed1368e2f14543a7d262a823faa33
@@ -0,0 +1 @@ +NID=186=hAgj6p5Rt1PoK7pMWzw2u0KOEoxCvX5-8DcPqkFLJjiniNLMoYPDtMHERnH3wRR4NPpMv71OszRmM4FPClPVeHETUCO4QuDAXVepgZaE0pYFjkFIVNXPjOeJyr4iauBxMZ_3DQ6-0EZLvA_gAAB3BAEa8i4cWSso8VDZpUxaG5s; expires=Sat, 28-Dec-2019 18:14:48 GMT; path=/; domain=.google.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e60d6d7872d1d70859c8d26ee4050c47a2eaf011 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e60d6d7872d1d70859c8d26ee4050c47a2eaf011 new file mode 100644 index 0000000..2955378 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e60d6d7872d1d70859c8d26ee4050c47a2eaf011
@@ -0,0 +1 @@ +bkdc=phx; expires=Wed, 25-Dec-2019 17:59:07 GMT; path=/; domain=.bluekai.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e61277ff2502bc356df7870b2b98b2a8252f166c b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e61277ff2502bc356df7870b2b98b2a8252f166c new file mode 100644 index 0000000..36980c1d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e61277ff2502bc356df7870b2b98b2a8252f166c
@@ -0,0 +1 @@ +nyt-a=m-a3EFJKIrIGZaX3DvUw15; Path=/; Domain=nytimes.com; Expires=Sat, 27 Jun 2020 18:13:10 GMT; Max-Age=31536000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e7e83533a247e20817f9aecdbabee3b8c0c8a0e4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e7e83533a247e20817f9aecdbabee3b8c0c8a0e4 new file mode 100644 index 0000000..336339b9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/e7e83533a247e20817f9aecdbabee3b8c0c8a0e4
@@ -0,0 +1 @@ +__qca=P0-1272030883-1561745780699; expires=Fri, 24 Jul 2020 18:16:21 GMT; path=/; domain=redditmedia.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ea08a08df36906fea11d1bd082cfd9945c72869a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ea08a08df36906fea11d1bd082cfd9945c72869a new file mode 100644 index 0000000..283d573 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ea08a08df36906fea11d1bd082cfd9945c72869a
@@ -0,0 +1 @@ +cto_writeable=;expires=Fri, 28 Jun 2019 17:58:29 GMT;domain=.com;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb242a1d0caeb6024c7384542e8475ab301d942a b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb242a1d0caeb6024c7384542e8475ab301d942a new file mode 100644 index 0000000..597f55d --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb242a1d0caeb6024c7384542e8475ab301d942a
@@ -0,0 +1 @@ +_uid="c054_6707642462741128233";expires=Sat, 27 Jun 2020 17:58:32 GMT;domain=.fwmrm.net;path=/; \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb44a6fd7935b23d6c2dda809b6b7d4bbed69f65 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb44a6fd7935b23d6c2dda809b6b7d4bbed69f65 new file mode 100644 index 0000000..5fd5f8ae --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/eb44a6fd7935b23d6c2dda809b6b7d4bbed69f65
@@ -0,0 +1 @@ +nyt-gdpr=0; Expires=Sat, 29 Jun 2019 00:14:47 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee241f6d0a53870859df56ac74c603a5b5264ad4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee241f6d0a53870859df56ac74c603a5b5264ad4 new file mode 100644 index 0000000..07afd56 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee241f6d0a53870859df56ac74c603a5b5264ad4
@@ -0,0 +1 @@ +c=1561744747; path=/; expires=Sat, 27-Jun-2020 17:59:07 GMT; domain=.bidswitch.net \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee29ed6f1e292da3b39b23e5872f68ad3650eca7 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee29ed6f1e292da3b39b23e5872f68ad3650eca7 new file mode 100644 index 0000000..6ddc9b9 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/ee29ed6f1e292da3b39b23e5872f68ad3650eca7
@@ -0,0 +1 @@ +sessionIndex=1|1561744666382|MS0QrKWr9qp_XkQmvjSS3B|1559761176380|true; Path=/; Domain=et.nytimes.com; Expires=Sat, 27 Jun 2020 17:57:23 GMT; Max-Age=31536000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0300c33bb43d4036e0c892ca67c959ed3a6c063 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0300c33bb43d4036e0c892ca67c959ed3a6c063 new file mode 100644 index 0000000..11b381b --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0300c33bb43d4036e0c892ca67c959ed3a6c063
@@ -0,0 +1 @@ +__tld__=null; domain=.cnn.com; expires=Fri, 28 Jun 2019 17:58:31 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f08f4732cf89fb8e213340d995842502ca8d9a19 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f08f4732cf89fb8e213340d995842502ca8d9a19 new file mode 100644 index 0000000..0a4d3f8 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f08f4732cf89fb8e213340d995842502ca8d9a19
@@ -0,0 +1 @@ +GoogleAdServingTest=; expires=Fri, 28 Jun 2019 17:57:47 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0ad412595cc1472aec5cff8606542eabbfad34b b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0ad412595cc1472aec5cff8606542eabbfad34b new file mode 100644 index 0000000..80328338 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f0ad412595cc1472aec5cff8606542eabbfad34b
@@ -0,0 +1 @@ +nyt-gdpr=0; Expires=Fri, 28 Jun 2019 23:57:46 GMT; Path=/; Domain=.nytimes.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f109db547ed4bdc59a8fde6f908946ea6109cc9f b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f109db547ed4bdc59a8fde6f908946ea6109cc9f new file mode 100644 index 0000000..f4c8d90 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f109db547ed4bdc59a8fde6f908946ea6109cc9f
@@ -0,0 +1 @@ +khaos=JXGEH7J7-S-KODE; Domain=.rubiconproject.com; Path=/; Expires=Sat, 27-Jun-2020 17:58:31 GMT; Max-Age=31536000 \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f13fd0f50220d38cc903dce9c8122bd59ec3f529 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f13fd0f50220d38cc903dce9c8122bd59ec3f529 new file mode 100644 index 0000000..54d18671 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f13fd0f50220d38cc903dce9c8122bd59ec3f529
@@ -0,0 +1 @@ +__cfduid=d7a8c39b518794a7c622df558ac8e21a31561745923; expires=Sat, 27-Jun-20 18:18:43 GMT; path=/; domain=.crazyegg.com; HttpOnly \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f3dbe871488d7e3c71dc0a9c6dc6efecc669fff4 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f3dbe871488d7e3c71dc0a9c6dc6efecc669fff4 new file mode 100644 index 0000000..7d1d687 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f3dbe871488d7e3c71dc0a9c6dc6efecc669fff4
@@ -0,0 +1 @@ +csm-hit=tb:s-Y1H9CT72C6MPHPH0Y96F|1561744745740&t:1561744745742;expires=Fri, 28 May 2021 17:59:05 GMT;path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f5dbb21084f900ba67ac6d3fe80478bbe9decdbd b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f5dbb21084f900ba67ac6d3fe80478bbe9decdbd new file mode 100644 index 0000000..e05ed29 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f5dbb21084f900ba67ac6d3fe80478bbe9decdbd
@@ -0,0 +1 @@ +nnls=; Path=/; Domain=pippio.com; Expires=Tue, 27 Aug 2019 18:16:23 GMT \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f83fc993626aca6ac059e791b2d7b01f3e10f969 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f83fc993626aca6ac059e791b2d7b01f3e10f969 new file mode 100644 index 0000000..d7b0ca4 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f83fc993626aca6ac059e791b2d7b01f3e10f969
@@ -0,0 +1 @@ +sailthru_content=; path=/; expires=Thu, 01 Jan 1970 00:00:00 UTC \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f8c25cdbb8d4bae5fd2eff6e35874494b52574c2 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f8c25cdbb8d4bae5fd2eff6e35874494b52574c2 new file mode 100644 index 0000000..eb1f5bb --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/f8c25cdbb8d4bae5fd2eff6e35874494b52574c2
@@ -0,0 +1 @@ +i=7d6862f3-dcbf-05d7-0183-b4f4f263cf9e|1561745690; Version=1; Expires=Sat, 27-Jun-2020 18:14:50 GMT; Max-Age=31536000; Domain=.openx.net; Path=/ \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fa84bb3e606d517f564607024df470f778007a95 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fa84bb3e606d517f564607024df470f778007a95 new file mode 100644 index 0000000..56c1b1f --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fa84bb3e606d517f564607024df470f778007a95
@@ -0,0 +1 @@ +_hrstCID=d268e84531edea487528fb6638a62d41; expires=Sun, 27 Jun 2021 18:18:39 GMT; path=/; domain=.www.wcvb.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fcf781ba904f4a8ce53c00a5f1071f5bcee8a21d b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fcf781ba904f4a8ce53c00a5f1071f5bcee8a21d new file mode 100644 index 0000000..b5116df --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fcf781ba904f4a8ce53c00a5f1071f5bcee8a21d
@@ -0,0 +1 @@ +OptanonConsent=landingPath=https%3A%2F%2Fwww.cnn.com%2F&datestamp=Fri+Jun+28+2019+13%3A58%3A31+GMT-0400+(Eastern+Daylight+Time)&version=4.5.0; expires=Sat, 27 Jun 2020 17:58:31 GMT; path=/; domain=.cnn.com \ No newline at end of file
diff --git a/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fec9232ce26d526167f5bd254706a5249090a593 b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fec9232ce26d526167f5bd254706a5249090a593 new file mode 100644 index 0000000..fae3153 --- /dev/null +++ b/net/data/fuzzer_data/net_canonical_cookie_fuzzer/fec9232ce26d526167f5bd254706a5249090a593
@@ -0,0 +1 @@ +univ_id=537072971|33b5eb2b-c79e-486a-bf3b-2cafed6d8fe1|1561744712474478; Version=1; Expires=Sat, 13-Jul-2019 17:58:32 GMT; Max-Age=1296000; Domain=.openx.net; Path=/ \ No newline at end of file
diff --git a/services/identity/public/cpp/DEPS b/services/identity/public/cpp/DEPS index 5ae08729..050b23b 100644 --- a/services/identity/public/cpp/DEPS +++ b/services/identity/public/cpp/DEPS
@@ -42,8 +42,8 @@ "+services/network/test/test_url_loader_factory.h", ], "identity_test_environment.cc": [ + "+components/signin/ios/browser/device_accounts_provider.h", "+components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h", - "+components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h", ], "identity_manager_unittest.cc": [ "+google_apis/gaia/oauth2_token_service_delegate.h",
diff --git a/services/identity/public/cpp/identity_test_environment.cc b/services/identity/public/cpp/identity_test_environment.cc index 4a0a60e..af698bce 100644 --- a/services/identity/public/cpp/identity_test_environment.cc +++ b/services/identity/public/cpp/identity_test_environment.cc
@@ -34,8 +34,8 @@ #include "services/identity/public/cpp/test_identity_manager_observer.h" #if defined(OS_IOS) +#include "components/signin/ios/browser/device_accounts_provider.h" #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.h" -#include "components/signin/ios/browser/profile_oauth2_token_service_ios_provider.h" #endif #if !defined(OS_ANDROID) && !defined(OS_IOS)
diff --git a/services/identity/public/cpp/identity_test_environment.h b/services/identity/public/cpp/identity_test_environment.h index e970e0f1..52fbf61 100644 --- a/services/identity/public/cpp/identity_test_environment.h +++ b/services/identity/public/cpp/identity_test_environment.h
@@ -24,7 +24,7 @@ class TestSigninClient; #if defined(OS_IOS) -class ProfileOAuth2TokenServiceIOSProvider; +class DeviceAccountsProvider; #endif namespace sync_preferences { @@ -61,8 +61,7 @@ #if defined(OS_IOS) // If non-null, an iOS delegate instance will be constructed for the // token service as opposed to the default fake delegate. - std::unique_ptr<ProfileOAuth2TokenServiceIOSProvider> - token_service_provider; + std::unique_ptr<DeviceAccountsProvider> token_service_provider; #endif };
diff --git a/services/network/cross_origin_read_blocking.cc b/services/network/cross_origin_read_blocking.cc index 5190771..117e6558 100644 --- a/services/network/cross_origin_read_blocking.cc +++ b/services/network/cross_origin_read_blocking.cc
@@ -220,10 +220,6 @@ return *set; } -bool ShouldEnforceInitiatorLock() { - return base::FeatureList::IsEnabled(network::features::kNetworkService); -} - // The function below returns a set of MIME types below may be blocked by CORB // without any confirmation sniffing (in contrast to HTML/JSON/XML which require // confirmation sniffing because images, scripts, etc. are frequently @@ -684,10 +680,8 @@ // there was no initiator or if it was incompatible with the lock. Using a // unique origin makes CORB treat the response as cross-origin and thus // considers it eligible for blocking (based on content-type, sniffing, etc.). - url::Origin initiator = GetTrustworthyInitiator( - ShouldEnforceInitiatorLock() ? request_initiator_site_lock - : base::nullopt, - request_initiator); + url::Origin initiator = + GetTrustworthyInitiator(request_initiator_site_lock, request_initiator); // Don't block same-origin documents. if (initiator.IsSameOriginWith(target_origin))
diff --git a/services/network/initiator_lock_compatibility.cc b/services/network/initiator_lock_compatibility.cc index 526dfa7..6828fb9 100644 --- a/services/network/initiator_lock_compatibility.cc +++ b/services/network/initiator_lock_compatibility.cc
@@ -80,6 +80,11 @@ if (!request_initiator.has_value()) return unique_origin_fallback; + if (!base::FeatureList::IsEnabled(features::kNetworkService) || + !base::FeatureList::IsEnabled(features::kRequestInitiatorSiteLock)) { + return request_initiator.value(); + } + InitiatorLockCompatibility initiator_compatibility = VerifyRequestInitiatorLock(request_initiator_site_lock, request_initiator);
diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc index d3c7ff5..c4c3a32 100644 --- a/services/network/public/cpp/features.cc +++ b/services/network/public/cpp/features.cc
@@ -60,6 +60,12 @@ const base::Feature kFetchMetadataDestination{ "FetchMetadataDestination", base::FEATURE_DISABLED_BY_DEFAULT}; +// When kRequestInitiatorSiteLock is enabled, then CORB, CORP and Sec-Fetch-Site +// will validate network::ResourceRequest::request_initiator against +// network::mojom::URLLoaderFactoryParams::request_initiator_site_lock. +const base::Feature kRequestInitiatorSiteLock{"RequestInitiatorSiteLock", + base::FEATURE_ENABLED_BY_DEFAULT}; + bool ShouldEnableOutOfBlinkCors() { // OOR-CORS requires NetworkService. if (!base::FeatureList::IsEnabled(features::kNetworkService))
diff --git a/services/network/public/cpp/features.h b/services/network/public/cpp/features.h index 1fe733d..c4fa3e8 100644 --- a/services/network/public/cpp/features.h +++ b/services/network/public/cpp/features.h
@@ -29,6 +29,8 @@ extern const base::Feature kFetchMetadata; COMPONENT_EXPORT(NETWORK_CPP) extern const base::Feature kFetchMetadataDestination; +COMPONENT_EXPORT(NETWORK_CPP) +extern const base::Feature kRequestInitiatorSiteLock; COMPONENT_EXPORT(NETWORK_CPP) bool ShouldEnableOutOfBlinkCors();
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index aedd24e6..0fde556 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -556,7 +556,6 @@ "AudioService": [ { "platforms": [ - "mac", "windows" ], "experiments": [ @@ -590,6 +589,28 @@ ] } ], + "AudioServiceOutOfProcessSandboxApmMac": [ + { + "platforms": [ + "mac" + ], + "experiments": [ + { + "name": "AudioProcess_APM", + "params": { + "teardown_timeout_s": "900", + "timeout_seconds": "180" + }, + "enable_features": [ + "AudioServiceOutOfProcess", + "AudioServiceOutOfProcessKillAtHang", + "AudioServiceSandbox", + "WebRtcApmInAudioService" + ] + } + ] + } + ], "AudioServiceSandboxApmLinux": [ { "platforms": [
diff --git a/third_party/.gitignore b/third_party/.gitignore index 7dafd82..8d544dc 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore
@@ -18,6 +18,7 @@ /android_protobuf/src /android_support_test_runner/lib/ /android_system_sdk/*.jar +/android_tools_internal/ /android_webview_glue/src /androidx/lib/ /angle
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 cb59d4e..57b0633 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -2327,6 +2327,7 @@ kPeriodicBackgroundSyncUnregister = 2938, kCreateObjectURLMediaSourceFromWorker = 2939, kCSSAtRuleProperty = 2940, + kServiceWorkerInterceptedRequestFromOriginDirtyStyleSheet = 2941, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/platform/web_url_request.h b/third_party/blink/public/platform/web_url_request.h index 602f88b2..7baabb3 100644 --- a/third_party/blink/public/platform/web_url_request.h +++ b/third_party/blink/public/platform/web_url_request.h
@@ -386,6 +386,8 @@ BLINK_PLATFORM_EXPORT int GetLoadFlagsForWebUrlRequest() const; + BLINK_PLATFORM_EXPORT bool IsFromOriginDirtyStyleSheet() const; + #if INSIDE_BLINK BLINK_PLATFORM_EXPORT ResourceRequest& ToMutableResourceRequest(); BLINK_PLATFORM_EXPORT const ResourceRequest& ToResourceRequest() const;
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h index 3159bc7..c41afd0 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h
@@ -18,6 +18,7 @@ #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-shared.h" #include "third_party/blink/public/mojom/frame/lifecycle.mojom-shared.h" #include "third_party/blink/public/mojom/selection_menu/selection_menu_behavior.mojom-shared.h" +#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h" #include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/web_focus_type.h" #include "third_party/blink/public/platform/web_size.h" @@ -250,10 +251,11 @@ virtual bool IsNavigationScheduledWithin( double interval_in_seconds) const = 0; - // Reports a list of unique blink::WebFeature values representing - // Blink features used, performed or encountered by the browser during the - // current page load happening on the frame. - virtual void BlinkFeatureUsageReport(const std::set<int>& features) = 0; + // Reports a list of Blink features used, performed or encountered by the + // browser during the current page load happening on the frame. + virtual void BlinkFeatureUsageReport( + const std::set<blink::mojom::WebFeature>& features) = 0; + virtual void BlinkFeatureUsageReport(blink::mojom::WebFeature feature) = 0; // Informs the renderer that mixed content was found externally regarding this // frame. Currently only the the browser process can do so. The included data
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/callback_function.py b/third_party/blink/renderer/bindings/scripts/web_idl/callback_function.py index 2e3a741..cbe2e2fca 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/callback_function.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/callback_function.py
@@ -8,10 +8,11 @@ from .common import WithDebugInfo from .common import WithExtendedAttributes from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition +from .user_defined_type import UserDefinedType -class CallbackFunction(IdlDefinition): +class CallbackFunction(UserDefinedType, WithExtendedAttributes, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """https://heycam.github.io/webidl/#idl-callback-functions""" class IR(IdentifierIRMap.IR, WithExtendedAttributes, WithCodeGeneratorInfo, @@ -46,3 +47,8 @@ @return Argument """ raise exceptions.NotImplementedError() + + # UserDefinedType overrides + @property + def is_callback_function(self): + return True
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py b/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py index 82bb35e8..74c157d 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/callback_interface.py
@@ -8,10 +8,11 @@ from .common import WithDebugInfo from .common import WithExtendedAttributes from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition +from .user_defined_type import UserDefinedType -class CallbackInterface(IdlDefinition): +class CallbackInterface(UserDefinedType, WithExtendedAttributes, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """https://heycam.github.io/webidl/#idl-interfaces""" class IR(IdentifierIRMap.IR, WithExtendedAttributes, WithCodeGeneratorInfo, @@ -55,3 +56,8 @@ @return tuple(Constant) """ raise exceptions.NotImplementedError() + + # UserDefinedType overrides + @property + def is_callback_interface(self): + return True
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/dictionary.py b/third_party/blink/renderer/bindings/scripts/web_idl/dictionary.py index 2f46e87d4..ee302433 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/dictionary.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/dictionary.py
@@ -8,11 +8,12 @@ from .common import WithDebugInfo from .common import WithExtendedAttributes from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition from .idl_member import IdlMember +from .user_defined_type import UserDefinedType -class Dictionary(IdlDefinition): +class Dictionary(UserDefinedType, WithExtendedAttributes, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """https://heycam.github.io/webidl/#idl-dictionaries""" class IR(IdentifierIRMap.IR, WithExtendedAttributes, WithCodeGeneratorInfo, @@ -57,6 +58,11 @@ """ raise exceptions.NotImplementedError() + # UserDefinedType overrides + @property + def is_dictionary(self): + return True + class DictionaryMember(IdlMember): @property
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/enumeration.py b/third_party/blink/renderer/bindings/scripts/web_idl/enumeration.py index 88cbd87..ef25fdb6 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/enumeration.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/enumeration.py
@@ -8,10 +8,11 @@ from .common import WithDebugInfo from .common import WithExtendedAttributes from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition +from .user_defined_type import UserDefinedType -class Enumeration(IdlDefinition): +class Enumeration(UserDefinedType, WithExtendedAttributes, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """https://heycam.github.io/webidl/#idl-enums""" class IR(IdentifierIRMap.IR, WithExtendedAttributes, WithCodeGeneratorInfo, @@ -38,3 +39,8 @@ @return tuple(str) """ raise exceptions.NotImplementedError() + + # UserDefinedType overrides + @property + def is_enumeration(self): + return True
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/idl_definition.py b/third_party/blink/renderer/bindings/scripts/web_idl/idl_definition.py deleted file mode 100644 index 7bf9f1c1..0000000 --- a/third_party/blink/renderer/bindings/scripts/web_idl/idl_definition.py +++ /dev/null
@@ -1,66 +0,0 @@ -# Copyright 2019 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. - -from .common import WithCodeGeneratorInfo -from .common import WithComponent -from .common import WithDebugInfo -from .common import WithExposure -from .common import WithExtendedAttributes -from .common import WithIdentifier - - -class IdlDefinition(WithIdentifier, WithExtendedAttributes, WithExposure, - WithCodeGeneratorInfo, WithComponent, WithDebugInfo): - """ - IdlDefinition provides common APIs for IDL definitions; Interface, Dictionary, - Namespace, CallbackFunction, CallbackInterface, and Enumeration. - """ - - @property - def is_interface(self): - """ - Returns True if |self| is an Interface. - @return bool - """ - return False - - @property - def is_dictionary(self): - """ - Returns True if |self| is a Dictionary. - @return bool - """ - return False - - @property - def is_namespace(self): - """ - Returns True if |self| is a Namespace. - @return bool - """ - return False - - @property - def is_callback_function(self): - """ - Returns True if |self| is a CallbackFunction. - @return bool - """ - return False - - @property - def is_callback_interface(self): - """ - Returns True if |self| is a CallbackInterface. - @return bool - """ - return False - - @property - def is_enumeration(self): - """ - Returns True if |self| is an Enumeration. - @return bool - """ - return False
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/idl_reference_proxy.py b/third_party/blink/renderer/bindings/scripts/web_idl/idl_reference_proxy.py index 31c27a1..23d47da6 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/idl_reference_proxy.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/idl_reference_proxy.py
@@ -10,29 +10,49 @@ Proxies attribute access on this object to the target object. """ - def __init__(self, target_object=None, target_attributes=None): + def __init__(self, + target_object=None, + target_attrs=None, + target_attrs_with_priority=None): """ Creates a new proxy to |target_object|. Keyword arguments: target_object -- The object to which attribute access is proxied. This can be set later by set_target_object. - target_attributes -- None or list of attribute names to be proxied. If - None, all the attribute access is proxied. + target_attrs -- None or list of attribute names to be proxied. If None, + all the attribute access is proxied. + target_attrs_with_priority -- None or list of attribute names to be + unconditionally proxied with priority over attributes defined on + |self|. If None, no attribute has priority over own attributes. """ - if target_attributes is not None: - assert isinstance(target_attributes, (tuple, list)) - assert all(isinstance(attr, str) for attr in target_attributes) + if target_attrs is not None: + assert isinstance(target_attrs, (tuple, list)) + assert all(isinstance(attr, str) for attr in target_attrs) self._target_object = target_object - self._target_attributes = target_attributes + self._target_attrs = target_attrs + self._target_attrs_with_priority = target_attrs_with_priority def __getattr__(self, attribute): - assert self._target_object - if (self._target_attributes is None - or attribute in self._target_attributes): - return getattr(self._target_object, attribute) + target_object = object.__getattribute__(self, '_target_object') + target_attrs = object.__getattribute__(self, '_target_attrs') + assert target_object + if target_attrs is None or attribute in target_attrs: + return getattr(target_object, attribute) raise AttributeError + def __getattribute__(self, attribute): + target_object = object.__getattribute__(self, '_target_object') + target_attrs = object.__getattribute__(self, + '_target_attrs_with_priority') + # It's okay to access own attributes, such as 'identifier', even when + # the target object is not yet resolved. + if target_object is None: + return object.__getattribute__(self, attribute) + if target_attrs is not None and attribute in target_attrs: + return getattr(target_object, attribute) + return object.__getattribute__(self, attribute) + def set_target_object(self, target_object): assert self._target_object is None assert isinstance(target_object, object) @@ -49,8 +69,8 @@ Creates a group of references that are later resolvable. All the references created by this factory are grouped per factory, and you - can apply a function to all the references. This allows you to resolve - all the references at very end of the compilation phases. + can apply a function to all the references. This allows you to resolve all + the references at very end of the compilation phases. """ class _RefById(Proxy, WithIdentifier): @@ -62,18 +82,26 @@ can treat this reference as if the object itself. """ - def __init__(self, identifier, target_attributes=None): - Proxy.__init__(self, target_attributes=target_attributes) + def __init__(self, + identifier, + target_attrs=None, + target_attrs_with_priority=None): + Proxy.__init__( + self, + target_attrs=target_attrs, + target_attrs_with_priority=target_attrs_with_priority) WithIdentifier.__init__(self, identifier) - def __init__(self, target_attributes): + def __init__(self, target_attrs=None, target_attrs_with_priority=None): self._references = set() self._did_resolve = False - self._target_attributes = target_attributes + self._target_attrs = target_attrs + self._target_attrs_with_priority = target_attrs_with_priority def create(self, identifier): assert not self._did_resolve - ref = RefByIdFactory._RefById(identifier, self._target_attributes) + ref = RefByIdFactory._RefById(identifier, self._target_attrs, + self._target_attrs_with_priority) self._references.add(ref) return ref
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/interface.py b/third_party/blink/renderer/bindings/scripts/web_idl/interface.py index 7e17eef..0244277b 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/interface.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/interface.py
@@ -9,11 +9,12 @@ from .common import WithExposure from .common import WithExtendedAttributes from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition from .idl_member import IdlMember +from .user_defined_type import UserDefinedType -class Interface(IdlDefinition): +class Interface(UserDefinedType, WithExtendedAttributes, WithExposure, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """A summarized interface definition in IDL. Interface provides information about an interface, partial interfaces, @@ -165,6 +166,11 @@ """ raise exceptions.NotImplementedError() + # UserDefinedType overrides + @property + def is_interface(self): + return True + class Iterable(IdlMember): """https://heycam.github.io/webidl/#idl-iterable"""
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py b/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py index b8b14aea..fe5176b 100644 --- a/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py +++ b/third_party/blink/renderer/bindings/scripts/web_idl/namespace.py
@@ -8,11 +8,12 @@ from .common import WithDebugInfo from .common import WithExposure from .common import WithExtendedAttributes +from .common import WithIdentifier from .identifier_ir_map import IdentifierIRMap -from .idl_definition import IdlDefinition -class Namespace(IdlDefinition): +class Namespace(WithIdentifier, WithExtendedAttributes, WithExposure, + WithCodeGeneratorInfo, WithComponent, WithDebugInfo): """https://heycam.github.io/webidl/#idl-namespaces""" class IR(IdentifierIRMap.IR, WithExtendedAttributes, WithExposure,
diff --git a/third_party/blink/renderer/bindings/scripts/web_idl/user_defined_type.py b/third_party/blink/renderer/bindings/scripts/web_idl/user_defined_type.py new file mode 100644 index 0000000..d1774e6b --- /dev/null +++ b/third_party/blink/renderer/bindings/scripts/web_idl/user_defined_type.py
@@ -0,0 +1,57 @@ +# Copyright 2019 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. + +from .common import WithIdentifier + + +class UserDefinedType(WithIdentifier): + """ + UserDefinedType is a common base class of spec-author-defined types. + + Spec-author-defined types are top-level IDL definitions given an unique + name. + """ + + def __init__(self, identifier): + WithIdentifier.__init__(self, identifier) + + @property + def is_interface(self): + """ + Returns True if |self| represents an Interface. + @return bool + """ + return False + + @property + def is_dictionary(self): + """ + Returns True if |self| represents a Dictionary. + @return bool + """ + return False + + @property + def is_callback_function(self): + """ + Returns True if |self| represents a CallbackFunction. + @return bool + """ + return False + + @property + def is_callback_interface(self): + """ + Returns True if |self| represents a CallbackInterface. + @return bool + """ + return False + + @property + def is_enumeration(self): + """ + Returns True if |self| represents an Enumeration. + @return bool + """ + return False
diff --git a/third_party/blink/renderer/controller/memory_usage_monitor.cc b/third_party/blink/renderer/controller/memory_usage_monitor.cc index 2e4708d..25ad2792 100644 --- a/third_party/blink/renderer/controller/memory_usage_monitor.cc +++ b/third_party/blink/renderer/controller/memory_usage_monitor.cc
@@ -14,10 +14,9 @@ constexpr base::TimeDelta kPingInterval = base::TimeDelta::FromSeconds(1); } -MemoryUsageMonitor::MemoryUsageMonitor() - : timer_(Thread::MainThread()->GetTaskRunner(), - this, - &MemoryUsageMonitor::TimerFired) {} +MemoryUsageMonitor::MemoryUsageMonitor() { + timer_.SetTaskRunner(Thread::MainThread()->GetTaskRunner()); +} void MemoryUsageMonitor::AddObserver(Observer* observer) { StartMonitoringIfNeeded(); @@ -33,9 +32,11 @@ } void MemoryUsageMonitor::StartMonitoringIfNeeded() { - if (timer_.IsActive()) + if (timer_.IsRunning()) return; - timer_.StartRepeating(kPingInterval, FROM_HERE); + timer_.Start(FROM_HERE, kPingInterval, + WTF::BindRepeating(&MemoryUsageMonitor::TimerFired, + WTF::Unretained(this))); } void MemoryUsageMonitor::StopMonitoring() { @@ -65,7 +66,7 @@ usage.partition_alloc_bytes = WTF::Partitions::TotalSizeOfCommittedPages(); } -void MemoryUsageMonitor::TimerFired(TimerBase*) { +void MemoryUsageMonitor::TimerFired() { MemoryUsage usage = GetCurrentMemoryUsage(); for (auto& observer : observers_) observer.OnMemoryPing(usage);
diff --git a/third_party/blink/renderer/controller/memory_usage_monitor.h b/third_party/blink/renderer/controller/memory_usage_monitor.h index 91026fdc..78f8f57 100644 --- a/third_party/blink/renderer/controller/memory_usage_monitor.h +++ b/third_party/blink/renderer/controller/memory_usage_monitor.h
@@ -48,7 +48,7 @@ void RemoveObserver(Observer*); bool HasObserver(Observer*); - bool TimerIsActive() const { return timer_.IsActive(); } + bool TimerIsActive() const { return timer_.IsRunning(); } protected: // Adds V8 related memory usage data to the given struct. @@ -62,9 +62,9 @@ virtual void StartMonitoringIfNeeded(); virtual void StopMonitoring(); - void TimerFired(TimerBase*); + void TimerFired(); - TaskRunnerTimer<MemoryUsageMonitor> timer_; + base::RepeatingTimer timer_; base::ObserverList<Observer> observers_; };
diff --git a/third_party/blink/renderer/controller/memory_usage_monitor_test.cc b/third_party/blink/renderer/controller/memory_usage_monitor_test.cc index 62c7a8c..e71edc0 100644 --- a/third_party/blink/renderer/controller/memory_usage_monitor_test.cc +++ b/third_party/blink/renderer/controller/memory_usage_monitor_test.cc
@@ -18,7 +18,25 @@ int count_ = 0; }; -TEST(MemoryUsageMonitorTest, StartStopMonitor) { +class MemoryUsageMonitorTest : public testing::Test { + public: + MemoryUsageMonitorTest() = default; + + void SetUp() override { + monitor_.reset(new MemoryUsageMonitor); + MemoryUsageMonitor::SetInstanceForTesting(monitor_.get()); + } + + void TearDown() override { + MemoryUsageMonitor::SetInstanceForTesting(nullptr); + monitor_.reset(); + } + + private: + std::unique_ptr<MemoryUsageMonitor> monitor_; +}; + +TEST_F(MemoryUsageMonitorTest, StartStopMonitor) { std::unique_ptr<CountingObserver> observer = std::make_unique<CountingObserver>(); EXPECT_FALSE(MemoryUsageMonitor::Instance().TimerIsActive()); @@ -47,7 +65,7 @@ } }; -TEST(MemoryUsageMonitorTest, RemoveObserverFromNotification) { +TEST_F(MemoryUsageMonitorTest, RemoveObserverFromNotification) { std::unique_ptr<OneShotObserver> observer1 = std::make_unique<OneShotObserver>(); std::unique_ptr<CountingObserver> observer2 =
diff --git a/third_party/blink/renderer/core/css/BUILD.gn b/third_party/blink/renderer/core/css/BUILD.gn index 07bac32..997ce670 100644 --- a/third_party/blink/renderer/core/css/BUILD.gn +++ b/third_party/blink/renderer/core/css/BUILD.gn
@@ -114,6 +114,7 @@ "css_media_rule.h", "css_namespace_rule.cc", "css_namespace_rule.h", + "css_origin_clean.h", "css_page_rule.cc", "css_page_rule.h", "css_paint_image_generator.cc",
diff --git a/third_party/blink/renderer/core/css/css_image_value.cc b/third_party/blink/renderer/core/css/css_image_value.cc index f0b8c04..fe4de29 100644 --- a/third_party/blink/renderer/core/css/css_image_value.cc +++ b/third_party/blink/renderer/core/css/css_image_value.cc
@@ -40,17 +40,21 @@ CSSImageValue::CSSImageValue(const AtomicString& raw_value, const KURL& url, const Referrer& referrer, - StyleImage* image) + StyleImage* image, + OriginClean origin_clean) : CSSValue(kImageClass), relative_url_(raw_value), referrer_(referrer), absolute_url_(url.GetString()), - cached_image_(image) {} + cached_image_(image), + origin_clean_(origin_clean) {} -CSSImageValue::CSSImageValue(const AtomicString& absolute_url) +CSSImageValue::CSSImageValue(const AtomicString& absolute_url, + OriginClean origin_clean) : CSSValue(kImageClass), relative_url_(absolute_url), - absolute_url_(absolute_url) {} + absolute_url_(absolute_url), + origin_clean_(OriginClean::kFalse) {} CSSImageValue::~CSSImageValue() = default; @@ -92,6 +96,9 @@ params.SetLazyImageDeferred(); } + if (origin_clean_ != OriginClean::kTrue) + params.SetFromOriginDirtyStyleSheet(true); + cached_image_ = MakeGarbageCollected<StyleFetchedImage>(document, params, is_lazily_loaded); }
diff --git a/third_party/blink/renderer/core/css/css_image_value.h b/third_party/blink/renderer/core/css/css_image_value.h index 347b3cd3..b8ab4d3 100644 --- a/third_party/blink/renderer/core/css/css_image_value.h +++ b/third_party/blink/renderer/core/css/css_image_value.h
@@ -23,6 +23,7 @@ #include "base/memory/scoped_refptr.h" #include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/core/css/css_origin_clean.h" #include "third_party/blink/renderer/core/css/css_value.h" #include "third_party/blink/renderer/platform/loader/fetch/cross_origin_attribute_value.h" #include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h" @@ -38,35 +39,43 @@ class CORE_EXPORT CSSImageValue : public CSSValue { public: - static CSSImageValue* Create(const KURL& url, StyleImage* image = nullptr) { - return Create(url.GetString(), url, Referrer(), image); + static CSSImageValue* Create(const KURL& url, + OriginClean origin_clean, + StyleImage* image = nullptr) { + return Create(url.GetString(), url, Referrer(), origin_clean, image); } static CSSImageValue* Create(const AtomicString& relative_url, const KURL& absolute_url, + OriginClean origin_clean, StyleImage* image = nullptr) { - return Create(relative_url, absolute_url, Referrer(), image); + return Create(relative_url, absolute_url, Referrer(), origin_clean, image); } static CSSImageValue* Create(const String& raw_value, const KURL& url, const Referrer& referrer, + OriginClean origin_clean, StyleImage* image = nullptr) { - return Create(AtomicString(raw_value), url, referrer, image); + return Create(AtomicString(raw_value), url, referrer, origin_clean, image); } static CSSImageValue* Create(const AtomicString& raw_value, const KURL& url, const Referrer& referrer, + OriginClean origin_clean, StyleImage* image = nullptr) { - return MakeGarbageCollected<CSSImageValue>(raw_value, url, referrer, image); + return MakeGarbageCollected<CSSImageValue>(raw_value, url, referrer, image, + origin_clean); } - static CSSImageValue* Create(const AtomicString& absolute_url) { - return MakeGarbageCollected<CSSImageValue>(absolute_url); + static CSSImageValue* Create(const AtomicString& absolute_url, + OriginClean origin_clean) { + return MakeGarbageCollected<CSSImageValue>(absolute_url, origin_clean); } CSSImageValue(const AtomicString& raw_value, const KURL&, const Referrer&, - StyleImage*); - CSSImageValue(const AtomicString& absolute_url); + StyleImage*, + OriginClean origin_clean); + CSSImageValue(const AtomicString& absolute_url, OriginClean origin_clean); ~CSSImageValue(); bool IsCachePending() const { return !cached_image_; } @@ -95,11 +104,12 @@ bool KnownToBeOpaque(const Document&, const ComputedStyle&) const; CSSImageValue* ValueWithURLMadeAbsolute() const { - return Create(KURL(absolute_url_), cached_image_.Get()); + return Create(KURL(absolute_url_), origin_clean_, cached_image_.Get()); } CSSImageValue* Clone() const { - return Create(relative_url_, KURL(absolute_url_), cached_image_.Get()); + return Create(relative_url_, KURL(absolute_url_), origin_clean_, + cached_image_.Get()); } void SetInitiator(const AtomicString& name) { initiator_name_ = name; } @@ -115,6 +125,10 @@ // Cached image data. mutable AtomicString absolute_url_; mutable Member<StyleImage> cached_image_; + + // Whether the stylesheet that requested this image is origin-clean: + // https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-origin-clean-flag + const OriginClean origin_clean_; }; template <>
diff --git a/third_party/blink/renderer/core/css/css_origin_clean.h b/third_party/blink/renderer/core/css/css_origin_clean.h new file mode 100644 index 0000000..a946833 --- /dev/null +++ b/third_party/blink/renderer/core/css/css_origin_clean.h
@@ -0,0 +1,11 @@ +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_ORIGIN_CLEAN_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_ORIGIN_CLEAN_H_ + +namespace blink { + +// https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-origin-clean-flag +enum class OriginClean { kFalse, kTrue }; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_ORIGIN_CLEAN_H_
diff --git a/third_party/blink/renderer/core/css/parser/css_parser_impl.cc b/third_party/blink/renderer/core/css/parser/css_parser_impl.cc index c9b448d..b19d984 100644 --- a/third_party/blink/renderer/core/css/parser/css_parser_impl.cc +++ b/third_party/blink/renderer/core/css/parser/css_parser_impl.cc
@@ -647,7 +647,8 @@ } return MakeGarbageCollected<StyleRuleImport>( - uri, MediaQueryParser::ParseMediaQuerySet(prelude)); + uri, MediaQueryParser::ParseMediaQuerySet(prelude), + context_->IsOriginClean() ? OriginClean::kTrue : OriginClean::kFalse); } StyleRuleNamespace* CSSParserImpl::ConsumeNamespaceRule(
diff --git a/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc b/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc index 1923178..9c17e8bf 100644 --- a/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc +++ b/third_party/blink/renderer/core/css/parser/css_property_parser_helpers.cc
@@ -1668,7 +1668,8 @@ const AtomicString& raw_value, const CSSParserContext* context) { CSSValue* image_value = CSSImageValue::Create( - raw_value, context->CompleteURL(raw_value), context->GetReferrer()); + raw_value, context->CompleteURL(raw_value), context->GetReferrer(), + context->IsOriginClean() ? OriginClean::kTrue : OriginClean::kFalse); return image_value; }
diff --git a/third_party/blink/renderer/core/css/style_rule_import.cc b/third_party/blink/renderer/core/css/style_rule_import.cc index 8c8944a..9be8d3cd 100644 --- a/third_party/blink/renderer/core/css/style_rule_import.cc +++ b/third_party/blink/renderer/core/css/style_rule_import.cc
@@ -34,13 +34,15 @@ namespace blink { StyleRuleImport::StyleRuleImport(const String& href, - scoped_refptr<MediaQuerySet> media) + scoped_refptr<MediaQuerySet> media, + OriginClean origin_clean) : StyleRuleBase(kImport), parent_style_sheet_(nullptr), style_sheet_client_(MakeGarbageCollected<ImportedStyleSheetClient>(this)), str_href_(href), media_queries_(media), - loading_(false) { + loading_(false), + origin_clean_(origin_clean) { if (!media_queries_) media_queries_ = MediaQuerySet::Create(String()); } @@ -133,6 +135,7 @@ options.initiator_info.name = fetch_initiator_type_names::kCSS; FetchParameters params(ResourceRequest(abs_url), options); params.SetCharset(parent_style_sheet_->Charset()); + params.SetFromOriginDirtyStyleSheet(origin_clean_ != OriginClean::kTrue); loading_ = true; DCHECK(!style_sheet_client_->GetResource()); CSSStyleSheetResource::Fetch(params, fetcher, style_sheet_client_);
diff --git a/third_party/blink/renderer/core/css/style_rule_import.h b/third_party/blink/renderer/core/css/style_rule_import.h index 2e86fa5b..cdfd0ef7 100644 --- a/third_party/blink/renderer/core/css/style_rule_import.h +++ b/third_party/blink/renderer/core/css/style_rule_import.h
@@ -22,6 +22,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_CSS_STYLE_RULE_IMPORT_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_STYLE_RULE_IMPORT_H_ +#include "third_party/blink/renderer/core/css/css_origin_clean.h" #include "third_party/blink/renderer/core/css/style_rule.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/loader/fetch/resource_client.h" @@ -36,7 +37,9 @@ USING_PRE_FINALIZER(StyleRuleImport, Dispose); public: - StyleRuleImport(const String& href, scoped_refptr<MediaQuerySet>); + StyleRuleImport(const String& href, + scoped_refptr<MediaQuerySet>, + OriginClean origin_clean); ~StyleRuleImport(); StyleSheetContents* ParentStyleSheet() const { return parent_style_sheet_; } @@ -97,6 +100,9 @@ scoped_refptr<MediaQuerySet> media_queries_; Member<StyleSheetContents> style_sheet_; bool loading_; + // Whether the style sheet that has this import rule is origin-clean: + // https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-origin-clean-flag + const OriginClean origin_clean_; }; template <>
diff --git a/third_party/blink/renderer/core/events/mouse_event.cc b/third_party/blink/renderer/core/events/mouse_event.cc index 9ad164b..5bd6207 100644 --- a/third_party/blink/renderer/core/events/mouse_event.cc +++ b/third_party/blink/renderer/core/events/mouse_event.cc
@@ -517,10 +517,17 @@ layer_location_ = view->DocumentToFrame(scaled_page_location); // FIXME: Does this differ from PaintLayer::ConvertToLayerCoords? - for (PaintLayer* layer = n->GetLayoutObject()->EnclosingLayer(); layer; - layer = layer->ContainingLayer()) { - layer_location_ -= DoubleSize(layer->Location().left.ToDouble(), - layer->Location().top.ToDouble()); + PaintLayer* layer = n->GetLayoutObject()->EnclosingLayer(); + while (layer) { + PhysicalOffset physical_offset = layer->Location(); + PaintLayer* containing_layer = layer->ContainingLayer(); + if (containing_layer) { + physical_offset -= + PhysicalOffset(containing_layer->ScrolledContentOffset()); + } + layer_location_ -= DoubleSize(physical_offset.left.ToDouble(), + physical_offset.top.ToDouble()); + layer = containing_layer; } if (inverse_zoom_factor != 1.0f) layer_location_.Scale(inverse_zoom_factor, inverse_zoom_factor);
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc index 0ed6f040..e9fda55 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -2156,13 +2156,17 @@ LocalFrame::NotifyUserActivation(GetFrame(), UserGestureToken::kNewGesture); } -void WebLocalFrameImpl::BlinkFeatureUsageReport(const std::set<int>& features) { +void WebLocalFrameImpl::BlinkFeatureUsageReport( + const std::set<blink::mojom::WebFeature>& features) { DCHECK(!features.empty()); // Assimilate all features used/performed by the browser into UseCounter. - for (int feature : features) { - UseCounter::Count(GetFrame()->GetDocument(), - static_cast<WebFeature>(feature)); - } + for (const auto& feature : features) + UseCounter::Count(GetFrame()->GetDocument(), feature); +} + +void WebLocalFrameImpl::BlinkFeatureUsageReport( + blink::mojom::WebFeature feature) { + UseCounter::Count(GetFrame()->GetDocument(), feature); } void WebLocalFrameImpl::MixedContentFound(
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h index 240cc16..15ed90d 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -268,7 +268,9 @@ bool IsLoading() const override; bool IsNavigationScheduledWithin(double interval) const override; void NotifyUserActivation() override; - void BlinkFeatureUsageReport(const std::set<int>& features) override; + void BlinkFeatureUsageReport( + const std::set<blink::mojom::WebFeature>& features) override; + void BlinkFeatureUsageReport(blink::mojom::WebFeature feature) override; void MixedContentFound(const WebURL& main_resource_url, const WebURL& mixed_content_url, mojom::RequestContextType,
diff --git a/third_party/blink/renderer/core/html/html_body_element.cc b/third_party/blink/renderer/core/html/html_body_element.cc index d25b5140..1250809 100644 --- a/third_party/blink/renderer/core/html/html_body_element.cc +++ b/third_party/blink/renderer/core/html/html_body_element.cc
@@ -65,7 +65,8 @@ CSSImageValue* image_value = CSSImageValue::Create(url, GetDocument().CompleteURL(url), Referrer(GetDocument().OutgoingReferrer(), - GetDocument().GetReferrerPolicy())); + GetDocument().GetReferrerPolicy()), + OriginClean::kTrue); image_value->SetInitiator(localName()); style->SetProperty( CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value));
diff --git a/third_party/blink/renderer/core/html/html_script_element.cc b/third_party/blink/renderer/core/html/html_script_element.cc index fbf1cfc..0807c984 100644 --- a/third_party/blink/renderer/core/html/html_script_element.cc +++ b/third_party/blink/renderer/core/html/html_script_element.cc
@@ -158,10 +158,6 @@ return FastHasAttribute(kAsyncAttr) || loader_->IsNonBlocking(); } -KURL HTMLScriptElement::Src() const { - return GetDocument().CompleteURL(SourceAttributeValue()); -} - String HTMLScriptElement::SourceAttributeValue() const { return getAttribute(kSrcAttr).GetString(); }
diff --git a/third_party/blink/renderer/core/html/html_script_element.h b/third_party/blink/renderer/core/html/html_script_element.h index 2a8c31b..ca7f9f5 100644 --- a/third_party/blink/renderer/core/html/html_script_element.h +++ b/third_party/blink/renderer/core/html/html_script_element.h
@@ -52,8 +52,6 @@ void setInnerText(const StringOrTrustedScript&, ExceptionState&) override; void setTextContent(const StringOrTrustedScript&, ExceptionState&) override; - KURL Src() const; - void setAsync(bool); bool async() const;
diff --git a/third_party/blink/renderer/core/html/html_table_element.cc b/third_party/blink/renderer/core/html/html_table_element.cc index 6e84aca..6eb0866 100644 --- a/third_party/blink/renderer/core/html/html_table_element.cc +++ b/third_party/blink/renderer/core/html/html_table_element.cc
@@ -329,7 +329,8 @@ CSSImageValue* image_value = CSSImageValue::Create(url, GetDocument().CompleteURL(url), Referrer(GetDocument().OutgoingReferrer(), - GetDocument().GetReferrerPolicy())); + GetDocument().GetReferrerPolicy()), + OriginClean::kTrue); style->SetProperty( CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value)); }
diff --git a/third_party/blink/renderer/core/html/html_table_part_element.cc b/third_party/blink/renderer/core/html/html_table_part_element.cc index d7e13ce..c5c813d 100644 --- a/third_party/blink/renderer/core/html/html_table_part_element.cc +++ b/third_party/blink/renderer/core/html/html_table_part_element.cc
@@ -63,7 +63,8 @@ CSSImageValue* image_value = CSSImageValue::Create(url, GetDocument().CompleteURL(url), Referrer(GetDocument().OutgoingReferrer(), - GetDocument().GetReferrerPolicy())); + GetDocument().GetReferrerPolicy()), + OriginClean::kTrue); style->SetProperty( CSSPropertyValue(GetCSSPropertyBackgroundImage(), *image_value)); }
diff --git a/third_party/blink/renderer/core/inspector/protocol_parser_test.cc b/third_party/blink/renderer/core/inspector/protocol_parser_test.cc index 259f6778..2f6d31b 100644 --- a/third_party/blink/renderer/core/inspector/protocol_parser_test.cc +++ b/third_party/blink/renderer/core/inspector/protocol_parser_test.cc
@@ -333,7 +333,7 @@ " \"S\":\"str\"\n" "}\n"); ASSERT_TRUE(root2.get()); - EXPECT_EQ(root->serializeToJSON(), root2->serializeToJSON()); + EXPECT_EQ(root->toJSONString(), root2->toJSONString()); root2 = ParseJSON( "{\r\n" @@ -342,7 +342,7 @@ " \"S\":\"str\"\r\n" "}\r\n"); ASSERT_TRUE(root2.get()); - EXPECT_EQ(root->serializeToJSON(), root2->serializeToJSON()); + EXPECT_EQ(root->toJSONString(), root2->toJSONString()); // Test nesting root = ParseJSON("{\"inner\":{\"array\":[true]},\"false\":false,\"d\":{}}");
diff --git a/third_party/blink/renderer/core/loader/idleness_detector.cc b/third_party/blink/renderer/core/loader/idleness_detector.cc index 709aecd..7855d10 100644 --- a/third_party/blink/renderer/core/loader/idleness_detector.cc +++ b/third_party/blink/renderer/core/loader/idleness_detector.cc
@@ -152,7 +152,6 @@ local_frame_->GetDocument()->GetResourceCoordinator()) { document_resource_coordinator->SetNetworkAlmostIdle(); } - local_frame_->GetDocument()->Fetcher()->OnNetworkQuiet(); if (WebServiceWorkerNetworkProvider* service_worker_network_provider = loader->GetServiceWorkerNetworkProvider()) { service_worker_network_provider->DispatchNetworkQuiet();
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc index d5dae2b..20ecd4ba 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.cc +++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -832,24 +832,16 @@ } if (PaintLayer* containing_layer = ContainingLayer()) { - if (containing_layer->GetLayoutObject().HasOverflowClip() && - !containing_layer->IsRootLayer()) { - // Subtract our container's scroll offset. - IntSize offset = - containing_layer->GetLayoutBox()->ScrolledContentOffset(); - local_point -= PhysicalOffset(offset); - } else { - auto& container = containing_layer->GetLayoutObject(); - if (GetLayoutObject().IsOutOfFlowPositioned() && - container.IsLayoutInline() && - container.CanContainOutOfFlowPositionedElement( - GetLayoutObject().StyleRef().GetPosition())) { - // Adjust offset for absolute under in-flow positioned inline. - PhysicalOffset offset = - ToLayoutInline(container).OffsetForInFlowPositionedInline( - ToLayoutBox(GetLayoutObject())); - local_point += offset; - } + auto& container = containing_layer->GetLayoutObject(); + if (GetLayoutObject().IsOutOfFlowPositioned() && + container.IsLayoutInline() && + container.CanContainOutOfFlowPositionedElement( + GetLayoutObject().StyleRef().GetPosition())) { + // Adjust offset for absolute under in-flow positioned inline. + PhysicalOffset offset = + ToLayoutInline(container).OffsetForInFlowPositionedInline( + ToLayoutBox(GetLayoutObject())); + local_point += offset; } } @@ -1575,6 +1567,7 @@ return nullptr; location += layer->Location(); + location -= PhysicalOffset(containing_layer->ScrolledContentOffset()); return containing_layer; } @@ -3276,15 +3269,10 @@ } } -PhysicalOffset PaintLayer::LocationInternal() const { - PhysicalOffset result = location_; - PaintLayer* containing_layer = ContainingLayer(); - if (containing_layer && containing_layer->IsRootLayer() && - containing_layer->GetLayoutObject().HasOverflowClip()) { - result -= PhysicalOffset( - containing_layer->GetLayoutBox()->ScrolledContentOffset()); - } - return result; +IntSize PaintLayer::ScrolledContentOffset() const { + if (GetLayoutObject().HasOverflowClip()) + return GetLayoutBox()->ScrolledContentOffset(); + return IntSize(); } PaintLayerClipper PaintLayer::Clipper(
diff --git a/third_party/blink/renderer/core/paint/paint_layer.h b/third_party/blink/renderer/core/paint/paint_layer.h index 1c727d4..31312c27 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.h +++ b/third_party/blink/renderer/core/paint/paint_layer.h
@@ -294,13 +294,17 @@ return curr; } + // The physical offset from this PaintLayer to its ContainingLayer. + // Does not include any scroll offset of the ContainingLayer. PhysicalOffset Location() const { #if DCHECK_IS_ON() DCHECK(!needs_position_update_); #endif - return LocationInternal(); + return location_; } + IntSize ScrolledContentOffset() const; + // FIXME: size() should DCHECK(!needs_position_update_) as well, but that // fails in some tests, for example, fast/repaint/clipped-relative.html. const LayoutSize& Size() const { return size_; } @@ -1262,8 +1266,6 @@ bool NeedsFilterReferenceBox() const; - PhysicalOffset LocationInternal() const; - AncestorDependentCompositingInputs& EnsureAncestorDependentCompositingInputs() const { if (!ancestor_dependent_compositing_inputs_) {
diff --git a/third_party/blink/renderer/core/paint/paint_layer_test.cc b/third_party/blink/renderer/core/paint/paint_layer_test.cc index af74551..ef79f94 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_test.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_test.cc
@@ -236,7 +236,9 @@ scroll_layer->GetScrollableArea()->SetScrollOffset(ScrollOffset(1000, 1000), kProgrammaticScroll); GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint(); - EXPECT_EQ(PhysicalOffset(-1000, -1000), content_layer->Location()); + EXPECT_EQ(PhysicalOffset(0, 0), content_layer->Location()); + EXPECT_EQ(IntSize(1000, 1000), + content_layer->ContainingLayer()->ScrolledContentOffset()); EXPECT_FALSE(content_layer->NeedsRepaint()); EXPECT_FALSE(scroll_layer->NeedsRepaint()); UpdateAllLifecyclePhasesForTest(); @@ -266,7 +268,10 @@ scroll_layer->GetScrollableArea()->SetScrollOffset(ScrollOffset(1000, 1000), kProgrammaticScroll); GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint(); - EXPECT_EQ(PhysicalOffset(-1000, -1000), content_layer->Location()); + EXPECT_EQ(PhysicalOffset(0, 0), content_layer->Location()); + EXPECT_EQ(IntSize(1000, 1000), + content_layer->ContainingLayer()->ScrolledContentOffset()); + EXPECT_TRUE(scroll_layer->NeedsRepaint()); EXPECT_FALSE(content_layer->NeedsRepaint()); UpdateAllLifecyclePhasesForTest(); @@ -1398,14 +1403,17 @@ EXPECT_EQ(container, span->Parent()); EXPECT_EQ(container, span->ContainingLayer()); - EXPECT_EQ(PhysicalOffset(100, -300), span->Location()); + EXPECT_EQ(PhysicalOffset(100, 100), span->Location()); + EXPECT_EQ(IntSize(0, 400), span->ContainingLayer()->ScrolledContentOffset()); if (RuntimeEnabledFeatures::LayoutNGEnabled()) { EXPECT_EQ(PhysicalOffset(50, 50), floating->Location()); EXPECT_EQ(PhysicalOffset(50, 50), floating->VisualOffsetFromAncestor(span)); EXPECT_EQ(PhysicalOffset(150, -250), floating->VisualOffsetFromAncestor(container)); } else { - EXPECT_EQ(PhysicalOffset(50, -350), floating->Location()); + EXPECT_EQ(PhysicalOffset(50, 50), floating->Location()); + EXPECT_EQ(IntSize(0, 400), + floating->ContainingLayer()->ScrolledContentOffset()); EXPECT_EQ(PhysicalOffset(-50, -50), floating->VisualOffsetFromAncestor(span)); EXPECT_EQ(PhysicalOffset(50, -350), @@ -1648,7 +1656,9 @@ EXPECT_EQ(columns, extra_layer->Parent()->Parent()); EXPECT_EQ(columns, extra_layer->ContainingLayer()->Parent()); - EXPECT_EQ(PhysicalOffset(-150, 50), spanner->Location()); + EXPECT_EQ(PhysicalOffset(50, 50), spanner->Location()); + EXPECT_EQ(IntSize(200, 0), + spanner->ContainingLayer()->ScrolledContentOffset()); EXPECT_EQ(PhysicalOffset(100, 100), extra_layer->Location()); // -60 = 2nd-column-x(40) - scroll-offset-x(200) + x-location(100) // 20 = y-location(100) - column-height(80)
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs index c81748a..129ab45 100644 --- a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs +++ b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/index.mjs
@@ -43,6 +43,9 @@ attributeChangedCallback(attrName, oldValue, newValue) { if (attrName == STATE_ATTR) { this[_track].value = newValue !== null; + // TODO(tkent): We should not add aria-checked attribute. + // https://github.com/WICG/aom/issues/127 + this.setAttribute('aria-checked', newValue !== null ? 'true' : 'false'); } } @@ -52,6 +55,12 @@ if (!this.hasAttribute('tabindex')) { this.setAttribute('tabindex', '0'); } + + // TODO(tkent): We should not add role attribute. + // https://github.com/WICG/aom/issues/127 + if (!this.hasAttribute('role')) { + this.setAttribute('role', 'switch'); + } } // TODO(tkent): Make this private. @@ -60,6 +69,8 @@ let root = this.attachShadow({mode: 'closed'}); this[_containerElement] = factory.createElement('span'); this[_containerElement].id = 'container'; + // Shadow elements should be invisible for a11y technologies. + this[_containerElement].setAttribute('aria-hidden', 'true'); root.appendChild(this[_containerElement]); this[_track] = new SwitchTrack(factory);
diff --git a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/style.mjs b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/style.mjs index 1664e86..4dea6e8 100644 --- a/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/style.mjs +++ b/third_party/blink/renderer/core/script/resources/layered_api/elements/switch/style.mjs
@@ -166,7 +166,7 @@ const CLASS_NAME = 'transitioning'; element.classList.add(CLASS_NAME); let durations = element.computedStyleMap().getAll('transition-duration'); - if (!durations.some(duration => duration.value >= 0)) { + if (!durations.some(duration => duration.value > 0)) { // If the element will have no transitions, we remove CLASS_NAME // immediately. element.classList.remove(CLASS_NAME); @@ -184,7 +184,10 @@ } }); let handleEndOrCancel = e => { - if (e.target === element && --element.runningTransitions === 0) { + // Need to check runningTransitions>0 due to superfluous transitioncancel + // events; crbug.com/979556. + if (e.target === element && element.runningTransitions > 0 && + --element.runningTransitions === 0) { element.classList.remove(CLASS_NAME); } };
diff --git a/third_party/blink/renderer/core/style/style_fetched_image.cc b/third_party/blink/renderer/core/style/style_fetched_image.cc index f6586b4..1f876087 100644 --- a/third_party/blink/renderer/core/style/style_fetched_image.cc +++ b/third_party/blink/renderer/core/style/style_fetched_image.cc
@@ -41,7 +41,9 @@ StyleFetchedImage::StyleFetchedImage(const Document& document, FetchParameters& params, bool is_lazyload_possibly_deferred) - : document_(&document), url_(params.Url()) { + : document_(&document), + url_(params.Url()), + origin_clean_(!params.IsFromOriginDirtyStyleSheet()) { is_image_resource_ = true; is_lazyload_possibly_deferred_ = is_lazyload_possibly_deferred; @@ -77,7 +79,9 @@ } CSSValue* StyleFetchedImage::CssValue() const { - return CSSImageValue::Create(url_, const_cast<StyleFetchedImage*>(this)); + return CSSImageValue::Create( + url_, origin_clean_ ? OriginClean::kTrue : OriginClean::kFalse, + const_cast<StyleFetchedImage*>(this)); } CSSValue* StyleFetchedImage::ComputedCSSValue() const {
diff --git a/third_party/blink/renderer/core/style/style_fetched_image.h b/third_party/blink/renderer/core/style/style_fetched_image.h index 6371282..c163ad2 100644 --- a/third_party/blink/renderer/core/style/style_fetched_image.h +++ b/third_party/blink/renderer/core/style/style_fetched_image.h
@@ -83,6 +83,7 @@ Member<ImageResourceContent> image_; Member<const Document> document_; const KURL url_; + const bool origin_clean_; }; template <>
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index cf6a62c..e97f718 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -725,7 +725,7 @@ void AXObjectCacheImpl::DeferTreeUpdateInternal(Node* node, base::OnceClosure callback) { tree_update_callback_queue_.push_back( - std::make_pair(WrapWeakPersistent(node), std::move(callback))); + MakeGarbageCollected<TreeUpdateParams>(node, std::move(callback))); } void AXObjectCacheImpl::DeferTreeUpdate( @@ -934,14 +934,14 @@ return; TreeUpdateCallbackQueue old_tree_update_callback_queue; tree_update_callback_queue_.swap(old_tree_update_callback_queue); - for (auto& pair : old_tree_update_callback_queue) { - Node* node = pair.first; + for (auto& tree_update : old_tree_update_callback_queue) { + Node* node = tree_update->node; if (!node) continue; - base::OnceClosure& callback = pair.second; + base::OnceClosure& callback = tree_update->callback; if (node->GetDocument() != document) { tree_update_callback_queue_.push_back( - std::make_pair(WrapWeakPersistent(node), std::move(callback))); + MakeGarbageCollected<TreeUpdateParams>(node, std::move(callback))); continue; } std::move(callback).Run(); @@ -949,10 +949,10 @@ } void AXObjectCacheImpl::PostNotificationsAfterLayout(Document* document) { - std::vector<AXEventParams> old_notifications_to_post; + HeapVector<Member<AXEventParams>> old_notifications_to_post; notifications_to_post_.swap(old_notifications_to_post); for (auto& params : old_notifications_to_post) { - AXObject* obj = params.target; + AXObject* obj = params->target; if (!obj || !obj->AXObjectID()) continue; @@ -960,10 +960,11 @@ if (obj->IsDetached()) continue; - ax::mojom::Event event_type = params.event_type; - ax::mojom::EventFrom event_from = params.event_from; + ax::mojom::Event event_type = params->event_type; + ax::mojom::EventFrom event_from = params->event_from; if (obj->GetDocument() != document) { - notifications_to_post_.push_back({obj, event_type, event_from}); + notifications_to_post_.push_back( + MakeGarbageCollected<AXEventParams>(obj, event_type, event_from)); continue; } @@ -1007,7 +1008,8 @@ return; modification_count_++; - notifications_to_post_.push_back({object, notification, ComputeEventFrom()}); + notifications_to_post_.push_back(MakeGarbageCollected<AXEventParams>( + object, notification, ComputeEventFrom())); } bool AXObjectCacheImpl::IsAriaOwned(const AXObject* object) const { @@ -1781,7 +1783,9 @@ visitor->Trace(node_object_mapping_); visitor->Trace(objects_); + visitor->Trace(notifications_to_post_); visitor->Trace(documents_); + visitor->Trace(tree_update_callback_queue_); AXObjectCache::Trace(visitor); }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h index b5fb09e..3eb549a47 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h
@@ -31,7 +31,6 @@ #include <memory> #include <utility> -#include <vector> #include "base/macros.h" #include "mojo/public/cpp/bindings/binding.h" @@ -44,6 +43,7 @@ #include "third_party/blink/renderer/modules/modules_export.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" +#include "third_party/blink/renderer/platform/wtf/vector.h" #include "ui/accessibility/ax_enums.mojom-blink.h" namespace blink { @@ -266,10 +266,25 @@ AXObject* CreateFromInlineTextBox(AbstractInlineTextBox*); private: - struct AXEventParams { - Persistent<AXObject> target; + struct AXEventParams : public GarbageCollectedFinalized<AXEventParams> { + AXEventParams(AXObject* target, + ax::mojom::Event event_type, + ax::mojom::EventFrom event_from) + : target(target), event_type(event_type), event_from(event_from) {} + Member<AXObject> target; ax::mojom::Event event_type; ax::mojom::EventFrom event_from; + + void Trace(Visitor* visitor) { visitor->Trace(target); } + }; + + struct TreeUpdateParams : public GarbageCollectedFinalized<TreeUpdateParams> { + TreeUpdateParams(Node* node, base::OnceClosure callback) + : node(node), callback(std::move(callback)) {} + WeakMember<Node> node; + base::OnceClosure callback; + + void Trace(Visitor* visitor) { visitor->Trace(node); } }; ax::mojom::EventFrom ComputeEventFrom(); @@ -299,7 +314,7 @@ bool has_been_disposed_ = false; #endif - std::vector<AXEventParams> notifications_to_post_; + HeapVector<Member<AXEventParams>> notifications_to_post_; void PostNotificationsAfterLayout(Document*); // ContextLifecycleObserver overrides. @@ -363,8 +378,7 @@ // The main document, plus any page popups. HeapHashSet<WeakMember<Document>> documents_; - typedef std::vector<std::pair<WeakPersistent<Node>, base::OnceClosure>> - TreeUpdateCallbackQueue; + typedef HeapVector<Member<TreeUpdateParams>> TreeUpdateCallbackQueue; TreeUpdateCallbackQueue tree_update_callback_queue_; bool is_handling_action_ = false;
diff --git a/third_party/blink/renderer/modules/accessibility/testing/accessibility_selection_test.cc b/third_party/blink/renderer/modules/accessibility/testing/accessibility_selection_test.cc index 6e22068..b632fed77 100644 --- a/third_party/blink/renderer/modules/accessibility/testing/accessibility_selection_test.cc +++ b/third_party/blink/renderer/modules/accessibility/testing/accessibility_selection_test.cc
@@ -6,7 +6,6 @@ #include <algorithm> #include <iterator> -#include <vector> #include "base/memory/scoped_refptr.h" #include "third_party/blink/renderer/core/dom/character_data.h" @@ -399,7 +398,7 @@ const String test_file = test_path + String::FromUTF8(kTestFileSuffix); scoped_refptr<SharedBuffer> test_file_buffer = ReadFromFile(test_file); - auto test_file_chars = test_file_buffer->CopyAs<std::vector<char>>(); + auto test_file_chars = test_file_buffer->CopyAs<Vector<char>>(); std::string test_file_contents; std::copy(test_file_chars.begin(), test_file_chars.end(), std::back_inserter(test_file_contents)); @@ -410,7 +409,7 @@ const String ax_file = test_path + String::FromUTF8(kAXTestExpectationSuffix); scoped_refptr<SharedBuffer> ax_file_buffer = ReadFromFile(ax_file); - auto ax_file_chars = ax_file_buffer->CopyAs<std::vector<char>>(); + auto ax_file_chars = ax_file_buffer->CopyAs<Vector<char>>(); std::string ax_file_contents; std::copy(ax_file_chars.begin(), ax_file_chars.end(), std::back_inserter(ax_file_contents));
diff --git a/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc b/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc index ebdb112..b59c1db5 100644 --- a/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc +++ b/third_party/blink/renderer/modules/websockets/dom_websocket_test.cc
@@ -55,14 +55,6 @@ void Send(scoped_refptr<BlobDataHandle> handle) override { SendMock(handle.get()); } - MOCK_METHOD1(SendTextAsCharVectorMock, void(Vector<char>*)); - void SendTextAsCharVector(std::unique_ptr<Vector<char>> vector) override { - SendTextAsCharVectorMock(vector.get()); - } - MOCK_METHOD1(SendBinaryAsCharVectorMock, void(Vector<char>*)); - void SendBinaryAsCharVector(std::unique_ptr<Vector<char>> vector) override { - SendBinaryAsCharVectorMock(vector.get()); - } MOCK_CONST_METHOD0(BufferedAmount, unsigned()); MOCK_METHOD2(Close, void(int, const String&)); MOCK_METHOD3(FailMock,
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel.h b/third_party/blink/renderer/modules/websockets/websocket_channel.h index 6a8d6948..dee6ce1 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel.h +++ b/third_party/blink/renderer/modules/websockets/websocket_channel.h
@@ -75,8 +75,6 @@ unsigned byte_offset, unsigned byte_length) = 0; virtual void Send(scoped_refptr<BlobDataHandle>) = 0; - virtual void SendTextAsCharVector(std::unique_ptr<Vector<char>>) = 0; - virtual void SendBinaryAsCharVector(std::unique_ptr<Vector<char>>) = 0; // Do not call |Send| after calling this method. virtual void Close(int code, const String& reason) = 0;
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc index 1cfe066d..7eef7d8 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -107,8 +107,6 @@ explicit Message(const std::string&); explicit Message(scoped_refptr<BlobDataHandle>); explicit Message(DOMArrayBuffer*); - // For WorkerWebSocketChannel - explicit Message(std::unique_ptr<Vector<char>>, MessageType); // Close message Message(uint16_t code, const String& reason); @@ -119,7 +117,6 @@ std::string text; scoped_refptr<BlobDataHandle> blob_data_handle; Member<DOMArrayBuffer> array_buffer; - std::unique_ptr<Vector<char>> vector_data; uint16_t code; String reason; }; @@ -337,32 +334,6 @@ ProcessSendQueue(); } -void WebSocketChannelImpl::SendTextAsCharVector( - std::unique_ptr<Vector<char>> data) { - NETWORK_DVLOG(1) << this << " SendTextAsCharVector(" - << static_cast<void*>(data.get()) << ", " << data->size() - << ")"; - probe::DidSendWebSocketMessage(execution_context_, identifier_, - WebSocketOpCode::kOpCodeText, true, - data->data(), data->size()); - messages_.push_back(MakeGarbageCollected<Message>( - std::move(data), kMessageTypeTextAsCharVector)); - ProcessSendQueue(); -} - -void WebSocketChannelImpl::SendBinaryAsCharVector( - std::unique_ptr<Vector<char>> data) { - NETWORK_DVLOG(1) << this << " SendBinaryAsCharVector(" - << static_cast<void*>(data.get()) << ", " << data->size() - << ")"; - probe::DidSendWebSocketMessage(execution_context_, identifier_, - WebSocketOpCode::kOpCodeBinary, true, - data->data(), data->size()); - messages_.push_back(MakeGarbageCollected<Message>( - std::move(data), kMessageTypeBinaryAsCharVector)); - ProcessSendQueue(); -} - void WebSocketChannelImpl::Close(int code, const String& reason) { NETWORK_DVLOG(1) << this << " Close(" << code << ", " << reason << ")"; DCHECK(handle_); @@ -426,14 +397,6 @@ WebSocketChannelImpl::Message::Message(DOMArrayBuffer* array_buffer) : type(kMessageTypeArrayBuffer), array_buffer(array_buffer) {} -WebSocketChannelImpl::Message::Message( - std::unique_ptr<Vector<char>> vector_data, - MessageType type) - : type(type), vector_data(std::move(vector_data)) { - DCHECK(type == kMessageTypeTextAsCharVector || - type == kMessageTypeBinaryAsCharVector); -} - WebSocketChannelImpl::Message::Message(uint16_t code, const String& reason) : type(kMessageTypeClose), code(code), reason(reason) {} @@ -494,18 +457,6 @@ message->array_buffer->ByteLength(), &consumed_buffered_amount); break; - case kMessageTypeTextAsCharVector: - CHECK(message->vector_data); - SendInternal(WebSocketHandle::kMessageTypeText, - message->vector_data->data(), message->vector_data->size(), - &consumed_buffered_amount); - break; - case kMessageTypeBinaryAsCharVector: - CHECK(message->vector_data); - SendInternal(WebSocketHandle::kMessageTypeBinary, - message->vector_data->data(), message->vector_data->size(), - &consumed_buffered_amount); - break; case kMessageTypeClose: { // No message should be sent from now on. DCHECK_EQ(messages_.size(), 1u);
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h index 1c6830d..09f1222 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h
@@ -95,8 +95,6 @@ unsigned byte_offset, unsigned byte_length) override; void Send(scoped_refptr<BlobDataHandle>) override; - void SendTextAsCharVector(std::unique_ptr<Vector<char>> data) override; - void SendBinaryAsCharVector(std::unique_ptr<Vector<char>> data) override; // Start closing handshake. Use the CloseEventCodeNotSpecified for the code // argument to omit payload. void Close(int code, const String& reason) override; @@ -174,8 +172,6 @@ kMessageTypeText, kMessageTypeBlob, kMessageTypeArrayBuffer, - kMessageTypeTextAsCharVector, - kMessageTypeBinaryAsCharVector, kMessageTypeClose, };
diff --git a/third_party/blink/renderer/modules/websockets/websocket_channel_impl_test.cc b/third_party/blink/renderer/modules/websockets/websocket_channel_impl_test.cc index fb2d73e..e9330ebc 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl_test.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl_test.cc
@@ -300,126 +300,6 @@ ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - Vector<char> foo_vector; - foo_vector.Append("foo", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(foo_vector)); - - EXPECT_EQ(3ul, sum_of_consumed_buffered_amount_); -} - -TEST_F(WebSocketChannelImplTest, sendBinaryInVectorWithNullBytes) { - Connect(); - { - InSequence s; - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("\0ar", 3), 3)); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("b\0z", 3), 3)); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("qu\0", 3), 3)); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("\0\0\0", 3), 3)); - } - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - - { - Vector<char> v; - v.Append("\0ar", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - } - { - Vector<char> v; - v.Append("b\0z", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - } - { - Vector<char> v; - v.Append("qu\0", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - } - { - Vector<char> v; - v.Append("\0\0\0", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - } - - EXPECT_EQ(12ul, sum_of_consumed_buffered_amount_); -} - -TEST_F(WebSocketChannelImplTest, sendBinaryInVectorNonLatin1UTF8) { - Connect(); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("\xe7\x8b\x90", 3), 3)); - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - - Vector<char> v; - v.Append("\xe7\x8b\x90", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - - EXPECT_EQ(3ul, sum_of_consumed_buffered_amount_); -} - -TEST_F(WebSocketChannelImplTest, sendBinaryInVectorNonUTF8) { - Connect(); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("\x80\xff\xe7", 3), 3)); - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - - Vector<char> v; - v.Append("\x80\xff\xe7", 3); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - - EXPECT_EQ(3ul, sum_of_consumed_buffered_amount_); -} - -TEST_F(WebSocketChannelImplTest, sendBinaryInVectorNonLatin1UTF8Continuation) { - Connect(); - Checkpoint checkpoint; - { - InSequence s; - EXPECT_CALL(*Handle(), Send(false, WebSocketHandle::kMessageTypeBinary, - MemEq("\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7" - "\x8b\x90\xe7\x8b\x90\xe7", - 16), - 16)); - EXPECT_CALL(checkpoint, Call(1)); - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeContinuation, - MemEq("\x8b\x90", 2), 2)); - } - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - - Vector<char> v; - v.Append( - "\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b\x90\xe7\x8b" - "\x90", - 18); - Channel()->SendBinaryAsCharVector(std::make_unique<Vector<char>>(v)); - checkpoint.Call(1); - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - - EXPECT_EQ(18ul, sum_of_consumed_buffered_amount_); -} - -TEST_F(WebSocketChannelImplTest, sendBinaryInArrayBuffer) { - Connect(); - { - InSequence s; - EXPECT_CALL(*Handle(), Send(true, WebSocketHandle::kMessageTypeBinary, - MemEq("foo", 3), 3)); - } - - ChannelImpl()->AddSendFlowControlQuota(Handle(), 16); - EXPECT_CALL(*ChannelClient(), DidConsumeBufferedAmount(_)).Times(AnyNumber()); - DOMArrayBuffer* foo_buffer = DOMArrayBuffer::Create("foo", 3); Channel()->Send(*foo_buffer, 0, 3);
diff --git a/third_party/blink/renderer/platform/exported/web_url_request.cc b/third_party/blink/renderer/platform/exported/web_url_request.cc index aceed95..2f47655e 100644 --- a/third_party/blink/renderer/platform/exported/web_url_request.cc +++ b/third_party/blink/renderer/platform/exported/web_url_request.cc
@@ -492,6 +492,10 @@ return resource_request_->GetDevToolsId(); } +bool WebURLRequest::IsFromOriginDirtyStyleSheet() const { + return resource_request_->IsFromOriginDirtyStyleSheet(); +} + WebURLRequest::WebURLRequest(ResourceRequest& r) : resource_request_(&r) {} } // namespace blink
diff --git a/third_party/blink/renderer/platform/heap/heap_test.cc b/third_party/blink/renderer/platform/heap/heap_test.cc index aa7010bf..7bfe3b7 100644 --- a/third_party/blink/renderer/platform/heap/heap_test.cc +++ b/third_party/blink/renderer/platform/heap/heap_test.cc
@@ -41,6 +41,7 @@ #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/platform/platform.h" +#include "third_party/blink/renderer/platform/bindings/buildflags.h" #include "third_party/blink/renderer/platform/heap/address_cache.h" #include "third_party/blink/renderer/platform/heap/handle.h" #include "third_party/blink/renderer/platform/heap/heap.h" @@ -155,6 +156,9 @@ struct SameSizeAsPersistent { void* pointer_[4]; +#if BUILDFLAG(RAW_HEAP_SNAPSHOTS) + PersistentLocation location; +#endif // BUILDFLAG(RAW_HEAP_SNAPSHOTS) }; static_assert(sizeof(Persistent<IntWrapper>) <= sizeof(SameSizeAsPersistent),
diff --git a/third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h b/third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h index 5fcbe87..227c5191c 100644 --- a/third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h +++ b/third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h
@@ -193,6 +193,14 @@ // method sets image_request_optimization_ to the appropriate value. void SetAllowImagePlaceholder(); + // See documentation in blink::ResourceRequest. + bool IsFromOriginDirtyStyleSheet() const { + return is_from_origin_dirty_style_sheet_; + } + void SetFromOriginDirtyStyleSheet(bool dirty) { + is_from_origin_dirty_style_sheet_ = dirty; + } + private: ResourceRequest resource_request_; // |decoder_options_|'s ContentType is set to |kPlainTextContent| in @@ -206,6 +214,7 @@ ClientHintsPreferences client_hint_preferences_; ImageRequestOptimization image_request_optimization_; bool is_stale_revalidation_ = false; + bool is_from_origin_dirty_style_sheet_ = false; }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc index 1663ade..c459e1f3e 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
@@ -925,6 +925,8 @@ uint64_t identifier = CreateUniqueIdentifier(); ResourceRequest& resource_request = params.MutableResourceRequest(); resource_request.SetInspectorId(identifier); + resource_request.SetFromOriginDirtyStyleSheet( + params.IsFromOriginDirtyStyleSheet()); TRACE_EVENT_NESTABLE_ASYNC_BEGIN1( TRACE_DISABLED_BY_DEFAULT("network"), "ResourceLoad", TRACE_ID_WITH_SCOPE("BlinkResourceID", TRACE_ID_LOCAL(identifier)), @@ -2007,10 +2009,6 @@ return MemoryCache::DefaultCacheIdentifier(); } -void ResourceFetcher::OnNetworkQuiet() { - scheduler_->OnNetworkQuiet(); -} - void ResourceFetcher::EmulateLoadStartedForInspector( Resource* resource, const KURL& url,
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h index 0702bdc..7cb73749 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
@@ -232,7 +232,6 @@ void RemovePreload(Resource*); void LoosenLoadThrottlingPolicy() { scheduler_->LoosenThrottlingPolicy(); } - void OnNetworkQuiet(); // Workaround for https://crbug.com/666214. // TODO(hiroshige): Remove this hack.
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.cc b/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.cc index 15e8957f..ed6280bd 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.cc
@@ -40,12 +40,6 @@ constexpr size_t kOutstandingLimitForBackgroundMainFrameDefault = 3u; constexpr size_t kOutstandingLimitForBackgroundSubFrameDefault = 2u; -// Maximum request count that request count metrics assume. -constexpr base::HistogramBase::Sample kMaximumReportSize10K = 10000; - -// Bucket count for metrics. -constexpr int32_t kReportBucketCount = 25; - constexpr char kRendererSideResourceScheduler[] = "RendererSideResourceScheduler"; @@ -125,7 +119,6 @@ public: explicit TrafficMonitor( const DetachableResourceFetcherProperties& resource_fetcher_properties); - ~TrafficMonitor(); // Notified when the ThrottlingState is changed. void OnLifecycleStateChanged(scheduler::SchedulingLifecycleState); @@ -143,10 +136,6 @@ scheduler::SchedulingLifecycleState current_state_ = scheduler::SchedulingLifecycleState::kStopped; - uint32_t total_throttled_request_count_ = 0; - uint32_t total_not_throttled_request_count_ = 0; - bool report_all_is_called_ = false; - scheduler::AggregatedMetricReporter<scheduler::FrameStatus, int64_t> traffic_kilobytes_per_frame_status_; scheduler::AggregatedMetricReporter<scheduler::FrameStatus, int64_t> @@ -163,10 +152,6 @@ "Blink.ResourceLoadScheduler.DecodedBytes.KBPerFrameStatus", &TakeWholeKilobytes) {} -ResourceLoadScheduler::TrafficMonitor::~TrafficMonitor() { - ReportAll(); -} - void ResourceLoadScheduler::TrafficMonitor::OnLifecycleStateChanged( scheduler::SchedulingLifecycleState state) { current_state_ = state; @@ -194,7 +179,6 @@ request_count_by_circumstance.Count( ToSample(ReportCircumstance::kSubframeThrottled)); } - total_throttled_request_count_++; break; case scheduler::SchedulingLifecycleState::kNotThrottled: if (resource_fetcher_properties_->IsMainFrame()) { @@ -204,7 +188,6 @@ request_count_by_circumstance.Count( ToSample(ReportCircumstance::kSubframeNotThrottled)); } - total_not_throttled_request_count_++; break; case scheduler::SchedulingLifecycleState::kStopped: break; @@ -224,51 +207,6 @@ } } -void ResourceLoadScheduler::TrafficMonitor::ReportAll() { - // Currently we only care about stats from frames. - if (!IsMainThread()) - return; - - // Blink has several cases to create DocumentLoader not for an actual page - // load use. I.e., per a XMLHttpRequest in "document" type response. - // We just ignore such uninteresting cases in following metrics. - if (!total_throttled_request_count_ && !total_not_throttled_request_count_) - return; - - if (report_all_is_called_) - return; - report_all_is_called_ = true; - - DEFINE_STATIC_LOCAL( - CustomCountHistogram, main_frame_total_throttled_request_count, - ("Blink.ResourceLoadScheduler.TotalRequestCount.MainframeThrottled", 0, - kMaximumReportSize10K, kReportBucketCount)); - DEFINE_STATIC_LOCAL( - CustomCountHistogram, main_frame_total_not_throttled_request_count, - ("Blink.ResourceLoadScheduler.TotalRequestCount.MainframeNotThrottled", 0, - kMaximumReportSize10K, kReportBucketCount)); - DEFINE_STATIC_LOCAL( - CustomCountHistogram, sub_frame_total_throttled_request_count, - ("Blink.ResourceLoadScheduler.TotalRequestCount.SubframeThrottled", 0, - kMaximumReportSize10K, kReportBucketCount)); - DEFINE_STATIC_LOCAL( - CustomCountHistogram, sub_frame_total_not_throttled_request_count, - ("Blink.ResourceLoadScheduler.TotalRequestCount.SubframeNotThrottled", 0, - kMaximumReportSize10K, kReportBucketCount)); - - if (resource_fetcher_properties_->IsMainFrame()) { - main_frame_total_throttled_request_count.Count( - total_throttled_request_count_); - main_frame_total_not_throttled_request_count.Count( - total_not_throttled_request_count_); - } else { - sub_frame_total_throttled_request_count.Count( - total_throttled_request_count_); - sub_frame_total_not_throttled_request_count.Count( - total_not_throttled_request_count_); - } -} - constexpr ResourceLoadScheduler::ClientId ResourceLoadScheduler::kInvalidClientId; @@ -425,13 +363,6 @@ MaybeRun(); } -void ResourceLoadScheduler::OnNetworkQuiet() { - DCHECK(IsMainThread()); - - // Flush out all traffic reports here for safety. - traffic_monitor_->ReportAll(); -} - bool ResourceLoadScheduler::IsClientDelayable(const ClientIdWithPriority& info, ThrottleOption option) const { const bool throttleable = option == ThrottleOption::kThrottleable &&
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.h b/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.h index f56a3156..c6c7b68 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_load_scheduler.h
@@ -199,8 +199,6 @@ } void SetOutstandingLimitForTesting(size_t tight_limit, size_t normal_limit); - void OnNetworkQuiet(); - // FrameScheduler::Observer overrides: void OnLifecycleStateChanged(scheduler::SchedulingLifecycleState) override;
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_request.cc b/third_party/blink/renderer/platform/loader/fetch/resource_request.cc index 836744d..187e0e7 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_request.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_request.cc
@@ -129,6 +129,7 @@ request->SetPurposeHeader(GetPurposeHeader()); request->SetUkmSourceId(GetUkmSourceId()); request->SetInspectorId(InspectorId()); + request->SetFromOriginDirtyStyleSheet(IsFromOriginDirtyStyleSheet()); return request; }
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_request.h b/third_party/blink/renderer/platform/loader/fetch/resource_request.h index 0cc04b6..45814eb 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_request.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_request.h
@@ -428,6 +428,18 @@ void SetInspectorId(uint64_t inspector_id) { inspector_id_ = inspector_id; } uint64_t InspectorId() const { return inspector_id_; } + // Temporary for metrics. True if the request was initiated by a stylesheet + // that is not origin-clean: + // https://drafts.csswg.org/cssom-1/#concept-css-style-sheet-origin-clean-flag + // + // TODO(crbug.com/898497): Remove this when there is enough data. + bool IsFromOriginDirtyStyleSheet() const { + return is_from_origin_dirty_style_sheet_; + } + void SetFromOriginDirtyStyleSheet(bool dirty) { + is_from_origin_dirty_style_sheet_ = dirty; + } + private: using SharableExtraData = base::RefCountedData<std::unique_ptr<WebURLRequest::ExtraData>>; @@ -510,6 +522,8 @@ base::UnguessableToken fetch_window_id_; uint64_t inspector_id_ = 0; + + bool is_from_origin_dirty_style_sheet_ = false; }; } // namespace blink
diff --git a/third_party/blink/tools/blinkpy/common/path_finder.py b/third_party/blink/tools/blinkpy/common/path_finder.py index 2989cb2..04feb3af 100644 --- a/third_party/blink/tools/blinkpy/common/path_finder.py +++ b/third_party/blink/tools/blinkpy/common/path_finder.py
@@ -45,7 +45,7 @@ def add_build_scripts_dir_to_sys_path(): - path_to_build_scripts = os.path.join(get_source_dir(), 'build', 'scripts') + path_to_build_scripts = get_build_scripts_dir() if path_to_build_scripts not in sys.path: sys.path.insert(0, path_to_build_scripts) @@ -95,6 +95,10 @@ return os.path.join(get_chromium_src_dir(), 'third_party', 'blink', 'tools') +def get_build_scripts_dir(): + return os.path.join(get_source_dir(), 'build', 'scripts') + + def add_blink_tools_dir_to_sys_path(): path = get_blink_tools_dir() if path not in sys.path:
diff --git a/third_party/blink/tools/run_bindings_tests.py b/third_party/blink/tools/run_bindings_tests.py index 18835d7..9bbac44 100755 --- a/third_party/blink/tools/run_bindings_tests.py +++ b/third_party/blink/tools/run_bindings_tests.py
@@ -71,7 +71,10 @@ return argument_parser.exit_status args = runner.args - args.top_level_dir = path_finder.get_bindings_scripts_dir() + args.top_level_dirs = [ + path_finder.get_bindings_scripts_dir(), + path_finder.get_build_scripts_dir(), + ] if not args.skip_unit_tests: return_code, _, _ = runner.run() if return_code != 0:
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 9d2a22c4..0decafd 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -287,6 +287,9 @@ crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/overflow/composited-scroll-with-fractional-translation.html [ Failure ] crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/video/video-controls-layer-creation-squashing.html [ Failure ] +# Broken pre-BGPT after removing tiled masks code. +crbug.com/979679 virtual/disable-blink-gen-property-trees/compositing/masks/broken-mask.html [ Failure ] + # These fail when device_scale_factor is changed, but only for anti-aliasing: crbug.com/968791 virtual/scalefactor200/css3/filters/effect-blur-hw.html [ Failure ] crbug.com/968791 virtual/scalefactor200/css3/filters/filterRegions.html [ Failure ] @@ -3192,6 +3195,83 @@ crbug.com/968164 external/wpt/css/css-ui/webkit-appearance-menulist-button-001.html [ Failure ] # ====== New tests from wpt-importer added here ====== +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unsafe-url/attr-referrer/same-origin/http-http/img-tag/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Mac10.12 ] external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-cues-missed.html [ Timeout ] +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unset-referrer-policy/attr-referrer/cross-origin/http-http/img-tag/swap-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unsafe-url/http-rp/same-origin/http-http/img-tag/keep-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/cross-origin/http-http/img-tag/keep-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unset-referrer-policy/meta-referrer/cross-origin/http-http/img-tag/no-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Win7 ] external/wpt/referrer-policy/unset-referrer-policy/http-rp/cross-origin/http-http/img-tag/keep-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/iframe-tag/no-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/no-redirect/same-origin-upgrade.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/redirect/redirect-origin.any.worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-https/a-tag/no-redirect/upgrade-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/fetch-request/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/headers/headers-basic.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/fetch-request/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-https/script-tag/swap-origin-redirect/upgrade-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/xhr-request/swap-origin-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/abort/cache.https.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/cross-origin/http-http/xhr-request/keep-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/css-integration/image/internal-stylesheet.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/policies/referrer-origin-worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-https/xhr-request/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/xhr-request/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/idl.any.serviceworker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/xhr-request/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/xhr-request/swap-origin-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/scheme-data.any.worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/policies/referrer-unsafe-url.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/fetch-request/swap-origin-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/cross-origin/http-http/iframe-tag/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-https/img-tag/swap-origin-redirect/upgrade-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/script-tag/swap-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/policies/referrer-no-referrer-worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/sec-metadata/iframe.tentative.https.sub.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/css-integration/font-face/internal-stylesheet.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/iframe-tag/swap-origin-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-https/a-tag/no-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/cross-origin/http-https/img-tag/keep-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-https/xhr-request/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/at-property/external/wpt/css/css-properties-values-api/registered-property-cssom.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/cors-rfc1918/idlharness.tentative.any.serviceworker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/range/sw.https.window.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/a-tag/no-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/corb/script-html-correctly-labeled.tentative.sub.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-https/script-tag/keep-origin-redirect/same-origin-upgrade.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/response/response-stream-with-broken-then.any.worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/fetch-request/no-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-https/img-tag/no-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/worker-request/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-https/img-tag/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-http/module-worker/keep-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/xhr-request/no-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/redirect/redirect-location-escape.tentative.any.worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/cors/cors-no-preflight.any.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-https/iframe-tag/keep-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/integrity.sub.any.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/iframe-tag/keep-origin-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/referrer.any.worker.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/attr-referrer/same-origin/http-http/script-tag/no-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-https/xhr-request/no-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/fetch-request/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/fetch-request/swap-origin-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/attr-referrer/cross-origin/http-http/img-tag/swap-origin-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/cross-origin/http-http/iframe-tag/keep-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/same-origin/http-http/iframe-tag/swap-origin-redirect/same-origin-insecure.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/meta-referrer/cross-origin/http-http/fetch-request/swap-origin-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/cross-origin/http-http/img-tag/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/policies/referrer-no-referrer.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-https/img-tag/keep-origin-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/meta-referrer/same-origin/http-https/iframe-tag/swap-origin-redirect/upgrade-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/api/basic/header-value-null-byte.any.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/a-tag/no-redirect/insecure-protocol.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/origin-when-cross-origin/attr-referrer/cross-origin/http-http/img-tag/no-redirect/cross-origin.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/attr-referrer/same-origin/http-https/script-tag/swap-origin-redirect/generic.http.html [ Timeout ] +crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-https/img-tag/swap-origin-redirect/upgrade-protocol.http.html [ Timeout ] crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/meta-referrer/same-origin/http-http/worker-request/keep-origin-redirect/generic.http.html [ Timeout ] crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/referrer-policy/no-referrer/http-rp/same-origin/http-http/module-worker/no-redirect/generic.http.html [ Timeout ] crbug.com/626703 [ Retina ] virtual/blink-cors/external/wpt/fetch/cross-origin-resource-policy/fetch.https.any.worker.html [ Timeout ] @@ -4536,9 +4616,10 @@ crbug.com/835717 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-in-sandboxed-iframe-by-csp-fetch-event.https.html [ Skip ] # This is crashing because of DCHECK. crbug.com/835717 virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/dedicated-worker-service-worker-interception.https.html [ Skip ] -# These are timing out. -crbug.com/835717 virtual/omt-worker-fetch/external/wpt/content-security-policy/inside-worker/dedicated-script.html [ Skip ] -crbug.com/835717 virtual/omt-worker-fetch/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html [ Skip ] +# These are timing out because filesystem: URL is not supported yet with +# PlzDedicatedWorker. +crbug.com/980451 virtual/omt-worker-fetch/external/wpt/content-security-policy/inside-worker/dedicated-script.html [ Skip ] +crbug.com/980451 virtual/omt-worker-fetch/external/wpt/content-security-policy/inside-worker/dedicated-inheritance.html [ Skip ] # This fails because AllowedByNoSniff::MimeTypeAsScript() blocks the nested worker's # worker script, because the script url has a .html file extension.
diff --git a/third_party/blink/web_tests/WebDriverExpectations b/third_party/blink/web_tests/WebDriverExpectations index c63d766c..75b416a 100644 --- a/third_party/blink/web_tests/WebDriverExpectations +++ b/third_party/blink/web_tests/WebDriverExpectations
@@ -52,6 +52,23 @@ crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/perform_actions/user_prompts.py>>test_dismiss[capabilities0-alert-None] [ Failure Pass ] crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/set_timeouts/user_prompts.py>>test_accept_and_notify[capabilities0-alert] [ Failure Pass ] crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/set_window_rect/user_prompts.py>>test_ignore[capabilities0-alert] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/click.py>>test_no_browsing_context [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/click.py>>test_null_response_value [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/navigate.py>>test_link_closes_window [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/navigate.py>>test_link_hash [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/navigate.py>>test_link_unload_event [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/navigate.py>>test_multi_line_link [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/navigate.py>>test_numbers_link [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[1] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[2] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[3] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[4] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[5] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[6] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[7] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[8] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_partially_visible_does_not_scroll[9] [ Failure Pass ] +crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/element_click/scroll_into_view.py>>test_scroll_into_view [ Failure Pass ] # ====== New tests from wpt-importer added here ====== crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/switch_to_window/alerts.py>>test_retain_tab_modal_status [ Failure ] crbug.com/626703 [ Linux ] external/wpt/webdriver/tests/minimize_window/minimize.py>>test_fully_exit_fullscreen [ Failure ]
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json index 89802b82..7c18709 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
@@ -60095,6 +60095,54 @@ {} ] ], + "css/css-pseudo/first-line-change-inline-color-nested.html": [ + [ + "css/css-pseudo/first-line-change-inline-color-nested.html", + [ + [ + "/css/css-pseudo/first-line-change-inline-color-nested-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-pseudo/first-line-change-inline-color.html": [ + [ + "css/css-pseudo/first-line-change-inline-color.html", + [ + [ + "/css/css-pseudo/first-line-change-inline-color-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-pseudo/first-line-on-ancestor-block.html": [ + [ + "css/css-pseudo/first-line-on-ancestor-block.html", + [ + [ + "/css/css-pseudo/first-line-on-ancestor-block-ref.html", + "==" + ] + ], + {} + ] + ], + "css/css-pseudo/first-line-with-out-of-flow.html": [ + [ + "css/css-pseudo/first-line-with-out-of-flow.html", + [ + [ + "/css/css-pseudo/first-line-with-out-of-flow-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-pseudo/marker-and-other-pseudo-elements.html": [ [ "css/css-pseudo/marker-and-other-pseudo-elements.html", @@ -138632,6 +138680,18 @@ "css/css-pseudo/first-line-and-placeholder-ref.html": [ [] ], + "css/css-pseudo/first-line-change-inline-color-nested-ref.html": [ + [] + ], + "css/css-pseudo/first-line-change-inline-color-ref.html": [ + [] + ], + "css/css-pseudo/first-line-on-ancestor-block-ref.html": [ + [] + ], + "css/css-pseudo/first-line-with-out-of-flow-ref.html": [ + [] + ], "css/css-pseudo/idlharness-expected.txt": [ [] ], @@ -145880,6 +145940,9 @@ "css/cssom/CSS-expected.txt": [ [] ], + "css/cssom/CSSGroupingRule-insertRule-expected.txt": [ + [] + ], "css/cssom/CSSKeyframesRule-expected.txt": [ [] ], @@ -166454,9 +166517,6 @@ "service-workers/service-worker/resources/worker-fetching-cross-origin.js": [ [] ], - "service-workers/service-worker/resources/worker-interception-iframe.https.html": [ - [] - ], "service-workers/service-worker/resources/worker-interception-redirect-serviceworker.js": [ [] ], @@ -196894,6 +196954,12 @@ {} ] ], + "css/CSS2/normal-flow/auto-margins-root-element.html": [ + [ + "css/CSS2/normal-flow/auto-margins-root-element.html", + {} + ] + ], "css/CSS2/normal-flow/containing-block-percent-margin-bottom.html": [ [ "css/CSS2/normal-flow/containing-block-percent-margin-bottom.html", @@ -210132,6 +210198,12 @@ {} ] ], + "css/css-ui/text-overflow-ellipsis-width-001.html": [ + [ + "css/css-ui/text-overflow-ellipsis-width-001.html", + {} + ] + ], "css/css-ui/webkit-appearance-parsing.html": [ [ "css/css-ui/webkit-appearance-parsing.html", @@ -211664,6 +211736,18 @@ {} ] ], + "css/cssom/CSSGroupingRule-cssRules.html": [ + [ + "css/cssom/CSSGroupingRule-cssRules.html", + {} + ] + ], + "css/cssom/CSSGroupingRule-insertRule.html": [ + [ + "css/cssom/CSSGroupingRule-insertRule.html", + {} + ] + ], "css/cssom/CSSKeyframeRule.html": [ [ "css/cssom/CSSKeyframeRule.html", @@ -328291,6 +328375,10 @@ "21451a04fa5e9618276e0e518e82bbb7bb64b21d", "reftest" ], + "css/CSS2/normal-flow/auto-margins-root-element.html": [ + "8d9aaf443a498ee450e5b4c649e11069952902f6", + "testharness" + ], "css/CSS2/normal-flow/block-formatting-context-height-001.xht": [ "e275ff4f5125bf240956856c79d29cc24ba53cfe", "reftest" @@ -366523,10 +366611,42 @@ "2db3480feb5928c6a39fbf6084cf07bec0ba4767", "reftest" ], + "css/css-pseudo/first-line-change-inline-color-nested-ref.html": [ + "84becd9a78d186ba3c0e658746fd56aef8039b74", + "support" + ], + "css/css-pseudo/first-line-change-inline-color-nested.html": [ + "4a58f1ea5b623ffa5acd2993be16de399cd24127", + "reftest" + ], + "css/css-pseudo/first-line-change-inline-color-ref.html": [ + "84becd9a78d186ba3c0e658746fd56aef8039b74", + "support" + ], + "css/css-pseudo/first-line-change-inline-color.html": [ + "2a5be916b01d5d12eec1a4e81d912d95c7036916", + "reftest" + ], "css/css-pseudo/first-line-first-letter-insert-crash.html": [ "17f035dedf1ef8df71918a1eacb01e1f0b80d46b", "testharness" ], + "css/css-pseudo/first-line-on-ancestor-block-ref.html": [ + "7193bf25eb88c5443457480f7ce27782acd9473a", + "support" + ], + "css/css-pseudo/first-line-on-ancestor-block.html": [ + "6b797107df80156b511b9dc58c5ee40d6114cfc4", + "reftest" + ], + "css/css-pseudo/first-line-with-out-of-flow-ref.html": [ + "7193bf25eb88c5443457480f7ce27782acd9473a", + "support" + ], + "css/css-pseudo/first-line-with-out-of-flow.html": [ + "798ecf8264e2ddb38257c6cb1174bcc069c6e6d1", + "reftest" + ], "css/css-pseudo/idlharness-expected.txt": [ "977415282ae39a096e46008e91d55452f5244b02", "support" @@ -373544,7 +373664,7 @@ "reftest" ], "css/css-text/line-break/line-break-anywhere-010.html": [ - "4c4b86c15b69f7d351b92477640808e297ed74f2", + "6554bf68ce13d0f3a3f3d020c01a749aca4228dd", "reftest" ], "css/css-text/line-break/line-break-anywhere-011.html": [ @@ -373552,7 +373672,7 @@ "reftest" ], "css/css-text/line-break/line-break-anywhere-012.html": [ - "76fe279c50da6d2d429ecf19ecf2d77241aa87fa", + "2dfe6071fdfe2a2993812a28c7e1408d59da763c", "reftest" ], "css/css-text/line-break/line-break-anywhere-013.html": [ @@ -388087,6 +388207,10 @@ "23291d433901497735235cdc24b76ebd756dc371", "testharness" ], + "css/css-ui/text-overflow-ellipsis-width-001.html": [ + "2042111588254242c202527589507b40ef0c3538", + "testharness" + ], "css/css-ui/text-overflow-ref.html": [ "b471cf1c3163d96d51eb9b92feda2a95eaf42baf", "support" @@ -396303,6 +396427,18 @@ "ba048c58acaac5cd2550fb21cb9b6e9ee8fb0bb1", "testharness" ], + "css/cssom/CSSGroupingRule-cssRules.html": [ + "e4afd5e560fc317db0490010d692174522fafa66", + "testharness" + ], + "css/cssom/CSSGroupingRule-insertRule-expected.txt": [ + "44e8aaa155eef7b2f14b1d86cee6ec9de789162a", + "support" + ], + "css/cssom/CSSGroupingRule-insertRule.html": [ + "2364465f8374bbf824e669a2e965c6ce19312c50", + "testharness" + ], "css/cssom/CSSKeyframeRule.html": [ "3f6d1821867ae42dc2e486597621fb079268e2c0", "testharness" @@ -413708,7 +413844,7 @@ "testharness" ], "fetch/corb/script-resource-with-nonsniffable-types.tentative.sub.html": [ - "e599bf26f9445e9e96ee98e4bbab2895e2283fe2", + "bf42d0eaf685d2d1bcdb3b9a0276daf2aae2268f", "testharness" ], "fetch/corb/style-css-mislabeled-as-html-nosniff.sub.html": [ @@ -436052,11 +436188,11 @@ "testharness" ], "inert/inert-retargeting-iframe.tentative.html": [ - "78d7f6b36a7af8181916c125a789e24dd2535ac1", + "c31cc88ccecce9212a0e7771c6cfe46479908d66", "testharness" ], "inert/inert-retargeting.tentative.html": [ - "d239a7056f2ffa971eda8e185bb1ab594e29226d", + "6ef3b2a1b1b7ededf6072156bb85fc5b22d885fe", "testharness" ], "infrastructure/META.yml": [ @@ -436636,7 +436772,7 @@ "support" ], "interfaces/animation-worklet.idl": [ - "d223a745046f5ff65054306488285c031288d105", + "32988e11506d14930a27b3b77dc3a8435bdf4269", "support" ], "interfaces/appmanifest.idl": [ @@ -436692,7 +436828,7 @@ "support" ], "interfaces/css-conditional.idl": [ - "8f928ad48269e4bfe3f2fd797b716e4e66cb6da2", + "a57cc6c205e290fab1244e7d8f5ef087011b6800", "support" ], "interfaces/css-counter-styles.idl": [ @@ -437120,7 +437256,7 @@ "support" ], "interfaces/webrtc-stats.idl": [ - "f29e00d195e898cb6c2dfce9a82bc81fd168787a", + "29604eafc2f4bff2ab1c0790cf7411589aefc214", "support" ], "interfaces/webrtc.idl": [ @@ -461592,7 +461728,7 @@ "support" ], "resources/chromium/webxr-test.js": [ - "5ed96b8fc93fa21dd5631e27ccec0544828d1c3b", + "e7bb7e9fa8a2580ffa7cbffafe0145b17746568c", "support" ], "resources/chromium/webxr-test.js.headers": [ @@ -461740,7 +461876,7 @@ "support" ], "screen-orientation/lock-unlock-check.html": [ - "129882d64f6d323d93a183d59f4744a8e888d3f1", + "8e79033e614ce3f0e9db26bc0235d517f1d5e28e", "testharness" ], "screen-orientation/onchange-event-expected.txt": [ @@ -461772,7 +461908,7 @@ "support" ], "screen-orientation/resources/orientation-utils.js": [ - "8721818bec2fadcaa3010f3c48d9e38db854f669", + "85be16c3691dcd5498e117c165f8f4b17c53064b", "support" ], "screen-orientation/resources/sandboxed-iframe-locking.html": [ @@ -465339,10 +465475,6 @@ "79f08991174cb50735f8bc0631876c22b3359be1", "support" ], - "service-workers/service-worker/resources/worker-interception-iframe.https.html": [ - "87b0ed3f2498552d995cc5086fcc15b90d47097f", - "support" - ], "service-workers/service-worker/resources/worker-interception-redirect-serviceworker.js": [ "f5ba5a38df5a7893dca3e2db47b4395c5360db2c", "support" @@ -465580,11 +465712,11 @@ "testharness" ], "service-workers/service-worker/worker-interception.https-expected.txt": [ - "3fb502afc0169f40220963532b91a9df672caedf", + "f123296d75fdc547132e9e6808403d427d4425fd", "support" ], "service-workers/service-worker/worker-interception.https.html": [ - "6b66fb0f02296410f4d96076c68deb798024e7b9", + "302a214ac619400c38f7564c065a5e0be47ac6df", "testharness" ], "service-workers/service-worker/xhr-response-url.https.html": [
diff --git a/third_party/blink/web_tests/external/wpt/css/css-conditional/idlharness-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-conditional/idlharness-expected.txt index aa36ecb..bf46c15 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-conditional/idlharness-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-conditional/idlharness-expected.txt
@@ -1,17 +1,7 @@ This is a testharness.js-based test. -Found 57 tests; 56 PASS, 1 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idl_test setup PASS Partial interface CSSRule: original interface defined PASS Partial namespace CSS: original namespace defined -PASS CSSGroupingRule interface: existence and properties of interface object -PASS CSSGroupingRule interface object length -PASS CSSGroupingRule interface object name -PASS CSSGroupingRule interface: existence and properties of interface prototype object -PASS CSSGroupingRule interface: existence and properties of interface prototype object's "constructor" property -PASS CSSGroupingRule interface: existence and properties of interface prototype object's @@unscopables property -PASS CSSGroupingRule interface: attribute cssRules -PASS CSSGroupingRule interface: operation insertRule(CSSOMString, unsigned long) -PASS CSSGroupingRule interface: operation deleteRule(unsigned long) PASS CSSConditionRule interface: existence and properties of interface object PASS CSSConditionRule interface object length PASS CSSConditionRule interface object name @@ -30,11 +20,6 @@ PASS Stringification of cssMediaRule PASS CSSMediaRule interface: cssMediaRule must inherit property "media" with the proper type PASS CSSConditionRule interface: cssMediaRule must inherit property "conditionText" with the proper type -PASS CSSGroupingRule interface: cssMediaRule must inherit property "cssRules" with the proper type -PASS CSSGroupingRule interface: cssMediaRule must inherit property "insertRule(CSSOMString, unsigned long)" with the proper type -PASS CSSGroupingRule interface: calling insertRule(CSSOMString, unsigned long) on cssMediaRule with too few arguments must throw TypeError -PASS CSSGroupingRule interface: cssMediaRule must inherit property "deleteRule(unsigned long)" with the proper type -PASS CSSGroupingRule interface: calling deleteRule(unsigned long) on cssMediaRule with too few arguments must throw TypeError PASS CSSRule interface: cssMediaRule must inherit property "SUPPORTS_RULE" with the proper type PASS CSSSupportsRule interface: existence and properties of interface object PASS CSSSupportsRule interface object length @@ -45,11 +30,6 @@ PASS CSSSupportsRule must be primary interface of cssSupportsRule PASS Stringification of cssSupportsRule PASS CSSConditionRule interface: cssSupportsRule must inherit property "conditionText" with the proper type -PASS CSSGroupingRule interface: cssSupportsRule must inherit property "cssRules" with the proper type -PASS CSSGroupingRule interface: cssSupportsRule must inherit property "insertRule(CSSOMString, unsigned long)" with the proper type -PASS CSSGroupingRule interface: calling insertRule(CSSOMString, unsigned long) on cssSupportsRule with too few arguments must throw TypeError -PASS CSSGroupingRule interface: cssSupportsRule must inherit property "deleteRule(unsigned long)" with the proper type -PASS CSSGroupingRule interface: calling deleteRule(unsigned long) on cssSupportsRule with too few arguments must throw TypeError PASS CSSRule interface: cssSupportsRule must inherit property "SUPPORTS_RULE" with the proper type PASS CSSRule interface: constant SUPPORTS_RULE on interface object PASS CSSRule interface: constant SUPPORTS_RULE on interface prototype object
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-010.html b/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-010.html index 4c4b86c..6554bf6 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-010.html +++ b/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-010.html
@@ -28,7 +28,7 @@ .test { color: green; width: 4ch; - white-space: break-spaces; + white-space: pre-wrap; line-break: anywhere; } </style>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-012.html b/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-012.html index 76fe279c5..2dfe607 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-012.html +++ b/third_party/blink/web_tests/external/wpt/css/css-text/line-break/line-break-anywhere-012.html
@@ -6,7 +6,7 @@ <link rel="help" href="https://drafts.csswg.org/css-text-3/#valdef-line-break-anywhere"> <meta name="flags" content=""> <link rel="match" href="reference/line-break-anywhere-004-ref.html"> -<meta name="assert" content="line-break:anywhere allows breaking opportunities around slash characters."> +<meta name="assert" content="line-break:anywhere allows breaking opportunities around backslash characters."> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <style> div {
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-cssRules.html b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-cssRules.html new file mode 100644 index 0000000..e4afd5e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-cssRules.html
@@ -0,0 +1,54 @@ +<!doctype html> +<html> +<head> + <meta charset="utf-8"> + <title>CSSOM - CSSGroupingRule - cssRules</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function create(t) { + var style = document.createElement('style'); + style.appendChild(document.createTextNode('@media all { * {} }')); + document.head.appendChild(style); + t.add_cleanup(function() { + document.head.removeChild(style); + }); + + assert_true(!!style.sheet, 'setup - sheet defined'); + assert_equals( + style.sheet.cssRules.length, 1, 'setup - grouping rule created' + ); + assert_equals( + style.sheet.cssRules[0].cssRules.length, 1, 'setup - rule created' + ); + return style.sheet.cssRules[0]; + } + + test(function (t) { + var groupingRule = create(t); + groupingRule.cssRules.wptMarker = 'wpt'; + + // `insertRule` is used to prompt non-conforming implementations to + // create a new CSSRuleList object. Its behavior is verified by a + // dedicated test and should not influence the result of this + // particular test. + try { + groupingRule.insertRule('.foo {}', 0); + groupingRule.insertRule('.bar {}', 0); + groupingRule.insertRule('.baz {}', 0); + } catch (err) {} + + assert_equals(groupingRule.cssRules.wptMarker, 'wpt'); + + try { + groupingRule.deleteRule('.foo {}', 0); + groupingRule.deleteRule('.bar {}', 0); + groupingRule.deleteRule('.baz {}', 0); + } catch (err) {} + + assert_equals(groupingRule.cssRules.wptMarker, 'wpt'); + }, '[SameObject] is honored'); + </script> +</head> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule-expected.txt b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule-expected.txt new file mode 100644 index 0000000..44e8aaa --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule-expected.txt
@@ -0,0 +1,10 @@ +This is a testharness.js-based test. +PASS index before first +PASS index after final +FAIL index not specified Failed to execute 'insertRule' on 'CSSGroupingRule': 2 arguments required, but only 1 present. +PASS index exceeds length +PASS CSS parsing error +PASS constraint violation +PASS disallowed namespace rule +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule.html b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule.html new file mode 100644 index 0000000..2364465 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/cssom/CSSGroupingRule-insertRule.html
@@ -0,0 +1,118 @@ +<!doctype html> +<html> +<head> + <meta charset="utf-8"> + <title>CSSOM - CSSGroupingRule - insertRule</title> + <link rel="help" href="https://drafts.csswg.org/cssom/#the-cssgroupingrule-interface"> + <script src="/resources/testharness.js"></script> + <script src="/resources/testharnessreport.js"></script> + <script> + function create(t) { + var style = document.createElement('style'); + style.appendChild(document.createTextNode('@media all { * {} }')); + document.head.appendChild(style); + t.add_cleanup(function() { + document.head.removeChild(style); + }); + + assert_true(!!style.sheet, 'setup - sheet defined'); + assert_equals( + style.sheet.cssRules.length, 1, 'setup - grouping rule created' + ); + assert_equals( + style.sheet.cssRules[0].cssRules.length, 1, 'setup - rule created' + ); + return style.sheet.cssRules[0]; + } + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + var result; + + result = groupingRule.insertRule('.foo {}', 0); + + assert_equals(groupingRule.cssRules.length, 2); + assert_not_equals(groupingRule.cssRules[0].cssText, first); + assert_equals(groupingRule.cssRules[1].cssText, first); + assert_equals(result, 0, 'result'); + }, 'index before first'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + var result; + + result = groupingRule.insertRule('.foo {}', 1); + + assert_equals(groupingRule.cssRules.length, 2); + assert_equals(groupingRule.cssRules[0].cssText, first); + assert_not_equals(groupingRule.cssRules[1].cssText, first); + assert_equals(result, 1); + }, 'index after final'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + var result; + + result = groupingRule.insertRule('.foo {}'); + + assert_equals(groupingRule.cssRules.length, 2); + assert_not_equals(groupingRule.cssRules[0].cssText, first); + assert_equals(groupingRule.cssRules[1].cssText, first); + assert_equals(result, 0); + }, 'index not specified'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + + assert_throws('IndexSizeError', function() { + // The syntax error is intentional; it verifies that the insertion + // index is validated prior to the CSS text. + groupingRule.insertRule('???', 2); + }); + + assert_equals(groupingRule.cssRules.length, 1); + assert_equals(groupingRule.cssRules[0].cssText, first); + }, 'index exceeds length'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + + assert_throws('SyntaxError', function() { + groupingRule.insertRule('???', 0); + }); + + assert_equals(groupingRule.cssRules.length, 1); + assert_equals(groupingRule.cssRules[0].cssText, first); + }, 'CSS parsing error'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + + assert_throws('HierarchyRequestError', function() { + groupingRule.insertRule('@import url("foo.css");', 0); + }); + + assert_equals(groupingRule.cssRules.length, 1); + assert_equals(groupingRule.cssRules[0].cssText, first); + }, 'constraint violation'); + + test(function (t) { + var groupingRule = create(t); + var first = groupingRule.cssRules[0].cssText; + + assert_throws('HierarchyRequestError', function() { + groupingRule.insertRule('@namespace url(http://www.w3.org/1999/xhtml);', 0); + }); + + assert_equals(groupingRule.cssRules.length, 1); + assert_equals(groupingRule.cssRules[0].cssText, first); + }, 'disallowed namespace rule'); + </script> +</head> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/inert/inert-retargeting-iframe.tentative.html b/third_party/blink/web_tests/external/wpt/inert/inert-retargeting-iframe.tentative.html index 78d7f6b..c31cc88 100644 --- a/third_party/blink/web_tests/external/wpt/inert/inert-retargeting-iframe.tentative.html +++ b/third_party/blink/web_tests/external/wpt/inert/inert-retargeting-iframe.tentative.html
@@ -28,7 +28,7 @@ background-color: red; } -#container.clicked { +#ancestorContainer.clicked { background-color: green; }
diff --git a/third_party/blink/web_tests/external/wpt/inert/inert-retargeting.tentative.html b/third_party/blink/web_tests/external/wpt/inert/inert-retargeting.tentative.html index d239a70..6ef3b2a 100644 --- a/third_party/blink/web_tests/external/wpt/inert/inert-retargeting.tentative.html +++ b/third_party/blink/web_tests/external/wpt/inert/inert-retargeting.tentative.html
@@ -28,7 +28,7 @@ background-color: red; } -#container.clicked { +#ancestorContainer.clicked { background-color: green; }
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/css-conditional.idl b/third_party/blink/web_tests/external/wpt/interfaces/css-conditional.idl index 8f928ad4..a57cc6c 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/css-conditional.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/css-conditional.idl
@@ -8,13 +8,6 @@ }; [Exposed=Window] -interface CSSGroupingRule : CSSRule { - readonly attribute CSSRuleList cssRules; - unsigned long insertRule (CSSOMString rule, unsigned long index); - void deleteRule (unsigned long index); -}; - -[Exposed=Window] interface CSSConditionRule : CSSGroupingRule { attribute CSSOMString conditionText; };
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/webrtc-stats.idl b/third_party/blink/web_tests/external/wpt/interfaces/webrtc-stats.idl index f29e00d..29604ea 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/webrtc-stats.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/webrtc-stats.idl
@@ -143,6 +143,9 @@ }; dictionary RTCAudioSourceStats : RTCMediaSourceStats { + double audioLevel; + double totalAudioEnergy; + double totalSamplesDuration; }; dictionary RTCVideoSourceStats : RTCMediaSourceStats { @@ -207,10 +210,7 @@ }; dictionary RTCAudioHandlerStats : RTCMediaHandlerStats { - double audioLevel; - double totalAudioEnergy; boolean voiceActivityFlag; - double totalSamplesDuration; }; dictionary RTCAudioSenderStats : RTCAudioHandlerStats { @@ -233,6 +233,9 @@ unsigned long long concealmentEvents; unsigned long long insertedSamplesForDeceleration; unsigned long long removedSamplesForAcceleration; + double audioLevel; + double totalAudioEnergy; + double totalSamplesDuration; }; dictionary RTCDataChannelStats : RTCStats { @@ -361,6 +364,12 @@ double fractionLost; }; +partial dictionary RTCAudioHandlerStats { + double audioLevel; + double totalAudioEnergy; + double totalSamplesDuration; +}; + partial dictionary RTCVideoSenderStats { unsigned long keyFramesSent; };
diff --git a/third_party/blink/web_tests/external/wpt/screen-orientation/lock-unlock-check.html b/third_party/blink/web_tests/external/wpt/screen-orientation/lock-unlock-check.html index 129882d..8e79033 100644 --- a/third_party/blink/web_tests/external/wpt/screen-orientation/lock-unlock-check.html +++ b/third_party/blink/web_tests/external/wpt/screen-orientation/lock-unlock-check.html
@@ -3,7 +3,7 @@ <script src="/resources/testharnessreport.js"></script> <script src="/resources/testdriver.js"></script> <script src="/resources/testdriver-vendor.js"></script> -<script> +<script type="module"> import { getOppositeOrientation } from "/screen-orientation/resources/orientation-utils.js"; promise_test(async t => { await test_driver.bless("request full screen", () => { @@ -15,10 +15,10 @@ // This one resolves, because we are re-locking. const pMustResolve = new Promise(r => { screen.orientation.onchange = () => { - r(orientation.lock("any")); + r(screen.orientation.lock("any")); }; }); - await promise_rejects(t, new TypeError(), pMustReject); + await promise_rejects(t, "AbortError", pMustReject); await pMustResolve; screen.orientation.unlock(); return document.exitFullscreen();
diff --git a/third_party/blink/web_tests/external/wpt/screen-orientation/resources/orientation-utils.js b/third_party/blink/web_tests/external/wpt/screen-orientation/resources/orientation-utils.js index 8721818b..85be16c 100644 --- a/third_party/blink/web_tests/external/wpt/screen-orientation/resources/orientation-utils.js +++ b/third_party/blink/web_tests/external/wpt/screen-orientation/resources/orientation-utils.js
@@ -13,5 +13,5 @@ export function getOppositeOrientation() { const { type: currentOrientation } = screen.orientation; const isPortrait = currentOrientation.includes("portrait"); - return (newOrientation = `${isPortrait ? "landscape" : "portrait"}`); + return isPortrait ? "landscape" : "portrait"; }
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/worker-interception-iframe.https.html b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/worker-interception-iframe.https.html deleted file mode 100644 index 87b0ed3..0000000 --- a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/worker-interception-iframe.https.html +++ /dev/null
@@ -1,59 +0,0 @@ -<script src="/resources/testharness.js"></script> -<script src="test-helpers.sub.js?pipe=sub"></script> -<script> - -class TestRunner { - constructor(script_url, worker_type) { - this.script_url = script_url; - this.worker_type = worker_type; - } - - // Tests subresource requests on a worker. - async run(subresource_type) { - let data; - if (this.worker_type === 'worker') { - data = await this.runOnDedicatedWorker(subresource_type); - } else if (this.worker_type === 'sharedworker') { - data = await this.runOnSharedWorker(subresource_type); - } else { - data = 'Unexpected worker type! ' + worker_type; - } - assert_equals(data, 'This load was successfully intercepted.'); - } - - async runOnDedicatedWorker(subresource_type) { - const worker = new Worker(this.script_url); - const data = await new Promise((resolve, reject) => { - worker.onmessage = e => resolve(e.data); - worker.onerror = e => reject(e); - worker.postMessage(subresource_type); - }); - worker.terminate(); - return data; - } - - async runOnSharedWorker(subresource_type) { - const worker = new SharedWorker(this.script_url); - return await new Promise((resolve, reject) => { - worker.port.onmessage = e => resolve(e.data); - worker.onerror = e => reject(e); - worker.port.postMessage(subresource_type); - }); - } -} - -window.addEventListener('message', async evt => { - const test_runner = new TestRunner(evt.data.script, evt.data.type); - const port = evt.ports[0]; - - try { - await test_runner.run('xhr'); - await test_runner.run('fetch'); - await test_runner.run('importScripts'); - port.postMessage({results: 'finish'}); - } catch(e) { - port.postMessage({results: 'failure:' + e}); - } -}); - -</script>
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt index 3fb502a..f123296 100644 --- a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt
@@ -7,9 +7,11 @@ PASS Verify a cors worker script served by a service worker fails shared worker start. PASS Verify a no-cors cross-origin worker script served by a service worker fails dedicated worker start. PASS Verify a no-cors cross-origin worker script served by a service worker fails shared worker start. -FAIL Verify subresource requests on a dedicated worker controlled by a service worker. assert_equals: expected "finish" but got "failure:Error: assert_equals: expected \"This load was successfully intercepted.\" but got \"{\\\"error\\": {\\"message\\": \\"\\", \\"code\\": 404}}\"" -PASS Verify subresource requests on a shared worker controlled by a service worker. -FAIL Verify subresource requests on a nested dedicated worker created from a dedicated worker and controlled by a service worker. assert_equals: expected "finish" but got "failure:Error: assert_equals: expected \"This load was successfully intercepted.\" but got \"{\\\"error\\": {\\"message\\": \\"\\", \\"code\\": 404}}\"" -FAIL Verify subresource requests on a nested dedicated worker created from a shared worker and controlled by a service worker. assert_equals: expected "finish" but got "failure:Error: assert_equals: expected \"This load was successfully intercepted.\" but got \"Unexpected error! Worker is not defined\"" +PASS Register a service worker for worker subresource interception tests. +FAIL Requests on a dedicated worker controlled by a service worker. assert_equals: expected "This load was successfully intercepted." but got "{\"error\": {\"message\": \"\", \"code\": 404}}" +PASS Requests on a shared worker controlled by a service worker. +FAIL Requests on a dedicated worker nested in a dedicated worker and controlled by a service worker assert_equals: expected "This load was successfully intercepted." but got "{\"error\": {\"message\": \"\", \"code\": 404}}" +FAIL Requests on a dedicated worker nested in a shared worker and controlled by a service worker assert_equals: expected "This load was successfully intercepted." but got "Unexpected error! Worker is not defined" +PASS Unregister a service worker for subresource interception tests. Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https.html b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https.html index 6b66fb0f0..302a214 100644 --- a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https.html +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/worker-interception.https.html
@@ -7,19 +7,21 @@ <body> <script> -async function setup_service_worker(t, script_url, scope) { - const r = - await service_worker_unregister_and_register(t, script_url, scope); +// ========== Worker main resource interception tests ========== + +async function setup_service_worker(t, service_worker_url, scope) { + const r = await service_worker_unregister_and_register( + t, service_worker_url, scope); t.add_cleanup(() => service_worker_unregister(t, scope)); await wait_for_state(t, r.installing, 'activated'); } promise_test(async t => { const worker_url = 'resources/dummy-synthesized-worker.js?dedicated'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new Worker(worker_url); const data = await new Promise((resolve, reject) => { w.onmessage = e => resolve(e.data); @@ -31,10 +33,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-synthesized-worker.js?shared'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new SharedWorker(worker_url); const data = await new Promise((resolve, reject) => { w.port.onmessage = e => resolve(e.data); @@ -46,10 +48,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-same-origin-worker.js?dedicated'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new Worker(worker_url); const data = await new Promise((resolve, reject) => { w.onmessage = e => resolve(e.data); @@ -61,10 +63,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-same-origin-worker.js?shared'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new SharedWorker(worker_url); const data = await new Promise((resolve, reject) => { w.port.onmessage = e => resolve(e.data); @@ -76,10 +78,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-cors-worker.js?dedicated'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new Worker(worker_url); const watcher = new EventWatcher(t, w, ['message', 'error']); await watcher.wait_for('error'); @@ -88,10 +90,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-cors-worker.js?shared'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new SharedWorker(worker_url); const watcher = new EventWatcher(t, w, ['message', 'error']); await watcher.wait_for('error'); @@ -100,10 +102,10 @@ promise_test(async t => { const worker_url = 'resources/dummy-no-cors-worker.js?dedicated'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new Worker(worker_url); const watcher = new EventWatcher(t, w, ['message', 'error']); await watcher.wait_for('error'); @@ -112,91 +114,75 @@ promise_test(async t => { const worker_url = 'resources/dummy-no-cors-worker.js?shared'; - const service_worker = 'resources/dummy-worker-interceptor.js'; + const service_worker_url = 'resources/dummy-worker-interceptor.js'; const scope = worker_url; - await setup_service_worker(t, service_worker, scope); + await setup_service_worker(t, service_worker_url, scope); const w = new SharedWorker(worker_url); const watcher = new EventWatcher(t, w, ['message', 'error']); await watcher.wait_for('error'); }, 'Verify a no-cors cross-origin worker script served by a service worker ' + 'fails shared worker start.'); -promise_test(async t => { - const subdoc_url = 'resources/worker-interception-iframe.https.html'; - const service_worker = 'resources/worker-load-interceptor.js'; - const scope = 'resources/load_worker.js?dedicated'; +// ========== Worker subresource interception tests ========== - await setup_service_worker(t, service_worker, scope); - const frame = await with_iframe(subdoc_url); - t.add_cleanup(() => frame.remove()); - const data = await new Promise((resolve, reject) => { - const channel = new MessageChannel(); - channel.port1.onmessage = e => resolve(e.data); - frame.contentWindow.postMessage( - { script: 'load_worker.js?dedicated', type: 'worker' }, - '*', [channel.port2]); - }); - assert_equals(data.results, 'finish'); -}, 'Verify subresource requests on a dedicated worker controlled by a ' + - 'service worker.'); +const scope_for_subresource_interception = 'resources/load_worker.js'; promise_test(async t => { - const subdoc_url = 'resources/worker-interception-iframe.https.html'; - const service_worker = 'resources/worker-load-interceptor.js'; - const scope = 'resources/load_worker.js?shared'; + const service_worker_url = 'resources/worker-load-interceptor.js'; + const r = await service_worker_unregister_and_register( + t, service_worker_url, scope_for_subresource_interception); + await wait_for_state(t, r.installing, 'activated'); +}, 'Register a service worker for worker subresource interception tests.'); - await setup_service_worker(t, service_worker, scope); - const frame = await with_iframe(subdoc_url); - t.add_cleanup(() => frame.remove()); +// Do not call this function multiple times without waiting for the promise +// resolution because this sets new event handlers on |worker|. +// TODO(nhiroki): To isolate multiple function calls, use MessagePort instead of +// worker's onmessage event handler. +async function request_on_worker(worker, resource_type) { const data = await new Promise((resolve, reject) => { - const channel = new MessageChannel(); - channel.port1.onmessage = e => resolve(e.data); - frame.contentWindow.postMessage( - { script: 'load_worker.js?shared', type: 'sharedworker' }, - '*', [channel.port2]); + if (worker instanceof Worker) { + worker.onmessage = e => resolve(e.data); + worker.onerror = e => reject(e); + worker.postMessage(resource_type); + } else if (worker instanceof SharedWorker) { + worker.port.onmessage = e => resolve(e.data); + worker.onerror = e => reject(e); + worker.port.postMessage(resource_type); + } else { + reject('Unexpected worker type!'); + } }); - assert_equals(data.results, 'finish'); -}, 'Verify subresource requests on a shared worker controlled by a service ' + - 'worker.'); + assert_equals(data, 'This load was successfully intercepted.'); +} + +async function subresource_test(worker) { + await request_on_worker(worker, 'xhr'); + await request_on_worker(worker, 'fetch'); + await request_on_worker(worker, 'importScripts'); +} promise_test(async t => { - const subdoc_url = 'resources/worker-interception-iframe.https.html'; - const service_worker = 'resources/worker-load-interceptor.js'; - const scope = 'resources/nested_load_worker.js?dedicated'; - - await setup_service_worker(t, service_worker, scope); - const frame = await with_iframe(subdoc_url); - t.add_cleanup(() => frame.remove()); - const data = await new Promise((resolve, reject) => { - const channel = new MessageChannel(); - channel.port1.onmessage = e => resolve(e.data); - frame.contentWindow.postMessage( - { script: 'nested_load_worker.js?dedicated', type: 'worker' }, - '*', [channel.port2]); - }); - assert_equals(data.results, 'finish'); -}, 'Verify subresource requests on a nested dedicated worker created from a ' + - 'dedicated worker and controlled by a service worker.'); + await subresource_test(new Worker('resources/load_worker.js')); +}, 'Requests on a dedicated worker controlled by a service worker.'); promise_test(async t => { - const subdoc_url = 'resources/worker-interception-iframe.https.html'; - const service_worker = 'resources/worker-load-interceptor.js'; - const scope = 'resources/nested_load_worker.js?shared'; + await subresource_test(new SharedWorker('resources/load_worker.js')); +}, 'Requests on a shared worker controlled by a service worker.'); - await setup_service_worker(t, service_worker, scope); - const frame = await with_iframe(subdoc_url); - t.add_cleanup(() => frame.remove()); - const data = await new Promise((resolve, reject) => { - const channel = new MessageChannel(); - channel.port1.onmessage = e => resolve(e.data); - frame.contentWindow.postMessage( - { script: 'nested_load_worker.js?shared', type: 'sharedworker' }, - '*', [channel.port2]); - }); - assert_equals(data.results, 'finish'); -}, 'Verify subresource requests on a nested dedicated worker created from a ' + - 'shared worker and controlled by a service worker.'); +promise_test(async t => { + await subresource_test(new Worker('resources/nested_load_worker.js')); +}, 'Requests on a dedicated worker nested in a dedicated worker and ' + + 'controlled by a service worker'); + +promise_test(async t => { + await subresource_test(new SharedWorker('resources/nested_load_worker.js')); +}, 'Requests on a dedicated worker nested in a shared worker and controlled ' + + 'by a service worker'); + +promise_test(async t => { + await service_worker_unregister(t, scope_for_subresource_interception); +}, 'Unregister a service worker for subresource interception tests.'); </script> </body>
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/background-color.css b/third_party/blink/web_tests/http/tests/serviceworker/resources/background-color.css new file mode 100644 index 0000000..9d9d772f --- /dev/null +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/background-color.css
@@ -0,0 +1,3 @@ +body { + background-color: green; +}
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/background-image.css b/third_party/blink/web_tests/http/tests/serviceworker/resources/background-image.css new file mode 100644 index 0000000..bcce02f --- /dev/null +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/background-image.css
@@ -0,0 +1,3 @@ +body { + background-image: url('/resources/square.png'); +}
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/import.css b/third_party/blink/web_tests/http/tests/serviceworker/resources/import.css new file mode 100644 index 0000000..0f3b07c --- /dev/null +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/import.css
@@ -0,0 +1 @@ +@import 'background-color.css';
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/network-fallback-worker.js b/third_party/blink/web_tests/http/tests/serviceworker/resources/network-fallback-worker.js new file mode 100644 index 0000000..9dc0107 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/network-fallback-worker.js
@@ -0,0 +1,3 @@ +self.addEventListener('fetch', event => { + // Do nothing. +});
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/usecounter-request-from-no-cors-style-sheet.html b/third_party/blink/web_tests/http/tests/serviceworker/usecounter-request-from-no-cors-style-sheet.html new file mode 100644 index 0000000..3878834 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/serviceworker/usecounter-request-from-no-cors-style-sheet.html
@@ -0,0 +1,87 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>service worker: Use Counter for intercepting requests from no-cors stylesheets</title> +<!-- Tests UseCounter for a service worker intercepting a request from a + no-cors stylesheet. This cannot be upstreamed to WPT because it + tests Chrome's UseCounter mechanism. --> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/test-helpers.js"></script> +<script src="/resources/get-host-info.js"></script> +<script> +function isUseCounted(win, feature) { + return win.internals.isUseCounted(win.document, feature); +} + +function observeUseCounter(win, feature) { + return win.internals.observeUseCounter(win.document, feature); +} + +function addStyleSheet(win, href) { + const link = win.document.createElement('link'); + link.rel = 'stylesheet'; + link.href = href; + win.document.head.appendChild(link); +} + +const scope = 'resources/blank.html'; +const basePath = new URL('.', self.location).pathname; +const remoteOrigin = get_host_info()['HTTP_REMOTE_ORIGIN']; +const remoteBase = new URL(basePath, remoteOrigin); + +// The feature tested by this file, +// |kServiceWorkerInterceptedRequestFromOriginDirtyStyleSheet| from +// web_feature.mojom. +const kFeature = 2941; + +// Loads a stylesheet that requests a subresource, and verifies that the +// feature use is counted when the stylesheet was not origin-clean. +function style_sheet_test(styleSheet, description) { + promise_test(async t => { + const remoteOriginStyleSheet = + new URL(`resources/${styleSheet}`, remoteBase).href; + + // |frame1| uses a same-origin style sheet. + const frame1 = await with_iframe('resources/blank.html'); + t.add_cleanup(() => { frame1.remove(); }); + const win1 = frame1.contentWindow; + addStyleSheet(win1, styleSheet); + + // |frame2| is out-of-scope. + const frame2 = await with_iframe('resources/other.html'); + t.add_cleanup(() => { frame2.remove(); }); + const win2 = frame2.contentWindow; + addStyleSheet(win2, remoteOriginStyleSheet); + + // |frame3| uses a cross-origin style sheet. + const frame3 = await with_iframe('resources/blank.html'); + t.add_cleanup(() => { frame3.remove(); }); + const win3 = frame3.contentWindow; + addStyleSheet(win3, remoteOriginStyleSheet); + + // Only |frame3| should record the feature. + await observeUseCounter(win3, kFeature); + assert_false(isUseCounted(win1, kFeature)); + assert_false(isUseCounted(win2, kFeature)); + assert_true(isUseCounted(win3, kFeature)); + }, description); +} + +promise_test(async t => { + const registration = await service_worker_unregister_and_register( + t, 'resources/network-fallback-worker.js', scope); + await wait_for_state(t, registration.installing, 'activated'); +}, 'global setup'); + +// Test a stylesheet that requests an image. +style_sheet_test('background-image.css', 'image'); + +// Test a stylesheet that requests an @import. +style_sheet_test('import.css', '@import'); + +// TODO(falken): Add a test for fonts. + +promise_test(async t => { + return service_worker_unregister(t, scope); +}, 'cleanup'); +</script>
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/usecounter.html b/third_party/blink/web_tests/http/tests/serviceworker/usecounter.html index f030827..600c518 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/usecounter.html +++ b/third_party/blink/web_tests/http/tests/serviceworker/usecounter.html
@@ -4,9 +4,9 @@ <script src="/resources/testharnessreport.js"></script> <script src="resources/test-helpers.js"></script> <script> - -const kFeature = 675; // From UseCounter.h -const kDeprecatedFeature = 166; // From Deprecation.h +// Dummy values for features. +const kFeature = 675; +const kDeprecatedFeature = 166; function isUseCounted(win, feature) { return win.internals.isUseCounted(win.document, feature);
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png new file mode 100644 index 0000000..adf2e27 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/accelerated-scrolling-with-clip-path-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/accelerated-scrolling-with-clip-path-expected.png new file mode 100644 index 0000000..5e261ae --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/accelerated-scrolling-with-clip-path-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png new file mode 100644 index 0000000..9c8bc4f --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png new file mode 100644 index 0000000..f7b4661 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png new file mode 100644 index 0000000..6087b3f2 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/std-switch/a11y-expected.txt b/third_party/blink/web_tests/std-switch/a11y-expected.txt new file mode 100644 index 0000000..228dcf3 --- /dev/null +++ b/third_party/blink/web_tests/std-switch/a11y-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +PASS Check accessibility behavior +FAIL Should have no a11y attributes assert_false: role expected false got true +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/std-switch/a11y.html b/third_party/blink/web_tests/std-switch/a11y.html new file mode 100644 index 0000000..21a7f17 --- /dev/null +++ b/third_party/blink/web_tests/std-switch/a11y.html
@@ -0,0 +1,36 @@ +<!DOCTYPE html> +<script src="../resources/testharness.js"></script> +<script src="../resources/testharnessreport.js"></script> +<body> +<script type="module"> +import 'std:elements/switch'; + +test(t => { + assert_own_property(window, 'accessibilityController'); + + let switchElement = document.createElement('std-switch'); + switchElement.id = 'switch'; + switchElement.textContent = 'child text'; + document.body.appendChild(switchElement); + + let axSwitch = accessibilityController.accessibleElementById('switch'); + assert_equals(axSwitch.role, 'AXRole: AXSwitch'); + assert_equals(axSwitch.name, '', 'has no "child text"'); + assert_equals(axSwitch.checked, 'false'); + + switchElement.on = true; + // Need to get AccessibleNode again + axSwitch = accessibilityController.accessibleElementById('switch'); + assert_equals(axSwitch.checked, 'true'); +}, 'Check accessibility behavior'); + +test(t => { + let switchElement = document.createElement('std-switch'); + document.body.appendChild(switchElement); + switchElement.on = true; + + assert_false(switchElement.hasAttribute('role'), 'role'); + assert_false(switchElement.hasAttribute('aria-checked'), 'aria-checked'); +}, 'Should have no a11y attributes'); +</script> +</body>
diff --git a/third_party/blink/web_tests/std-switch/click-transition.html b/third_party/blink/web_tests/std-switch/click-transition.html index 21f3c1c..daafd90 100644 --- a/third_party/blink/web_tests/std-switch/click-transition.html +++ b/third_party/blink/web_tests/std-switch/click-transition.html
@@ -29,9 +29,17 @@ assert_true(transitionStartCounter > 0); if (transitionStartCounter > transitionEndCounter) { await new Promise((resolve, reject) => { - thumb.addEventListener('transitionend', resolve, {once: true}); + thumb.addEventListener('transitionend', () => { + if (transitionStartCounter == transitionEndCounter) { + resolve(); + } + }); }); } + assert_equals(thumb.runningTransitions, 0); + // The track element doesn't animate by default. + let trackElement = internals.shadowRoot(switchElement).getElementById('track'); + assert_equals(trackElement.runningTransitions, undefined); // Changing the state with an IDL attribute should not animate. transitionStartCounter = 0;
diff --git a/third_party/blink/web_tests/virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt b/third_party/blink/web_tests/virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt index 8a05900d..a9262980 100644 --- a/third_party/blink/web_tests/virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt +++ b/third_party/blink/web_tests/virtual/omt-worker-fetch/external/wpt/service-workers/service-worker/worker-interception.https-expected.txt
@@ -7,9 +7,11 @@ PASS Verify a cors worker script served by a service worker fails shared worker start. PASS Verify a no-cors cross-origin worker script served by a service worker fails dedicated worker start. PASS Verify a no-cors cross-origin worker script served by a service worker fails shared worker start. -PASS Verify subresource requests on a dedicated worker controlled by a service worker. -PASS Verify subresource requests on a shared worker controlled by a service worker. -FAIL Verify subresource requests on a nested dedicated worker created from a dedicated worker and controlled by a service worker. assert_equals: expected "finish" but got "failure:Error: assert_equals: expected \"This load was successfully intercepted.\" but got \"{\\\"error\\": {\\"message\\": \\"\\", \\"code\\": 404}}\"" -FAIL Verify subresource requests on a nested dedicated worker created from a shared worker and controlled by a service worker. assert_equals: expected "finish" but got "failure:Error: assert_equals: expected \"This load was successfully intercepted.\" but got \"Unexpected error! Worker is not defined\"" +PASS Register a service worker for worker subresource interception tests. +PASS Requests on a dedicated worker controlled by a service worker. +PASS Requests on a shared worker controlled by a service worker. +PASS Requests on a dedicated worker nested in a dedicated worker and controlled by a service worker +FAIL Requests on a dedicated worker nested in a shared worker and controlled by a service worker assert_equals: expected "This load was successfully intercepted." but got "Unexpected error! Worker is not defined" +PASS Unregister a service worker for subresource interception tests. Harness: the test ran to completion.
diff --git a/tools/licenses.py b/tools/licenses.py index 9f6d4931..5e8ab27 100755 --- a/tools/licenses.py +++ b/tools/licenses.py
@@ -36,6 +36,9 @@ # Placeholder directory only, not third-party code. os.path.join('third_party','adobe'), + # Will remove it once converted private sdk using cipd. + os.path.join('third_party','android_tools_internal'), + # Build files only, not third-party code. os.path.join('third_party','widevine'),
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 46eeefb..3e6d2d0 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -23797,6 +23797,8 @@ <int value="2938" label="PeriodicBackgroundSyncUnregister"/> <int value="2939" label="CreateObjectURLMediaSourceFromWorker"/> <int value="2940" label="CSSAtRuleProperty"/> + <int value="2941" + label="ServiceWorkerInterceptedRequestFromOriginDirtyStyleSheet"/> </enum> <enum name="FeaturePolicyAllowlistType">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 2b971aa3..dbba78e6 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -5344,12 +5344,20 @@ </histogram> <histogram name="Arc.CustomTabs.SessionLifetime.All" units="ms"> + <obsolete> + Deprecated 06/2019. Replaced by Arc.CustomTabs.SessionLifetime2.All to + extend the max value. + </obsolete> <owner>hashimoto@google.com</owner> <owner>shihuis@google.com</owner> <summary>Lifetime of each session. Recorded when a session ends.</summary> </histogram> <histogram name="Arc.CustomTabs.SessionLifetime.Closed" units="ms"> + <obsolete> + Deprecated 06/2019. Replaced by Arc.CustomTabs.SessionLifetime2.Closed to + extend the max value. + </obsolete> <owner>hashimoto@google.com</owner> <owner>shihuis@google.com</owner> <summary> @@ -5359,6 +5367,11 @@ <histogram name="Arc.CustomTabs.SessionLifetime.ForwardedToNormalTab" units="ms"> + <obsolete> + Deprecated 06/2019. Replaced by + Arc.CustomTabs.SessionLifetime2.ForwardedToNormalTab to extend the max + value. + </obsolete> <owner>hashimoto@google.com</owner> <owner>shihuis@google.com</owner> <summary> @@ -5367,6 +5380,27 @@ </summary> </histogram> +<histogram name="Arc.CustomTabs.SessionLifetime2.All" units="ms"> + <owner>hashimoto@google.com</owner> + <summary>Lifetime of each session. Recorded when a session ends.</summary> +</histogram> + +<histogram name="Arc.CustomTabs.SessionLifetime2.Closed" units="ms"> + <owner>hashimoto@google.com</owner> + <summary> + Lifetime of each session. Recorded when a session is closed. + </summary> +</histogram> + +<histogram name="Arc.CustomTabs.SessionLifetime2.ForwardedToNormalTab" + units="ms"> + <owner>hashimoto@google.com</owner> + <summary> + Lifetime of each session. Recorded when a session ends because the tab was + forwarded to a normal tab. + </summary> +</histogram> + <histogram name="Arc.EngagementTime.ArcTotal" units="ms"> <owner>maajid@google.com</owner> <owner>shaochuan@google.com</owner> @@ -13705,9 +13739,13 @@ <histogram base="true" name="Blink.ResourceLoadScheduler.TotalRequestCount" units="requests"> + <obsolete> + Removed as of 6/2019. + </obsolete> <!-- Name completed by histogram_suffixes name="ResourceLoadScheduler.FrameType" --> <owner>toyoshim@chromium.org</owner> + <owner>ksakamoto@chromium.org</owner> <summary> Total number of resource requests completed from the frame creation until network activity quiets. @@ -17754,9 +17792,7 @@ <histogram base="true" name="ChromeOS.Camera.Jpeg.Latency" units="microseconds" expires_after="2019-10-25"> <!-- Name completed by histogram_suffixes - name="ChromeOS.Camera.JpegProcessMethod" --> - -<!-- Name completed by histogram_suffixes + name="ChromeOS.Camera.JpegProcessMethod" and name="ChromeOS.Camera.JpegProcessType" --> <owner>wtlee@chromium.org</owner> @@ -17771,9 +17807,7 @@ <histogram base="true" name="ChromeOS.Camera.Jpeg.Resolution" units="pixels" expires_after="2019-10-25"> <!-- Name completed by histogram_suffixes - name="ChromeOS.Camera.JpegProcessMethod" --> - -<!-- Name completed by histogram_suffixes + name="ChromeOS.Camera.JpegProcessMethod" and name="ChromeOS.Camera.JpegProcessType" --> <owner>wtlee@chromium.org</owner> @@ -32938,7 +32972,7 @@ </histogram> <histogram name="Enterprise.PolicyUserVerification" - enum="EnterprisePolicyUserVerification" expires_after="M77"> + enum="EnterprisePolicyUserVerification" expires_after="M92"> <owner>poromov@chromium.org</owner> <summary>Tracking the results of policy user verification.</summary> </histogram> @@ -33259,7 +33293,7 @@ </histogram> <histogram name="EnterpriseCheck.InvalidJsonPolicies" enum="EnterprisePolicies" - expires_after="M77"> + expires_after="2020-06-18"> <owner>olsen@chromium.org</owner> <summary> A set of policy rules that failed validation due to unparsable JSON, or JSON @@ -33269,8 +33303,8 @@ </histogram> <histogram name="EnterpriseCheck.InvalidPolicies" enum="EnterprisePolicies" - expires_after="M77"> - <owner>mnissler@chromium.org</owner> + expires_after="2020-06-18"> + <owner>pastarmovj@chromium.org</owner> <summary> A set of policy rules that were ignored due to integrity violations while parsing the policy data which happens on start-up and when the policy has @@ -33279,8 +33313,7 @@ </histogram> <histogram name="EnterpriseCheck.InvalidPoliciesDetected" - units="disabled policies" expires_after="M77"> - <owner>mnissler@chromium.org</owner> + units="disabled policies" expires_after="2020-06-18"> <owner>pastarmovj@chromium.org</owner> <summary> The number of disabled policy entries on Windows due to integrity violations @@ -33307,7 +33340,7 @@ </histogram> <histogram name="EnterpriseCheck.IsLocalMachine" enum="Boolean" - expires_after="M77"> + expires_after="2020-06-18"> <owner>mad@chromium.org</owner> <summary> Whether the full machine name is the same as the short one, identifying a @@ -33316,7 +33349,7 @@ </histogram> <histogram name="EnterpriseCheck.IsLocalUser" enum="Boolean" - expires_after="M77"> + expires_after="2020-06-18"> <owner>mad@chromium.org</owner> <summary> Whether the currently logged in user is a local user or not, based on its @@ -33334,7 +33367,7 @@ </histogram> <histogram name="EnterpriseCheck.NetGetJoinInformationAddress" - enum="BooleanEnabled" expires_after="M77"> + enum="BooleanEnabled" expires_after="2020-06-18"> <owner>rogerta@chromium.org</owner> <summary> Whether we could obtain the address of the NetGetJoinInformation function. @@ -33342,8 +33375,8 @@ </summary> </histogram> -<histogram name="EnterpriseCheck.OSType" enum="OsSuite" expires_after="M77"> - <owner>mnissler@chromium.org</owner> +<histogram name="EnterpriseCheck.OSType" enum="OsSuite" + expires_after="2020-06-18"> <owner>pastarmovj@chromium.org</owner> <summary> The rough Windows suite we are running on. This check is performed once at @@ -43514,7 +43547,7 @@ <histogram name="Fingerprint.Unlock.AttemptsCountBeforeSuccess" units="count" expires_after="M85"> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Counts the number of fingerprint attempts until successful screen unlock. @@ -43523,7 +43556,7 @@ <histogram name="Fingerprint.Unlock.AuthSuccessful" enum="BooleanSuccess" expires_after="M85"> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Counts the number of times that the fingerprint match successfully vs. @@ -43534,7 +43567,7 @@ <histogram name="Fingerprint.Unlock.EnrolledFingerCount" units="count" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary>Counts the number of fingers enrolled by the user.</summary> </histogram> @@ -43542,7 +43575,7 @@ <histogram name="Fingerprint.Unlock.Match.Duration.Capture" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took to capture the fingerprint image in the 'match' @@ -43553,7 +43586,7 @@ <histogram name="Fingerprint.Unlock.Match.Duration.Matcher" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took to run matcher in the 'match' case. @@ -43563,7 +43596,7 @@ <histogram name="Fingerprint.Unlock.Match.Duration.Overall" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took between the detection of a finger and the 'match' @@ -43574,7 +43607,7 @@ <histogram name="Fingerprint.Unlock.NoMatch.Duration.Capture" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took to capture the fingerprint image in the 'no-match' @@ -43585,7 +43618,7 @@ <histogram name="Fingerprint.Unlock.NoMatch.Duration.Matcher" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took to run the matcher in the 'no-match' case. @@ -43595,7 +43628,7 @@ <histogram name="Fingerprint.Unlock.NoMatch.Duration.Overall" units="ms" expires_after="M85"> <owner>norvez@chromium.org</owner> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Measures the time it took between the detection of a finger and the @@ -43605,7 +43638,7 @@ <histogram name="Fingerprint.UnlockEnabled" enum="BooleanEnabled" expires_after="M85"> - <owner>yulunwu@chromium.org</owner> + <owner>rsorokin@chromium.org</owner> <owner>jessejames@chromium.org</owner> <summary> Track whether fingerprint is enabled to unlock the screen, when the user @@ -53687,7 +53720,8 @@ </summary> </histogram> -<histogram name="Media.Audio.ActualInputBufferFrameSizeMac" expires_after="M77"> +<histogram name="Media.Audio.ActualInputBufferFrameSizeMac" + expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary> Size (in audio frames) of native I/O buffers that is set by the audio @@ -53698,7 +53732,7 @@ </histogram> <histogram name="Media.Audio.AudioUnitRenderHasWorkedMac" - enum="BooleanEverWorked" expires_after="M77"> + enum="BooleanEverWorked" expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary> Stored in combination with Media.Audio.RenderFailsWhenBufferSizeChangesMac. @@ -54219,7 +54253,7 @@ </summary> </histogram> -<histogram name="Media.Audio.LogicalProcessorsMac" expires_after="M77"> +<histogram name="Media.Audio.LogicalProcessorsMac" expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary> The number of logical processors/cores available on the Mac OSX device. Only @@ -54694,7 +54728,7 @@ </histogram> <histogram name="Media.Audio.RenderFailsWhenBufferSizeChangesMac" - enum="BooleanChanged" expires_after="M77"> + enum="BooleanChanged" expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary> True if a call to AudioUnitRender failed with an error code of @@ -54705,7 +54739,7 @@ </histogram> <histogram name="Media.Audio.RequestedInputBufferFrameSizeMac" - expires_after="M77"> + expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary> Size (in audio frames) the client has asked for when creating an @@ -56835,7 +56869,7 @@ </histogram> <histogram name="Media.MediaRecorder.VEAUsed" enum="MediaRecorderVEAUsed" - expires_after="M77"> + expires_after="M87"> <owner>shenghao@chromium.org</owner> <owner>mcasas@chromium.org</owner> <summary>Whether HW video encode is used in MediaRecorder.</summary> @@ -103349,7 +103383,7 @@ </histogram> <histogram name="Process.Sandbox.FlagOverrodeRemoteSessionCheck" enum="Boolean" - expires_after="M77"> + expires_after="2020-06-18"> <owner>pastarmovj@chromium.org</owner> <summary> Measure how often the automatic recognition for terminal services @@ -146531,7 +146565,7 @@ </histogram> <histogram name="WebRTC.AudioInputChannelLayout" enum="ChannelLayout" - expires_after="M77"> + expires_after="2020-07-01"> <owner>henrika@chromium.org</owner> <summary>Audio input channel layout in WebRTC.</summary> </histogram> @@ -151979,8 +152013,10 @@ <histogram_suffixes name="ChromeOS.Camera.JpegProcessType" separator="."> <suffix name="Decode"/> <suffix name="Encode"/> - <affected-histogram name="ChromeOS.Camera.Jpeg.Latency"/> - <affected-histogram name="ChromeOS.Camera.Jpeg.Resolution"/> + <affected-histogram name="ChromeOS.Camera.Jpeg.Latency.Hardware"/> + <affected-histogram name="ChromeOS.Camera.Jpeg.Latency.Software"/> + <affected-histogram name="ChromeOS.Camera.Jpeg.Resolution.Hardware"/> + <affected-histogram name="ChromeOS.Camera.Jpeg.Resolution.Software"/> </histogram_suffixes> <histogram_suffixes name="ChromeOS.Camera.StreamFormat" separator=".">
diff --git a/tools/perf/benchmarks/blink_perf_unittest.py b/tools/perf/benchmarks/blink_perf_unittest.py index 9184e9d..9a6c13c 100644 --- a/tools/perf/benchmarks/blink_perf_unittest.py +++ b/tools/perf/benchmarks/blink_perf_unittest.py
@@ -45,7 +45,7 @@ ps=self._CreateStorySetForTestFile('append-child-measure-time.html'), options=self._options) self.assertFalse(results.had_failures) - self.assertEquals(len(results.FindAllTraceValues()), 1) + self.assertEquals(len(list(results.IterRunsWithTraces())), 1) frame_view_layouts = results.FindAllPageSpecificValuesNamed( 'LocalFrameView::layout') @@ -67,7 +67,7 @@ 'color-changes-measure-frame-time.html'), options=self._options) self.assertFalse(results.had_failures) - self.assertEquals(len(results.FindAllTraceValues()), 1) + self.assertEquals(len(list(results.IterRunsWithTraces())), 1) frame_view_prepaints = results.FindAllPageSpecificValuesNamed( 'LocalFrameView::RunPrePaintLifecyclePhase') @@ -90,7 +90,7 @@ 'simple-html-measure-page-load-time.html'), options=self._options) self.assertFalse(results.had_failures) - self.assertEquals(len(results.FindAllTraceValues()), 1) + self.assertEquals(len(list(results.IterRunsWithTraces())), 1) create_child_frame = results.FindAllPageSpecificValuesNamed( 'WebLocalFrameImpl::createChildframe') @@ -114,7 +114,7 @@ 'simple-blob-measure-async.html'), options=self._options) self.assertFalse(results.had_failures) - self.assertEquals(len(results.FindAllTraceValues()), 1) + self.assertEquals(len(list(results.IterRunsWithTraces())), 1) blob_requests = results.FindAllPageSpecificValuesNamed( 'BlobRequest')
diff --git a/ui/accessibility/platform/ax_platform_node_auralinux.cc b/ui/accessibility/platform/ax_platform_node_auralinux.cc index 5fe65a7..7c54bf37 100644 --- a/ui/accessibility/platform/ax_platform_node_auralinux.cc +++ b/ui/accessibility/platform/ax_platform_node_auralinux.cc
@@ -2418,14 +2418,6 @@ case ax::mojom::Role::kSearchBox: if (GetData().HasState(ax::mojom::State::kProtected)) return ATK_ROLE_PASSWORD_TEXT; - // TODO(crbug.com/865101) Use - // GetData().HasState(ax::mojom::State::kAutofillAvailable) instead of - // IsFocusedInputWithSuggestions() - if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete) - .empty() || - IsFocusedInputWithSuggestions()) { - return ATK_ROLE_AUTOCOMPLETE; - } return ATK_ROLE_ENTRY; case ax::mojom::Role::kTextFieldWithComboBox: return ATK_ROLE_COMBO_BOX; @@ -2542,11 +2534,8 @@ atk_state_set_add_state(atk_state_set, ATK_STATE_SINGLE_LINE); } - // TODO(crbug.com/865101) Use - // GetData().HasState(ax::mojom::State::kAutofillAvailable) instead of - // IsFocusedInputWithSuggestions() if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete).empty() || - IsFocusedInputWithSuggestions()) + data.HasState(ax::mojom::State::kAutofillAvailable)) atk_state_set_add_state(atk_state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION); // Checked state
diff --git a/ui/chromeos/file_manager_strings.grdp b/ui/chromeos/file_manager_strings.grdp index c7ba173..b870349 100644 --- a/ui/chromeos/file_manager_strings.grdp +++ b/ui/chromeos/file_manager_strings.grdp
@@ -741,6 +741,9 @@ <message name="IDS_FILE_BROWSER_MOVE_UNEXPECTED_ERROR" desc="File Manager error message."> Move failed, unexpected error: <ph name="ERROR_MESSAGE">$1<ex>Could not move</ex></ph> </message> + <message name="IDS_FILE_BROWSER_TO_FOLDER_NAME" desc="File Manager status message."> + To <ph name="FOLDER_NAME">$1<ex>images</ex></ph> + </message> <message name="IDS_FILE_BROWSER_ZIP_FILE_NAME" desc="File Manager status message."> Zipping <ph name="FILE_NAME">$1<ex>movie.avi</ex></ph>... </message>
diff --git a/ui/file_manager/file_manager/background/js/runtime_loaded_test_util.js b/ui/file_manager/file_manager/background/js/runtime_loaded_test_util.js index a0e6fc23..9878152 100644 --- a/ui/file_manager/file_manager/background/js/runtime_loaded_test_util.js +++ b/ui/file_manager/file_manager/background/js/runtime_loaded_test_util.js
@@ -925,3 +925,12 @@ test.util.sync.recordEnumMetric = (name, value, validValues) => { metrics.recordEnum(name, value, validValues); }; + +/** + * Reloads the Files app (Background & Foreground). + * NOTE: Any foreground window opened before the reload will be killed, so any + * appId/windowId won't be usable after the reload. + */ +test.util.sync.reload = () => { + chrome.runtime.reload(); +};
diff --git a/ui/file_manager/file_manager/common/js/progress_center_common.js b/ui/file_manager/file_manager/common/js/progress_center_common.js index 883a4fd6..816a125 100644 --- a/ui/file_manager/file_manager/common/js/progress_center_common.js +++ b/ui/file_manager/file_manager/common/js/progress_center_common.js
@@ -76,6 +76,12 @@ this.message = ''; /** + * Optional sub message for the progress item. + * @type {string} + */ + this.subMessage = ''; + + /** * Max value of the progress. * @type {number} */
diff --git a/ui/file_manager/file_manager/foreground/elements/files_format_dialog.html b/ui/file_manager/file_manager/foreground/elements/files_format_dialog.html index 4a92d57..70995d5 100644 --- a/ui/file_manager/file_manager/foreground/elements/files_format_dialog.html +++ b/ui/file_manager/file_manager/foreground/elements/files_format_dialog.html
@@ -51,7 +51,7 @@ </div> <div slot="body"> <div>[[i18n('FORMAT_DIALOG_MESSAGE')]]</div> - <div id="warning-container" hidden="[[!space_used_]]"> + <div id="warning-container" hidden="[[!space_used_]]" role="alert"> <iron-icon id="warning-icon" icon="cr:warning"></iron-icon> <div id="warning-message"> [[i18n('FORMAT_DIALOG_DELETE_WARNING', space_used_)]]
diff --git a/ui/file_manager/file_manager/foreground/elements/files_metadata_entry.html b/ui/file_manager/file_manager/foreground/elements/files_metadata_entry.html index b119a8d..9e97a727 100644 --- a/ui/file_manager/file_manager/foreground/elements/files_metadata_entry.html +++ b/ui/file_manager/file_manager/foreground/elements/files_metadata_entry.html
@@ -45,10 +45,17 @@ } #value[loading] { + /* TODO(crbug.com/965370) loading is only set on |size| metatdata of a + directory entry. This font-size makes the modificationTime value that + appears below it, render further down from its normal position. Once + the size is loaded, this "loading" CSS is removed & modificationTime + renders in its normal position: visual effect is the modificationTime + "bounces" around in the metadata box. */ font-size: 30px; } #value[loading]::after { + /* TODO(crbug.com/965370) see above */ animation: ellipsis steps(4,end) 900ms infinite; content: '\2026'; /* ascii code for the ellipsis character */ display: inline-block; @@ -63,12 +70,6 @@ } } - @keyframes ellipsis { - to { - width: 1.25em; - } - } - @media only screen and (max-width: 720px) { #padding { width: 12px; @@ -88,7 +89,14 @@ <div id="box" hidden="[[!value]]"> <div id="padding"></div> <div id="key">[[key]]</div> - <div id="value" loading$="{{loading}}"><div hidden="[[loading]]">[[value]]</div></div> + <!-- TODO(crbug.com/965370) The loading animation is only applied to a + directory entry size metadata field at this time. On switching to + another directory, the size field value is cleared, and that hides + our <div id="box"> parent. Result: the #value[loading] animation + applied here _is never visible_! --> + <div id="value" loading$="{{loading}}"> + <div hidden="[[loading]]">[[value]]</div> + </div> </div> </template> </dom-module>
diff --git a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js index a8e3841..5e9097f 100644 --- a/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js +++ b/ui/file_manager/file_manager/foreground/js/file_transfer_controller.js
@@ -645,6 +645,18 @@ item.message = strf('COPY_ITEMS_REMAINING', entries.length); } } + // TODO(crbug.com/947388) Use VolumeManager/getLocationInfo + // for i18n translations of the path name. + let destinationName = null; + if (destinationEntry instanceof VolumeEntry) { + destinationName = destinationEntry.name; + } else { + destinationName = destinationEntry.fullPath; + } + if (destinationName) { + item.subMessage = strf( + 'TO_FOLDER_NAME', destinationName.replace(/^\//, '')); + } this.progressCenter_.updateItem(item); // Check if cross share is needed or not. return this.getMultiProfileShareEntries_(entries);
diff --git a/ui/file_manager/file_manager/foreground/js/ui/location_line.js b/ui/file_manager/file_manager/foreground/js/ui/location_line.js index 77abad9..7e7fcf79 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/location_line.js +++ b/ui/file_manager/file_manager/foreground/js/ui/location_line.js
@@ -150,7 +150,17 @@ const paths = relativePath.split('/'); for (let i = 0; i < paths.length; i++) { currentUrl += '/' + encodeURIComponent(paths[i]); - components.push(new LocationLine.PathComponent(paths[i], currentUrl)); + let path = paths[i]; + if (i === 0 && + locationInfo.rootType === VolumeManagerCommon.RootType.DOWNLOADS) { + if (path === 'Downloads') { + path = str('DOWNLOADS_DIRECTORY_LABEL'); + } + if (path === 'PvmDefault') { + path = str('PLUGIN_VM_DIRECTORY_LABEL'); + } + } + components.push(new LocationLine.PathComponent(path, currentUrl)); } return components;
diff --git a/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js b/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js index 4db9a6b..e05cd70 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js +++ b/ui/file_manager/file_manager/foreground/js/ui/progress_center_panel.js
@@ -336,6 +336,9 @@ panelItem = this.feedbackHost_.addPanelItem(item.id); panelItem.panelType = panelItem.panelTypeProgress; panelItem.setAttribute('primary-text', item.message); + if (item.subMessage) { + panelItem.setAttribute('secondary-text', item.subMessage); + } } panelItem.progress = item.progressRateInPercent; // Remove the feedback panel when complete, and create
diff --git a/ui/file_manager/integration_tests/file_manager/breadcrumbs.js b/ui/file_manager/integration_tests/file_manager/breadcrumbs.js index 8116235..012686c1 100644 --- a/ui/file_manager/integration_tests/file_manager/breadcrumbs.js +++ b/ui/file_manager/integration_tests/file_manager/breadcrumbs.js
@@ -54,4 +54,31 @@ // Focus should be on file list. await remoteCall.waitForElement(appId, '#file-list:focus'); }; + + /** + * Tests that Downloads is translated in the breadcrumbs. + */ + testcase.breadcrumbsDownloadsTranslation = async () => { + // Switch UI to Portuguese (Portugal). + await sendTestMessage({name: 'switchLanguage', language: 'pt-PT'}); + + // Reload Files app to pick up the new language. + await remoteCall.callRemoteTestUtil('reload', null, []); + + // Open Files app. + const appId = + await setupAndWaitUntilReady(RootPath.DOWNLOADS, [ENTRIES.photos], []); + + // Check the breadcrumbs for Downloads: + // Os meu ficheiros => My files. + // Transferências => Downloads (as in Transfers). + const path = + await remoteCall.callRemoteTestUtil('getBreadcrumbPath', appId, []); + chrome.test.assertEq('/Os meus ficheiros/Transferências', path); + + // Navigate to Downloads/photos. + await remoteCall.navigateWithDirectoryTree( + appId, RootPath.DOWNLOADS_PATH + '/photos', + 'Os meus ficheiros/Transferências'); + }; })();
diff --git a/ui/file_manager/integration_tests/file_manager/transfer.js b/ui/file_manager/integration_tests/file_manager/transfer.js index 189595b0..57090399 100644 --- a/ui/file_manager/integration_tests/file_manager/transfer.js +++ b/ui/file_manager/integration_tests/file_manager/transfer.js
@@ -585,12 +585,10 @@ chrome.test.assertTrue( await remoteCall.callRemoteTestUtil('execCommand', appId, ['paste'])); - // Wait for the progress center to display. - await remoteCall.waitForElement(appId, '#progress-center:not([hidden])'); - - // Check that the error appears in the progress center. - const element = - await remoteCall.waitForElement(appId, '.progress-frame label'); + // Check that the error appears in the feedback panel. + const element = await remoteCall.waitForElement( + appId, ['#progress-panel', 'xf-panel-item']); chrome.test.assertEq( - `Whoops, ${entry.nameText} no longer exists.`, element.text); + `Whoops, ${entry.nameText} no longer exists.`, + element.attributes['primary-text']); };
diff --git a/ui/login/account_picker/chromeos_user_pod_row.css b/ui/login/account_picker/chromeos_user_pod_row.css index 93a3992..812a9509 100644 --- a/ui/login/account_picker/chromeos_user_pod_row.css +++ b/ui/login/account_picker/chromeos_user_pod_row.css
@@ -546,7 +546,7 @@ .action-box-button { --cr-icon-button-icon-size: 24px; - --cr-icon-button-size: 24px; + --cr-icon-button-size: 28px; margin-inline-end: 0; margin-inline-start: 8px; margin-top: 3px; @@ -966,8 +966,8 @@ .public-account-submit-button { --cr-icon-button-color: #FFF; + --cr-icon-button-size: 40px; opacity: 1; - margin: 10px 7px 8px 11px; } .monitoring-container {
diff --git a/ui/login/account_picker/chromeos_user_pod_template.css b/ui/login/account_picker/chromeos_user_pod_template.css index bf979a6..be7b532 100644 --- a/ui/login/account_picker/chromeos_user_pod_template.css +++ b/ui/login/account_picker/chromeos_user_pod_template.css
@@ -6,16 +6,23 @@ * chromeos_user_pod_template.html. */ - cr-icon-button { +cr-icon-button { + --cr-icon-button-color: var(--google-grey-refresh-500); + cursor: default; margin: 0; } .action-box-remove-user-warning .remove-warning-button { - color: #E67C73; - margin: 0; - padding: 0; - text-transform: none; - z-index: 6; + background: transparent; + border: none; + box-shadow: none; + color: #e66a5e; /* Google dark red 500 */ + cursor: default; + padding: 4px; +} + +.action-box-remove-user-warning .remove-warning-button:not(:active):focus { + font-weight: bold; } /* TODO(crbug.com/814922): Merge most of these with the default values. */
diff --git a/ui/login/account_picker/chromeos_user_pod_template.html b/ui/login/account_picker/chromeos_user_pod_template.html index 34cd7ed..2c3900ae 100644 --- a/ui/login/account_picker/chromeos_user_pod_template.html +++ b/ui/login/account_picker/chromeos_user_pod_template.html
@@ -18,11 +18,8 @@ Inlined from Polymer's iron-icons to avoid importing everything. See http://goo.gl/Y1OdAq for instructions on adding additional icons. --> - <g id="arrow-forward" fill="none" fill-rule="evenodd"> - <polygon points="0 0 20 0 20 20 0 20"/> - <polygon fill="#FFF" points="10.042 3.5 8.896 4.646 13.43 9.188 3.542 9.188 3.542 10.813 13.43 10.813 8.896 15.354 10.042 16.5 16.542 10"/> - </g> - <g id="dropdown" fill="#FFFFFF" stroke="none" stroke-width="1" fill-rule="evenodd" opacity="0.34"> + <g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"></path></g> + <g id="dropdown" stroke="none" stroke-width="1" fill-rule="evenodd"> <polygon points="16.59 8.59 12 13.17 7.41 8.59 6 10 12 16 18 10"></polygon> </g> <g id="legacy-supervised-badge"> @@ -104,7 +101,7 @@ <div class="name-container"> <div class="name"></div> <div class="action-box-area"> - <cr-icon-button class="action-box-button" disabled + <cr-icon-button class="action-box-button" iron-icon="user-pod:dropdown"></cr-icon-button> <div class="action-box-button ripple-circle"></div> <iron-icon icon="cr:more-vert" class="action-box-icon"></iron-icon> @@ -158,10 +155,10 @@ <div class="action-box-remove-non-owner-user-warning-text"> $i18n{removeNonOwnerUserWarningText} </div> - <!-- paper-button is imported inside user_manager.html --> - <paper-button class="remove-warning-button action-button"> + <!-- cr-button is imported inside user_manager.html --> + <cr-button class="remove-warning-button action-button" noink> $i18n{removeUserWarningButtonTitle} - </paper-button> + </cr-button> </div> </div> </div>
diff --git a/ui/login/account_picker/user_pod_template.css b/ui/login/account_picker/user_pod_template.css index fdc9f0f..b3ea8006 100644 --- a/ui/login/account_picker/user_pod_template.css +++ b/ui/login/account_picker/user_pod_template.css
@@ -7,14 +7,8 @@ */ .action-box-remove-user-warning .remove-warning-button { - --paper-button: { - background: var(--google-red-700); - color: white; - font-weight: 600; - @apply(--layout-vertical); - }; - --paper-button-flat-keyboard-focus: { - background: rgb(173, 50, 36); - }; - @apply(--action-button); + --active-shadow-action-rgb: var(--google-red-500-rgb); + --bg-action: var(--google-red-700); + --hover-bg-action: rgba(var(--google-red-700-rgb), .9); + --hover-shadow-action-rgb: var(--google-red-500-rgb); }
diff --git a/ui/login/account_picker/user_pod_template.html b/ui/login/account_picker/user_pod_template.html index c817c04..ef32ee9 100644 --- a/ui/login/account_picker/user_pod_template.html +++ b/ui/login/account_picker/user_pod_template.html
@@ -4,7 +4,9 @@ </template> </dom-module> -<style is="custom-style" include="user-pod-template-shared-styles"></style> +<custom-style> + <style is="custom-style" include="user-pod-template-shared-styles"></style> +</custom-style> <link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html"> @@ -143,10 +145,10 @@ <div class="action-box-remove-non-owner-user-warning-text"> $i18n{removeNonOwnerUserWarningText} </div> - <!-- paper-button is imported inside user_manager.html --> - <paper-button class="remove-warning-button action-button"> + <!-- cr-button is imported inside user_manager.html --> + <cr-button class="remove-warning-button action-button"> $i18n{removeUserWarningButtonTitle} - </paper-button> + </cr-button> </div> </div> <div class="user-type-bubble">