diff --git a/DEPS b/DEPS index 112d1069..d3707ff 100644 --- a/DEPS +++ b/DEPS
@@ -167,11 +167,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': '27c4369651a868d6d0dcf367456efc39eeaf2c98', + 'skia_revision': '3838fe3c82b4c2bf5eb420a351a6f63ee668d8d7', # 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': '8be37a6d57ad9559e0a794b414a9d869f2b0a1a7', + 'v8_revision': '2fafa2475be1fc16388e9459d4f001b1a7935aae', # 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. @@ -179,7 +179,7 @@ # 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': '741c0aa6f5a12659520437b381c6f522c5ee6d77', + 'angle_revision': 'd192e933eb69e96b498a785777b117b145f3f360', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -187,7 +187,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '9fa72471b87de2f4db6d13097519e6cc854e7620', + 'pdfium_revision': '1f088ab877cbbca8ed383e327e1460ae08eb6cb0', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling BoringSSL # and whatever else without interference from each other. @@ -862,7 +862,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '4d4275fc6a5d6f61bd93b654a158f3d696700ab5', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '1fce7657a2fdc9a253c2bdbdd945a2b0b431d084', 'condition': 'checkout_linux', }, @@ -887,7 +887,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '12265a8f7de02667caa3961b95760c0f37d743dd', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '2cbae8a8b9f61ad88e51f3b9fa30f97824db614b', 'src/third_party/devtools-node-modules': Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), @@ -1280,7 +1280,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'dbcebd185da399ec3ea42630c8ed38d24d504b10', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'dbb94e26f6507809b9f55482482c5da127bf9ef7', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1372,7 +1372,7 @@ 'packages': [ { 'package': 'chromium/third_party/r8', - 'version': 'VYsSPB6QlnJQH-2vJBhK8T6r0mexvbb9klMKwnK22GoC', + 'version': 'W_6e81yiWSvg-zaPh6Ho1HEnaAi3_tApuT7jChFwtFMC', }, ], 'condition': 'checkout_android', @@ -1470,7 +1470,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '2701c130839edbeb226735b0775966b6423d9e83', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '80f53b785b377ab4c781c36d371d84241c7d9b80', + Var('webrtc_git') + '/src.git' + '@' + '373b149d8cf24f2675ffc32ef1e641cf2ecc3112', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1532,7 +1532,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@8d99c8fdb68b6223b7070e694821549ccaf9afa9', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@a82bb0b1ae2e4de576d74c28b299e86faf6b1f6a', 'condition': 'checkout_src_internal', },
diff --git a/WATCHLISTS b/WATCHLISTS index 5d61804..c06cccc 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -2005,7 +2005,9 @@ 'rogerm+autofillwatch@chromium.org', 'tmartino+autofillwatch@chromium.org'], 'autofill_assistant': ['autofill_assistant+watch@google.com'], - 'autofill_payments': ['jsaul+autofillwatch@google.com'], + 'autofill_payments': ['armalhotra+autofillwatch@google.com', + 'jsaul+autofillwatch@google.com', + 'siyua+autofillwatch@chromium.org'], 'background_fetch': ['peter@chromium.org', 'rayankans+watch@chromium.org', 'nator+watch@chromium.org'],
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 1494411..65514ec 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -1351,7 +1351,7 @@ "//ui/wm", ] deps = [ - "//ash/app_list:presenter", + "//ash/app_list", "//ash/app_menu", "//ash/assistant/model", "//ash/assistant/ui", @@ -1533,7 +1533,7 @@ deps = [ ":ash", ":test_support", - "//ash/app_list:presenter", + "//ash/app_list", "//ash/public/cpp", "//base", "//base:i18n", @@ -1896,12 +1896,11 @@ "window_user_data_unittest.cc", "wm/always_on_top_controller_unittest.cc", "wm/ash_focus_rules_unittest.cc", + "wm/back_gesture_affordance_unittest.cc", "wm/client_controlled_state_unittest.cc", "wm/collision_detection/collision_detection_utils_unittest.cc", "wm/container_finder_unittest.cc", "wm/default_window_resizer_unittest.cc", - "wm/desks/desks_test_util.cc", - "wm/desks/desks_test_util.h", "wm/desks/desks_unittests.cc", "wm/drag_window_resizer_unittest.cc", "wm/fullscreen_window_finder_unittest.cc", @@ -1972,7 +1971,7 @@ deps = [ ":ash", ":test_support", - "//ash/app_list:presenter", + "//ash/app_list", "//ash/app_list:test_support", "//ash/app_menu", "//ash/assistant/model", @@ -2281,6 +2280,8 @@ "wallpaper/wallpaper_controller_test_api.h", "wm/cursor_manager_test_api.cc", "wm/cursor_manager_test_api.h", + "wm/desks/desks_test_util.cc", + "wm/desks/desks_test_util.h", "wm/lock_state_controller_test_api.cc", "wm/lock_state_controller_test_api.h", "wm/splitview/multi_display_overview_and_split_view_test.cc", @@ -2318,7 +2319,7 @@ ] deps = [ "//ash", - "//ash/app_list:presenter", + "//ash/app_list", "//ash/app_list:test_support", "//ash/app_menu", "//ash/assistant/model:model",
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc index 0ad91c9..470d56f 100644 --- a/ash/accelerators/accelerator_controller_impl.cc +++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -51,6 +51,8 @@ #include "ash/system/brightness_control_delegate.h" #include "ash/system/ime_menu/ime_menu_tray.h" #include "ash/system/keyboard_brightness_control_delegate.h" +#include "ash/system/model/enterprise_domain_model.h" +#include "ash/system/model/system_tray_model.h" #include "ash/system/palette/palette_tray.h" #include "ash/system/palette/palette_utils.h" #include "ash/system/power/power_button_controller.h" @@ -1007,12 +1009,22 @@ void NotifyAccessibilityFeatureDisabledByAdmin( int feature_name_id, + bool feature_state, const std::string& notification_id) { + const base::string16 organization_name = + base::UTF8ToUTF16(Shell::Get() + ->system_tray_model() + ->enterprise_domain() + ->enterprise_display_domain()); CreateAndShowStickyNotification( l10n_util::GetStringUTF16( IDS_ASH_ACCESSIBILITY_FEATURE_SHORTCUT_DISABLED_TITLE), l10n_util::GetStringFUTF16( IDS_ASH_ACCESSIBILITY_FEATURE_SHORTCUT_DISABLED_MSG, + organization_name, + l10n_util::GetStringUTF16( + feature_state ? IDS_ASH_ACCESSIBILITY_FEATURE_ACTIVATED + : IDS_ASH_ACCESSIBILITY_FEATURE_DEACTIVATED), l10n_util::GetStringUTF16(feature_name_id)), notification_id, kLoginScreenEnterpriseIcon); } @@ -1035,7 +1047,7 @@ kDockedMagnifierToggleAccelNotificationId); } else if (enabled != actual_enabled) { NotifyAccessibilityFeatureDisabledByAdmin( - IDS_ASH_STATUS_TRAY_ACCESSIBILITY_DOCKED_MAGNIFIER, + IDS_ASH_DOCKED_MAGNIFIER_SHORTCUT_DISABLED, actual_enabled, kDockedMagnifierToggleAccelNotificationId); } } @@ -1083,7 +1095,7 @@ kFullscreenMagnifierToggleAccelNotificationId); } else if (enabled != actual_enabled) { NotifyAccessibilityFeatureDisabledByAdmin( - IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SCREEN_MAGNIFIER, + IDS_ASH_FULLSCREEN_MAGNIFIER_SHORTCUT_DISABLED, actual_enabled, kFullscreenMagnifierToggleAccelNotificationId); } } @@ -1102,7 +1114,7 @@ kHighContrastToggleAccelNotificationId); } else if (enabled != actual_enabled) { NotifyAccessibilityFeatureDisabledByAdmin( - IDS_ASH_STATUS_TRAY_ACCESSIBILITY_HIGH_CONTRAST_MODE, + IDS_ASH_HIGH_CONTRAST_SHORTCUT_DISABLED, actual_enabled, kHighContrastToggleAccelNotificationId); } } @@ -1167,7 +1179,8 @@ RemoveStickyNotitification(kSpokenFeedbackToggleAccelNotificationId); if (!controller->spoken_feedback_enabled() && !old_value) { NotifyAccessibilityFeatureDisabledByAdmin( - IDS_ASH_STATUS_TRAY_ACCESSIBILITY_SPOKEN_FEEDBACK, + IDS_ASH_SPOKEN_FEEDBACK_SHORTCUT_DISABLED, + controller->spoken_feedback_enabled(), kSpokenFeedbackToggleAccelNotificationId); } }
diff --git a/ash/app_list/BUILD.gn b/ash/app_list/BUILD.gn index a51c161..d3a924b 100644 --- a/ash/app_list/BUILD.gn +++ b/ash/app_list/BUILD.gn
@@ -12,6 +12,9 @@ "app_list_export.h", "app_list_metrics.cc", "app_list_metrics.h", + "app_list_presenter_delegate.h", + "app_list_presenter_impl.cc", + "app_list_presenter_impl.h", "app_list_util.cc", "app_list_util.h", "app_list_view_delegate.h", @@ -145,34 +148,15 @@ "//ash/app_list/model:app_list_model", "//ash/app_list/model:search_model", "//ash/public/cpp", - "//services/content/public/mojom", - ] -} - -component("presenter") { - sources = [ - "app_list_presenter_delegate.h", - "app_list_presenter_export.h", - "app_list_presenter_impl.cc", - "app_list_presenter_impl.h", - ] - - defines = [ "APP_LIST_PRESENTER_IMPLEMENTATION" ] - - public_deps = [ - "//ash/app_list", "//base", "//mojo/public/cpp/bindings", + "//services/content/public/mojom", "//ui/aura", "//ui/compositor", "//ui/gfx/geometry", "//ui/views", "//ui/wm", "//ui/wm/public", - - # Temporary dependency to fix compile flake in http://crbug.com/611898. - # TODO(tapted): Remove once http://crbug.com/612382 is fixed. - "//ui/accessibility:ax_enums_mojo", ] }
diff --git a/ash/app_list/app_list_controller_impl.cc b/ash/app_list/app_list_controller_impl.cc index 7fc9f99..493b5ea 100644 --- a/ash/app_list/app_list_controller_impl.cc +++ b/ash/app_list/app_list_controller_impl.cc
@@ -1264,10 +1264,10 @@ if (client_) client_->OnAppListVisibilityChanged(real_visibility); + last_visible_ = real_visibility; + for (auto& observer : observers_) observer.OnAppListVisibilityChanged(real_visibility, display_id); - - last_visible_ = real_visibility; } } @@ -1290,6 +1290,9 @@ // Notify chrome of target visibility changes. if (last_target_visible_ != real_target_visibility) { + last_target_visible_ = real_target_visibility; + last_target_visible_display_id_ = display_id; + if (client_) client_->OnAppListTargetVisibilityChanged(real_target_visibility); @@ -1297,8 +1300,6 @@ observer.OnAppListTargetVisibilityChanged(real_target_visibility, display_id); } - last_target_visible_ = real_target_visibility; - last_target_visible_display_id_ = display_id; } }
diff --git a/ash/app_list/app_list_presenter_delegate.h b/ash/app_list/app_list_presenter_delegate.h index 27e64c7..0bc244d 100644 --- a/ash/app_list/app_list_presenter_delegate.h +++ b/ash/app_list/app_list_presenter_delegate.h
@@ -7,7 +7,7 @@ #include <stdint.h> -#include "ash/app_list/app_list_presenter_export.h" +#include "ash/app_list/app_list_export.h" namespace aura { class Window; @@ -22,7 +22,7 @@ // Delegate of the app list presenter which allows customizing its behavior. // The design of this interface was heavily influenced by the needs of Ash's // app list implementation (see ash::AppListPresenterDelegateImpl). -class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegate { +class APP_LIST_EXPORT AppListPresenterDelegate { public: virtual ~AppListPresenterDelegate() {}
diff --git a/ash/app_list/app_list_presenter_export.h b/ash/app_list/app_list_presenter_export.h deleted file mode 100644 index 5c8e4ad..0000000 --- a/ash/app_list/app_list_presenter_export.h +++ /dev/null
@@ -1,23 +0,0 @@ -// Copyright (c) 2012 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 ASH_APP_LIST_APP_LIST_PRESENTER_EXPORT_H_ -#define ASH_APP_LIST_APP_LIST_PRESENTER_EXPORT_H_ - -// Defines APP_LIST_PRESENTER_EXPORT so that functionality implemented by the -// app_list presenter module can be exported to consumers. - -#if defined(COMPONENT_BUILD) - -#if defined(APP_LIST_PRESENTER_IMPLEMENTATION) -#define APP_LIST_PRESENTER_EXPORT __attribute__((visibility("default"))) -#else -#define APP_LIST_PRESENTER_EXPORT -#endif - -#else // defined(COMPONENT_BUILD) -#define APP_LIST_PRESENTER_EXPORT -#endif - -#endif // ASH_APP_LIST_APP_LIST_PRESENTER_EXPORT_H_
diff --git a/ash/app_list/app_list_presenter_impl.h b/ash/app_list/app_list_presenter_impl.h index 1c40a00..7a08f01 100644 --- a/ash/app_list/app_list_presenter_impl.h +++ b/ash/app_list/app_list_presenter_impl.h
@@ -9,9 +9,9 @@ #include <memory> +#include "ash/app_list/app_list_export.h" #include "ash/app_list/app_list_metrics.h" #include "ash/app_list/app_list_presenter_delegate.h" -#include "ash/app_list/app_list_presenter_export.h" #include "ash/app_list/views/app_list_view.h" #include "ash/public/cpp/pagination/pagination_model_observer.h" #include "ash/public/cpp/shelf_types.h" @@ -32,7 +32,7 @@ // Manages app list UI. Creates AppListView and schedules showing/hiding // animation. While the UI is visible, it monitors things such as app list // activation state to auto dismiss the UI. -class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl +class APP_LIST_EXPORT AppListPresenterImpl : public ash::PaginationModelObserver, public aura::client::FocusChangeObserver, public ui::ImplicitAnimationObserver,
diff --git a/ash/app_list/model/folder_image.cc b/ash/app_list/model/folder_image.cc index 1e852d3d..02d8ad9 100644 --- a/ash/app_list/model/folder_image.cc +++ b/ash/app_list/model/folder_image.cc
@@ -10,6 +10,7 @@ #include "ash/app_list/model/app_list_item.h" #include "ash/app_list/model/app_list_item_list.h" #include "ash/public/cpp/app_list/app_list_config.h" +#include "ash/public/cpp/app_list/app_list_config_provider.h" #include "base/macros.h" #include "base/memory/ptr_util.h" #include "ui/base/l10n/l10n_util.h" @@ -189,7 +190,8 @@ const AppListConfig& base_config = app_list_config.type() == ash::AppListConfigType::kShared ? AppListConfig::instance() - : app_list_config; + : *AppListConfigProvider::Get().GetConfigForType( + app_list_config.type(), true /*can_create*/); // The folder icons are generated as unclipped icons for default app list // config, and then scaled down to the required unclipped folder size as
diff --git a/ash/app_list/views/app_list_view.cc b/ash/app_list/views/app_list_view.cc index 666f8bc..dceb048 100644 --- a/ash/app_list/views/app_list_view.cc +++ b/ash/app_list/views/app_list_view.cc
@@ -809,12 +809,6 @@ } void AppListView::UpdateAppListConfig(aura::Window* parent_window) { - const gfx::Size non_apps_grid_size = AppsContainerView::GetNonAppsGridSize(); - gfx::Size available_apps_grid_size = parent_window->bounds().size(); - available_apps_grid_size.Enlarge( - -non_apps_grid_size.width(), - -non_apps_grid_size.height() - delegate_->GetShelfHeight()); - // Create the app list configuration override if it's needed for the current // display bounds and the available apps grid size. std::unique_ptr<AppListConfig> new_config = @@ -823,7 +817,8 @@ ->GetDisplayNearestView(parent_window) .work_area() .size(), - available_apps_grid_size, app_list_config_.get()); + AppsContainerView::GetMinimumGridHorizontalMargin(), + delegate_->GetShelfHeight(), app_list_config_.get()); if (!new_config) return; @@ -1574,9 +1569,6 @@ void AppListView::ApplyBoundsAnimation(ash::AppListViewState target_state, base::TimeDelta duration_ms) { - // Reset animation metrics reporter when animation is started. - ResetTransitionMetricsReporter(); - ui::ImplicitAnimationObserver* animation_observer = delegate_->GetAnimationObserver(target_state); @@ -1589,19 +1581,6 @@ return; } - if (is_tablet_mode_ && target_state != ash::AppListViewState::kClosed) { - DCHECK(target_state == ash::AppListViewState::kFullscreenAllApps || - target_state == ash::AppListViewState::kFullscreenSearch); - TabletModeAnimationTransition transition_type = - target_state == ash::AppListViewState::kFullscreenAllApps - ? TabletModeAnimationTransition::kEnterFullscreenAllApps - : TabletModeAnimationTransition::kEnterFullscreenSearch; - state_animation_metrics_reporter_->SetTabletModeAnimationTransition( - transition_type); - } else { - state_animation_metrics_reporter_->SetTargetState(target_state); - } - gfx::Rect target_bounds = GetPreferredWidgetBoundsForState(target_state); // When closing the view should animate to the shelf bounds. The workspace @@ -1637,6 +1616,22 @@ layer->SetTransform(transform); animation_end_timestamp_ = base::TimeTicks::Now() + duration_ms; + // Reset animation metrics reporter when animation is started. + ResetTransitionMetricsReporter(); + + if (is_tablet_mode_ && target_state != ash::AppListViewState::kClosed) { + DCHECK(target_state == ash::AppListViewState::kFullscreenAllApps || + target_state == ash::AppListViewState::kFullscreenSearch); + TabletModeAnimationTransition transition_type = + target_state == ash::AppListViewState::kFullscreenAllApps + ? TabletModeAnimationTransition::kEnterFullscreenAllApps + : TabletModeAnimationTransition::kEnterFullscreenSearch; + state_animation_metrics_reporter_->SetTabletModeAnimationTransition( + transition_type); + } else { + state_animation_metrics_reporter_->SetTargetState(target_state); + } + ui::ScopedLayerAnimationSettings animation(layer->GetAnimator()); animation.SetPreemptionStrategy( ui::LayerAnimator::IMMEDIATELY_SET_NEW_TARGET);
diff --git a/ash/app_list/views/app_list_view_unittest.cc b/ash/app_list/views/app_list_view_unittest.cc index 9503bea..a1eb5f5 100644 --- a/ash/app_list/views/app_list_view_unittest.cc +++ b/ash/app_list/views/app_list_view_unittest.cc
@@ -384,6 +384,33 @@ DISALLOW_COPY_AND_ASSIGN(AppListViewTest); }; +// Tests app list view layout for different screen sizes with ScalableAppList +// feature enabled. +class AppListViewScalableLayoutTest : public AppListViewTest { + public: + AppListViewScalableLayoutTest() { + scoped_feature_list_.InitWithFeatures( + {app_list_features::kScalableAppList, + ash::features::kEnableBackgroundBlur}, + {}); + } + ~AppListViewScalableLayoutTest() override = default; + + void SetUp() override { + // Clear configs created in previous tests. + AppListConfigProvider::Get().ResetForTesting(); + AppListViewTest::SetUp(); + } + + void TearDown() override { + AppListViewTest::TearDown(); + AppListConfigProvider::Get().ResetForTesting(); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + class AppListViewFocusTest : public views::ViewsTestBase, public testing::WithParamInterface<bool> { public: @@ -2767,12 +2794,8 @@ // Tests fullscreen apps grid sizing and layout for small screens (width < 960) // in landscape layout. -TEST_F(AppListViewTest, AppListViewLayoutForSmallLandscapeScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, + AppListViewLayoutForSmallLandscapeScreen) { const gfx::Size window_size = gfx::Size(800, 600); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2792,12 +2815,7 @@ // Tests fullscreen apps grid sizing and layout for small screens (width < 600) // in portrait layout. -TEST_F(AppListViewTest, AppListViewLayoutForSmallPortraitScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, AppListViewLayoutForSmallPortraitScreen) { const gfx::Size window_size = gfx::Size(500, 800); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2817,12 +2835,8 @@ // Tests fullscreen apps grid sizing and layout for medium sized screens // (width < 1200) in lanscape layout. -TEST_F(AppListViewTest, AppListViewLayoutForMediumLandscapeScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, + AppListViewLayoutForMediumLandscapeScreen) { const gfx::Size window_size = gfx::Size(960, 800); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2845,12 +2859,8 @@ // Tests fullscreen apps grid sizing and layout for medium sized screens // (width < 768) in portrait layout. -TEST_F(AppListViewTest, AppListViewLayoutForMediumPortraitScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, + AppListViewLayoutForMediumPortraitScreen) { const gfx::Size window_size = gfx::Size(700, 800); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2870,12 +2880,8 @@ // Tests fullscreen apps grid sizing and layout for large screens // (width >= 1200) in landscape layout. -TEST_F(AppListViewTest, AppListViewLayoutForLargeLandscapeScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, + AppListViewLayoutForLargeLandscapeScreen) { const gfx::Size window_size = gfx::Size(1200, 960); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2898,12 +2904,7 @@ // Tests fullscreen apps grid sizing and layout for large screens (width >= 768) // in portrait layout. -TEST_F(AppListViewTest, AppListViewLayoutForLargePortraitScreen) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, AppListViewLayoutForLargePortraitScreen) { const gfx::Size window_size = gfx::Size(800, 1200); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2923,12 +2924,7 @@ // Tests that apps grid horizontal margin have minimum that ensures the page // switcher view can fit next to the apps grid. -TEST_F(AppListViewTest, EnsurePageSwitcherFitsAppsGridMargin) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, EnsurePageSwitcherFitsAppsGridMargin) { const gfx::Size window_size = gfx::Size(400, 800); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2952,12 +2948,7 @@ // Verifies that the vertical spacing between items in apps grid has an upper // limit, and that the apps grid is centered in the available space if item // spacing hits that limit. -TEST_F(AppListViewTest, VerticalAppsGridItemSpacingIsBounded) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, VerticalAppsGridItemSpacingIsBounded) { const gfx::Size window_size = gfx::Size(960, 1600); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size)); @@ -2983,12 +2974,8 @@ // Verifies that the vertical apps container margin is big enough to fit the // apps grid fadeout area. -TEST_F(AppListViewTest, VerticalAppsContainerMarginFitFadeoutArea) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitWithFeatures({app_list_features::kScalableAppList, - ash::features::kEnableBackgroundBlur}, - {}); - +TEST_F(AppListViewScalableLayoutTest, + VerticalAppsContainerMarginFitFadeoutArea) { const gfx::Size window_size = gfx::Size(650, 500); gfx::NativeView parent = GetContext(); parent->SetBounds(gfx::Rect(window_size));
diff --git a/ash/app_list/views/apps_container_view.cc b/ash/app_list/views/apps_container_view.cc index 8ba597f..fb98588 100644 --- a/ash/app_list/views/apps_container_view.cc +++ b/ash/app_list/views/apps_container_view.cc
@@ -36,9 +36,6 @@ namespace { -// Height of suggestion chip container. -constexpr int kSuggestionChipContainerHeight = 32; - // Suggestion chip container top margin (from the search box view). constexpr int kSuggestionChipContainerTopMarginForSmallScreens = 8; @@ -78,32 +75,14 @@ } // namespace // static -gfx::Size AppsContainerView::GetNonAppsGridSize() { - gfx::Size size; - +int AppsContainerView::GetMinimumGridHorizontalMargin() { // If ScalableAppList feature is enabled, there is no extra horizontal margin // between grid view and the page switcher. - const int min_grid_horizontal_margin = - app_list_features::IsScalableAppListEnabled() - ? 0 - : kAppsGridMinimumMargin * 2; - - // Enlarge with the apps grid view horizontal margin. - size.Enlarge(min_grid_horizontal_margin, 0); - - // Enlarge with suggestion chips. - size.Enlarge( - 0, AppListConfig::instance().search_box_fullscreen_top_padding() + - search_box::kSearchBoxPreferredHeight + - AppListConfig::instance().suggestion_chip_container_top_margin() + - kSuggestionChipContainerHeight); - - // Enlarge with page switcher. - size.Enlarge((kAppsGridPageSwitcherSpacing + - PageSwitcher::kPreferredButtonStripWidth) * - 2, - 0); - return size; + return kAppsGridPageSwitcherSpacing + + PageSwitcher::kPreferredButtonStripWidth + + (app_list_features::IsScalableAppListEnabled() + ? 0 + : kAppsGridMinimumMargin); } AppsContainerView::AppsContainerView(ContentsView* contents_view, @@ -292,7 +271,8 @@ chip_container_rect.set_y(GetExpectedSuggestionChipY( contents_view_->app_list_view()->GetAppListTransitionProgress( AppListView::kProgressFlagNone))); - chip_container_rect.set_height(kSuggestionChipContainerHeight); + chip_container_rect.set_height( + GetAppListConfig().suggestion_chip_container_height()); if (app_list_features::IsScalableAppListEnabled()) { chip_container_rect.Inset(GetContainerHorizontalPaddingForBounds(rect), 0); @@ -306,7 +286,7 @@ rect.set_height( rect.height() - GetExpectedSuggestionChipY(kAppListFullscreenProgressValue) - - kSuggestionChipContainerHeight); + chip_container_rect.height()); const int page_switcher_width = page_switcher_->GetPreferredSize().width(); @@ -468,7 +448,7 @@ available_height -= search_box_size.height() + GetAppListConfig().grid_fadeout_zone_height() + - kSuggestionChipContainerHeight + + GetAppListConfig().suggestion_chip_container_height() + GetAppListConfig().suggestion_chip_container_top_margin(); }
diff --git a/ash/app_list/views/apps_container_view.h b/ash/app_list/views/apps_container_view.h index 66c94dc..4cf0974 100644 --- a/ash/app_list/views/apps_container_view.h +++ b/ash/app_list/views/apps_container_view.h
@@ -30,9 +30,8 @@ // active folder. class APP_LIST_EXPORT AppsContainerView : public HorizontalPage { public: - // Returns the expected container size with apps grid bounds excluded. - // In other words: apps container view size - apps grid size. - static gfx::Size GetNonAppsGridSize(); + // Returns the minimum horizontal margins that apps grid has to respect. + static int GetMinimumGridHorizontalMargin(); AppsContainerView(ContentsView* contents_view, AppListModel* model); ~AppsContainerView() override;
diff --git a/ash/app_list/views/contents_view.cc b/ash/app_list/views/contents_view.cc index a69ed81..ea3f2bf 100644 --- a/ash/app_list/views/contents_view.cc +++ b/ash/app_list/views/contents_view.cc
@@ -550,6 +550,8 @@ if (ShouldShowDenseLayout(GetContentsBounds().height(), target_view_state_)) { preferred_size.set_height( AppListConfig::instance().search_box_height_for_dense_layout()); + } else { + preferred_size.set_height(AppListConfig::instance().search_box_height()); } return AdjustSearchBoxSizeToFitMargins(preferred_size);
diff --git a/ash/ash_strings.grd b/ash/ash_strings.grd index 9fef715..0ca3d05 100644 --- a/ash/ash_strings.grd +++ b/ash/ash_strings.grd
@@ -416,7 +416,31 @@ </message> <message name="IDS_ASH_ACCESSIBILITY_FEATURE_SHORTCUT_DISABLED_MSG" desc="The message used to indicate that, the corresponding shortcut for that accessibility feature has been disabled."> - Administrator has deactivated <ph name="FEATURE_NAME">$1<ex>Fullscreen magnifier</ex></ph>. + <ph name="ORGANIZATION_NAME">$1<ex>google.com</ex></ph> has <ph name="FEATURE_STATE">$2<ex>activated</ex></ph> <ph name="FEATURE_NAME">$3<ex>Fullscreen magnifier</ex></ph>. + </message> + <message name="IDS_ASH_HIGH_CONTRAST_SHORTCUT_DISABLED" + desc="The label used in the notification used to indicate that, the shortcut for high contrast feature has been disabled."> + high-contrast mode + </message> + <message name="IDS_ASH_DOCKED_MAGNIFIER_SHORTCUT_DISABLED" + desc="The label used in the notification used to indicate that, the shortcut for docked magnifier feature has been disabled."> + the docked magnifier + </message> + <message name="IDS_ASH_FULLSCREEN_MAGNIFIER_SHORTCUT_DISABLED" + desc="The label used in the notification used to indicate that, the shortcut for fullscreen magnifier feature has been disabled."> + the full-screen magnifier + </message> + <message name="IDS_ASH_SPOKEN_FEEDBACK_SHORTCUT_DISABLED" + desc="The label used in the notification used to indicate that, the shortcut for spoken feedback feature has been disabled."> + ChromeVox (spoken feedback) + </message> + <message name="IDS_ASH_ACCESSIBILITY_FEATURE_ACTIVATED" + desc="The label used in the notification used to indicate that, the accessibility feature is being set as forced enabled."> + activated + </message> + <message name="IDS_ASH_ACCESSIBILITY_FEATURE_DEACTIVATED" + desc="The label used in the notification used to indicate that, the accessibility feature is being set as forced disabled."> + deactivated </message> <message name="IDS_ASH_STATUS_TRAY_IME_SHORT" desc="The short label used for IME button in system tray bubble.">
diff --git a/ash/public/cpp/BUILD.gn b/ash/public/cpp/BUILD.gn index f8439da..10966351 100644 --- a/ash/public/cpp/BUILD.gn +++ b/ash/public/cpp/BUILD.gn
@@ -95,6 +95,8 @@ "default_frame_header.h", "default_scale_factor_retriever.cc", "default_scale_factor_retriever.h", + "desks_helper.cc", + "desks_helper.h", "fps_counter.cc", "fps_counter.h", "frame_header.cc",
diff --git a/ash/public/cpp/app_list/app_list_config.cc b/ash/public/cpp/app_list/app_list_config.cc index 9cb2757..fec4975 100644 --- a/ash/public/cpp/app_list/app_list_config.cc +++ b/ash/public/cpp/app_list/app_list_config.cc
@@ -17,16 +17,26 @@ namespace { -// The height reduced from the tile when min scale is not sufficient to make the -// apps grid fit the available size - This would essentially remove the vertical -// padding for the unclipped folder icon. -constexpr int kMinYScaleHeightAdjustment = 16; - // Scales |value| using the smaller one of |scale_1| and |scale_2|. int MinScale(int value, float scale_1, float scale_2) { return std::round(value * std::min(scale_1, scale_2)); } +// The height reduced from the tile when min scale is not sufficient to make the +// apps grid fit the available size - This would essentially remove the vertical +// padding for the unclipped folder icon. +int MinYScaleHeightAdjustmentForType(ash::AppListConfigType type) { + switch (type) { + case ash::AppListConfigType::kShared: + case ash::AppListConfigType::kLarge: + return 16; + case ash::AppListConfigType::kMedium: + return 8; + case ash::AppListConfigType::kSmall: + return 4; + } +} + int GridTileWidthForType(ash::AppListConfigType type) { switch (type) { case ash::AppListConfigType::kShared: @@ -38,9 +48,6 @@ case ash::AppListConfigType::kSmall: return 80; } - - NOTREACHED(); - return GridTileWidthForType(ash::AppListConfigType::kShared); } int GridTileHeightForType(ash::AppListConfigType type) { @@ -53,9 +60,6 @@ case ash::AppListConfigType::kSmall: return 80; } - - NOTREACHED(); - return GridTileHeightForType(ash::AppListConfigType::kShared); } int GridIconDimensionForType(ash::AppListConfigType type) { @@ -68,9 +72,6 @@ case ash::AppListConfigType::kSmall: return 40; } - - NOTREACHED(); - return GridIconDimensionForType(ash::AppListConfigType::kShared); } int GridTitleTopPaddingForType(ash::AppListConfigType type) { @@ -83,9 +84,6 @@ case ash::AppListConfigType::kSmall: return 56; } - - NOTREACHED(); - return GridTitleTopPaddingForType(ash::AppListConfigType::kShared); } int GridTitleBottomPaddingForType(ash::AppListConfigType type) { @@ -97,9 +95,6 @@ case ash::AppListConfigType::kSmall: return 6; } - - NOTREACHED(); - return GridTitleBottomPaddingForType(ash::AppListConfigType::kShared); } int GridTitleHorizontalPaddingForType(ash::AppListConfigType type) { @@ -112,9 +107,6 @@ case ash::AppListConfigType::kSmall: return 0; } - - NOTREACHED(); - return GridTitleHorizontalPaddingForType(ash::AppListConfigType::kShared); } int GridFocusDimensionForType(ash::AppListConfigType type) { @@ -127,9 +119,6 @@ case ash::AppListConfigType::kSmall: return 56; } - - NOTREACHED(); - return GridFocusDimensionForType(ash::AppListConfigType::kShared); } int GridFocusCornerRadiusForType(ash::AppListConfigType type) { @@ -141,9 +130,6 @@ case ash::AppListConfigType::kSmall: return 8; } - - NOTREACHED(); - return GridFocusCornerRadiusForType(ash::AppListConfigType::kShared); } int GridFadeoutMaskHeightForType(ash::AppListConfigType type) { @@ -161,9 +147,6 @@ case ash::AppListConfigType::kSmall: return 16; } - - NOTREACHED(); - return GridFadeoutMaskHeightForType(ash::AppListConfigType::kShared); } int AppTitleMaxLineHeightForType(ash::AppListConfigType type) { @@ -175,9 +158,6 @@ case ash::AppListConfigType::kSmall: return 18; } - - NOTREACHED(); - return AppTitleMaxLineHeightForType(ash::AppListConfigType::kShared); } gfx::FontList AppTitleFontForType(ash::AppListConfigType type) { @@ -189,9 +169,6 @@ case ash::AppListConfigType::kSmall: return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta(0); } - - NOTREACHED(); - return AppTitleFontForType(ash::AppListConfigType::kShared); } int FolderUnclippedIconDimensionForType(ash::AppListConfigType type) { @@ -204,9 +181,6 @@ case ash::AppListConfigType::kSmall: return 56; } - - NOTREACHED(); - return FolderUnclippedIconDimensionForType(ash::AppListConfigType::kShared); } int FolderClippedIconDimensionForType(ash::AppListConfigType type) { @@ -219,9 +193,6 @@ case ash::AppListConfigType::kSmall: return 48; } - - NOTREACHED(); - return FolderClippedIconDimensionForType(ash::AppListConfigType::kShared); } int ItemIconInFolderIconDimensionForType(ash::AppListConfigType type) { @@ -234,9 +205,6 @@ case ash::AppListConfigType::kSmall: return 24; } - - NOTREACHED(); - return ItemIconInFolderIconDimensionForType(ash::AppListConfigType::kShared); } int ItemIconInFolderIconMarginForType(ash::AppListConfigType type) { @@ -248,9 +216,6 @@ case ash::AppListConfigType::kSmall: return 2; } - - NOTREACHED(); - return ItemIconInFolderIconMarginForType(ash::AppListConfigType::kShared); } int SuggestionChipIconDimension() { @@ -299,12 +264,14 @@ suggestion_chip_icon_dimension_(SuggestionChipIconDimension()), suggestion_chip_container_top_margin_( SuggestionChipContainerTopMarginForType(type)), + suggestion_chip_container_height_(32), app_title_max_line_height_(AppTitleMaxLineHeightForType(type)), app_title_font_(AppTitleFontForType(type)), peeking_app_list_height_(284), search_box_closed_top_padding_(0), search_box_peeking_top_padding_(84), search_box_fullscreen_top_padding_(24), + search_box_height_(48), search_box_height_for_dense_layout_(40), preferred_cols_(5), preferred_rows_(4), @@ -355,25 +322,25 @@ scale_x_(scale_x), scale_y_(scale_y), grid_tile_width_(MinScale(base_config.grid_tile_width_, scale_x, 1)), - grid_tile_height_( - MinScale(base_config.grid_tile_height_ - - (min_y_scale ? kMinYScaleHeightAdjustment : 0), - scale_y, - 1)), + grid_tile_height_(MinScale( + base_config.grid_tile_height_ - + (min_y_scale ? MinYScaleHeightAdjustmentForType(type_) : 0), + scale_y, + 1)), grid_tile_spacing_(base_config.grid_tile_spacing_), grid_icon_dimension_(MinScale(base_config.grid_icon_dimension_, scale_x, inner_tile_scale_y)), - grid_icon_bottom_padding_( - MinScale(base_config.grid_icon_bottom_padding_ + - (min_y_scale ? kMinYScaleHeightAdjustment : 0), - inner_tile_scale_y, - 1)), - grid_title_top_padding_( - MinScale(base_config.grid_title_top_padding_ - - (min_y_scale ? kMinYScaleHeightAdjustment : 0), - inner_tile_scale_y, - 1)), + grid_icon_bottom_padding_(MinScale( + base_config.grid_icon_bottom_padding_ + + (min_y_scale ? MinYScaleHeightAdjustmentForType(type_) : 0), + inner_tile_scale_y, + 1)), + grid_title_top_padding_(MinScale( + base_config.grid_title_top_padding_ - + (min_y_scale ? MinYScaleHeightAdjustmentForType(type_) : 0), + inner_tile_scale_y, + 1)), grid_title_bottom_padding_( MinScale(base_config.grid_title_bottom_padding_, inner_tile_scale_y, @@ -410,6 +377,8 @@ base_config.suggestion_chip_icon_dimension_), suggestion_chip_container_top_margin_( base_config.suggestion_chip_container_top_margin_), + suggestion_chip_container_height_( + base_config.suggestion_chip_container_height_), app_title_max_line_height_(base_config.app_title_max_line_height_), app_title_font_(base_config.app_title_font_.DeriveWithSizeDelta( min_y_scale ? -2 : (scale_y < 0.66 ? -1 : 0))), @@ -420,6 +389,7 @@ base_config.search_box_peeking_top_padding_), search_box_fullscreen_top_padding_( base_config.search_box_fullscreen_top_padding_), + search_box_height_(base_config.search_box_height_), search_box_height_for_dense_layout_( base_config.search_box_height_for_dense_layout_), preferred_cols_(base_config.preferred_cols_), @@ -483,9 +453,7 @@ all_apps_opacity_end_px_(base_config.all_apps_opacity_end_px_), search_result_title_font_style_( base_config.search_result_title_font_style_), - search_tile_height_(base_config.search_tile_height_) { - DCHECK_EQ(type_, ash::AppListConfigType::kShared); -} + search_tile_height_(base_config.search_tile_height_) {} AppListConfig::~AppListConfig() = default; @@ -508,10 +476,8 @@ case ash::SearchResultDisplayType::kCard: return 0; case ash::SearchResultDisplayType::kLast: - break; + return 0; } - NOTREACHED(); - return 0; } int AppListConfig::GetMaxNumOfItemsPerPage(int /* page */) const {
diff --git a/ash/public/cpp/app_list/app_list_config.h b/ash/public/cpp/app_list/app_list_config.h index de71cd3..df1380f 100644 --- a/ash/public/cpp/app_list/app_list_config.h +++ b/ash/public/cpp/app_list/app_list_config.h
@@ -86,6 +86,9 @@ int suggestion_chip_container_top_margin() const { return suggestion_chip_container_top_margin_; } + int suggestion_chip_container_height() const { + return suggestion_chip_container_height_; + } int app_title_max_line_height() const { return app_title_max_line_height_; } const gfx::FontList& app_title_font() const { return app_title_font_; } int peeking_app_list_height() const { return peeking_app_list_height_; } @@ -98,6 +101,7 @@ int search_box_fullscreen_top_padding() const { return search_box_fullscreen_top_padding_; } + int search_box_height() const { return search_box_height_; } int search_box_height_for_dense_layout() const { return search_box_height_for_dense_layout_; } @@ -292,6 +296,9 @@ // The suggestion chip container top margin. const int suggestion_chip_container_top_margin_; + // The suggestion chip container height. + const int suggestion_chip_container_height_; + // The maximum line height for app title in app list. const int app_title_max_line_height_; @@ -310,9 +317,11 @@ // The top padding of search box in fullscreen state. const int search_box_fullscreen_top_padding_; + // The preferred search box height. + const int search_box_height_; + // The preferred search box height when the vertical app list contents space - // is condensed - normally the default search box preferred height would be - // used. + // is condensed - normally |search_box_height_| would be used. const int search_box_height_for_dense_layout_; // Preferred number of columns and rows in apps grid.
diff --git a/ash/public/cpp/app_list/app_list_config_provider.cc b/ash/public/cpp/app_list/app_list_config_provider.cc index 082b9b2..49ce087 100644 --- a/ash/public/cpp/app_list/app_list_config_provider.cc +++ b/ash/public/cpp/app_list/app_list_config_provider.cc
@@ -15,8 +15,8 @@ namespace { -// The minimum scale that can be used when scaling down the app list view UI. -constexpr float kMinimumConfigScale = 48. / 120.; +// The minimum allowed app list grid item heightafter scaling a config down. +constexpr float kMinimumTileHeightAfterConfigScale = 48.; // Determines the app list config that should be used for a display work area // size. It should not be used if ScalableAppList feature is disabled. @@ -89,22 +89,18 @@ std::unique_ptr<AppListConfig> AppListConfigProvider::CreateForAppListWidget( const gfx::Size& display_work_area_size, - const gfx::Size& available_grid_size, + int min_horizontal_margin, + int shelf_height, const AppListConfig* current_config) { - if (app_list_features::IsScalableAppListEnabled()) { - ash::AppListConfigType type = - GetConfigTypeForDisplaySize(display_work_area_size); - if (current_config && current_config->type() == type) - return nullptr; - // Ensure that the app list config provider has a config with the same - // type as the created config - the app list model will use the config owned - // by the AppListConfigProvider instance to generate folder icons needed by - // app list UI. - GetConfigForType(type, true /*can_create*/); - return std::make_unique<AppListConfig>(type); - } + const AppListConfig& base_config = + GetBaseConfigForDisplaySize(display_work_area_size); - AppListConfig& base_config = AppListConfig::instance(); + float scale_x = 1; + float scale_y = 1; + float inner_tile_scale_y = 1; + + const float min_config_scale = + kMinimumTileHeightAfterConfigScale / base_config.grid_tile_height(); const int min_grid_height = (display_work_area_size.width() < display_work_area_size.height() @@ -117,14 +113,28 @@ : base_config.preferred_cols()) * base_config.grid_tile_width(); - float scale_x = 1; - float scale_y = 1; - float inner_tile_scale_y = 1; + int non_grid_height = base_config.suggestion_chip_container_top_margin() + + base_config.suggestion_chip_container_height(); + // Add search box height. + non_grid_height += display_work_area_size.height() - shelf_height >= 600 + ? base_config.search_box_height() + : base_config.search_box_height_for_dense_layout(); - if (available_grid_size.height() < min_grid_height) { + // Add minimum top margin (which matches the grid fadeout zone when scalable + // app list is enabled). + if (app_list_features::IsScalableAppListEnabled()) { + non_grid_height += base_config.grid_fadeout_zone_height(); + } else { + non_grid_height += base_config.search_box_fullscreen_top_padding(); + } + + const int available_grid_height = + display_work_area_size.height() - shelf_height - non_grid_height; + + if (available_grid_height < min_grid_height) { scale_y = std::max( - kMinimumConfigScale, - static_cast<float>(available_grid_size.height() - + min_config_scale, + static_cast<float>(available_grid_height - 2 * base_config.grid_fadeout_zone_height()) / min_grid_height); // Adjust scale to reflect the fact the app list item title height does not @@ -142,24 +152,42 @@ total_title_padding; } - if (available_grid_size.width() < min_grid_width) { - scale_x = std::max( - kMinimumConfigScale, - static_cast<float>(available_grid_size.width()) / min_grid_width); + const int available_grid_width = + display_work_area_size.width() - 2 * min_horizontal_margin; + + if (available_grid_width < min_grid_width) { + scale_x = + std::max(min_config_scale, + static_cast<float>(available_grid_width) / min_grid_width); } - if (current_config && current_config->scale_x() == scale_x && + if (current_config && current_config->type() == base_config.type() && + current_config->scale_x() == scale_x && current_config->scale_y() == scale_y) { return nullptr; } return std::make_unique<AppListConfig>(base_config, scale_x, scale_y, inner_tile_scale_y, - scale_y == kMinimumConfigScale); + scale_y == min_config_scale); } void AppListConfigProvider::ResetForTesting() { configs_.clear(); } +const AppListConfig& AppListConfigProvider::GetBaseConfigForDisplaySize( + const gfx::Size& display_work_area_size) { + if (!app_list_features::IsScalableAppListEnabled()) + return AppListConfig::instance(); + + ash::AppListConfigType type = + GetConfigTypeForDisplaySize(display_work_area_size); + // Ensures that the app list config provider has a config with the same + // type as the created config - the app list model will use the config owned + // by the AppListConfigProvider instance to generate folder icons needed by + // app list UI. + return *GetConfigForType(type, true /*can_create*/); +} + } // namespace ash
diff --git a/ash/public/cpp/app_list/app_list_config_provider.h b/ash/public/cpp/app_list/app_list_config_provider.h index f7f4a1c..ff6d7dd 100644 --- a/ash/public/cpp/app_list/app_list_config_provider.h +++ b/ash/public/cpp/app_list/app_list_config_provider.h
@@ -53,22 +53,29 @@ // based on the app list display, and available size for the apps grid. // Returns nullptr if the new app list config is the same as |current_config|. // |work_area_size|: The work area size of the display showing the app list. - // |available_grid_size|: The size of the bounds available for the apps grid. + // |min_horizontal_margin|: The minimum horizontal margins that the apps grid + // has to respect (the apps grid width should fit into the space + // restricted by these margins). + // |shelf_height|: The current shelf height. // |current_config|: If not null, the app list config currently used by the - // app list. + // app list. // TODO(crbug.com/976947): Once ScalableAppList feature is removed (and // enabled by default), this should return a reference or a pointer to an // AppListConfig owned by |this|, as then the number of possible different // configs will be restricted to the number of supported config types. std::unique_ptr<AppListConfig> CreateForAppListWidget( const gfx::Size& display_work_area_size, - const gfx::Size& available_grid_size, + int min_horizontal_margin, + int shelf_height, const AppListConfig* current_config); // Clears the set of configs owned by the provider. void ResetForTesting(); private: + const AppListConfig& GetBaseConfigForDisplaySize( + const gfx::Size& display_work_area_size); + std::map<ash::AppListConfigType, std::unique_ptr<AppListConfig>> configs_; base::ObserverList<Observer>::Unchecked observers_;
diff --git a/ash/public/cpp/app_list/app_list_config_provider_unittest.cc b/ash/public/cpp/app_list/app_list_config_provider_unittest.cc index 64eb59d9..48a2ff0 100644 --- a/ash/public/cpp/app_list/app_list_config_provider_unittest.cc +++ b/ash/public/cpp/app_list/app_list_config_provider_unittest.cc
@@ -211,9 +211,8 @@ std::unique_ptr<AppListConfig> config = AppListConfigProvider::Get().CreateForAppListWidget( - test_case.work_area_size, - gfx::Size(300, 300) /*not used with kScalableAppList feature*/, - nullptr); + test_case.work_area_size, 32 /*min_horizontal_margin*/, + 56 /*shelf_height*/, nullptr); ASSERT_TRUE(config.get()); EXPECT_EQ(test_case.config_type, config->type()); @@ -236,9 +235,8 @@ // Verify CreateForAppListWidget returns nullptr if the created config would // be the same as |config|. EXPECT_FALSE(AppListConfigProvider::Get().CreateForAppListWidget( - test_case.work_area_size, - gfx::Size(300, 300) /*not used with kScalableAppList feature*/, - config.get())); + test_case.work_area_size, 32 /*min_horizontal_margin*/, + 56 /*shelf_height*/, config.get())); } } @@ -253,25 +251,22 @@ // Create initial configuration. std::unique_ptr<AppListConfig> config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(1200, 768), - gfx::Size(300, 300) /*not used with kScalableAppList feature*/, - nullptr); + gfx::Size(1200, 768), 32 /*min_horizontal_margin*/, + 56 /*shelf_height*/, nullptr); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kLarge, config->type()); // Verify CreateForAppListWidget returns nullptr if the created config would // be the same as |config|. EXPECT_FALSE(AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(768, 1200), - gfx::Size(300, 300) /*not used with kScalableAppList feature*/, + gfx::Size(768, 1200), 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get())); // Create different config. std::unique_ptr<AppListConfig> updated_config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(960, 600), - gfx::Size(300, 300) /*not used with kScalableAppList feature*/, - config.get()); + gfx::Size(960, 600), 32 /*min_horizontal_margin*/, + 56 /*shelf_height*/, config.get()); ASSERT_TRUE(updated_config); EXPECT_EQ(ash::AppListConfigType::kMedium, updated_config->type()); } @@ -290,7 +285,7 @@ std::unique_ptr<AppListConfig> config = AppListConfigProvider::Get().CreateForAppListWidget( gfx::Size(1200, 768) /*display_work_area_size*/, - gfx::Size(1000, 700) /*available_grid_size*/, nullptr); + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, nullptr); ASSERT_TRUE(config.get()); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(1, config->scale_x()); @@ -309,12 +304,12 @@ // previous one. EXPECT_FALSE(AppListConfigProvider::Get().CreateForAppListWidget( gfx::Size(1200, 768) /*display_work_area_size*/, - gfx::Size(1200, 700) /*available_grid_size*/, config.get())); + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get())); // The app list has to be scaled down horizontally. config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(800, 600) /*display_work_area_size*/, - gfx::Size(500, 528) /*available_grid_size*/, config.get()); + gfx::Size(800, 700) /*display_work_area_size*/, + 150 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(500.f / kMinGridWidth, config->scale_x()); @@ -328,8 +323,8 @@ // The app list has to be scaled down vertically. config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(800, 600) /*display_work_area_size*/, - gfx::Size(600, 448) /*available_grid_size*/, config.get()); + gfx::Size(800, 624) /*display_work_area_size*/, + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(1, config->scale_x()); @@ -345,8 +340,8 @@ // Both vertical and horizontal scaling required. config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(800, 600) /*display_work_area_size*/, - gfx::Size(500, 448) /*available_grid_size*/, config.get()); + gfx::Size(800, 624) /*display_work_area_size*/, + 150 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(500.f / kMinGridWidth, config->scale_x()); @@ -376,7 +371,7 @@ std::unique_ptr<AppListConfig> config = AppListConfigProvider::Get().CreateForAppListWidget( gfx::Size(768, 1200) /*display_work_area_size*/, - gfx::Size(700, 1200) /*available_grid_size*/, nullptr); + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, nullptr); ASSERT_TRUE(config.get()); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(1, config->scale_x()); @@ -395,12 +390,12 @@ // previous one. EXPECT_FALSE(AppListConfigProvider::Get().CreateForAppListWidget( gfx::Size(768, 1200) /*display_work_area_size*/, - gfx::Size(700, 1200) /*available_grid_size*/, config.get())); + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get())); // The app list has to be scaled down horizontally. config = AppListConfigProvider::Get().CreateForAppListWidget( gfx::Size(600, 800) /*display_work_area_size*/, - gfx::Size(400, 600) /*available_grid_size*/, config.get()); + 100 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(400.f / kMinGridWidth, config->scale_x()); @@ -414,8 +409,8 @@ // The app list has to be scaled down vertically. config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(600, 800) /*display_work_area_size*/, - gfx::Size(600, 448) /*available_grid_size*/, config.get()); + gfx::Size(600, 624) /*display_work_area_size*/, + 32 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(1, config->scale_x()); @@ -431,8 +426,8 @@ // Both vertical and horizontal scaling required. config = AppListConfigProvider::Get().CreateForAppListWidget( - gfx::Size(600, 800) /*display_work_area_size*/, - gfx::Size(300, 548) /*available_grid_size*/, config.get()); + gfx::Size(600, 732) /*display_work_area_size*/, + 150 /*min_horizontal_margin*/, 56 /*shelf_height*/, config.get()); ASSERT_TRUE(config); EXPECT_EQ(ash::AppListConfigType::kShared, config->type()); EXPECT_EQ(300.f / kMinGridWidth, config->scale_x());
diff --git a/ash/public/cpp/desks_helper.cc b/ash/public/cpp/desks_helper.cc new file mode 100644 index 0000000..f95a7c9 --- /dev/null +++ b/ash/public/cpp/desks_helper.cc
@@ -0,0 +1,31 @@ +// 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 "ash/public/cpp/desks_helper.h" + +#include "base/logging.h" + +namespace ash { + +namespace { +DesksHelper* g_instance = nullptr; +} // namespace + +// static +DesksHelper* DesksHelper::Get() { + DCHECK(g_instance); + return g_instance; +} + +DesksHelper::DesksHelper() { + DCHECK(!g_instance); + g_instance = this; +} + +DesksHelper::~DesksHelper() { + DCHECK_EQ(this, g_instance); + g_instance = nullptr; +} + +} // namespace ash
diff --git a/ash/public/cpp/desks_helper.h b/ash/public/cpp/desks_helper.h new file mode 100644 index 0000000..76ba75b --- /dev/null +++ b/ash/public/cpp/desks_helper.h
@@ -0,0 +1,36 @@ +// 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 ASH_PUBLIC_CPP_DESKS_HELPER_H_ +#define ASH_PUBLIC_CPP_DESKS_HELPER_H_ + +#include "ash/public/cpp/ash_public_export.h" +#include "base/macros.h" + +namespace aura { +class Window; +} // namespace aura + +namespace ash { + +// Interface for an ash client (e.g. Chrome) to interact with the Virtual Desks +// feature. +class ASH_PUBLIC_EXPORT DesksHelper { + public: + static DesksHelper* Get(); + + // Returns true if |window| exists on the currently active desk. + virtual bool BelongsToActiveDesk(aura::Window* window) = 0; + + protected: + DesksHelper(); + virtual ~DesksHelper(); + + private: + DISALLOW_COPY_AND_ASSIGN(DesksHelper); +}; + +} // namespace ash + +#endif // ASH_PUBLIC_CPP_DESKS_HELPER_H_
diff --git a/ash/shelf/scrollable_shelf_view.cc b/ash/shelf/scrollable_shelf_view.cc index 163324e..3c8bba5 100644 --- a/ash/shelf/scrollable_shelf_view.cc +++ b/ash/shelf/scrollable_shelf_view.cc
@@ -677,6 +677,10 @@ // transformation. UpdateVisibleSpace(); shelf_container_view_->layer()->SetClipRect(visible_space_); + if (IsInTabletMode() && chromeos::switches::ShouldShowShelfHotseat()) { + shelf_container_view_->layer()->SetRoundedCornerRadius( + CalculateShelfContainerRoundedCorners()); + } gfx::Vector2dF total_offset = scroll_offset_; if (ShouldAdaptToRTL()) @@ -1323,11 +1327,34 @@ if (ShouldAdaptToRTL()) return gfx::Insets(0, after_padding, 0, before_padding); - else { - return GetShelf()->IsHorizontalAlignment() - ? gfx::Insets(0, before_padding, 0, after_padding) - : gfx::Insets(before_padding, 0, after_padding, 0); - } + + return GetShelf()->IsHorizontalAlignment() + ? gfx::Insets(0, before_padding, 0, after_padding) + : gfx::Insets(before_padding, 0, after_padding, 0); +} + +gfx::RoundedCornersF +ScrollableShelfView::CalculateShelfContainerRoundedCorners() const { + const bool is_horizontal_alignment = GetShelf()->IsHorizontalAlignment(); + const float radius = (is_horizontal_alignment ? height() : width()) / 2.f; + + const int upper_left = left_arrow_->GetVisible() ? 0 : radius; + + int upper_right; + if (is_horizontal_alignment) + upper_right = right_arrow_->GetVisible() ? 0 : radius; + else + upper_right = left_arrow_->GetVisible() ? 0 : radius; + + const int lower_right = right_arrow_->GetVisible() ? 0 : radius; + + int lower_left; + if (is_horizontal_alignment) + lower_left = left_arrow_->GetVisible() ? 0 : radius; + else + lower_left = right_arrow_->GetVisible() ? 0 : radius; + + return gfx::RoundedCornersF(upper_left, upper_right, lower_right, lower_left); } } // namespace ash
diff --git a/ash/shelf/scrollable_shelf_view.h b/ash/shelf/scrollable_shelf_view.h index 675a7b6..3fb7d33 100644 --- a/ash/shelf/scrollable_shelf_view.h +++ b/ash/shelf/scrollable_shelf_view.h
@@ -265,6 +265,11 @@ // ripple ring correctly. gfx::Insets CalculateRipplePaddingInsets() const; + // Calculates the rounded corners for |shelf_container_view_|. It contributes + // to cut off the child view out of the scrollable shelf's bounds, such as + // ripple ring. + gfx::RoundedCornersF CalculateShelfContainerRoundedCorners() const; + LayoutStrategy layout_strategy_ = kNotShowArrowButtons; // Child views Owned by views hierarchy.
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc index b8b5776..009bef7 100644 --- a/ash/shelf/shelf_layout_manager_unittest.cc +++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -2694,32 +2694,43 @@ TestHomeLauncherGestureHandler(/*autohide_shelf=*/true); } -TEST_F(ShelfLayoutManagerTest, PressHomeButtonOnAutoHideShelf) { +// Tests that tapping the home button is successful on the autohidden shelf. +TEST_P(ShelfLayoutManagerTest, PressHomeButtonOnAutoHideShelf) { TabletModeControllerTestApi().EnterTabletMode(); - - // Create a widget to hide the shelf in auto-hide mode. - views::Widget* widget = CreateTestWidget(); Shelf* shelf = GetPrimaryShelf(); + shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); const display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); - shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); - ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); - layout_manager->LayoutShelf(); + // Create a window to hide the shelf in auto-hide mode. + std::unique_ptr<aura::Window> window = + AshTestBase::CreateTestWindow(gfx::Rect(0, 0, 400, 400)); + wm::ActivateWindow(window.get()); + EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState()); EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState()); + GetAppListTestHelper()->CheckVisibility(false); SwipeUpOnShelf(); EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState()); + GetAppListTestHelper()->CheckVisibility(false); // Press the home button with touch. views::View* home_button = GetPrimaryShelf()->shelf_widget()->GetHomeButton(); + // Wait for the back button to finish animating from behind the home button. + ShelfViewTestAPI(GetPrimaryShelf()->GetShelfViewForTesting()) + .RunMessageLoopUntilAnimationsDone( + GetPrimaryShelf() + ->GetShelfViewForTesting() + ->shelf_widget() + ->navigation_widget() + ->get_bounds_animator_for_testing()); + GetEventGenerator()->GestureTapAt( home_button->GetBoundsInScreen().CenterPoint()); // The app list should now be visible, and the window we created should hide. GetAppListTestHelper()->CheckVisibility(true); - aura::Window* window = widget->GetNativeWindow(); EXPECT_FALSE(window->IsVisible()); }
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index 8b825ad..072a4e7 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc
@@ -209,6 +209,10 @@ } void ShelfWidget::DelegateView::UpdateOpaqueBackground() { + // Shell could be destroying. + if (!Shell::Get()->tablet_mode_controller()) + return; + gfx::Rect opaque_background_bounds = GetLocalBounds(); const Shelf* shelf = shelf_widget_->shelf();
diff --git a/ash/shell/content/test/ash_content_test.cc b/ash/shell/content/test/ash_content_test.cc index e492f0aa..4e55273 100644 --- a/ash/shell/content/test/ash_content_test.cc +++ b/ash/shell/content/test/ash_content_test.cc
@@ -5,6 +5,7 @@ #include "ash/shell/content/test/ash_content_test.h" #include <utility> +#include <vector> #include "ash/public/cpp/shelf_config.h" #include "ash/shell.h" @@ -27,6 +28,7 @@ #include "base/system/sys_info.h" #include "base/task/post_task.h" #include "base/test/test_file_util.h" +#include "base/threading/thread_restrictions.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "chromeos/constants/chromeos_switches.h" @@ -34,6 +36,7 @@ #include "content/public/browser/tracing_controller.h" #include "content/public/test/browser_test_utils.h" #include "services/tracing/public/cpp/trace_event_agent.h" +#include "testing/perf/luci_test_result.h" #include "ui/aura/window_tracker.h" #include "ui/compositor/compositor_switches.h" #include "ui/display/display_switches.h" @@ -56,15 +59,29 @@ return static_cast<float>(samples->sum()) / samples->TotalCount(); } +perf_test::LuciTestResult CreateTestResult( + const base::FilePath& trace_file, + const std::vector<std::string>& tbm_metrics) { + perf_test::LuciTestResult result = + perf_test::LuciTestResult::CreateForGTest(); + result.AddOutputArtifactFile("trace/1", trace_file, "application/json"); + for (auto& metric : tbm_metrics) + result.AddTag("tbmv2", metric); + + return result; +} + } // namespace class AshContentTest::Tracer { public: Tracer(base::FilePath trace_dir, std::string tracing_categories, - std::vector<std::string> histograms) + std::vector<std::string> histograms, + std::vector<std::string> tbm_metrics) : trace_dir_(std::move(trace_dir)), - tracing_categories_(std::move(tracing_categories)) { + tracing_categories_(std::move(tracing_categories)), + tbm_metrics_(std::move(tbm_metrics)) { auto* controller = content::TracingController::GetInstance(); base::trace_event::TraceConfig config( tracing_categories_, base::trace_event::RECORD_CONTINUOUSLY); @@ -79,16 +96,9 @@ } ~Tracer() { - { - // TODO(oshima): Figure out how interactive_ui_tests allows IO operation - // in teardown. - base::RunLoop runloop; - base::PostTaskAndReply( - FROM_HERE, {base::ThreadPool(), base::MayBlock()}, - base::BindOnce(&Tracer::CreateTmp, base::Unretained(this)), - runloop.QuitClosure()); - runloop.Run(); - } + base::ScopedAllowBlockingForTesting allow_io; + CreateTmp(); + { base::RunLoop runloop; auto trace_data_endpoint = content::TracingController::CreateFileEndpoint( @@ -98,6 +108,10 @@ runloop.Run(); CHECK(result); } + + base::FilePath report_file = + trace_file_.AddExtension(FILE_PATH_LITERAL("test_result.json")); + CreateTestResult(trace_file_, tbm_metrics_).WriteToFile(report_file); } void CreateTmp() { @@ -107,6 +121,7 @@ base::FilePath trace_dir_; base::FilePath trace_file_; std::string tracing_categories_; + std::vector<std::string> tbm_metrics_; }; AshContentTest::AshContentTest() @@ -144,7 +159,7 @@ std::move(dir), std::move( "benchmark,cc,viz,input,latency,gpu,rail,toplevel,ui,views,viz"), - GetUMAHistogramNames()); + GetUMAHistogramNames(), GetTimelineBasedMetrics()); } gfx::Size display_size = ash::Shell::GetPrimaryRootWindow()->bounds().size(); test_window_size_.set_height( @@ -154,8 +169,8 @@ void AshContentTest::TearDownOnMainThread() { tracer_.reset(); - bool print = - base::CommandLine::ForCurrentProcess()->HasSwitch(kPerfTestPrintUmaMeans); + auto* command_line = base::CommandLine::ForCurrentProcess(); + const bool print = command_line->HasSwitch(kPerfTestPrintUmaMeans); LOG_IF(INFO, print) << "=== Histogram Means ==="; for (auto name : GetUMAHistogramNames()) { EXPECT_TRUE(!!base::StatisticsRecorder::FindHistogram(name)) @@ -210,5 +225,9 @@ } std::vector<std::string> AshContentTest::GetUMAHistogramNames() const { - return std::vector<std::string>(); + return {}; +} + +std::vector<std::string> AshContentTest::GetTimelineBasedMetrics() const { + return {"renderingMetric", "umaMetric"}; }
diff --git a/ash/shell/content/test/ash_content_test.h b/ash/shell/content/test/ash_content_test.h index 19d370b..9958806 100644 --- a/ash/shell/content/test/ash_content_test.h +++ b/ash/shell/content/test/ash_content_test.h
@@ -6,6 +6,8 @@ #define ASH_SHELL_CONTENT_TEST_ASH_CONTENT_TEST_H_ #include <memory> +#include <string> +#include <vector> #include "base/macros.h" #include "content/public/test/content_browser_test.h" @@ -30,6 +32,13 @@ virtual std::vector<std::string> GetUMAHistogramNames() const; + // Returns the names of timeline based metrics (TBM) to be extracted from + // the generated trace. The metrics must be defined in telemetry + // third_party/catapult/tracing/tracing/metrics/ + // so that third_party/catapult/tracing/bin/run_metric could handle them. + // Default is "renderingMetric", "umaMetric". + virtual std::vector<std::string> GetTimelineBasedMetrics() const; + private: class Tracer;
diff --git a/ash/system/night_light/night_light_controller_impl.cc b/ash/system/night_light/night_light_controller_impl.cc index ee19be3..d9d0172 100644 --- a/ash/system/night_light/night_light_controller_impl.cc +++ b/ash/system/night_light/night_light_controller_impl.cc
@@ -481,10 +481,10 @@ StoreCachedGeoposition(position); delegate_->SetGeoposition(position); - // If the schedule type is sunset to sunrise, then a potential change in the - // geoposition might mean a change in the start and end times. In this case, - // we must trigger a refresh. - if (GetScheduleType() == ScheduleType::kSunsetToSunrise) + // If the schedule type is sunset to sunrise or custom, a potential change in + // the geoposition might mean timezone change as well as a change in the start + // and end times. In these cases, we must trigger a refresh. + if (GetScheduleType() != ScheduleType::kNone) Refresh(true /* did_schedule_change */); }
diff --git a/ash/system/night_light/night_light_controller_unittest.cc b/ash/system/night_light/night_light_controller_unittest.cc index a5cbe33..bbae7d8 100644 --- a/ash/system/night_light/night_light_controller_unittest.cc +++ b/ash/system/night_light/night_light_controller_unittest.cc
@@ -585,7 +585,7 @@ // now sunset sunrise // NightLightControllerImpl* controller = GetController(); - delegate()->SetFakeNow(TimeOfDay(16 * 60)); // 4:00 PM. + delegate()->SetFakeNow(TimeOfDay(16 * 60)); // 4:00PM. controller->SetCurrentGeoposition(NightLightController::SimpleGeoposition{ kFakePosition1_Latitude, kFakePosition1_Longitude}); @@ -642,6 +642,86 @@ controller->timer()->GetCurrentDelay()); } +// Tests the behavior when the client sets the geoposition while in custom +// schedule setting. Current time is simulated to be updated accordingly. The +// current time change should bring the controller into or take it out of the +// night light mode accordingly if necessary, based on the settings. +TEST_F(NightLightTest, TestCustomScheduleGeopositionChanges) { + constexpr int kCustom_Start = 19 * 60; + constexpr int kCustom_End = 2 * 60; + + // Returns the positive difference in minutes given t1 and t2 in minutes + auto time_diff = [](int t1, int t2) { + int t = t2 - t1; + return t < 0 ? 24 * 60 + t : t; + }; + + NightLightControllerImpl* controller = GetController(); + controller->SetCustomStartTime(TimeOfDay(kCustom_Start)); + controller->SetCustomEndTime(TimeOfDay(kCustom_End)); + + // Position 1 current time and custom start and end time. + // + // 16:00 19:00 2:00 + // <----- + --------- + --------------- + -------------> + // | | | + // now custom start custom end + // + + int fake_now = 16 * 60; + delegate()->SetFakeNow(TimeOfDay(fake_now)); + controller->SetCurrentGeoposition(NightLightController::SimpleGeoposition{ + kFakePosition1_Latitude, kFakePosition1_Longitude}); + + // Expect that timer is running and is scheduled at next custom start time. + controller->SetScheduleType(NightLightController::ScheduleType::kCustom); + EXPECT_FALSE(controller->GetEnabled()); + TestCompositorsTemperature(0.0f); + EXPECT_TRUE(controller->timer()->IsRunning()); + EXPECT_EQ(base::TimeDelta::FromMinutes(time_diff(fake_now, kCustom_Start)), + controller->timer()->GetCurrentDelay()); + + // Simulate a timezone change by changing geoposition. + // Current time updates to 9PM. + // 19:00 21:00 2:00 + // <----- + --------- + -------- + ---------------------> + // | | | + // custom start now custom end + // + fake_now = 21 * 60; + delegate()->SetFakeNow(TimeOfDay(fake_now)); + controller->timer()->FireNow(); + controller->SetCurrentGeoposition(NightLightController::SimpleGeoposition{ + kFakePosition2_Latitude, kFakePosition2_Longitude}); + + // Expect the controller to enter night light mode and the scheduled end + // delay has been updated. + EXPECT_TRUE(controller->GetEnabled()); + TestCompositorsTemperature(controller->GetColorTemperature()); + EXPECT_EQ(NightLightControllerImpl::AnimationDuration::kShort, + controller->last_animation_duration()); + EXPECT_TRUE(controller->timer()->IsRunning()); + EXPECT_EQ(base::TimeDelta::FromMinutes(time_diff(fake_now, kCustom_End)), + controller->timer()->GetCurrentDelay()); + + // Simulate user changing position back to location 1 and current time goes + // back to 4PM. + fake_now = 16 * 60; + delegate()->SetFakeNow(TimeOfDay(fake_now)); + controller->timer()->FireNow(); + + controller->SetCurrentGeoposition(NightLightController::SimpleGeoposition{ + kFakePosition1_Latitude, kFakePosition1_Longitude}); + EXPECT_FALSE(controller->GetEnabled()); + TestCompositorsTemperature(0.0f); + EXPECT_EQ(NightLightControllerImpl::AnimationDuration::kShort, + controller->last_animation_duration()); + // Timer is running and is scheduled at next custom start time. + EXPECT_TRUE(controller->timer()->IsRunning()); + EXPECT_EQ(base::TimeDelta::FromMinutes(time_diff(fake_now, kCustom_Start)), + controller->timer()->GetCurrentDelay()); +} + // Tests the behavior when there is no valid geoposition for example due to lack // of connectivity. TEST_F(NightLightTest, AbsentValidGeoposition) {
diff --git a/ash/wm/back_gesture_affordance.cc b/ash/wm/back_gesture_affordance.cc index 9cd824f..8290fb4 100644 --- a/ash/wm/back_gesture_affordance.cc +++ b/ash/wm/back_gesture_affordance.cc
@@ -21,8 +21,10 @@ namespace { -// Distance of the arrow that above the drag start position. -constexpr int kArrowAboveStartPosition = 64; +// Distance from the arrow to the drag touch point. The arrow is usually +// above the touch point but will be put below the touch point if the affordance +// is outside of the display. +constexpr int kDistanceFromArrowToTouchPoint = 64; constexpr int kArrowSize = 20; @@ -129,9 +131,14 @@ gfx::Rect widget_bounds( gfx::Rect(2 * kRippleBurstRadius, 2 * kRippleBurstRadius)); gfx::Point origin; - // TODO(crbug.com/1002733): Handle the case while origin y is outside display. - origin.set_y(location.y() - kArrowAboveStartPosition - kRippleBurstRadius); origin.set_x(-kRippleBurstRadius - kBackgroundRadius); + int origin_y = + location.y() - kDistanceFromArrowToTouchPoint - kRippleBurstRadius; + if (origin_y < 0) { + origin_y = + location.y() + kDistanceFromArrowToTouchPoint - kRippleBurstRadius; + } + origin.set_y(origin_y); widget_bounds.set_origin(origin); return widget_bounds; }
diff --git a/ash/wm/back_gesture_affordance.h b/ash/wm/back_gesture_affordance.h index 8ccc59c..b53efd0 100644 --- a/ash/wm/back_gesture_affordance.h +++ b/ash/wm/back_gesture_affordance.h
@@ -7,6 +7,7 @@ #include <memory> +#include "ash/ash_export.h" #include "base/macros.h" #include "ui/gfx/animation/animation_delegate.h" #include "ui/gfx/animation/linear_animation.h" @@ -16,7 +17,7 @@ // This class is responsible for creating, painting, and positioning the back // gesture affordance. -class BackGestureAffordance : public gfx::AnimationDelegate { +class ASH_EXPORT BackGestureAffordance : public gfx::AnimationDelegate { public: explicit BackGestureAffordance(const gfx::Point& location); ~BackGestureAffordance() override; @@ -33,6 +34,10 @@ // Completes the affordance and fading it out. void Complete(); + gfx::Rect affordance_widget_bounds_for_testing() { + return affordance_widget_->GetWindowBoundsInScreen(); + } + private: enum class State { DRAGGING, ABORTING, COMPLETING };
diff --git a/ash/wm/back_gesture_affordance_unittest.cc b/ash/wm/back_gesture_affordance_unittest.cc new file mode 100644 index 0000000..142c20e --- /dev/null +++ b/ash/wm/back_gesture_affordance_unittest.cc
@@ -0,0 +1,48 @@ +// 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 "ash/wm/back_gesture_affordance.h" + +#include "ash/test/ash_test_base.h" +#include "base/strings/string_number_conversions.h" + +namespace ash { + +namespace { + +constexpr int kDisplayWidth = 1200; +constexpr int kDisplayHeight = 800; + +} // namespace + +using BackGestureAffordanceTest = AshTestBase; + +// Tests that the affordance should never be shown outside of the display. +TEST_F(BackGestureAffordanceTest, AffordaceShouldNotOutsideDisplay) { + const std::string display = base::NumberToString(kDisplayWidth) + "x" + + base::NumberToString(kDisplayHeight); + UpdateDisplay(display); + + // Affordance is above the start point and inside display if doesn's start + // from the top area of the display. + gfx::Point start_point(0, kDisplayHeight / 2); + std::unique_ptr<BackGestureAffordance> back_gesture_affordance = + std::make_unique<BackGestureAffordance>(start_point); + gfx::Rect affordance_bounds = + back_gesture_affordance->affordance_widget_bounds_for_testing(); + EXPECT_LE(0, affordance_bounds.y()); + EXPECT_GE(start_point.y(), affordance_bounds.y()); + + // Affordance should be put below the start point to keep it inside display if + // starts from the top area of the display. + start_point.set_y(10); + back_gesture_affordance = + std::make_unique<BackGestureAffordance>(gfx::Point(0, 10)); + affordance_bounds = + back_gesture_affordance->affordance_widget_bounds_for_testing(); + EXPECT_LE(0, affordance_bounds.y()); + EXPECT_LE(start_point.y(), affordance_bounds.y()); +} + +} // namespace ash
diff --git a/ash/wm/client_controlled_state.cc b/ash/wm/client_controlled_state.cc index 0b2edee7..5076711 100644 --- a/ash/wm/client_controlled_state.cc +++ b/ash/wm/client_controlled_state.cc
@@ -45,6 +45,10 @@ ClientControlledState::~ClientControlledState() = default; +void ClientControlledState::ResetDelegate() { + delegate_.reset(); +} + void ClientControlledState::HandleTransitionEvents(WindowState* window_state, const WMEvent* event) { if (!delegate_) @@ -127,6 +131,8 @@ void ClientControlledState::HandleWorkspaceEvents(WindowState* window_state, const WMEvent* event) { + if (!delegate_) + return; // Client is responsible for adjusting bounds after workspace bounds change. if (window_state->IsSnapped()) { gfx::Rect bounds = GetSnappedWindowBoundsInParent( @@ -263,7 +269,7 @@ } void ClientControlledState::OnWindowDestroying(WindowState* window_state) { - delegate_.reset(); + ResetDelegate(); } bool ClientControlledState::EnterNextState(WindowState* window_state,
diff --git a/ash/wm/client_controlled_state.h b/ash/wm/client_controlled_state.h index f056d1d..6b0b5d1 100644 --- a/ash/wm/client_controlled_state.h +++ b/ash/wm/client_controlled_state.h
@@ -53,6 +53,9 @@ explicit ClientControlledState(std::unique_ptr<Delegate> delegate); ~ClientControlledState() override; + // Resets |delegate_|. + void ResetDelegate(); + // A flag used to update the window's bounds directly, instead of // delegating to |Delegate|. The Delegate should use this to // apply the bounds change to the window.
diff --git a/ash/wm/desks/desks_controller.cc b/ash/wm/desks/desks_controller.cc index 3f1f03b..21267bd 100644 --- a/ash/wm/desks/desks_controller.cc +++ b/ash/wm/desks/desks_controller.cc
@@ -548,6 +548,10 @@ desk->OnRootWindowClosing(root_window); } +bool DesksController::BelongsToActiveDesk(aura::Window* window) { + return desks_util::BelongsToActiveDesk(window); +} + void DesksController::OnWindowActivating(ActivationReason reason, aura::Window* gaining_active, aura::Window* losing_active) {
diff --git a/ash/wm/desks/desks_controller.h b/ash/wm/desks/desks_controller.h index 355c8be..240af6a 100644 --- a/ash/wm/desks/desks_controller.h +++ b/ash/wm/desks/desks_controller.h
@@ -10,6 +10,7 @@ #include <vector> #include "ash/ash_export.h" +#include "ash/public/cpp/desks_helper.h" #include "ash/session/session_observer.h" #include "ash/wm/desks/desks_histogram_enums.h" #include "ash/wm/desks/root_window_desk_switch_animator.h" @@ -29,7 +30,8 @@ // Defines a controller for creating, destroying and managing virtual desks and // their windows. -class ASH_EXPORT DesksController : public wm::ActivationChangeObserver, +class ASH_EXPORT DesksController : public DesksHelper, + public wm::ActivationChangeObserver, public SessionObserver { public: class Observer { @@ -130,6 +132,9 @@ void OnRootWindowAdded(aura::Window* root_window); void OnRootWindowClosing(aura::Window* root_window); + // DesksHelper: + bool BelongsToActiveDesk(aura::Window* window) override; + // ::wm::ActivationChangeObserver: void OnWindowActivating(ActivationReason reason, aura::Window* gaining_active,
diff --git a/ash/wm/lock_layout_manager.cc b/ash/wm/lock_layout_manager.cc index 5c4345b..5f36092 100644 --- a/ash/wm/lock_layout_manager.cc +++ b/ash/wm/lock_layout_manager.cc
@@ -5,7 +5,6 @@ #include "ash/wm/lock_layout_manager.h" #include "ash/keyboard/ui/keyboard_ui_controller.h" -#include "ash/shell.h" #include "ash/wm/lock_window_state.h" #include "ash/wm/window_state.h" #include "ash/wm/wm_event.h" @@ -19,7 +18,6 @@ : WmDefaultLayoutManager(), window_(window), root_window_(window->GetRootWindow()) { - Shell::Get()->AddShellObserver(this); root_window_->AddObserver(this); keyboard::KeyboardUIController::Get()->AddObserver(this); shelf_observer_.Add(shelf); @@ -34,7 +32,6 @@ for (aura::Window* child : window_->children()) child->RemoveObserver(this); - Shell::Get()->RemoveShellObserver(this); } void LockLayoutManager::OnWindowResized() {
diff --git a/ash/wm/lock_layout_manager.h b/ash/wm/lock_layout_manager.h index 9c3685f..e689634 100644 --- a/ash/wm/lock_layout_manager.h +++ b/ash/wm/lock_layout_manager.h
@@ -10,7 +10,6 @@ #include "ash/public/cpp/keyboard/keyboard_controller_observer.h" #include "ash/shelf/shelf.h" #include "ash/shelf/shelf_observer.h" -#include "ash/shell_observer.h" #include "ash/wm/wm_default_layout_manager.h" #include "base/macros.h" #include "base/scoped_observer.h" @@ -35,7 +34,6 @@ // with LockWindowState. class ASH_EXPORT LockLayoutManager : public WmDefaultLayoutManager, public aura::WindowObserver, - public ShellObserver, public ShelfObserver, public KeyboardControllerObserver { public:
diff --git a/ash/wm/lock_window_state.cc b/ash/wm/lock_window_state.cc index 43e45480..c7ae3eb 100644 --- a/ash/wm/lock_window_state.cc +++ b/ash/wm/lock_window_state.cc
@@ -189,10 +189,13 @@ ? keyboard_controller->GetKeyboardLockScreenOffsetBounds().height() : 0; gfx::Rect bounds = screen_util::GetDisplayBoundsWithShelf(window); - bounds.Inset(0, - WorkAreaInsets::ForWindow(window->GetRootWindow()) - ->accessibility_panel_height(), - 0, keyboard_height); + gfx::Insets insets(WorkAreaInsets::ForWindow(window->GetRootWindow()) + ->GetAccessibilityInsets()); + + if (keyboard_height > 0) + insets.set_bottom(keyboard_height); + + bounds.Inset(insets); return bounds; }
diff --git a/ash/wm/overview/overview_window_drag_controller_unittest.cc b/ash/wm/overview/overview_window_drag_controller_unittest.cc index a45066d..d27eefa0 100644 --- a/ash/wm/overview/overview_window_drag_controller_unittest.cc +++ b/ash/wm/overview/overview_window_drag_controller_unittest.cc
@@ -24,6 +24,7 @@ #include "ash/wm/window_util.h" #include "base/stl_util.h" #include "base/test/scoped_feature_list.h" +#include "chromeos/constants/chromeos_switches.h" #include "ui/aura/window_tree_host.h" #include "ui/display/test/display_manager_test_api.h" #include "ui/events/test/event_generator.h" @@ -400,6 +401,10 @@ TEST_F(OverviewWindowDragControllerDesksPortraitTabletTest, DragAndDropInEmptyArea) { + // TODO(https://crbug.com/1011128): Fix this test when the hotseat is enabled. + if (chromeos::switches::ShouldShowShelfHotseat()) + return; + auto window = CreateAppWindow(gfx::Rect(0, 0, 250, 100)); StartDraggingAndValidateDesksBarShifted(window.get()); @@ -414,6 +419,10 @@ TEST_F(OverviewWindowDragControllerDesksPortraitTabletTest, DragAndDropInSnapAreas) { + // TODO(https://crbug.com/1011128): Fix this test when the hotseat is enabled. + if (chromeos::switches::ShouldShowShelfHotseat()) + return; + auto window = CreateAppWindow(gfx::Rect(0, 0, 250, 100)); StartDraggingAndValidateDesksBarShifted(window.get()); @@ -456,6 +465,10 @@ } TEST_F(OverviewWindowDragControllerDesksPortraitTabletTest, DragAndDropInDesk) { + // TODO(https://crbug.com/1011128): Fix this test when the hotseat is enabled. + if (chromeos::switches::ShouldShowShelfHotseat()) + return; + auto window = CreateAppWindow(gfx::Rect(0, 0, 250, 100)); StartDraggingAndValidateDesksBarShifted(window.get());
diff --git a/ash/wm/splitview/split_view_controller.cc b/ash/wm/splitview/split_view_controller.cc index 34051e1..f4fb7fa7 100644 --- a/ash/wm/splitview/split_view_controller.cc +++ b/ash/wm/splitview/split_view_controller.cc
@@ -703,7 +703,6 @@ StopObserving(LEFT); StopObserving(RIGHT); - split_view_divider_.reset(); black_scrim_layer_.reset(); default_snap_position_ = NONE; divider_position_ = -1; @@ -711,6 +710,10 @@ snapping_window_transformed_bounds_map_.clear(); UpdateStateAndNotifyObservers(); + // Close splitview divider widget after updating state so that + // OnDisplayMetricsChanged triggered by the widget closing correctly + // finds out !InSplitViewMode(). + split_view_divider_.reset(); base::RecordAction(base::UserMetricsAction("SplitView_EndSplitView")); UMA_HISTOGRAM_LONG_TIMES("Ash.SplitView.TimeInSplitView", base::Time::Now() - splitview_start_time_);
diff --git a/ash/wm/splitview/split_view_controller_unittest.cc b/ash/wm/splitview/split_view_controller_unittest.cc index f6fd5c8..e39cbcc 100644 --- a/ash/wm/splitview/split_view_controller_unittest.cc +++ b/ash/wm/splitview/split_view_controller_unittest.cc
@@ -4041,6 +4041,7 @@ CreateWindowWithType(bounds, AppType::BROWSER)); std::unique_ptr<aura::Window> window3( CreateWindowWithType(bounds, AppType::BROWSER)); + wm::ActivateWindow(window1.get()); const gfx::Rect bounds1 = window1->bounds(); const gfx::Rect bounds2 = window2->bounds(); EXPECT_EQ(bounds1, bounds2);
diff --git a/ash/wm/splitview/split_view_divider.cc b/ash/wm/splitview/split_view_divider.cc index 65192bb..191e624 100644 --- a/ash/wm/splitview/split_view_divider.cc +++ b/ash/wm/splitview/split_view_divider.cc
@@ -364,6 +364,9 @@ const gfx::Rect& old_bounds, const gfx::Rect& new_bounds, ui::PropertyChangeReason reason) { + if (!controller_->InSplitViewMode()) + return; + // We only care about the bounds change of windows in // |transient_windows_observer_|. if (!transient_windows_observer_.IsObserving(window))
diff --git a/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc b/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc index b53ee88..f9fb0bd 100644 --- a/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc +++ b/ash/wm/tablet_mode/tablet_mode_controller_unittest.cc
@@ -39,6 +39,7 @@ #include "base/test/metrics/user_action_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/simple_test_tick_clock.h" +#include "chromeos/constants/chromeos_switches.h" #include "chromeos/dbus/power/fake_power_manager_client.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/test/test_window_delegate.h" @@ -1544,6 +1545,11 @@ histogram_tester.ExpectTotalCount(kExitHistogram, 0); } + // The workspace size changes when going between clamshell and tablet mode. + // This means there will be an animation during the transition. + if (chromeos::switches::ShouldShowShelfHotseat()) + return; + // Test that we get no animation smoothness histograms when entering or // exiting tablet mode with a maximized window as no animation will take // place. @@ -1674,6 +1680,10 @@ waiter.Wait(); EXPECT_FALSE(IsScreenshotShown()); + // The window will animate if the hotseat is enabled because the workspace + // area will change. As long as a screenshot is not shown, this is ok. + if (chromeos::switches::ShouldShowShelfHotseat()) + return; EXPECT_FALSE(window->layer()->GetAnimator()->is_animating()); }
diff --git a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc index 40c24f9..9a5fec7 100644 --- a/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc +++ b/ash/wm/tablet_mode/tablet_mode_window_manager_unittest.cc
@@ -340,10 +340,6 @@ EXPECT_FALSE(WindowState::Get(fixed_window.get())->IsMaximized()); EXPECT_EQ(rect.ToString(), fixed_window->bounds().ToString()); - gfx::Size workspace_size = - screen_util::GetMaximizedWindowBoundsInParent(unlimited_window.get()) - .size(); - // Create the manager and make sure that all qualifying windows were detected // and changed. TabletModeWindowManager* manager = CreateTabletModeWindowManager(); @@ -352,7 +348,10 @@ // The unlimited window should have the size of the workspace / parent window. EXPECT_FALSE(WindowState::Get(unlimited_window.get())->IsMaximized()); EXPECT_EQ("0,0", unlimited_window->bounds().origin().ToString()); - EXPECT_EQ(workspace_size.ToString(), + const gfx::Size workspace_size_tablet_mode = + screen_util::GetMaximizedWindowBoundsInParent(unlimited_window.get()) + .size(); + EXPECT_EQ(workspace_size_tablet_mode.ToString(), unlimited_window->bounds().size().ToString()); // The limited window should have the size of the upper possible bounds. EXPECT_FALSE(WindowState::Get(limited_window.get())->IsMaximized());
diff --git a/ash/wm/window_util_unittest.cc b/ash/wm/window_util_unittest.cc index 9f7bcb8..7d56f64 100644 --- a/ash/wm/window_util_unittest.cc +++ b/ash/wm/window_util_unittest.cc
@@ -8,6 +8,7 @@ #include "ash/wm/window_positioning_utils.h" #include "ash/wm/window_state.h" #include "ash/wm/wm_event.h" +#include "chromeos/constants/chromeos_switches.h" #include "ui/aura/test/test_windows.h" #include "ui/aura/window.h" #include "ui/display/screen.h" @@ -63,12 +64,22 @@ CenterWindow(window.get()); // Centring window is considered as a user's action. EXPECT_TRUE(window_state->bounds_changed_by_user()); - EXPECT_EQ("200,122 100x100", window->bounds().ToString()); - EXPECT_EQ("200,122 100x100", window->GetBoundsInScreen().ToString()); + if (chromeos::switches::ShouldShowShelfHotseat()) { + EXPECT_EQ("200,126 100x100", window->bounds().ToString()); + EXPECT_EQ("200,126 100x100", window->GetBoundsInScreen().ToString()); + } else { + EXPECT_EQ("200,122 100x100", window->bounds().ToString()); + EXPECT_EQ("200,122 100x100", window->GetBoundsInScreen().ToString()); + } window->SetBoundsInScreen(gfx::Rect(600, 0, 100, 100), GetSecondaryDisplay()); CenterWindow(window.get()); - EXPECT_EQ("250,122 100x100", window->bounds().ToString()); - EXPECT_EQ("750,122 100x100", window->GetBoundsInScreen().ToString()); + if (chromeos::switches::ShouldShowShelfHotseat()) { + EXPECT_EQ("250,126 100x100", window->bounds().ToString()); + EXPECT_EQ("750,126 100x100", window->GetBoundsInScreen().ToString()); + } else { + EXPECT_EQ("250,122 100x100", window->bounds().ToString()); + EXPECT_EQ("750,122 100x100", window->GetBoundsInScreen().ToString()); + } } TEST_F(WindowUtilTest, AdjustBoundsToEnsureMinimumVisibility) {
diff --git a/base/containers/checked_iterators.h b/base/containers/checked_iterators.h index e844ae0..bf3d6949 100644 --- a/base/containers/checked_iterators.h +++ b/base/containers/checked_iterators.h
@@ -27,15 +27,16 @@ template <typename U> friend class CheckedContiguousIterator; - CheckedContiguousIterator() = default; - CheckedContiguousIterator(T* start, const T* end) + constexpr CheckedContiguousIterator() = default; + constexpr CheckedContiguousIterator(T* start, const T* end) : CheckedContiguousIterator(start, start, end) {} - CheckedContiguousIterator(const T* start, T* current, const T* end) + constexpr CheckedContiguousIterator(const T* start, T* current, const T* end) : start_(start), current_(current), end_(end) { - CHECK(start <= current); - CHECK(current <= end); + CHECK_LE(start, current); + CHECK_LE(current, end); } - CheckedContiguousIterator(const CheckedContiguousIterator& other) = default; + constexpr CheckedContiguousIterator(const CheckedContiguousIterator& other) = + default; // Converting constructor allowing conversions like CRAI<T> to CRAI<const T>, // but disallowing CRAI<const T> to CRAI<T> or CRAI<Derived> to CRAI<Base>, @@ -45,75 +46,75 @@ template < typename U, std::enable_if_t<std::is_convertible<U (*)[], T (*)[]>::value>* = nullptr> - CheckedContiguousIterator(const CheckedContiguousIterator<U>& other) + constexpr CheckedContiguousIterator(const CheckedContiguousIterator<U>& other) : start_(other.start_), current_(other.current_), end_(other.end_) { // We explicitly don't delegate to the 3-argument constructor here. Its // CHECKs would be redundant, since we expect |other| to maintain its own // invariant. However, DCHECKs never hurt anybody. Presumably. - DCHECK(other.start_ <= other.current_); - DCHECK(other.current_ <= other.end_); + DCHECK_LE(other.start_, other.current_); + DCHECK_LE(other.current_, other.end_); } ~CheckedContiguousIterator() = default; - CheckedContiguousIterator& operator=(const CheckedContiguousIterator& other) = - default; + constexpr CheckedContiguousIterator& operator=( + const CheckedContiguousIterator& other) = default; - bool operator==(const CheckedContiguousIterator& other) const { + constexpr bool operator==(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ == other.current_; } - bool operator!=(const CheckedContiguousIterator& other) const { + constexpr bool operator!=(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ != other.current_; } - bool operator<(const CheckedContiguousIterator& other) const { + constexpr bool operator<(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ < other.current_; } - bool operator<=(const CheckedContiguousIterator& other) const { + constexpr bool operator<=(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ <= other.current_; } - bool operator>(const CheckedContiguousIterator& other) const { + constexpr bool operator>(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ > other.current_; } - bool operator>=(const CheckedContiguousIterator& other) const { + constexpr bool operator>=(const CheckedContiguousIterator& other) const { CheckComparable(other); return current_ >= other.current_; } - CheckedContiguousIterator& operator++() { - CHECK(current_ != end_); + constexpr CheckedContiguousIterator& operator++() { + CHECK_NE(current_, end_); ++current_; return *this; } - CheckedContiguousIterator operator++(int) { + constexpr CheckedContiguousIterator operator++(int) { CheckedContiguousIterator old = *this; ++*this; return old; } - CheckedContiguousIterator& operator--() { - CHECK(current_ != start_); + constexpr CheckedContiguousIterator& operator--() { + CHECK_NE(current_, start_); --current_; return *this; } - CheckedContiguousIterator& operator--(int) { + constexpr CheckedContiguousIterator& operator--(int) { CheckedContiguousIterator old = *this; --*this; return old; } - CheckedContiguousIterator& operator+=(difference_type rhs) { + constexpr CheckedContiguousIterator& operator+=(difference_type rhs) { if (rhs > 0) { CHECK_LE(rhs, end_ - current_); } else { @@ -123,13 +124,13 @@ return *this; } - CheckedContiguousIterator operator+(difference_type rhs) const { + constexpr CheckedContiguousIterator operator+(difference_type rhs) const { CheckedContiguousIterator it = *this; it += rhs; return it; } - CheckedContiguousIterator& operator-=(difference_type rhs) { + constexpr CheckedContiguousIterator& operator-=(difference_type rhs) { if (rhs < 0) { CHECK_LE(rhs, end_ - current_); } else { @@ -139,30 +140,31 @@ return *this; } - CheckedContiguousIterator operator-(difference_type rhs) const { + constexpr CheckedContiguousIterator operator-(difference_type rhs) const { CheckedContiguousIterator it = *this; it -= rhs; return it; } - friend difference_type operator-(const CheckedContiguousIterator& lhs, - const CheckedContiguousIterator& rhs) { - CHECK(lhs.start_ == rhs.start_); - CHECK(lhs.end_ == rhs.end_); + constexpr friend difference_type operator-( + const CheckedContiguousIterator& lhs, + const CheckedContiguousIterator& rhs) { + CHECK_EQ(lhs.start_, rhs.start_); + CHECK_EQ(lhs.end_, rhs.end_); return lhs.current_ - rhs.current_; } - reference operator*() const { - CHECK(current_ != end_); + constexpr reference operator*() const { + CHECK_NE(current_, end_); return *current_; } - pointer operator->() const { - CHECK(current_ != end_); + constexpr pointer operator->() const { + CHECK_NE(current_, end_); return current_; } - reference operator[](difference_type rhs) const { + constexpr reference operator[](difference_type rhs) const { CHECK_GE(rhs, 0); CHECK_LT(rhs, end_ - current_); return current_[rhs]; @@ -185,7 +187,7 @@ } private: - void CheckComparable(const CheckedContiguousIterator& other) const { + constexpr void CheckComparable(const CheckedContiguousIterator& other) const { CHECK_EQ(start_, other.start_); CHECK_EQ(end_, other.end_); }
diff --git a/base/containers/span.h b/base/containers/span.h index c03bdf8..fc7f58d 100644 --- a/base/containers/span.h +++ b/base/containers/span.h
@@ -405,8 +405,10 @@ constexpr T* data() const noexcept { return data_; } // [span.iter], span iterator support - iterator begin() const noexcept { return iterator(data_, data_ + size()); } - iterator end() const noexcept { + constexpr iterator begin() const noexcept { + return iterator(data_, data_ + size()); + } + constexpr iterator end() const noexcept { return iterator(data_, data_ + size(), data_ + size()); }
diff --git a/base/containers/span_unittest.cc b/base/containers/span_unittest.cc index 5a5a9d8..e8daf948 100644 --- a/base/containers/span_unittest.cc +++ b/base/containers/span_unittest.cc
@@ -23,6 +23,24 @@ namespace base { +namespace { + +// constexpr implementation of std::equal's 4 argument overload. +template <class InputIterator1, class InputIterator2> +constexpr bool constexpr_equal(InputIterator1 first1, + InputIterator1 last1, + InputIterator2 first2, + InputIterator2 last2) { + for (; first1 != last1 && first2 != last2; ++first1, ++first2) { + if (*first1 != *first2) + return false; + } + + return first1 == last1 && first2 == last2; +} + +} // namespace + TEST(SpanTest, DefaultConstructor) { span<int> dynamic_span; EXPECT_EQ(nullptr, dynamic_span.data()); @@ -962,6 +980,21 @@ EXPECT_THAT(results, ElementsAre(1, 6, 1, 8, 0)); } +TEST(SpanTest, ConstexprIterator) { + static constexpr int kArray[] = {1, 6, 1, 8, 0}; + constexpr span<const int> span(kArray); + + static_assert(constexpr_equal(std::begin(kArray), std::end(kArray), + span.begin(), span.end()), + ""); + static_assert(1 == span.begin()[0], ""); + static_assert(1 == *(span.begin() += 0), ""); + static_assert(6 == *(span.begin() += 1), ""); + + static_assert(1 == *((span.begin() + 1) -= 1), ""); + static_assert(6 == *((span.begin() + 1) -= 0), ""); +} + TEST(SpanTest, ReverseIterator) { static constexpr int kArray[] = {1, 6, 1, 8, 0}; constexpr span<const int> span(kArray);
diff --git a/base/fuchsia/filtered_service_directory.h b/base/fuchsia/filtered_service_directory.h index 8b4bce3..dc12054 100644 --- a/base/fuchsia/filtered_service_directory.h +++ b/base/fuchsia/filtered_service_directory.h
@@ -18,7 +18,7 @@ namespace base { namespace fuchsia { -// ServiceDirectory that uses the supplied ServiceDirectoryClient to satisfy +// ServiceDirectory that uses the supplied sys::ServiceDirectory to satisfy // requests for only a restricted set of services. class BASE_EXPORT FilteredServiceDirectory { public:
diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc index 1440689..38d3910 100644 --- a/base/i18n/icu_util.cc +++ b/base/i18n/icu_util.cc
@@ -37,10 +37,6 @@ #include "base/mac/foundation_util.h" #endif -#if defined(OS_FUCHSIA) -#include "base/base_paths_fuchsia.h" -#endif - namespace base { namespace i18n {
diff --git a/base/logging.h b/base/logging.h index a037324..cdb9d7c 100644 --- a/base/logging.h +++ b/base/logging.h
@@ -532,7 +532,7 @@ // |message| must be non-null if and only if the check failed. constexpr CheckOpResult(std::string* message) : message_(message) {} // Returns true if the check succeeded. - operator bool() const { return !message_; } + constexpr operator bool() const { return !message_; } // Returns the message. std::string* message() { return message_; } @@ -685,20 +685,21 @@ // The checked condition is wrapped with ANALYZER_ASSUME_TRUE, which under // static analysis builds, blocks analysis of the current path if the // condition is false. -#define DEFINE_CHECK_OP_IMPL(name, op) \ - template <class t1, class t2> \ - inline std::string* Check##name##Impl(const t1& v1, const t2& v2, \ - const char* names) { \ - if (ANALYZER_ASSUME_TRUE(v1 op v2)) \ - return NULL; \ - else \ - return ::logging::MakeCheckOpString(v1, v2, names); \ - } \ - inline std::string* Check##name##Impl(int v1, int v2, const char* names) { \ - if (ANALYZER_ASSUME_TRUE(v1 op v2)) \ - return NULL; \ - else \ - return ::logging::MakeCheckOpString(v1, v2, names); \ +#define DEFINE_CHECK_OP_IMPL(name, op) \ + template <class t1, class t2> \ + constexpr std::string* Check##name##Impl(const t1& v1, const t2& v2, \ + const char* names) { \ + if (ANALYZER_ASSUME_TRUE(v1 op v2)) \ + return nullptr; \ + else \ + return ::logging::MakeCheckOpString(v1, v2, names); \ + } \ + constexpr std::string* Check##name##Impl(int v1, int v2, \ + const char* names) { \ + if (ANALYZER_ASSUME_TRUE(v1 op v2)) \ + return nullptr; \ + else \ + return ::logging::MakeCheckOpString(v1, v2, names); \ } DEFINE_CHECK_OP_IMPL(EQ, ==) DEFINE_CHECK_OP_IMPL(NE, !=)
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc index 0fef2a8..2889b25 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc
@@ -29,9 +29,9 @@ namespace { -// The value returned by ::GetThreadPriority() after background thread mode is -// enabled on Windows 8+. -constexpr int kWin8AboveBackgroundThreadModePriority = -4; +// The most common value returned by ::GetThreadPriority() after background +// thread mode is enabled on Windows 7. +constexpr int kWin7BackgroundThreadModePriority = 4; // The information on how to set the thread name comes from // a MSDN article: http://msdn2.microsoft.com/en-us/library/xcb2z8hs.aspx @@ -401,17 +401,45 @@ // static ThreadPriority PlatformThread::GetCurrentThreadPriority() { + static_assert( + THREAD_PRIORITY_IDLE < 0, + "THREAD_PRIORITY_IDLE is >= 0 and will incorrectly cause errors."); + static_assert( + THREAD_PRIORITY_LOWEST < 0, + "THREAD_PRIORITY_LOWEST is >= 0 and will incorrectly cause errors."); + static_assert(THREAD_PRIORITY_BELOW_NORMAL < 0, + "THREAD_PRIORITY_BELOW_NORMAL is >= 0 and will incorrectly " + "cause errors."); + static_assert( + THREAD_PRIORITY_NORMAL == 0, + "The logic below assumes that THREAD_PRIORITY_NORMAL is zero. If it is " + "not, ThreadPriority::BACKGROUND may be incorrectly detected."); + static_assert(THREAD_PRIORITY_ABOVE_NORMAL >= 0, + "THREAD_PRIORITY_ABOVE_NORMAL is < 0 and will incorrectly be " + "translated to ThreadPriority::BACKGROUND."); + static_assert(THREAD_PRIORITY_HIGHEST >= 0, + "THREAD_PRIORITY_HIGHEST is < 0 and will incorrectly be " + "translated to ThreadPriority::BACKGROUND."); + static_assert(THREAD_PRIORITY_TIME_CRITICAL >= 0, + "THREAD_PRIORITY_TIME_CRITICAL is < 0 and will incorrectly be " + "translated to ThreadPriority::BACKGROUND."); + static_assert(THREAD_PRIORITY_ERROR_RETURN >= 0, + "THREAD_PRIORITY_ERROR_RETURN is < 0 and will incorrectly be " + "translated to ThreadPriority::BACKGROUND."); + const int priority = ::GetThreadPriority(PlatformThread::CurrentHandle().platform_handle()); + // Negative values represent a background priority. We have observed -3, -4, + // -6 when THREAD_MODE_BACKGROUND_* is used. THREAD_PRIORITY_IDLE, + // THREAD_PRIORITY_LOWEST and THREAD_PRIORITY_BELOW_NORMAL are other possible + // negative values. + if (priority < THREAD_PRIORITY_NORMAL) + return ThreadPriority::BACKGROUND; + switch (priority) { - case THREAD_PRIORITY_IDLE: - case internal::kWin7BackgroundThreadModePriority: + case kWin7BackgroundThreadModePriority: DCHECK_EQ(win::GetVersion(), win::Version::WIN7); - FALLTHROUGH; - case kWin8AboveBackgroundThreadModePriority: - case THREAD_PRIORITY_LOWEST: - case THREAD_PRIORITY_BELOW_NORMAL: return ThreadPriority::BACKGROUND; case THREAD_PRIORITY_NORMAL: return ThreadPriority::NORMAL; @@ -421,10 +449,10 @@ case THREAD_PRIORITY_TIME_CRITICAL: return ThreadPriority::REALTIME_AUDIO; case THREAD_PRIORITY_ERROR_RETURN: - DPCHECK(false) << "GetThreadPriority error"; + DPCHECK(false) << "::GetThreadPriority error"; } - NOTREACHED() << "GetCurrentThreadPriority returned " << priority << "."; + NOTREACHED() << "::GetThreadPriority returned " << priority << "."; return ThreadPriority::NORMAL; }
diff --git a/base/threading/platform_thread_win.h b/base/threading/platform_thread_win.h index d1bf420..879d506 100644 --- a/base/threading/platform_thread_win.h +++ b/base/threading/platform_thread_win.h
@@ -25,10 +25,6 @@ namespace internal { -// The value returned by ::GetThreadPriority() after background thread mode is -// enabled on Windows 7. Exposed for unit tests. -constexpr int kWin7BackgroundThreadModePriority = 4; - // Assert that the memory priority of |thread| is |memory_priority|. No-op on // Windows 7 because ::GetThreadInformation() is not available. Exposed for unit // tests.
diff --git a/base/threading/platform_thread_win_unittest.cc b/base/threading/platform_thread_win_unittest.cc index 4c798fa00..de1d2cab 100644 --- a/base/threading/platform_thread_win_unittest.cc +++ b/base/threading/platform_thread_win_unittest.cc
@@ -51,23 +51,19 @@ EXPECT_TRUE(::SetThreadPriority(thread_handle, THREAD_MODE_BACKGROUND_BEGIN)); // On Win8, GetThreadPriority() stays NORMAL. On Win7, it can stay NORMAL or - // switch to one of the 2 priorities that are usually observed after entering + // switch to one of the various priorities that are observed after entering // thread mode background in a NORMAL_PRIORITY_CLASS process. On all Windows - // verisons, memory priority becomes VERY_LOW. + // versions, memory priority becomes VERY_LOW. // // Note: this documents the aforementioned kernel bug. Ideally this would // *not* be the case. const float priority_after_thread_mode_background_begin = ::GetThreadPriority(thread_handle); if (win::GetVersion() == win::Version::WIN7) { - constexpr std::array<int, 3> kExpectedWin7Priorities( - {// Priority if GetThreadPriority() is not affected. - THREAD_PRIORITY_NORMAL, - // Priorities if GetThreadPriority() behaves like in a - // NORMAL_PRIORITY_CLASS process. - THREAD_PRIORITY_IDLE, internal::kWin7BackgroundThreadModePriority}); - EXPECT_THAT(kExpectedWin7Priorities, - testing::Contains(priority_after_thread_mode_background_begin)); + if (priority_after_thread_mode_background_begin != THREAD_PRIORITY_NORMAL) { + EXPECT_EQ(ThreadPriority::BACKGROUND, + base::PlatformThread::GetCurrentThreadPriority()); + } } else { EXPECT_EQ(priority_after_thread_mode_background_begin, THREAD_PRIORITY_NORMAL);
diff --git a/build/android/incremental_install/write_installer_json.py b/build/android/incremental_install/write_installer_json.py index 5c3789a..df6cfdf 100755 --- a/build/android/incremental_install/write_installer_json.py +++ b/build/android/incremental_install/write_installer_json.py
@@ -33,6 +33,7 @@ 'Can be specified multiple times.') parser.add_argument( '--native-libs', + action='append', help='GN-list of paths to native libraries relative to ' 'output directory. Can be repeated.') parser.add_argument(
diff --git a/cc/metrics/frame_sequence_tracker.cc b/cc/metrics/frame_sequence_tracker.cc index 4c48b4b..5ba4bf9 100644 --- a/cc/metrics/frame_sequence_tracker.cc +++ b/cc/metrics/frame_sequence_tracker.cc
@@ -38,7 +38,7 @@ enum class ThreadType { kMain, kCompositor, - kSlowerThread, + kSlower, }; constexpr int kBuiltinSequenceNum = @@ -254,8 +254,7 @@ } if (slower_throughput.has_value()) { ThroughputData::ReportHistogram( - type_, "SlowerThread", - GetIndexForMetric(ThreadType::kSlowerThread, type_), + type_, "SlowerThread", GetIndexForMetric(ThreadType::kSlower, type_), slower_throughput.value()); }
diff --git a/chrome/android/features/start_surface/internal/java/src/org/chromium/chrome/features/start_surface/StartSurfaceLocationBarDelegate.java b/chrome/android/features/start_surface/internal/java/src/org/chromium/chrome/features/start_surface/StartSurfaceLocationBarDelegate.java index 96d7eaa..3e1e4988 100644 --- a/chrome/android/features/start_surface/internal/java/src/org/chromium/chrome/features/start_surface/StartSurfaceLocationBarDelegate.java +++ b/chrome/android/features/start_surface/internal/java/src/org/chromium/chrome/features/start_surface/StartSurfaceLocationBarDelegate.java
@@ -22,7 +22,10 @@ // Implements TasksSurface.FakeSearchBoxDelegate. @Override public void requestUrlFocus(@Nullable String pastedText) { - mLocationBar.setUrlBarFocus(true); + mLocationBar.setUrlBarFocus(true, pastedText, + pastedText == null + ? LocationBar.OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_TAP + : LocationBar.OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_LONG_PRESS); } // Implements StartSurfaceMediator.Delegate.
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceMediator.java index d52ebc6d4..8b570669 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceMediator.java
@@ -5,12 +5,15 @@ package org.chromium.chrome.browser.tasks; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.FAKE_SEARCH_BOX_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.FAKE_SEARCH_BOX_TEXT_WATCHER; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_FAKE_SEARCH_BOX_VISIBLE; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_TAB_CAROUSEL; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_VOICE_RECOGNITION_BUTTON_VISIBLE; import android.content.Context; import android.support.annotation.Nullable; +import android.text.Editable; +import android.text.TextWatcher; import android.view.View; import org.chromium.ui.modelutil.PropertyModel; @@ -36,13 +39,28 @@ mFakeSearchBoxDelegate.requestUrlFocus(null); } }); + mModel.set(FAKE_SEARCH_BOX_TEXT_WATCHER, new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) {} + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) {} + + @Override + public void afterTextChanged(Editable s) { + if (s.length() == 0) return; + mFakeSearchBoxDelegate.requestUrlFocus(s.toString()); + + // This won't cause infinite loop since we checked s.length() == 0 above. + s.clear(); + } + }); // Set the initial state. mModel.set(IS_FAKE_SEARCH_BOX_VISIBLE, true); mModel.set(IS_VOICE_RECOGNITION_BUTTON_VISIBLE, false); // TODO(crbug.com/982018): Enable voice recognition button in the fake search box. - // TODO(crbug.com/982018): Enable long press and paste search in the fake search box. // TODO(crbug.com/982018): Change the fake search box in dark mode. } }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceProperties.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceProperties.java index 6cc4c9e..fee0254 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceProperties.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksSurfaceProperties.java
@@ -6,6 +6,7 @@ import static org.chromium.chrome.browser.tasks.MostVisitedListProperties.IS_VISIBLE; +import android.text.TextWatcher; import android.view.View; import org.chromium.ui.modelutil.PropertyKey; @@ -28,10 +29,14 @@ .WritableObjectPropertyKey<View.OnClickListener> FAKE_SEARCH_BOX_CLICK_LISTENER = new PropertyModel.WritableObjectPropertyKey<View.OnClickListener>(); public static final PropertyModel + .WritableObjectPropertyKey<TextWatcher> FAKE_SEARCH_BOX_TEXT_WATCHER = + new PropertyModel.WritableObjectPropertyKey<TextWatcher>(); + public static final PropertyModel .WritableObjectPropertyKey<View.OnClickListener> MORE_TABS_CLICK_LISTENER = new PropertyModel.WritableObjectPropertyKey<View.OnClickListener>(); public static final PropertyModel.WritableBooleanPropertyKey MV_TILES_VISIBLE = IS_VISIBLE; - public static final PropertyKey[] ALL_KEYS = new PropertyKey[] {IS_FAKE_SEARCH_BOX_VISIBLE, - IS_INCOGNITO, IS_TAB_CAROUSEL, IS_VOICE_RECOGNITION_BUTTON_VISIBLE, - FAKE_SEARCH_BOX_CLICK_LISTENER, MORE_TABS_CLICK_LISTENER, MV_TILES_VISIBLE}; + public static final PropertyKey[] ALL_KEYS = + new PropertyKey[] {IS_FAKE_SEARCH_BOX_VISIBLE, IS_INCOGNITO, IS_TAB_CAROUSEL, + IS_VOICE_RECOGNITION_BUTTON_VISIBLE, FAKE_SEARCH_BOX_CLICK_LISTENER, + FAKE_SEARCH_BOX_TEXT_WATCHER, MORE_TABS_CLICK_LISTENER, MV_TILES_VISIBLE}; }
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java index 24a083d..a37e66e6 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksView.java
@@ -7,6 +7,7 @@ import android.content.Context; import android.content.res.Resources; import android.support.v4.view.MarginLayoutParamsCompat; +import android.text.TextWatcher; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; @@ -76,6 +77,14 @@ } /** + * Set the given watcher for the fake search box. + * @param textWatcher The given {@link TextWatcher}. + */ + void setFakeSearchBoxTextWatcher(TextWatcher textWatcher) { + mSearchBoxText.addTextChangedListener(textWatcher); + } + + /** * Set the visibility of the fake search box. * @param isVisible Whether it's visible. */
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksViewBinder.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksViewBinder.java index 8c2becd..2f63d7f 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksViewBinder.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/TasksViewBinder.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.tasks; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.FAKE_SEARCH_BOX_CLICK_LISTENER; +import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.FAKE_SEARCH_BOX_TEXT_WATCHER; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_FAKE_SEARCH_BOX_VISIBLE; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_INCOGNITO; import static org.chromium.chrome.browser.tasks.TasksSurfaceProperties.IS_TAB_CAROUSEL; @@ -22,6 +23,8 @@ public static void bind(PropertyModel model, TasksView view, PropertyKey propertyKey) { if (propertyKey == FAKE_SEARCH_BOX_CLICK_LISTENER) { view.setFakeSearchBoxClickListener(model.get(FAKE_SEARCH_BOX_CLICK_LISTENER)); + } else if (propertyKey == FAKE_SEARCH_BOX_TEXT_WATCHER) { + view.setFakeSearchBoxTextWatcher(model.get(FAKE_SEARCH_BOX_TEXT_WATCHER)); } else if (propertyKey == IS_FAKE_SEARCH_BOX_VISIBLE) { view.setFakeSearchBoxVisibility(model.get(IS_FAKE_SEARCH_BOX_VISIBLE)); } else if (propertyKey == IS_INCOGNITO) {
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java index 7d868f3..eac3f53 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java
@@ -99,7 +99,7 @@ mMenuWindow.dismiss(); }); - View decorView = ((Activity) mContext).getWindow().getDecorView(); + View decorView = ((Activity) contentView.getContext()).getWindow().getDecorView(); ViewRectProvider rectProvider = new ViewRectProvider(anchorView); Rect rect = new Rect(); decorView.getWindowVisibleDisplayFrame(rect);
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml index 2a0f7c61..b1dc7d3e 100644 --- a/chrome/android/java/AndroidManifest.xml +++ b/chrome/android/java/AndroidManifest.xml
@@ -306,10 +306,9 @@ <data android:scheme="content" /> <data android:mimeType="*/*" /> <data android:host="*" /> - <data android:pathPattern="/.*\\.wbn" /> - <data android:pathPattern="/.*\\..*\\.wbn" /> - <data android:pathPattern="/.*\\..*\\..*\\.wbn" /> - <data android:pathPattern="/.*\\..*\\..*\\..*\\.wbn" /> + {% for i in range(10) %} + <data android:pathPattern="/.*{{ '\\\\..*' * i }}\\.wbn" /> + {% endfor %} </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" />
diff --git a/chrome/android/java/res/layout/ephemeral_tab_toolbar.xml b/chrome/android/java/res/layout/ephemeral_tab_toolbar.xml index 8f5ae7d..7c5102d 100644 --- a/chrome/android/java/res/layout/ephemeral_tab_toolbar.xml +++ b/chrome/android/java/res/layout/ephemeral_tab_toolbar.xml
@@ -8,8 +8,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="100dp" - android:paddingBottom="30dp"> + android:layout_height="@dimen/preview_tab_toolbar_height"> <LinearLayout android:id="@+id/toolbar"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java index b3fb992..6ed0901 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java
@@ -41,7 +41,7 @@ import org.chromium.chrome.browser.dependency_injection.ModuleFactoryOverrides; import org.chromium.chrome.browser.metrics.UmaUtils; import org.chromium.chrome.browser.night_mode.SystemNightModeMonitor; -import org.chromium.chrome.browser.preferences.ChromePreferenceManager; +import org.chromium.chrome.browser.util.FeatureUtilities; import org.chromium.chrome.browser.vr.OnExitVrRequestListener; import org.chromium.chrome.browser.vr.VrModuleProvider; import org.chromium.components.embedder_support.application.FontPreloadingWorkaround; @@ -149,8 +149,7 @@ } private static Boolean shouldUseDebugFlags() { - return ChromePreferenceManager.getInstance().readBoolean( - ChromePreferenceManager.COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY, false); + return FeatureUtilities.isCommandLineOnNonRootedEnabled(); } private static boolean isBrowserProcess() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index 611407b..da03f96 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -106,6 +106,7 @@ import org.chromium.chrome.browser.ntp.NewTabPage; import org.chromium.chrome.browser.ntp.NewTabPageUma; import org.chromium.chrome.browser.omaha.OmahaBase; +import org.chromium.chrome.browser.omnibox.LocationBar; import org.chromium.chrome.browser.partnercustomizations.HomepageManager; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.preferences.ChromePreferenceManager; @@ -1532,7 +1533,9 @@ assert false : "Unknown TabOpenType: " + tabOpenType; break; } - getToolbarManager().setUrlBarFocusOnceNativeInitialized(focus); + getToolbarManager().setUrlBarFocusOnceNativeInitialized(focus, + focus ? LocationBar.OmniboxFocusReason.LAUNCH_NEW_INCOGNITO_TAB + : LocationBar.OmniboxFocusReason.UNFOCUS); } @Override @@ -1828,7 +1831,8 @@ boolean isUrlBarVisible = !mOverviewModeController.overviewVisible() && (!isTablet() || getCurrentTabModel().getCount() != 0); if (isUrlBarVisible) { - getToolbarManager().setUrlBarFocus(true); + getToolbarManager().setUrlBarFocus( + true, LocationBar.OmniboxFocusReason.MENU_OR_KEYBOARD_ACTION); } } else if (id == R.id.downloads_menu_id) { DownloadUtils.showDownloadManager(this, currentTab, DownloadOpenSource.MENU); @@ -2263,7 +2267,7 @@ return; } mNavigationSheet = NavigationSheet.create( - getWindow().getDecorView().findViewById(android.R.id.content), + getWindow().getDecorView().findViewById(android.R.id.content), this, this::getBottomSheetController, new TabbedSheetDelegate(tab)); mNavigationSheet.startAndExpand(/* forward=*/false, /* animate=*/true); getBottomSheet().addObserver(new EmptyBottomSheetObserver() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java index 34b228b6..9a05edbb 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java
@@ -243,7 +243,8 @@ if (mNavigationDelegate.isNavigationEnabled(mContainerView)) { if (mNavigationHandler == null) { mActionDelegate = mNavigationDelegate.createActionDelegate(); - mNavigationHandler = new NavigationHandler(mContainerView, mNavigationDelegate, + mNavigationHandler = new NavigationHandler(mContainerView, mTab.getContext(), + mNavigationDelegate, NavigationGlowFactory.forRenderedPage( mContainerView, mTab.getWebContents())); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java index 86a6dd7..7db25b1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/ephemeraltab/EphemeralTabSheetContent.java
@@ -215,24 +215,23 @@ return 0.9f; } - // TODO(shaktisahu): Provide correct strings for the following methods. @Override public int getSheetContentDescriptionStringId() { - return R.string.send_tab_to_self_content_description; + return R.string.ephemeral_tab_sheet_description; } @Override public int getSheetHalfHeightAccessibilityStringId() { - return R.string.send_tab_to_self_sheet_half_height; + return R.string.ephemeral_tab_sheet_opened_half; } @Override public int getSheetFullHeightAccessibilityStringId() { - return R.string.send_tab_to_self_sheet_full_height; + return R.string.ephemeral_tab_sheet_opened_full; } @Override public int getSheetClosedAccessibilityStringId() { - return R.string.send_tab_to_self_sheet_closed; + return R.string.ephemeral_tab_sheet_closed; } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateController.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateController.java index 917b62b..0c71ad4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateController.java
@@ -8,6 +8,7 @@ import android.support.v7.app.AppCompatDelegate; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.browser.customtabs.CustomTabsIntent; import org.chromium.base.ObserverList; @@ -38,7 +39,8 @@ private int mRequestedColorScheme; private AppCompatDelegate mAppCompatDelegate; - private boolean mIsInNightMode; + @Nullable // Null initially, so that the first update is always applied (see updateNightMode()). + private Boolean mIsInNightMode; CustomTabNightModeStateController(ActivityLifecycleDispatcher lifecycleDispatcher, SystemNightModeMonitor systemNightModeMonitor, @@ -85,8 +87,7 @@ // NightModeStateProvider implementation. @Override public boolean isInNightMode() { - return mIsInNightMode; - + return mIsInNightMode != null && mIsInNightMode; } @Override @@ -108,7 +109,7 @@ private void updateNightMode() { boolean shouldBeInNightMode = shouldBeInNightMode(); - if (mIsInNightMode == shouldBeInNightMode) return; + if (mIsInNightMode != null && mIsInNightMode == shouldBeInNightMode) return; mIsInNightMode = shouldBeInNightMode; mAppCompatDelegate.setLocalNightMode(mIsInNightMode ? AppCompatDelegate.MODE_NIGHT_YES
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/HistoryNavigationLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/HistoryNavigationLayout.java index 0e7bf00..d95b3195 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/HistoryNavigationLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/HistoryNavigationLayout.java
@@ -71,7 +71,7 @@ if (mNavigationHandler == null) { mDetector = new GestureDetector(getContext(), new SideNavGestureListener()); mNavigationHandler = new NavigationHandler( - this, mDelegate, NavigationGlowFactory.forJavaLayer(this)); + this, getContext(), mDelegate, NavigationGlowFactory.forJavaLayer(this)); } } else { mDetector = null;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationHandler.java index 0ca11af..fedefe2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationHandler.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationHandler.java
@@ -4,6 +4,7 @@ package org.chromium.chrome.browser.gesturenav; +import android.content.Context; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; @@ -44,6 +45,7 @@ } private final ViewGroup mParentView; + private final Context mContext; private final Supplier<NavigationGlow> mGlowEffectSupplier; private final HistoryNavigationDelegate mDelegate; @@ -88,9 +90,10 @@ boolean willBackExitApp(); } - public NavigationHandler(ViewGroup parentView, HistoryNavigationDelegate delegate, - Supplier<NavigationGlow> glowEffectSupplier) { + public NavigationHandler(ViewGroup parentView, Context context, + HistoryNavigationDelegate delegate, Supplier<NavigationGlow> glowEffectSupplier) { mParentView = parentView; + mContext = context; mDelegate = delegate; mActionDelegate = delegate.createActionDelegate(); mGlowEffectSupplier = glowEffectSupplier; @@ -98,7 +101,7 @@ } private void createLayout() { - mSideSlideLayout = new SideSlideLayout(mParentView.getContext()); + mSideSlideLayout = new SideSlideLayout(mContext); mSideSlideLayout.setLayoutParams( new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)); mSideSlideLayout.setOnNavigationListener((forward) -> { @@ -117,8 +120,8 @@ }); mNavigationSheet = NavigationSheet.isEnabled() - ? NavigationSheet.create(mParentView, mDelegate.getBottomSheetController(), - mDelegate.createSheetDelegate()) + ? NavigationSheet.create(mParentView, mContext, + mDelegate.getBottomSheetController(), mDelegate.createSheetDelegate()) : NavigationSheet.DUMMY; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheet.java index b1a92a2..ae0fa48 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheet.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheet.java
@@ -4,6 +4,7 @@ package org.chromium.chrome.browser.gesturenav; +import android.content.Context; import android.view.View; import org.chromium.base.Supplier; @@ -44,14 +45,15 @@ /** * Create {@link NavigationSheet} object. * @param rootView Root view whose dimension is used for the sheet. + * @param context {@link Context} used to retrieve resources. * @param bottomSheetController {@link BottomSheetController} object. * @param delegate Delegate used by navigation sheet to perform actions. * @return NavigationSheet object. */ - public static NavigationSheet create(View rootView, + public static NavigationSheet create(View rootView, Context context, Supplier<BottomSheetController> bottomSheetController, NavigationSheet.Delegate delegate) { - return new NavigationSheetCoordinator(rootView, bottomSheetController, delegate); + return new NavigationSheetCoordinator(rootView, context, bottomSheetController, delegate); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheetCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheetCoordinator.java index 439013d..989047e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheetCoordinator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/NavigationSheetCoordinator.java
@@ -114,12 +114,11 @@ /** * Construct a new NavigationSheet. */ - NavigationSheetCoordinator( - View parent, Supplier<BottomSheetController> bottomSheetController, Delegate delegate) { + NavigationSheetCoordinator(View parent, Context context, + Supplier<BottomSheetController> bottomSheetController, Delegate delegate) { mParentView = parent; mBottomSheetController = bottomSheetController; mDelegate = delegate; - Context context = parent.getContext(); mLayoutInflater = LayoutInflater.from(context); mToolbarView = mLayoutInflater.inflate(R.layout.navigation_sheet_toolbar, null); mMediator = new NavigationSheetMediator(context, mModelList, (position, index) -> {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalPresenter.java b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalPresenter.java index b63b264..48b6d5d 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalPresenter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/modaldialog/TabModalPresenter.java
@@ -22,6 +22,7 @@ import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel; import org.chromium.chrome.browser.contextualsearch.ContextualSearchManager; import org.chromium.chrome.browser.fullscreen.ChromeFullscreenManager; +import org.chromium.chrome.browser.omnibox.LocationBar; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabAttributeKeys; import org.chromium.chrome.browser.tab.TabAttributes; @@ -324,7 +325,8 @@ // Force toolbar to show and disable overflow menu. onTabModalDialogStateChanged(true); - mChromeActivity.getToolbarManager().setUrlBarFocus(false); + mChromeActivity.getToolbarManager().setUrlBarFocus( + false, LocationBar.OmniboxFocusReason.UNFOCUS); menuButton.setEnabled(false); } else {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java index 94bf5135..d8a3173 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java
@@ -11,6 +11,7 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.text.TextUtils; +import android.util.ArrayMap; import android.util.LruCache; import android.view.ContextMenu; import android.view.LayoutInflater; @@ -43,13 +44,14 @@ import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; import java.util.List; +import java.util.Map; /** * Row adapter for presenting recently closed tabs, synced tabs from other devices, the sync or * sign in promo, and currently open tabs (only in document mode) in a grouped list view. */ public class RecentTabsRowAdapter extends BaseExpandableListAdapter { - private static final int MAX_NUM_FAVICONS_TO_CACHE = 256; + private static final int MAX_NUM_FAVICONS_TO_CACHE = 128; @IntDef({ChildType.NONE, ChildType.DEFAULT_CONTENT, ChildType.PERSONALIZED_SIGNIN_PROMO, ChildType.SYNC_PROMO}) @@ -98,6 +100,15 @@ int NUM_ENTRIES = 11; } + @IntDef({FaviconLocality.LOCAL, FaviconLocality.FOREIGN}) + @Retention(RetentionPolicy.SOURCE) + private @interface FaviconLocality { + int LOCAL = 0; + int FOREIGN = 1; + + int NUM_ENTRIES = 2; + } + private final Activity mActivity; private final List<Group> mGroups; private final DefaultFaviconHelper mDefaultFaviconHelper; @@ -105,7 +116,8 @@ private final RecentlyClosedTabsGroup mRecentlyClosedTabsGroup = new RecentlyClosedTabsGroup(); private final SeparatorGroup mVisibleSeparatorGroup = new SeparatorGroup(true); private final SeparatorGroup mInvisibleSeparatorGroup = new SeparatorGroup(false); - private final FaviconCache mFaviconCache; + private final Map<Integer, FaviconCache> mFaviconCaches = + new ArrayMap<>(FaviconLocality.NUM_ENTRIES); private final int mFaviconSize; private boolean mHasForeignDataRecorded; private RoundedIconGenerator mIconGenerator; @@ -640,29 +652,18 @@ } private static class FaviconCache { - private static final String FOREIGN_FAVICON_PREFIX = "Foreign"; - private static final String LOCAL_FAVICON_PREFIX = "Local"; - private final LruCache<String, Drawable> mMemoryCache; public FaviconCache(int size) { - mMemoryCache = new LruCache<String, Drawable>(size); + mMemoryCache = new LruCache<>(size); } - public Drawable getForeignFaviconImage(String url) { - return mMemoryCache.get(FOREIGN_FAVICON_PREFIX + url); + Drawable getFaviconImage(String url) { + return mMemoryCache.get(url); } - public void putForeignFaviconImage(String url, Drawable image) { - mMemoryCache.put(FOREIGN_FAVICON_PREFIX + url, image); - } - - public Drawable getLocalFaviconImage(String url) { - return mMemoryCache.get(LOCAL_FAVICON_PREFIX + url); - } - - public void putLocalFaviconImage(String url, Drawable image) { - mMemoryCache.put(LOCAL_FAVICON_PREFIX + url, image); + public void putFaviconImage(String url, Drawable image) { + mMemoryCache.put(url, image); } } @@ -677,7 +678,8 @@ mActivity = activity; mRecentTabsManager = recentTabsManager; mGroups = new ArrayList<>(); - mFaviconCache = new FaviconCache(MAX_NUM_FAVICONS_TO_CACHE); + mFaviconCaches.put(FaviconLocality.LOCAL, new FaviconCache(MAX_NUM_FAVICONS_TO_CACHE)); + mFaviconCaches.put(FaviconLocality.FOREIGN, new FaviconCache(MAX_NUM_FAVICONS_TO_CACHE)); Resources resources = activity.getResources(); mDefaultFaviconHelper = new DefaultFaviconHelper(); @@ -702,13 +704,6 @@ public FaviconImageCallback imageCallback; } - @IntDef({FaviconLocality.LOCAL, FaviconLocality.FOREIGN}) - @Retention(RetentionPolicy.SOURCE) - private @interface FaviconLocality { - int LOCAL = 0; - int FOREIGN = 1; - } - private void loadFavicon( final ViewHolder viewHolder, final String url, @FaviconLocality int locality) { Drawable image; @@ -717,7 +712,7 @@ image = mDefaultFaviconHelper.getDefaultFaviconDrawable( mActivity.getResources(), url, true); } else { - image = mFaviconCache.getLocalFaviconImage(url); + image = mFaviconCaches.get(locality).getFaviconImage(url); if (image == null) { FaviconImageCallback imageCallback = new FaviconImageCallback() { @Override @@ -726,7 +721,7 @@ Drawable faviconDrawable = FaviconUtils.getIconDrawableWithFilter(bitmap, url, mIconGenerator, mDefaultFaviconHelper, mActivity.getResources(), mFaviconSize); - mFaviconCache.putLocalFaviconImage(url, faviconDrawable); + mFaviconCaches.get(locality).putFaviconImage(url, faviconDrawable); viewHolder.imageView.setImageDrawable(faviconDrawable); } };
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java index 0bda0f2b..4887603 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java
@@ -9,6 +9,9 @@ import android.view.ViewGroup; import android.view.Window; +import androidx.annotation.IntDef; +import androidx.annotation.Nullable; + import org.chromium.chrome.browser.ActivityTabProvider; import org.chromium.chrome.browser.WindowDelegate; import org.chromium.chrome.browser.ntp.NewTabPage; @@ -20,10 +23,41 @@ import org.chromium.chrome.browser.toolbar.top.ToolbarActionModeCallback; import org.chromium.ui.base.WindowAndroid; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + /** * Container that holds the {@link UrlBar} and SSL state related with the current {@link Tab}. */ public interface LocationBar extends UrlBarDelegate { + /** A means of tracking which mechanism is being used to focus the omnibox. */ + @IntDef({OmniboxFocusReason.OMNIBOX_TAP, OmniboxFocusReason.OMNIBOX_LONG_PRESS, + OmniboxFocusReason.FAKE_BOX_TAP, OmniboxFocusReason.FAKE_BOX_LONG_PRESS, + OmniboxFocusReason.ACCELERATOR_TAP, OmniboxFocusReason.TAB_SWITCHER_OMNIBOX_TAP, + OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_TAP, + OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_LONG_PRESS, + OmniboxFocusReason.DEFAULT_WITH_HARDWARE_KEYBOARD, OmniboxFocusReason.SEARCH_QUERY, + OmniboxFocusReason.LAUNCH_NEW_INCOGNITO_TAB, OmniboxFocusReason.MENU_OR_KEYBOARD_ACTION, + OmniboxFocusReason.UNFOCUS}) + @Retention(RetentionPolicy.SOURCE) + public @interface OmniboxFocusReason { + int OMNIBOX_TAP = 0; + int OMNIBOX_LONG_PRESS = 1; + int FAKE_BOX_TAP = 2; + int FAKE_BOX_LONG_PRESS = 3; + int ACCELERATOR_TAP = 4; + // TAB_SWITCHER_OMNIBOX_TAP has not been used anymore, keep it for record for now. + int TAB_SWITCHER_OMNIBOX_TAP = 5; + int TASKS_SURFACE_FAKE_BOX_TAP = 6; + int TASKS_SURFACE_FAKE_BOX_LONG_PRESS = 7; + int DEFAULT_WITH_HARDWARE_KEYBOARD = 8; + int SEARCH_QUERY = 9; + int LAUNCH_NEW_INCOGNITO_TAB = 10; + int MENU_OR_KEYBOARD_ACTION = 11; + int UNFOCUS = 12; + int NUM_ENTRIES = 13; + } + /** * Cleanup resources when this goes out of scope. */ @@ -122,8 +156,11 @@ * Signal a {@link UrlBar} focus change request. * @param shouldBeFocused Whether the focus should be requested or cleared. True requests focus * and False clears focus. + * @param pastedText The given pasted text when focus, which could be null. + * @param reason The given reason. */ - void setUrlBarFocus(boolean shouldBeFocused); + void setUrlBarFocus( + boolean shouldBeFocused, @Nullable String pastedText, @OmniboxFocusReason int reason); /** * Triggers the cursor to be visible in the UrlBar without triggering any of the focus animation
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java index 0e2456c..6bb64d4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -30,6 +30,7 @@ import org.chromium.base.CommandLine; import org.chromium.base.ObserverList; import org.chromium.base.VisibleForTesting; +import org.chromium.base.metrics.CachedMetrics.EnumeratedHistogramSample; import org.chromium.base.metrics.RecordUserAction; import org.chromium.chrome.R; import org.chromium.chrome.browser.ActivityTabProvider; @@ -41,6 +42,7 @@ import org.chromium.chrome.browser.ntp.NewTabPage; import org.chromium.chrome.browser.ntp.NewTabPage.FakeboxDelegate; import org.chromium.chrome.browser.ntp.NewTabPageUma; +import org.chromium.chrome.browser.omnibox.LocationBar.OmniboxFocusReason; import org.chromium.chrome.browser.omnibox.UrlBar.ScrollType; import org.chromium.chrome.browser.omnibox.UrlBarCoordinator.SelectionState; import org.chromium.chrome.browser.omnibox.geo.GeolocationHeader; @@ -56,7 +58,6 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tasks.ReturnToChromeExperimentsUtil; import org.chromium.chrome.browser.toolbar.ToolbarDataProvider; -import org.chromium.chrome.browser.toolbar.ToolbarManager; import org.chromium.chrome.browser.toolbar.top.ToolbarActionModeCallback; import org.chromium.chrome.browser.ui.widget.CompositeTouchDelegate; import org.chromium.chrome.browser.util.AccessibilityUtil; @@ -77,6 +78,10 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener, LocationBar, AutocompleteDelegate, FakeboxDelegate, LocationBarVoiceRecognitionHandler.Delegate { + private static final EnumeratedHistogramSample ENUMERATED_FOCUS_REASON = + new EnumeratedHistogramSample( + "Android.OmniboxFocusReason", OmniboxFocusReason.NUM_ENTRIES); + protected ImageButton mDeleteButton; protected ImageButton mMicButton; protected UrlBar mUrlBar; @@ -259,7 +264,7 @@ && newConfig.keyboard != Configuration.KEYBOARD_QWERTY) { // If we lose the hardware keyboard and the focus animations were not run, then the // user has not typed any text, so we will just clear the focus instead. - setUrlBarFocus(false); + setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); } } @@ -366,13 +371,35 @@ } @Override - public void setUrlBarFocus(boolean shouldBeFocused) { + public void setUrlBarFocus( + boolean shouldBeFocused, @Nullable String pastedText, @OmniboxFocusReason int reason) { if (shouldBeFocused) { - mUrlBar.requestFocus(); + if (!mUrlHasFocus) recordOmniboxFocusReason(reason); + + if (reason == LocationBar.OmniboxFocusReason.FAKE_BOX_TAP + || reason == LocationBar.OmniboxFocusReason.FAKE_BOX_LONG_PRESS + || reason == LocationBar.OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_LONG_PRESS + || reason == LocationBar.OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_TAP) { + mUrlFocusedFromFakebox = true; + } + + if (mUrlHasFocus && mUrlFocusedWithoutAnimations) { + handleUrlFocusAnimation(mUrlHasFocus); + } else { + mUrlBar.requestFocus(); + } } else { + assert pastedText == null; hideKeyboard(); mUrlBar.clearFocus(); } + + if (pastedText != null) { + // This must be happen after requestUrlFocus(), which changes the selection. + mUrlCoordinator.setUrlBarData(UrlBarData.forNonUrlText(pastedText), + UrlBar.ScrollType.NO_SCROLL, UrlBarCoordinator.SelectionState.SELECT_END); + forceOnTextChanged(); + } } @Override @@ -382,7 +409,7 @@ @Override public void clearOmniboxFocus() { - setUrlBarFocus(false); + setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); } @Override @@ -535,23 +562,11 @@ @Override public void requestUrlFocusFromFakebox(String pastedText) { - mUrlFocusedFromFakebox = true; - if (mUrlHasFocus && mUrlFocusedWithoutAnimations) { - handleUrlFocusAnimation(mUrlHasFocus); - } else { - setUrlBarFocus(true); - } - - if (pastedText != null) { - ToolbarManager.recordOmniboxFocusReason( - ToolbarManager.OmniboxFocusReason.FAKE_BOX_LONG_PRESS); - // This must be happen after requestUrlFocus(), which changes the selection. - mUrlCoordinator.setUrlBarData(UrlBarData.forNonUrlText(pastedText), - UrlBar.ScrollType.NO_SCROLL, UrlBarCoordinator.SelectionState.SELECT_END); - forceOnTextChanged(); - } else { - ToolbarManager.recordOmniboxFocusReason(ToolbarManager.OmniboxFocusReason.FAKE_BOX_TAP); - } + // TODO(crbug.com/1013693): Get rid of requestUrlFocusFromFakebox to let the caller uses + // setUrlBarFocus directly. + setUrlBarFocus(true, pastedText, + pastedText == null ? LocationBar.OmniboxFocusReason.FAKE_BOX_TAP + : LocationBar.OmniboxFocusReason.FAKE_BOX_LONG_PRESS); } @Override @@ -570,7 +585,10 @@ if (mUrlHasFocus || mUrlFocusedFromFakebox) return; mUrlFocusedWithoutAnimations = true; - setUrlBarFocus(true); + + // This interface should only be called to devices with a hardware keyboard attached as + // described in the LocationBar. + setUrlBarFocus(true, null, LocationBar.OmniboxFocusReason.DEFAULT_WITH_HARDWARE_KEYBOARD); } /** @@ -799,7 +817,7 @@ setUrlBarText(UrlBarData.forNonUrlText(query), UrlBar.ScrollType.NO_SCROLL, SelectionState.SELECT_ALL); - setUrlBarFocus(true); + setUrlBarFocus(true, null, LocationBar.OmniboxFocusReason.SEARCH_QUERY); mAutocompleteCoordinator.startAutocompleteForQuery(query); post(new Runnable() { @Override @@ -826,7 +844,7 @@ @Override public void backKeyPressed() { - setUrlBarFocus(false); + setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); // Revert the URL to match the current page. setUrlToPageUrl(); focusCurrentTab(); @@ -845,6 +863,12 @@ return mToolbarDataProvider.getDisplaySearchTerms() != null; } + @Override + public void gestureDetected(boolean isLongPress) { + recordOmniboxFocusReason(isLongPress ? LocationBar.OmniboxFocusReason.OMNIBOX_LONG_PRESS + : LocationBar.OmniboxFocusReason.OMNIBOX_TAP); + } + /** * @return Returns the original url of the page. */ @@ -870,7 +894,7 @@ // If we did not run the focus animations, then the user has not typed any text. // So, clear the focus and accept whatever URL the page is currently attempting to // display. If the NTP is showing, the current page's URL should not be displayed. - setUrlBarFocus(false); + setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); } else { return; } @@ -1119,4 +1143,8 @@ String textWithAutocomplete = mUrlCoordinator.getTextWithAutocomplete(); mAutocompleteCoordinator.onTextChanged(textWithoutAutocomplete, textWithAutocomplete); } + + private void recordOmniboxFocusReason(@OmniboxFocusReason int reason) { + ENUMERATED_FOCUS_REASON.record(reason); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java index af4f428..4d2bda3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
@@ -42,7 +42,6 @@ import org.chromium.base.ThreadUtils; import org.chromium.base.metrics.CachedMetrics; import org.chromium.chrome.browser.WindowDelegate; -import org.chromium.chrome.browser.toolbar.ToolbarManager; import org.chromium.ui.KeyboardVisibilityDelegate; import java.lang.annotation.Retention; @@ -210,6 +209,12 @@ * whatever's in the URL bar verbatim. */ boolean shouldCutCopyVerbatim(); + + /** + * Called to notify that a tap or long press gesture has been detected. + * @param isLongPress Whether or not is a long press gesture. + */ + void gestureDetected(boolean isLongPress); } /** Provides updates about the URL text changes. */ @@ -272,16 +277,14 @@ new GestureDetector(getContext(), new GestureDetector.SimpleOnGestureListener() { @Override public void onLongPress(MotionEvent e) { - ToolbarManager.recordOmniboxFocusReason( - ToolbarManager.OmniboxFocusReason.OMNIBOX_LONG_PRESS); + mUrlBarDelegate.gestureDetected(true); performLongClick(); } @Override public boolean onSingleTapUp(MotionEvent e) { requestFocus(); - ToolbarManager.recordOmniboxFocusReason( - ToolbarManager.OmniboxFocusReason.OMNIBOX_TAP); + mUrlBarDelegate.gestureDetected(false); return true; } }, ThreadUtils.getUiThreadHandler());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java index 19c9bd6..42d15b0 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
@@ -105,13 +105,6 @@ "contextual_search_previous_interaction_timestamp"; /** - * Key to cache whether - * {@link ChromeFeatureList#SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT} is enabled. - */ - public static final String SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT = - "swap_pixel_format_to_fix_convert_from_translucent"; - - /** * Whether the promotion for data reduction has been skipped on first invocation. * Default value is false. */ @@ -192,43 +185,6 @@ "inflate_toolbar_on_background_thread"; /** - * Whether or not the bottom toolbar is enabled. - * Default value is false. - */ - public static final String BOTTOM_TOOLBAR_ENABLED_KEY = "bottom_toolbar_enabled"; - - /** - * Whether or not the adaptive toolbar is enabled. - * Default value is true. - */ - public static final String ADAPTIVE_TOOLBAR_ENABLED_KEY = "adaptive_toolbar_enabled"; - - /** - * Whether or not the labeled bottom toolbar is enabled. - * Default value is false. - */ - public static final String LABELED_BOTTOM_TOOLBAR_ENABLED_KEY = - "labeled_bottom_toolbar_enabled"; - - /** - * Whether or not night mode is available. - * Default value is false. - */ - public static final String NIGHT_MODE_AVAILABLE_KEY = "night_mode_available"; - - /** - * Whether or not night mode should set "light" as the default option. - * Default value is false. - */ - public static final String NIGHT_MODE_DEFAULT_TO_LIGHT = "night_mode_default_to_light"; - - /** - * Whether or not night mode is available for custom tabs. - * Default value is false. - */ - public static final String NIGHT_MODE_CCT_AVAILABLE_KEY = "night_mode_cct_available"; - - /** * The current theme setting in the user settings. * Default value is -1. Use NightModeUtils#getThemeSetting() to retrieve current setting or * default theme. @@ -242,13 +198,6 @@ public static final String DARKEN_WEBSITES_ENABLED_KEY = "darken_websites_enabled"; /** - * Whether or not the download auto-resumption is enabled in native. - * Default value is true. - */ - public static final String DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY = - "download_auto_resumption_in_native"; - - /** * Marks that the content suggestions surface has been shown. * Default value is false. */ @@ -279,13 +228,6 @@ @Deprecated public static final String SOLE_INTEGRATION_ENABLED_KEY = "sole_integration_enabled"; - /** - * Whether or not command line on non-rooted devices is enabled. - * Default value is false. - */ - public static final String COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY = - "command_line_on_non_rooted_enabled"; - private static final String VERIFIED_DIGITAL_ASSET_LINKS = "verified_digital_asset_links"; private static final String TRUSTED_WEB_ACTIVITY_DISCLOSURE_ACCEPTED_PACKAGES = @@ -329,27 +271,6 @@ /** Key for deferred recording of list of uninstalled WebAPK packages. */ public static final String WEBAPK_UNINSTALLED_PACKAGES = "webapk_uninstalled_packages"; - public static final String INTEREST_FEED_CONTENT_SUGGESTIONS_KEY = - "interest_feed_content_suggestions"; - - /** - * Whether or not the start surface is enabled. - * Default value is false. - */ - public static final String START_SURFACE_ENABLED_KEY = "start_surface_enabled"; - - /** - * Whether or not the grid tab switcher is enabled. - * Default value is false. - */ - public static final String GRID_TAB_SWITCHER_ENABLED_KEY = "grid_tab_switcher_enabled"; - - /** - * Whether or not the tab group is enabled. - * Default value is false. - */ - public static final String TAB_GROUPS_ANDROID_ENABLED_KEY = "tab_group_android_enabled"; - /** * Whether or not the tab group UI improvement is enabled. * Default value is false. @@ -358,21 +279,6 @@ "tab_group_ui_improvements_android_enabled"; /** - * Key for whether PrefetchBackgroundTask should load native in service manager only mode. - * Default value is false. - */ - public static final String SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY = - "service_manager_for_background_prefetch"; - - /** - * Key for whether DownloadResumptionBackgroundTask should load native in service manager only - * mode. - * Default value is false. - */ - public static final String SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY = - "service_manager_for_download_resumption"; - - /** * Key for whether it allows to start in service manager only mode. * Default value is false. */ @@ -389,37 +295,12 @@ public static final String CHROME_HOME_SHARED_PREFERENCES_KEY = "chrome_home_enabled_date"; /** - * Whether or not bootstrap tasks should be prioritized (i.e. bootstrap task prioritization - * experiment is enabled). Default value is true. - */ - public static final String PRIORITIZE_BOOTSTRAP_TASKS_KEY = "prioritize_bootstrap_tasks"; - - /** - * Whether warming up network service is enabled. - * Default value is false. - */ - public static final String NETWORK_SERVICE_WARM_UP_ENABLED_KEY = - "network_service_warm_up_enabled"; - - /** * Contains a trial group that was used to determine whether the reached code profiler should be * enabled. */ public static final String REACHED_CODE_PROFILER_GROUP_KEY = "reached_code_profiler_group"; /** - * Whether or not we should directly open the dialer when a click to call notification is - * received. Default value is false. - */ - public static final String CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY = - "click_to_call_open_dialer_directly"; - - /** - * Key to cache whether immersive ui mode is enabled. - */ - public static final String IMMERSIVE_UI_MODE_ENABLED = "immersive_ui_mode_enabled"; - - /** * Key to cache whether offline indicator v2 (persistent offline indicator) is enabled. */ public static final String OFFLINE_INDICATOR_V2_ENABLED_KEY = "offline_indicator_v2_enabled";
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java index 254fce9..1f9452b6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
@@ -19,7 +19,6 @@ import android.view.View.OnLongClickListener; import android.view.ViewGroup; -import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.annotation.StringRes; @@ -27,7 +26,6 @@ import org.chromium.base.Callback; import org.chromium.base.VisibleForTesting; import org.chromium.base.metrics.CachedMetrics.ActionEvent; -import org.chromium.base.metrics.CachedMetrics.EnumeratedHistogramSample; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.RecordUserAction; import org.chromium.chrome.R; @@ -125,8 +123,6 @@ import org.chromium.ui.widget.Toast; import org.chromium.ui.widget.ViewRectProvider; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.util.List; /** @@ -147,23 +143,6 @@ void updateReloadButtonState(boolean isLoading); } - /** A means of tracking which mechanism is being used to focus the omnibox. */ - @IntDef({OmniboxFocusReason.OMNIBOX_TAP, OmniboxFocusReason.OMNIBOX_LONG_PRESS, - OmniboxFocusReason.FAKE_BOX_TAP, OmniboxFocusReason.FAKE_BOX_LONG_PRESS, - OmniboxFocusReason.ACCELERATOR_TAP, OmniboxFocusReason.TAB_SWITCHER_OMNIBOX_TAP}) - @Retention(RetentionPolicy.SOURCE) - public @interface OmniboxFocusReason { - int OMNIBOX_TAP = 0; - int OMNIBOX_LONG_PRESS = 1; - int FAKE_BOX_TAP = 2; - int FAKE_BOX_LONG_PRESS = 3; - int ACCELERATOR_TAP = 4; - int TAB_SWITCHER_OMNIBOX_TAP = 5; - int NUM_ENTRIES = 6; - } - private static final EnumeratedHistogramSample ENUMERATED_FOCUS_REASON = - new EnumeratedHistogramSample( - "Android.OmniboxFocusReason", OmniboxFocusReason.NUM_ENTRIES); private static final ActionEvent ACCELERATOR_BUTTON_TAP_ACTION = new ActionEvent("MobileToolbarOmniboxAcceleratorTap"); @@ -746,7 +725,7 @@ @Override public void onScrimClick() { - setUrlBarFocus(false); + setUrlBarFocus(false, LocationBar.OmniboxFocusReason.UNFOCUS); } /** @@ -757,17 +736,6 @@ } /** - * @param reason A {@link OmniboxFocusReason} that the omnibox was focused. - */ - public static void recordOmniboxFocusReason(@OmniboxFocusReason int reason) { - if (OmniboxFocusReason.OMNIBOX_TAP == reason - && ReturnToChromeExperimentsUtil.isInOverviewWithOmnibox()) { - reason = OmniboxFocusReason.TAB_SWITCHER_OMNIBOX_TAP; - } - ENUMERATED_FOCUS_REASON.record(reason); - } - - /** * Enable the bottom toolbar. */ public void enableBottomToolbar() { @@ -779,9 +747,8 @@ final OnClickListener searchAcceleratorListener = v -> { recordBottomToolbarUseForIPH(); - recordOmniboxFocusReason(OmniboxFocusReason.ACCELERATOR_TAP); ACCELERATOR_BUTTON_TAP_ACTION.record(); - setUrlBarFocus(true); + setUrlBarFocus(true, LocationBar.OmniboxFocusReason.ACCELERATOR_TAP); }; final OnClickListener shareButtonListener = v -> { @@ -1374,7 +1341,7 @@ if (isVisible) { // Defocus here to avoid handling focus in multiple places, e.g., when the // forward button is pressed. (see crbug.com/414219) - setUrlBarFocus(false); + setUrlBarFocus(false, LocationBar.OmniboxFocusReason.UNFOCUS); if (!mActivity.isInOverviewMode() && isShowingAppMenuUpdateBadge()) { // The app menu badge should be removed the first time the menu is opened. @@ -1675,11 +1642,12 @@ * If you request focus and the UrlBar was already focused, this will select all of the text. * * @param focused Whether URL bar should be focused. + * @param reason The given reason. */ - public void setUrlBarFocus(boolean focused) { + public void setUrlBarFocus(boolean focused, @LocationBar.OmniboxFocusReason int reason) { if (!isInitialized()) return; boolean wasFocused = mLocationBar.isUrlBarFocused(); - mLocationBar.setUrlBarFocus(focused); + mLocationBar.setUrlBarFocus(focused, null, reason); if (wasFocused && focused) { mLocationBar.selectAll(); } @@ -1689,9 +1657,10 @@ * See {@link #setUrlBarFocus}, but if native is not loaded it will queue the request instead * of dropping it. */ - public void setUrlBarFocusOnceNativeInitialized(boolean focused) { + public void setUrlBarFocusOnceNativeInitialized( + boolean focused, @LocationBar.OmniboxFocusReason int reason) { if (isInitialized()) { - setUrlBarFocus(focused); + setUrlBarFocus(focused, reason); return; } @@ -1700,7 +1669,7 @@ // initialized. This is important for the Launch to Incognito Tab flow (see // IncognitoTabLauncher. mOnInitializedRunnable = () -> { - setUrlBarFocus(focused); + setUrlBarFocus(focused, reason); }; } else { mOnInitializedRunnable = null; @@ -1859,7 +1828,7 @@ // Ensure the URL bar loses focus if the tab it was interacting with is changed from // underneath it. - setUrlBarFocus(false); + setUrlBarFocus(false, LocationBar.OmniboxFocusReason.UNFOCUS); // Place the cursor in the Omnibox if applicable. We always clear the focus above to // ensure the shield placed over the content is dismissed when switching tabs. But if
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/CustomTabToolbar.java index eabdc4c..83e7ca9 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/CustomTabToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/CustomTabToolbar.java
@@ -609,6 +609,9 @@ } @Override + public void gestureDetected(boolean isLongPress) {} + + @Override public void setShowTitle(boolean showTitle) { if (showTitle) { mState = STATE_DOMAIN_AND_TITLE; @@ -803,7 +806,8 @@ } @Override - public void setUrlBarFocus(boolean shouldBeFocused) {} + public void setUrlBarFocus(boolean shouldBeFocused, @Nullable String pastedText, + @LocationBar.OmniboxFocusReason int reason) {} @Override public void showUrlBarCursorWithoutFocusAnimations() {}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java index e1641c6..8bc47f0 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarLayout.java
@@ -797,7 +797,9 @@ * @return Whether or not the current Tab did go back. */ boolean back() { - if (getLocationBar() != null) getLocationBar().setUrlBarFocus(false); + if (getLocationBar() != null) { + getLocationBar().setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); + } return mToolbarTabController != null && mToolbarTabController.back() != null; } @@ -806,7 +808,9 @@ * @return Whether or not the current Tab did go forward. */ boolean forward() { - if (getLocationBar() != null) getLocationBar().setUrlBarFocus(false); + if (getLocationBar() != null) { + getLocationBar().setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); + } return mToolbarTabController != null ? mToolbarTabController.forward() : false; } @@ -817,7 +821,9 @@ * <p>The buttons of the toolbar will be updated as a result of making this call. */ void stopOrReloadCurrentTab() { - if (getLocationBar() != null) getLocationBar().setUrlBarFocus(false); + if (getLocationBar() != null) { + getLocationBar().setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); + } if (mToolbarTabController != null) mToolbarTabController.stopOrReloadCurrentTab(); } @@ -825,7 +831,9 @@ * Opens hompage in the current tab. */ void openHomepage() { - if (getLocationBar() != null) getLocationBar().setUrlBarFocus(false); + if (getLocationBar() != null) { + getLocationBar().setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); + } if (mToolbarTabController != null) mToolbarTabController.openHomepage(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java index 9e07763..0a3c728 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java
@@ -2199,10 +2199,6 @@ if (getToolbarDataProvider().shouldShowLocationBarInOverviewMode()) { mLocationBar.updateStatusIcon(); - - if (getToolbarDataProvider().isInOverviewAndShowingOmnibox()) { - mUrlBar.setText(""); - } } } });
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java index 92948d0..5a5e3f3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/FeatureUtilities.java
@@ -71,6 +71,125 @@ public class FeatureUtilities { private static final String TAG = "FeatureUtilities"; + /** + * Key for whether DownloadResumptionBackgroundTask should load native in service manager only + * mode. + * Default value is false. + */ + private static final String SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY = + "service_manager_for_download_resumption"; + + /** + * Key for whether PrefetchBackgroundTask should load native in service manager only mode. + * Default value is false. + */ + private static final String SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY = + "service_manager_for_background_prefetch"; + + private static final String INTEREST_FEED_CONTENT_SUGGESTIONS_KEY = + "interest_feed_content_suggestions"; + + /** + * Whether or not the download auto-resumption is enabled in native. + * Default value is true. + */ + private static final String DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY = + "download_auto_resumption_in_native"; + + /** + * Whether or not the bottom toolbar is enabled. + * Default value is false. + */ + private static final String BOTTOM_TOOLBAR_ENABLED_KEY = "bottom_toolbar_enabled"; + + /** + * Whether or not the adaptive toolbar is enabled. + * Default value is true. + */ + private static final String ADAPTIVE_TOOLBAR_ENABLED_KEY = "adaptive_toolbar_enabled"; + + /** + * Whether or not the labeled bottom toolbar is enabled. + * Default value is false. + */ + private static final String LABELED_BOTTOM_TOOLBAR_ENABLED_KEY = + "labeled_bottom_toolbar_enabled"; + + /** + * Whether or not night mode is available. + * Default value is false. + */ + private static final String NIGHT_MODE_AVAILABLE_KEY = "night_mode_available"; + + /** + * Whether or not night mode should set "light" as the default option. + * Default value is false. + */ + private static final String NIGHT_MODE_DEFAULT_TO_LIGHT = "night_mode_default_to_light"; + + /** + * Whether or not night mode is available for custom tabs. + * Default value is false. + */ + private static final String NIGHT_MODE_CCT_AVAILABLE_KEY = "night_mode_cct_available"; + + /** + * Whether or not command line on non-rooted devices is enabled. + * Default value is false. + */ + private static final String COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY = + "command_line_on_non_rooted_enabled"; + + /** + * Whether or not the start surface is enabled. + * Default value is false. + */ + private static final String START_SURFACE_ENABLED_KEY = "start_surface_enabled"; + + /** + * Whether or not the grid tab switcher is enabled. + * Default value is false. + */ + private static final String GRID_TAB_SWITCHER_ENABLED_KEY = "grid_tab_switcher_enabled"; + + /** + * Whether or not the tab group is enabled. + * Default value is false. + */ + private static final String TAB_GROUPS_ANDROID_ENABLED_KEY = "tab_group_android_enabled"; + + /** + * Whether or not bootstrap tasks should be prioritized (i.e. bootstrap task prioritization + * experiment is enabled). Default value is true. + */ + private static final String PRIORITIZE_BOOTSTRAP_TASKS_KEY = "prioritize_bootstrap_tasks"; + + /** + * Whether warming up network service is enabled. + * Default value is false. + */ + private static final String NETWORK_SERVICE_WARM_UP_ENABLED_KEY = + "network_service_warm_up_enabled"; + + /** + * Key to cache whether immersive ui mode is enabled. + */ + private static final String IMMERSIVE_UI_MODE_ENABLED = "immersive_ui_mode_enabled"; + + /** + * Key to cache whether + * {@link ChromeFeatureList#SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT} is enabled. + */ + private static final String SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT = + "swap_pixel_format_to_fix_convert_from_translucent"; + + /** + * Whether or not we should directly open the dialer when a click to call notification is + * received. Default value is false. + */ + private static final String CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY = + "click_to_call_open_dialer_directly"; + private static Map<String, Boolean> sFlags = new HashMap<>(); private static Boolean sHasGoogleAccountAuthenticator; private static Boolean sHasRecognitionIntentHandler; @@ -199,7 +318,7 @@ } private static void cacheServiceManagerForDownloadResumption() { - cacheFlag(ChromePreferenceManager.SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY, + cacheFlag(SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY, ChromeFeatureList.SERVICE_MANAGER_FOR_DOWNLOAD); } @@ -207,12 +326,11 @@ * @return if DownloadResumptionBackgroundTask should load native in service manager only mode. */ public static boolean isServiceManagerForDownloadResumptionEnabled() { - return isFlagEnabled( - ChromePreferenceManager.SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY, false); + return isFlagEnabled(SERVICE_MANAGER_FOR_DOWNLOAD_RESUMPTION_KEY, false); } public static void cacheServiceManagerForBackgroundPrefetch() { - cacheFlag(ChromePreferenceManager.SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY, + cacheFlag(SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY, ChromeFeatureList.SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH); } @@ -220,9 +338,7 @@ * @return if PrefetchBackgroundTask should load native in service manager only mode. */ public static boolean isServiceManagerForBackgroundPrefetchEnabled() { - return isFlagEnabled( - ChromePreferenceManager.SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY, false) - && isFeedEnabled(); + return isFlagEnabled(SERVICE_MANAGER_FOR_BACKGROUND_PREFETCH_KEY, false) && isFeedEnabled(); } /** @@ -230,7 +346,7 @@ * native is loaded. */ public static void cacheFeedEnabled() { - cacheFlag(ChromePreferenceManager.INTEREST_FEED_CONTENT_SUGGESTIONS_KEY, + cacheFlag(INTEREST_FEED_CONTENT_SUGGESTIONS_KEY, ChromeFeatureList.INTEREST_FEED_CONTENT_SUGGESTIONS); } @@ -238,7 +354,7 @@ * @return Whether or not the Feed is enabled (based on the cached value in SharedPrefs). */ public static boolean isFeedEnabled() { - return isFlagEnabled(ChromePreferenceManager.INTEREST_FEED_CONTENT_SUGGESTIONS_KEY, false); + return isFlagEnabled(INTEREST_FEED_CONTENT_SUGGESTIONS_KEY, false); } /** @@ -246,7 +362,7 @@ */ @CalledByNative public static boolean isDownloadAutoResumptionEnabledInNative() { - return isFlagEnabled(ChromePreferenceManager.DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, true); + return isFlagEnabled(DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, true); } /** @@ -254,8 +370,7 @@ * be made available immediately. */ public static void cacheBottomToolbarEnabled() { - cacheFlag( - ChromePreferenceManager.BOTTOM_TOOLBAR_ENABLED_KEY, ChromeFeatureList.CHROME_DUET); + cacheFlag(BOTTOM_TOOLBAR_ENABLED_KEY, ChromeFeatureList.CHROME_DUET); } /** @@ -263,8 +378,7 @@ * be made available immediately. */ public static void cacheAdaptiveToolbarEnabled() { - cacheFlag(ChromePreferenceManager.ADAPTIVE_TOOLBAR_ENABLED_KEY, - ChromeFeatureList.CHROME_DUET_ADAPTIVE); + cacheFlag(ADAPTIVE_TOOLBAR_ENABLED_KEY, ChromeFeatureList.CHROME_DUET_ADAPTIVE); } /** @@ -272,8 +386,7 @@ * be made available immediately. */ public static void cacheLabeledBottomToolbarEnabled() { - cacheFlag(ChromePreferenceManager.LABELED_BOTTOM_TOOLBAR_ENABLED_KEY, - ChromeFeatureList.CHROME_DUET_LABELED); + cacheFlag(LABELED_BOTTOM_TOOLBAR_ENABLED_KEY, ChromeFeatureList.CHROME_DUET_LABELED); } /** @@ -281,16 +394,21 @@ * value can be made available immediately. */ private static void cacheDownloadAutoResumptionEnabledInNative() { - cacheFlag(ChromePreferenceManager.DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, + cacheFlag(DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, ChromeFeatureList.DOWNLOADS_AUTO_RESUMPTION_NATIVE); } + @VisibleForTesting + public static void setDownloadAutoResumptionEnabledInNativeForTesting(Boolean value) { + sFlags.put(DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, value); + } + /** * @return Whether or not the bottom toolbar is enabled. */ public static boolean isBottomToolbarEnabled() { // TODO(crbug.com/944228): TabGroupsAndroid and ChromeDuet are incompatible for now. - return isFlagEnabled(ChromePreferenceManager.BOTTOM_TOOLBAR_ENABLED_KEY, false) + return isFlagEnabled(BOTTOM_TOOLBAR_ENABLED_KEY, false) && !DeviceFormFactor.isNonMultiDisplayContextOnTablet( ContextUtils.getApplicationContext()) && !isTabGroupsAndroidEnabled(); @@ -299,24 +417,24 @@ /** * Set whether the bottom toolbar is enabled for tests. Reset to null at the end of tests. */ - public static void setIsBottomToolbarEnabledForTests(Boolean enabled) { - sFlags.put(ChromePreferenceManager.BOTTOM_TOOLBAR_ENABLED_KEY, enabled); + @VisibleForTesting + public static void setIsBottomToolbarEnabledForTesting(Boolean enabled) { + sFlags.put(BOTTOM_TOOLBAR_ENABLED_KEY, enabled); } /** * @return Whether or not the adaptive toolbar is enabled. */ public static boolean isAdaptiveToolbarEnabled() { - return isFlagEnabled(ChromePreferenceManager.ADAPTIVE_TOOLBAR_ENABLED_KEY, true) - && isBottomToolbarEnabled() && !isGridTabSwitcherEnabled(); + return isFlagEnabled(ADAPTIVE_TOOLBAR_ENABLED_KEY, true) && isBottomToolbarEnabled() + && !isGridTabSwitcherEnabled(); } /** * @return Whether or not the labeled bottom toolbar is enabled. */ public static boolean isLabeledBottomToolbarEnabled() { - return isFlagEnabled(ChromePreferenceManager.LABELED_BOTTOM_TOOLBAR_ENABLED_KEY, false) - && isBottomToolbarEnabled(); + return isFlagEnabled(LABELED_BOTTOM_TOOLBAR_ENABLED_KEY, false) && isBottomToolbarEnabled(); } /** @@ -327,8 +445,7 @@ boolean available = ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_NIGHT_MODE) || (BuildInfo.isAtLeastQ() && ChromeFeatureList.isEnabled(ChromeFeatureList.ANDROID_NIGHT_MODE_FOR_Q)); - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.NIGHT_MODE_AVAILABLE_KEY, available); + ChromePreferenceManager.getInstance().writeBoolean(NIGHT_MODE_AVAILABLE_KEY, available); } /** @@ -336,7 +453,7 @@ * enabled). */ public static boolean isNightModeAvailable() { - return isFlagEnabled(ChromePreferenceManager.NIGHT_MODE_AVAILABLE_KEY, false); + return isFlagEnabled(NIGHT_MODE_AVAILABLE_KEY, false); } /** @@ -345,7 +462,7 @@ */ @VisibleForTesting public static void setNightModeAvailableForTesting(@Nullable Boolean available) { - sFlags.put(ChromePreferenceManager.NIGHT_MODE_AVAILABLE_KEY, available); + sFlags.put(NIGHT_MODE_AVAILABLE_KEY, available); } /** @@ -364,7 +481,7 @@ ChromeFeatureList.ANDROID_NIGHT_MODE, lightModeDefaultParam, false); ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.NIGHT_MODE_DEFAULT_TO_LIGHT, lightModeAsDefault); + NIGHT_MODE_DEFAULT_TO_LIGHT, lightModeAsDefault); } /** @@ -374,7 +491,7 @@ if (BuildInfo.isAtLeastQ()) { return false; } - return isFlagEnabled(ChromePreferenceManager.NIGHT_MODE_DEFAULT_TO_LIGHT, false); + return isFlagEnabled(NIGHT_MODE_DEFAULT_TO_LIGHT, false); } /** @@ -383,7 +500,7 @@ */ @VisibleForTesting public static void setNightModeDefaultToLightForTesting(@Nullable Boolean available) { - sFlags.put(ChromePreferenceManager.NIGHT_MODE_DEFAULT_TO_LIGHT, available); + sFlags.put(NIGHT_MODE_DEFAULT_TO_LIGHT, available); } /** @@ -391,8 +508,7 @@ * enabled), so the value is immediately available on next start-up. */ public static void cacheNightModeForCustomTabsAvailable() { - cacheFlag(ChromePreferenceManager.NIGHT_MODE_CCT_AVAILABLE_KEY, - ChromeFeatureList.ANDROID_NIGHT_MODE_CCT); + cacheFlag(NIGHT_MODE_CCT_AVAILABLE_KEY, ChromeFeatureList.ANDROID_NIGHT_MODE_CCT); } /** @@ -400,7 +516,7 @@ * enabled) for custom tabs. */ public static boolean isNightModeForCustomTabsAvailable() { - return isFlagEnabled(ChromePreferenceManager.NIGHT_MODE_CCT_AVAILABLE_KEY, true); + return isFlagEnabled(NIGHT_MODE_CCT_AVAILABLE_KEY, true); } /** @@ -408,17 +524,21 @@ * testing. Should be reset back to NULL after the test has finished. */ public static void setNightModeForCustomTabsAvailableForTesting(Boolean available) { - sFlags.put(ChromePreferenceManager.NIGHT_MODE_CCT_AVAILABLE_KEY, available); + sFlags.put(NIGHT_MODE_CCT_AVAILABLE_KEY, available); } /** * Cache whether or not command line is enabled on non-rooted devices. */ private static void cacheCommandLineOnNonRootedEnabled() { - cacheFlag(ChromePreferenceManager.COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY, + cacheFlag(COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY, ChromeFeatureList.COMMAND_LINE_ON_NON_ROOTED); } + public static boolean isCommandLineOnNonRootedEnabled() { + return isFlagEnabled(COMMAND_LINE_ON_NON_ROOTED_ENABLED_KEY, false); + } + /** * @return Whether or not the download progress infobar is enabled. */ @@ -427,20 +547,18 @@ } private static void cacheStartSurfaceEnabled() { - cacheFlag(ChromePreferenceManager.START_SURFACE_ENABLED_KEY, - ChromeFeatureList.START_SURFACE_ANDROID); + cacheFlag(START_SURFACE_ENABLED_KEY, ChromeFeatureList.START_SURFACE_ANDROID); } /** * @return Whether the Start Surface is enabled. */ public static boolean isStartSurfaceEnabled() { - return isFlagEnabled(ChromePreferenceManager.START_SURFACE_ENABLED_KEY, false); + return isFlagEnabled(START_SURFACE_ENABLED_KEY, false); } private static void cacheGridTabSwitcherEnabled() { - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.GRID_TAB_SWITCHER_ENABLED_KEY, + ChromePreferenceManager.getInstance().writeBoolean(GRID_TAB_SWITCHER_ENABLED_KEY, !DeviceClassManager.enableAccessibilityLayout() && (ChromeFeatureList.isEnabled( ChromeFeatureList.DOWNLOAD_TAB_MANAGEMENT_MODULE) @@ -457,8 +575,7 @@ // TODO(yusufo): AccessibilityLayout check should not be here and the flow should support // changing that setting while Chrome is alive. // Having Tab Groups implies Grid Tab Switcher. - return isFlagEnabled(ChromePreferenceManager.GRID_TAB_SWITCHER_ENABLED_KEY, false) - || isTabGroupsAndroidEnabled(); + return isFlagEnabled(GRID_TAB_SWITCHER_ENABLED_KEY, false) || isTabGroupsAndroidEnabled(); } /** @@ -467,12 +584,11 @@ */ @VisibleForTesting public static void setGridTabSwitcherEnabledForTesting(@Nullable Boolean enabled) { - sFlags.put(ChromePreferenceManager.GRID_TAB_SWITCHER_ENABLED_KEY, enabled); + sFlags.put(GRID_TAB_SWITCHER_ENABLED_KEY, enabled); } private static void cacheTabGroupsAndroidEnabled() { - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.TAB_GROUPS_ANDROID_ENABLED_KEY, + ChromePreferenceManager.getInstance().writeBoolean(TAB_GROUPS_ANDROID_ENABLED_KEY, !DeviceClassManager.enableAccessibilityLayout() && (ChromeFeatureList.isEnabled( ChromeFeatureList.DOWNLOAD_TAB_MANAGEMENT_MODULE) @@ -487,7 +603,7 @@ * @return Whether the tab group feature is enabled and available for use. */ public static boolean isTabGroupsAndroidEnabled() { - return isFlagEnabled(ChromePreferenceManager.TAB_GROUPS_ANDROID_ENABLED_KEY, false); + return isFlagEnabled(TAB_GROUPS_ANDROID_ENABLED_KEY, false); } /** @@ -496,7 +612,7 @@ */ @VisibleForTesting public static void setTabGroupsAndroidEnabledForTesting(@Nullable Boolean available) { - sFlags.put(ChromePreferenceManager.TAB_GROUPS_ANDROID_ENABLED_KEY, available); + sFlags.put(TAB_GROUPS_ANDROID_ENABLED_KEY, available); } /** @@ -505,7 +621,7 @@ */ @VisibleForTesting public static void setStartSurfaceEnabledForTesting(@Nullable Boolean isEnabled) { - sFlags.put(ChromePreferenceManager.START_SURFACE_ENABLED_KEY, isEnabled); + sFlags.put(START_SURFACE_ENABLED_KEY, isEnabled); } /** @@ -562,8 +678,7 @@ * can be made available immediately. */ public static void cachePrioritizeBootstrapTasks() { - cacheFlag(ChromePreferenceManager.PRIORITIZE_BOOTSTRAP_TASKS_KEY, - ChromeFeatureList.PRIORITIZE_BOOTSTRAP_TASKS); + cacheFlag(PRIORITIZE_BOOTSTRAP_TASKS_KEY, ChromeFeatureList.PRIORITIZE_BOOTSTRAP_TASKS); } /** @@ -571,7 +686,7 @@ * prioritization experiment is enabled). */ public static boolean shouldPrioritizeBootstrapTasks() { - return isFlagEnabled(ChromePreferenceManager.PRIORITIZE_BOOTSTRAP_TASKS_KEY, true); + return isFlagEnabled(PRIORITIZE_BOOTSTRAP_TASKS_KEY, true); } /** @@ -579,8 +694,7 @@ * can be made available immediately on next start up. */ private static void cacheNetworkServiceWarmUpEnabled() { - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.NETWORK_SERVICE_WARM_UP_ENABLED_KEY, + ChromePreferenceManager.getInstance().writeBoolean(NETWORK_SERVICE_WARM_UP_ENABLED_KEY, FeatureUtilitiesJni.get().isNetworkServiceWarmUpEnabled()); } @@ -588,19 +702,18 @@ * @return whether warming up network service is enabled. */ public static boolean isNetworkServiceWarmUpEnabled() { - return isFlagEnabled(ChromePreferenceManager.NETWORK_SERVICE_WARM_UP_ENABLED_KEY, false); + return isFlagEnabled(NETWORK_SERVICE_WARM_UP_ENABLED_KEY, false); } private static void cacheImmersiveUiModeEnabled() { - cacheFlag(ChromePreferenceManager.IMMERSIVE_UI_MODE_ENABLED, - ChromeFeatureList.IMMERSIVE_UI_MODE); + cacheFlag(IMMERSIVE_UI_MODE_ENABLED, ChromeFeatureList.IMMERSIVE_UI_MODE); } /** * @return Whether immersive ui mode is enabled. */ public static boolean isImmersiveUiModeEnabled() { - return isFlagEnabled(ChromePreferenceManager.IMMERSIVE_UI_MODE_ENABLED, false); + return isFlagEnabled(IMMERSIVE_UI_MODE_ENABLED, false); } /** @@ -609,11 +722,11 @@ */ public static boolean isSwapPixelFormatToFixConvertFromTranslucentEnabled() { return ChromePreferenceManager.getInstance().readBoolean( - ChromePreferenceManager.SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT, true); + SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT, true); } public static void cacheSwapPixelFormatToFixConvertFromTranslucentEnabled() { - cacheFlag(ChromePreferenceManager.SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT, + cacheFlag(SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT, ChromeFeatureList.SWAP_PIXEL_FORMAT_TO_FIX_CONVERT_FROM_TRANSLUCENT); } @@ -621,7 +734,7 @@ * Cache the value of the flag whether or not to directly open the dialer for click to call. */ public static void cacheClickToCallOpenDialerDirectlyEnabled() { - cacheFlag(ChromePreferenceManager.CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, + cacheFlag(CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, ChromeFeatureList.CLICK_TO_CALL_OPEN_DIALER_DIRECTLY); } @@ -630,7 +743,7 @@ * value in SharedPrefs). */ public static boolean isClickToCallOpenDialerDirectlyEnabled() { - return isFlagEnabled(ChromePreferenceManager.CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, false); + return isFlagEnabled(CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, false); } /** @@ -640,7 +753,7 @@ @VisibleForTesting public static void setIsClickToCallOpenDialerDirectlyEnabledForTesting( @Nullable Boolean isEnabled) { - sFlags.put(ChromePreferenceManager.CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, isEnabled); + sFlags.put(CLICK_TO_CALL_OPEN_DIALER_DIRECTLY_KEY, isEnabled); } /**
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 328cdfb..b393f68 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -3357,6 +3357,20 @@ Navigation history is closed </message> + <!-- Ephemeral Tab --> + <message name="IDS_EPHEMERAL_TAB_SHEET_DESCRIPTION" desc="The content description of the preview tab bottom sheet."> + Preview tab + </message> + <message name="IDS_EPHEMERAL_TAB_SHEET_OPENED_HALF" desc="Accessibility string read when the preview tab bottom sheet is opened at half height. The sheet will occupy up to half the screen."> + Preview tab is half-opened + </message> + <message name="IDS_EPHEMERAL_TAB_SHEET_OPENED_FULL" desc="Accessibility string read when the preview tab bottom sheet is opened at full height. The sheet will occupy up to the full screen."> + Preview tab is opened + </message> + <message name="IDS_EPHEMERAL_TAB_SHEET_CLOSED" desc="Accessibility string read when the preview tab bottom sheet is closed."> + Preview tab is closed + </message> + <!-- Storage Preference UI strings for clearing storage. --> <message name="IDS_STORAGE_MANAGEMENT_ACTIVITY_LABEL" desc="Title for Chrome's Manage Space Activity."> Google <ph name="APP_NAME">%1$s<ex>Chrome</ex></ph> storage
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 26288051..33a2171 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
@@ -30,7 +30,7 @@ import org.chromium.chrome.browser.ChromeFeatureList; 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.util.FeatureUtilities; import org.chromium.chrome.test.ChromeBrowserTestRule; import org.chromium.components.offline_items_collection.ContentId; import org.chromium.components.offline_items_collection.OfflineItem.Progress; @@ -439,8 +439,7 @@ @Feature({"Download"}) @RetryOnFailure public void testInterruptedDownloadAreAutoResumed() throws InterruptedException { - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, false); + FeatureUtilities.setDownloadAutoResumptionEnabledInNativeForTesting(false); MockDownloadNotifier notifier = new MockDownloadNotifier(); createDownloadManagerService(notifier, UPDATE_DELAY_FOR_TEST);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationSheetTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationSheetTest.java index cb9e5445..b337d62 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationSheetTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/gesturenav/NavigationSheetTest.java
@@ -196,9 +196,10 @@ private NavigationSheet showPopup(NavigationController controller) throws ExecutionException { return TestThreadUtils.runOnUiThreadBlocking(() -> { Tab tab = mActivityTestRule.getActivity().getActivityTabProvider().get(); - NavigationSheet navigationSheet = NavigationSheet.create(tab.getContentView(), - mActivityTestRule.getActivity()::getBottomSheetController, - new TestSheetDelegate(controller)); + NavigationSheet navigationSheet = + NavigationSheet.create(tab.getContentView(), mActivityTestRule.getActivity(), + mActivityTestRule.getActivity()::getBottomSheetController, + new TestSheetDelegate(controller)); navigationSheet.startAndExpand(false, false); return navigationSheet; });
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarLayoutTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarLayoutTest.java index 8b8f064..cd9c137 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarLayoutTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarLayoutTest.java
@@ -20,6 +20,7 @@ import org.junit.runner.RunWith; import org.chromium.base.ContextUtils; +import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; @@ -250,4 +251,48 @@ onView(withId(R.id.location_bar_status)) .check((view, e) -> Assert.assertEquals(iconView.getVisibility(), GONE)); } + + @Test + @SmallTest + public void testSetUrlBarFocus() { + final LocationBarLayout locationBar = getLocationBar(); + + Assert.assertEquals( + 0, RecordHistogram.getHistogramTotalCountForTesting("Android.OmniboxFocusReason")); + TestThreadUtils.runOnUiThreadBlocking(() -> { + locationBar.setUrlBarFocus( + true, SEARCH_TERMS_URL, LocationBar.OmniboxFocusReason.FAKE_BOX_LONG_PRESS); + }); + Assert.assertTrue(locationBar.isUrlBarFocused()); + Assert.assertTrue(locationBar.didFocusUrlFromFakebox()); + Assert.assertEquals(SEARCH_TERMS_URL, getUrlText(getUrlBar())); + Assert.assertEquals( + 1, RecordHistogram.getHistogramTotalCountForTesting("Android.OmniboxFocusReason")); + + TestThreadUtils.runOnUiThreadBlocking(() -> { + locationBar.setUrlBarFocus( + true, SEARCH_TERMS, LocationBar.OmniboxFocusReason.SEARCH_QUERY); + }); + Assert.assertTrue(locationBar.isUrlBarFocused()); + Assert.assertTrue(locationBar.didFocusUrlFromFakebox()); + Assert.assertEquals(SEARCH_TERMS, getUrlText(getUrlBar())); + Assert.assertEquals( + 1, RecordHistogram.getHistogramTotalCountForTesting("Android.OmniboxFocusReason")); + + TestThreadUtils.runOnUiThreadBlocking(() -> { + locationBar.setUrlBarFocus(false, null, LocationBar.OmniboxFocusReason.UNFOCUS); + }); + Assert.assertFalse(locationBar.isUrlBarFocused()); + Assert.assertFalse(locationBar.didFocusUrlFromFakebox()); + Assert.assertEquals( + 1, RecordHistogram.getHistogramTotalCountForTesting("Android.OmniboxFocusReason")); + + TestThreadUtils.runOnUiThreadBlocking(() -> { + locationBar.setUrlBarFocus(true, null, LocationBar.OmniboxFocusReason.OMNIBOX_TAP); + }); + Assert.assertTrue(locationBar.isUrlBarFocused()); + Assert.assertFalse(locationBar.didFocusUrlFromFakebox()); + Assert.assertEquals( + 2, RecordHistogram.getHistogramTotalCountForTesting("Android.OmniboxFocusReason")); + } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarTest.java index f9d2871..70be0418319 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/bottom/BottomToolbarTest.java
@@ -42,13 +42,13 @@ @Before public void setUp() throws InterruptedException { - FeatureUtilities.setIsBottomToolbarEnabledForTests(true); + FeatureUtilities.setIsBottomToolbarEnabledForTesting(true); mActivityTestRule.startMainActivityOnBlankPage(); } @After public void tearDown() { - FeatureUtilities.setIsBottomToolbarEnabledForTests(null); + FeatureUtilities.setIsBottomToolbarEnabledForTesting(null); } @Test
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateControllerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateControllerTest.java index 799b66e..32a445ac 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateControllerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/customtabs/CustomTabNightModeStateControllerTest.java
@@ -77,6 +77,20 @@ } @Test + public void triggersAppCompatDelegate_WhenInitialSchemeIsLight() { + setSystemNightMode(false); + initializeWithColorScheme(COLOR_SCHEME_SYSTEM); + verify(mAppCompatDelegate).setLocalNightMode(AppCompatDelegate.MODE_NIGHT_NO); + } + + @Test + public void triggersAppCompatDelegate_WhenInitialSchemeIsDark() { + setSystemNightMode(true); + initializeWithColorScheme(COLOR_SCHEME_SYSTEM); + verify(mAppCompatDelegate).setLocalNightMode(AppCompatDelegate.MODE_NIGHT_YES); + } + + @Test public void nightModeIfOff_WhenSchemeForced() { initializeWithColorScheme(COLOR_SCHEME_LIGHT); assertFalse(mNightModeController.isInNightMode());
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/download/DownloadResumptionSchedulerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/download/DownloadResumptionSchedulerTest.java index e132ba2..ba4ec37 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/download/DownloadResumptionSchedulerTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/download/DownloadResumptionSchedulerTest.java
@@ -28,7 +28,7 @@ import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; -import org.chromium.chrome.browser.preferences.ChromePreferenceManager; +import org.chromium.chrome.browser.util.FeatureUtilities; import org.chromium.components.background_task_scheduler.BackgroundTaskScheduler; import org.chromium.components.background_task_scheduler.BackgroundTaskSchedulerFactory; import org.chromium.components.background_task_scheduler.TaskIds; @@ -55,8 +55,7 @@ @Before public void setUp() { - ChromePreferenceManager.getInstance().writeBoolean( - ChromePreferenceManager.DOWNLOAD_AUTO_RESUMPTION_IN_NATIVE_KEY, false); + FeatureUtilities.setDownloadAutoResumptionEnabledInNativeForTesting(false); BackgroundTaskSchedulerFactory.setSchedulerForTesting(mScheduler); }
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 790f469c..23edd09 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -1020,31 +1020,26 @@ #endif // defined(OS_ANDROID) #if !defined(OS_ANDROID) -const FeatureEntry::FeatureParam kProactiveTabFreezeAndDiscard_FreezeOnly[] = { +const FeatureEntry::FeatureParam kTabFreeze_FreezeNoUnfreeze[] = { {resource_coordinator:: kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam, + "false"}, + {resource_coordinator:: + kProactiveTabFreezeAndDiscard_ShouldPeriodicallyUnfreezeParam, "false"}}; -const FeatureEntry::FeatureParam - kProactiveTabFreezeAndDiscard_FreezeAndDiscard[] = { - {resource_coordinator:: - kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam, - "true"}}; -const FeatureEntry::FeatureParam - kProactiveTabFreezeAndDiscard_DisableHeuristics[] = { - {resource_coordinator:: - kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam, - "true"}, - {resource_coordinator:: - kProactiveTabFreezeAndDiscard_DisableHeuristicsParam, - "true"}}; -const FeatureEntry::FeatureVariation kProactiveTabFreezeAndDiscardVariations[] = - {{"Freeze only", kProactiveTabFreezeAndDiscard_FreezeOnly, - base::size(kProactiveTabFreezeAndDiscard_FreezeOnly), nullptr}, - {"Freeze and discard", kProactiveTabFreezeAndDiscard_FreezeAndDiscard, - base::size(kProactiveTabFreezeAndDiscard_FreezeAndDiscard), nullptr}, - {"Freeze and discard, heuristics disabled", - kProactiveTabFreezeAndDiscard_DisableHeuristics, - base::size(kProactiveTabFreezeAndDiscard_DisableHeuristics), nullptr}}; +const FeatureEntry::FeatureParam kTabFreeze_FreezeWithUnfreeze[] = { + {resource_coordinator:: + kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam, + "false"}, + {resource_coordinator:: + kProactiveTabFreezeAndDiscard_ShouldPeriodicallyUnfreezeParam, + "true"}}; +const FeatureEntry::FeatureVariation kTabFreezeVariations[] = { + {"Freeze - No Unfreeze", kTabFreeze_FreezeNoUnfreeze, + base::size(kTabFreeze_FreezeNoUnfreeze), nullptr}, + {"Freeze - Unfreeze 10 seconds every 15 minutes", + kTabFreeze_FreezeWithUnfreeze, base::size(kTabFreeze_FreezeWithUnfreeze), + nullptr}}; #endif #if defined(OS_ANDROID) @@ -3519,12 +3514,11 @@ kOsDesktop, FEATURE_VALUE_TYPE( features::kSessionRestorePrioritizesBackgroundUseCases)}, - {"proactive-tab-freeze-and-discard", - flag_descriptions::kProactiveTabFreezeAndDiscardName, - flag_descriptions::kProactiveTabFreezeAndDiscardDescription, kOsDesktop, + {"proactive-tab-freeze", flag_descriptions::kTabFreezeName, + flag_descriptions::kTabFreezeDescription, kOsDesktop, FEATURE_WITH_PARAMS_VALUE_TYPE( features::kProactiveTabFreezeAndDiscard, - kProactiveTabFreezeAndDiscardVariations, + kTabFreezeVariations, resource_coordinator::kProactiveTabFreezeAndDiscardFeatureName)}, #endif
diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc index f5b4264..c4bbf5a 100644 --- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc +++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -491,11 +491,13 @@ host->set_sw_origin_for_logs(url::Origin::Create(GURL(sw_scope))); host->set_payment_request_id_for_logs(event_data->payment_request_id); + // Todo(sahel): SupportedDelegations should be properly populated after + // implementing delegation on Android. https://crbug.com/984694 content::PaymentAppProvider::GetInstance()->InstallAndInvokePaymentApp( web_contents, std::move(event_data), ConvertJavaStringToUTF8(env, japp_name), icon_bitmap, ConvertJavaStringToUTF8(env, jsw_js_url), sw_scope, juse_cache, - ConvertJavaStringToUTF8(env, jmethod), + ConvertJavaStringToUTF8(env, jmethod), content::SupportedDelegations(), base::BindOnce( &payments::PaymentHandlerHost::set_registration_id_for_logs, host->AsWeakPtr()),
diff --git a/chrome/browser/android/vr/arcore_device/ar_image_transport.cc b/chrome/browser/android/vr/arcore_device/ar_image_transport.cc index a1cb2ae2..e9c0713 100644 --- a/chrome/browser/android/vr/arcore_device/ar_image_transport.cc +++ b/chrome/browser/android/vr/arcore_device/ar_image_transport.cc
@@ -26,34 +26,37 @@ ArImageTransport::ArImageTransport( std::unique_ptr<vr::MailboxToSurfaceBridge> mailbox_bridge) : gl_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), - mailbox_bridge_(std::move(mailbox_bridge)) {} + mailbox_bridge_(std::move(mailbox_bridge)) { + DVLOG(2) << __func__; +} -ArImageTransport::~ArImageTransport() { +ArImageTransport::~ArImageTransport() = default; + +void ArImageTransport::DestroySharedBuffers(vr::WebXrPresentationState* webxr) { + DVLOG(2) << __func__; DCHECK(IsOnGlThread()); - if (webxr_) { - std::vector<std::unique_ptr<vr::WebXrSharedBuffer>> buffers = - webxr_->TakeSharedBuffers(); - for (auto& buffer : buffers) { - if (!buffer->mailbox_holder.mailbox.IsZero()) { - DCHECK(mailbox_bridge_); - DVLOG(2) << ": DestroySharedImage, mailbox=" - << buffer->mailbox_holder.mailbox.ToDebugString(); - // Note: the sync token in mailbox_holder may not be accurate. See - // comment in TransferFrame below. - mailbox_bridge_->DestroySharedImage(buffer->mailbox_holder); - } + if (!webxr) + return; + + std::vector<std::unique_ptr<vr::WebXrSharedBuffer>> buffers = + webxr->TakeSharedBuffers(); + for (auto& buffer : buffers) { + if (!buffer->mailbox_holder.mailbox.IsZero()) { + DCHECK(mailbox_bridge_); + DVLOG(2) << ": DestroySharedImage, mailbox=" + << buffer->mailbox_holder.mailbox.ToDebugString(); + // Note: the sync token in mailbox_holder may not be accurate. See + // comment in TransferFrame below. + mailbox_bridge_->DestroySharedImage(buffer->mailbox_holder); } } } -bool ArImageTransport::Initialize(vr::WebXrPresentationState* webxr) { - DVLOG(1) << __func__; +void ArImageTransport::Initialize(vr::WebXrPresentationState* webxr, + base::OnceClosure callback) { DCHECK(IsOnGlThread()); - - webxr_ = webxr; - - mailbox_bridge_->BindContextProviderToCurrentThread(); + DVLOG(2) << __func__; glDisable(GL_DEPTH_TEST); glDepthMask(GL_FALSE); @@ -62,14 +65,26 @@ glGenFramebuffersEXT(1, &camera_fbo_); - return true; + mailbox_bridge_->CreateAndBindContextProvider( + base::BindOnce(&ArImageTransport::OnMailboxBridgeReady, + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); +} + +void ArImageTransport::OnMailboxBridgeReady(base::OnceClosure callback) { + DVLOG(2) << __func__; + DCHECK(IsOnGlThread()); + + DCHECK(mailbox_bridge_->IsConnected()); + + std::move(callback).Run(); } GLuint ArImageTransport::GetCameraTextureId() { return camera_texture_id_arcore_; } -void ArImageTransport::ResizeSharedBuffer(const gfx::Size& size, +void ArImageTransport::ResizeSharedBuffer(vr::WebXrPresentationState* webxr, + const gfx::Size& size, vr::WebXrSharedBuffer* buffer) { DCHECK(IsOnGlThread()); @@ -94,7 +109,7 @@ static constexpr gfx::BufferFormat format = gfx::BufferFormat::RGBA_8888; static constexpr gfx::BufferUsage usage = gfx::BufferUsage::SCANOUT; - gfx::GpuMemoryBufferId kBufferId(webxr_->next_memory_buffer_id++); + gfx::GpuMemoryBufferId kBufferId(webxr->next_memory_buffer_id++); buffer->gmb = gpu::GpuMemoryBufferImplAndroidHardwareBuffer::Create( kBufferId, size, format, usage, gpu::GpuMemoryBufferImpl::DestructionCallback()); @@ -135,16 +150,17 @@ } gpu::MailboxHolder ArImageTransport::TransferFrame( + vr::WebXrPresentationState* webxr, const gfx::Size& frame_size, const gfx::Transform& uv_transform) { DCHECK(IsOnGlThread()); - if (!webxr_->GetAnimatingFrame()->shared_buffer) { - webxr_->GetAnimatingFrame()->shared_buffer = CreateBuffer(); + if (!webxr->GetAnimatingFrame()->shared_buffer) { + webxr->GetAnimatingFrame()->shared_buffer = CreateBuffer(); } vr::WebXrSharedBuffer* shared_buffer = - webxr_->GetAnimatingFrame()->shared_buffer.get(); - ResizeSharedBuffer(frame_size, shared_buffer); + webxr->GetAnimatingFrame()->shared_buffer.get(); + ResizeSharedBuffer(webxr, frame_size, shared_buffer); mailbox_bridge_->GenSyncToken(&shared_buffer->mailbox_holder.sync_token); return shared_buffer->mailbox_holder; @@ -169,12 +185,13 @@ } void ArImageTransport::CopyDrawnImageToFramebuffer( + vr::WebXrPresentationState* webxr, const gfx::Size& frame_size, const gfx::Transform& uv_transform) { DVLOG(2) << __func__; vr::WebXrSharedBuffer* shared_buffer = - webxr_->GetRenderingFrame()->shared_buffer.get(); + webxr->GetRenderingFrame()->shared_buffer.get(); // Set the blend mode for combining the drawn image (source) with the camera // image (destination). WebXR assumes that the canvas has premultiplied alpha,
diff --git a/chrome/browser/android/vr/arcore_device/ar_image_transport.h b/chrome/browser/android/vr/arcore_device/ar_image_transport.h index 747e2f9..6d4fc00 100644 --- a/chrome/browser/android/vr/arcore_device/ar_image_transport.h +++ b/chrome/browser/android/vr/arcore_device/ar_image_transport.h
@@ -7,6 +7,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" +#include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" #include "chrome/browser/android/vr/arcore_device/ar_renderer.h" #include "device/vr/public/mojom/vr_service.mojom.h" @@ -29,30 +30,40 @@ namespace device { -// This class copies the camera texture to a shared image and returns a mailbox -// holder which is suitable for mojo transport to the Renderer. +// This class handles transporting WebGL rendered output from the GPU process's +// command buffer GL context to the local GL context, and compositing WebGL +// output onto the camera image using the local GL context. class ArImageTransport { public: explicit ArImageTransport( std::unique_ptr<vr::MailboxToSurfaceBridge> mailbox_bridge); virtual ~ArImageTransport(); - // Initialize() must be called on a valid GL thread. - virtual bool Initialize(vr::WebXrPresentationState* webxr); + virtual void DestroySharedBuffers(vr::WebXrPresentationState* webxr); + + // All methods must be called on a valid GL thread. Initialization + // must happen after the local GL context is ready for use. That + // starts the asynchronous setup for the GPU process command buffer + // GL context via MailboxToSurfaceBridge, and the callback is called + // once that's complete. + virtual void Initialize(vr::WebXrPresentationState* webxr, + base::OnceClosure callback); virtual GLuint GetCameraTextureId(); // This transfers whatever the contents of the texture specified // by GetCameraTextureId() is at the time it is called and returns // a gpu::MailboxHolder with that texture copied to a shared buffer. - virtual gpu::MailboxHolder TransferFrame(const gfx::Size& frame_size, + virtual gpu::MailboxHolder TransferFrame(vr::WebXrPresentationState* webxr, + const gfx::Size& frame_size, const gfx::Transform& uv_transform); virtual void CreateGpuFenceForSyncToken( const gpu::SyncToken& sync_token, base::OnceCallback<void(std::unique_ptr<gfx::GpuFence>)>); virtual void CopyCameraImageToFramebuffer(const gfx::Size& frame_size, const gfx::Transform& uv_transform); - virtual void CopyDrawnImageToFramebuffer(const gfx::Size& frame_size, + virtual void CopyDrawnImageToFramebuffer(vr::WebXrPresentationState* webxr, + const gfx::Size& frame_size, const gfx::Transform& uv_transform); virtual void CopyTextureToFramebuffer(GLuint texture, const gfx::Size& frame_size, @@ -61,10 +72,13 @@ private: std::unique_ptr<vr::WebXrSharedBuffer> CreateBuffer(); - void ResizeSharedBuffer(const gfx::Size& size, vr::WebXrSharedBuffer* buffer); + void ResizeSharedBuffer(vr::WebXrPresentationState* webxr, + const gfx::Size& size, + vr::WebXrSharedBuffer* buffer); bool IsOnGlThread() const; + void OnMailboxBridgeReady(base::OnceClosure callback); std::unique_ptr<ArRenderer> ar_renderer_; - // samplerExternalOES texture data for WebXR content image. + // samplerExternalOES texture for the camera image. GLuint camera_texture_id_arcore_ = 0; GLuint camera_fbo_ = 0; @@ -72,8 +86,8 @@ std::unique_ptr<vr::MailboxToSurfaceBridge> mailbox_bridge_; - vr::WebXrPresentationState* webxr_ = nullptr; - + // Must be last. + base::WeakPtrFactory<ArImageTransport> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ArImageTransport); };
diff --git a/chrome/browser/android/vr/arcore_device/arcore_device.cc b/chrome/browser/android/vr/arcore_device/arcore_device.cc index e3317aa18..2f7afc3 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_device.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_device.cc
@@ -88,12 +88,6 @@ // it obvious if we're using this data instead of the actual values we get // from the output drawing surface. SetVRDisplayInfo(CreateVRDisplayInfo(GetId(), {16, 16})); - - // TODO(https://crbug.com/836524) clean up usage of mailbox bridge - // and extract the methods in this class that interact with ARCore API - // into a separate class that implements the ArCore interface. - mailbox_bridge_->CreateUnboundContextProvider( - base::BindOnce(&ArCoreDevice::OnMailboxBridgeReady, GetWeakPtr())); } ArCoreDevice::ArCoreDevice() @@ -122,33 +116,6 @@ session_state_->arcore_gl_thread_ = nullptr; } -void ArCoreDevice::OnMailboxBridgeReady() { - DVLOG(1) << __func__; - DCHECK(IsOnMainThread()); - DCHECK(!session_state_->arcore_gl_thread_); - // MailboxToSurfaceBridge's destructor's call to DestroyContext must - // happen on the GL thread, so transferring it to that thread is appropriate. - // TODO(https://crbug.com/836553): use same GL thread as GVR. - session_state_->arcore_gl_thread_ = std::make_unique<ArCoreGlThread>( - std::move(ar_image_transport_factory_), std::move(mailbox_bridge_), - CreateMainThreadCallback(base::BindOnce( - &ArCoreDevice::OnArCoreGlThreadInitialized, GetWeakPtr()))); - session_state_->arcore_gl_thread_->Start(); -} - -void ArCoreDevice::OnArCoreGlThreadInitialized() { - DVLOG(1) << __func__; - DCHECK(IsOnMainThread()); - - session_state_->is_arcore_gl_thread_initialized_ = true; - - if (session_state_->pending_request_session_after_gl_thread_initialized_) { - std::move( - session_state_->pending_request_session_after_gl_thread_initialized_) - .Run(); - } -} - void ArCoreDevice::RequestSession( mojom::XRRuntimeSessionOptionsPtr options, mojom::XRRuntime::RequestSessionCallback callback) { @@ -166,35 +133,22 @@ options->enabled_features, device::mojom::XRSessionFeature::DOM_OVERLAY_FOR_HANDHELD_AR); - if (session_state_->is_arcore_gl_thread_initialized_) { - // First session on a new ArCoreDevice, and it's ready to proceed now. - RequestSessionAfterInitialization( - options->render_process_id, options->render_frame_id, use_dom_overlay); - } else { - if (mailbox_bridge_) { - // This is a new ArCoreDevice, but its mailbox_bridge_ hasn't finished - // initialization yet. - } else { - // We're reusing a previously constructed ArCoreDevice for a new session. - // Restart initialization. - mailbox_bridge_ = std::make_unique<vr::MailboxToSurfaceBridge>(); - mailbox_bridge_->CreateUnboundContextProvider( - base::BindOnce(&ArCoreDevice::OnMailboxBridgeReady, GetWeakPtr())); - } + // mailbox_bridge_ is either supplied from the constructor, or recreated in + // OnSessionEnded(). + DCHECK(mailbox_bridge_); - // We're now expecting a call to OnMailboxBridgeReady() which will create - // a new GL thread, and at some point after that GL thread initialization - // will complete which calls OnArCoreGlThreadInitialized(). - session_state_->pending_request_session_after_gl_thread_initialized_ = - base::BindOnce(&ArCoreDevice::RequestSessionAfterInitialization, - GetWeakPtr(), options->render_process_id, - options->render_frame_id, use_dom_overlay); - } + session_state_->arcore_gl_thread_ = std::make_unique<ArCoreGlThread>( + std::move(ar_image_transport_factory_), std::move(mailbox_bridge_), + CreateMainThreadCallback( + base::BindOnce(&ArCoreDevice::OnGlThreadReady, GetWeakPtr(), + options->render_process_id, options->render_frame_id, + use_dom_overlay))); + session_state_->arcore_gl_thread_->Start(); } -void ArCoreDevice::RequestSessionAfterInitialization(int render_process_id, - int render_frame_id, - bool use_overlay) { +void ArCoreDevice::OnGlThreadReady(int render_process_id, + int render_frame_id, + bool use_overlay) { auto ready_callback = base::BindRepeating(&ArCoreDevice::OnDrawingSurfaceReady, GetWeakPtr()); auto touch_callback = @@ -268,9 +222,9 @@ // just a factory.) ar_image_transport_factory_ = std::make_unique<ArImageTransportFactory>(); - // Shut down the mailbox bridge, this has the side effect of also destroying - // GL resources in the GPU process. - mailbox_bridge_ = nullptr; + // Create a new mailbox bridge for use in the next session. (This is cheap, + // the constructor doesn't establish a GL context.) + mailbox_bridge_ = std::make_unique<vr::MailboxToSurfaceBridge>(); } void ArCoreDevice::CallDeferredRequestSessionCallback(bool success) { @@ -291,7 +245,6 @@ } // Success case should only happen after GL thread is ready. - DCHECK(session_state_->is_arcore_gl_thread_initialized_); auto create_callback = base::BindOnce(&ArCoreDevice::OnCreateSessionCallback, GetWeakPtr(), std::move(deferred_callback)); @@ -342,7 +295,6 @@ const gfx::Size& frame_size) { DVLOG(1) << __func__; DCHECK(IsOnMainThread()); - DCHECK(session_state_->is_arcore_gl_thread_initialized_); if (!arcore_session_utils_->EnsureLoaded()) { DLOG(ERROR) << "ARCore was not loaded properly."; @@ -372,7 +324,6 @@ void ArCoreDevice::OnArCoreGlInitializationComplete(bool success) { DVLOG(1) << __func__; DCHECK(IsOnMainThread()); - DCHECK(session_state_->is_arcore_gl_thread_initialized_); if (!success) { CallDeferredRequestSessionCallback(/*success=*/false);
diff --git a/chrome/browser/android/vr/arcore_device/arcore_device.h b/chrome/browser/android/vr/arcore_device/arcore_device.h index 8689e6a..498eb58 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_device.h +++ b/chrome/browser/android/vr/arcore_device/arcore_device.h
@@ -52,11 +52,6 @@ } private: - // VRDeviceBase implementation - void OnMailboxBridgeReady(); - void OnArCoreGlThreadInitialized(); - void OnRequestCameraPermissionComplete(bool success); - void OnDrawingSurfaceReady(gfx::AcceleratedWidget window, display::Display::Rotation rotation, const gfx::Size& frame_size); @@ -84,13 +79,22 @@ bool IsOnMainThread(); - void RequestSessionAfterInitialization(int render_process_id, - int render_frame_id, - bool use_overlay); + // Called once the GL thread is started. At this point, it doesn't + // have a valid GL context yet. + void OnGlThreadReady(int render_process_id, + int render_frame_id, + bool use_overlay); + + // Replies to the pending mojo RequestSession request. void CallDeferredRequestSessionCallback(bool success); + + // Tells the GL thread to initialize a GL context and other resources, + // using the supplied window as a drawing surface. void RequestArCoreGlInitialization(gfx::AcceleratedWidget window, int rotation, const gfx::Size& size); + + // Called when the GL thread's GL context initialization completes. void OnArCoreGlInitializationComplete(bool success); void OnCreateSessionCallback( @@ -112,7 +116,6 @@ ~SessionState(); std::unique_ptr<ArCoreGlThread> arcore_gl_thread_; - bool is_arcore_gl_thread_initialized_ = false; bool is_arcore_gl_initialized_ = false; base::OnceClosure start_immersive_activity_callback_; @@ -121,8 +124,6 @@ // the callback for replying once that initialization completes. Only one // concurrent session is supported, other requests are rejected. mojom::XRRuntime::RequestSessionCallback pending_request_session_callback_; - - base::OnceClosure pending_request_session_after_gl_thread_initialized_; }; // This object is reset to initial values when ending a session. This helps
diff --git a/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc b/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc index b3f75fe..dea4eb3 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc
@@ -31,9 +31,10 @@ std::unique_ptr<vr::MailboxToSurfaceBridge> mailbox_bridge) : ArImageTransport(std::move(mailbox_bridge)) {} - // TODO(lincolnfrog): verify this gets called on GL thread. - // TODO(lincolnfrog): test what happens if this returns false. - bool Initialize(vr::WebXrPresentationState*) override { return true; } + void Initialize(vr::WebXrPresentationState*, + base::OnceClosure callback) override { + std::move(callback).Run(); + } // TODO(lincolnfrog): test verify this somehow. GLuint GetCameraTextureId() override { return CAMERA_TEXTURE_ID; } @@ -42,6 +43,7 @@ // by GetCameraTextureId() is at the time it is called and returns // a gpu::MailboxHolder with that texture copied to a shared buffer. gpu::MailboxHolder TransferFrame( + vr::WebXrPresentationState*, const gfx::Size& frame_size, const gfx::Transform& uv_transform) override { return gpu::MailboxHolder(); @@ -65,14 +67,10 @@ public: StubMailboxToSurfaceBridge() = default; - MOCK_METHOD1(DoCreateUnboundContextProvider, - void(base::OnceClosure callback)); - void CreateUnboundContextProvider(base::OnceClosure callback) override { + void CreateAndBindContextProvider(base::OnceClosure callback) override { callback_ = std::move(callback); } - void BindContextProviderToCurrentThread() override {} - bool IsConnected() override { return true; } void CallCallback() { std::move(callback_).Run(); } @@ -178,7 +176,6 @@ run_loop = std::make_unique<base::RunLoop>(); quit_closure = run_loop->QuitClosure(); - bridge->CallCallback(); run_loop->Run(); EXPECT_TRUE(environment_provider);
diff --git a/chrome/browser/android/vr/arcore_device/arcore_gl.cc b/chrome/browser/android/vr/arcore_device/arcore_gl.cc index 4c1164b14..97c9eba 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_gl.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_gl.cc
@@ -80,11 +80,6 @@ return result; } -gfx::Transform WebXRImageTransformMatrix() { - gfx::Transform result; - return result; -} - const gfx::Size kDefaultFrameSize = {1, 1}; const display::Display::Rotation kDefaultRotation = display::Display::ROTATE_0; @@ -108,12 +103,12 @@ webxr_(std::make_unique<vr::WebXrPresentationState>()), environment_binding_(this) { DVLOG(1) << __func__; - webxr_transform_ = WebXRImageTransformMatrix(); } ArCoreGl::~ArCoreGl() { DVLOG(1) << __func__; DCHECK(IsOnGlThread()); + ar_image_transport_->DestroySharedBuffers(webxr_.get()); ar_image_transport_.reset(); CloseBindingsIfOpen(); } @@ -155,13 +150,24 @@ return; } - // Set the texture on ArCore to render the camera. + DVLOG(3) << "ar_image_transport_->Initialize()..."; + ar_image_transport_->Initialize( + webxr_.get(), + base::BindOnce(&ArCoreGl::OnArImageTransportReady, + weak_ptr_factory_.GetWeakPtr(), std::move(callback))); + + // Set the texture on ArCore to render the camera. Must be after + // ar_image_transport_->Initialize(). arcore_->SetCameraTexture(ar_image_transport_->GetCameraTextureId()); // Set the Geometry to ensure consistent behaviour. arcore_->SetDisplayGeometry(kDefaultFrameSize, kDefaultRotation); +} +void ArCoreGl::OnArImageTransportReady( + base::OnceCallback<void(bool)> callback) { + DVLOG(3) << __func__; is_initialized_ = true; - + webxr_->NotifyMailboxBridgeReady(); std::move(callback).Run(true); } @@ -240,12 +246,6 @@ return false; } - DVLOG(3) << "ar_image_transport_->Initialize()..."; - if (!ar_image_transport_->Initialize(webxr_.get())) { - DLOG(ERROR) << "ARImageTransport failed to initialize"; - return false; - } - // Assign the surface and context members now that initialization has // succeeded. surface_ = std::move(surface); @@ -391,8 +391,8 @@ } // Set up a shared buffer for the renderer to draw into, it'll be sent // alongside the frame pose. - gpu::MailboxHolder buffer_holder = - ar_image_transport_->TransferFrame(transfer_size_, uv_transform_); + gpu::MailboxHolder buffer_holder = ar_image_transport_->TransferFrame( + webxr_.get(), transfer_size_, uv_transform_); // Create the frame data to return to the renderer. frame_data->pose = std::move(pose); @@ -443,15 +443,23 @@ } void ArCoreGl::CopyCameraImageToFramebuffer() { + DVLOG(2) << __func__; + // Draw the current camera texture to the output default framebuffer now, if // available. - if (!have_camera_image_) - return; + if (have_camera_image_) { + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); + ar_image_transport_->CopyCameraImageToFramebuffer(camera_image_size_, + uv_transform_); + have_camera_image_ = false; + } - glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); - ar_image_transport_->CopyCameraImageToFramebuffer(camera_image_size_, - uv_transform_); - have_camera_image_ = false; + // We're done with the camera image for this frame, start the next ARCore + // update if we had deferred it. This will get the next frame's camera image + // and pose in parallel while we're waiting for this frame's rendered image. + if (pending_getframedata_) { + std::move(pending_getframedata_).Run(); + } } void ArCoreGl::SubmitFrameMissing(int16_t frame_index, @@ -466,13 +474,6 @@ CopyCameraImageToFramebuffer(); - // We're done with the camera image for this frame, start the next ARCore - // update if we had deferred it. This will get the next frame's camera image - // and pose in parallel while we're waiting for this frame's rendered image. - if (pending_getframedata_) { - std::move(pending_getframedata_).Run(); - } - surface_->SwapBuffers(base::DoNothing()); DVLOG(3) << __func__ << ": frame=" << frame_index << " SwapBuffers"; } @@ -496,19 +497,20 @@ if (!IsSubmitFrameExpected(frame_index)) return; - webxr_->TransitionFrameAnimatingToProcessing(); + // Start processing the frame now if possible. If there's already a current + // processing frame, defer it until that frame calls TryDeferredProcessing. + webxr_->ProcessOrDefer(base::BindOnce(&ArCoreGl::ProcessFrameDrawnIntoTexture, + weak_ptr_factory_.GetWeakPtr(), + frame_index, sync_token)); +} +void ArCoreGl::ProcessFrameDrawnIntoTexture(int16_t frame_index, + const gpu::SyncToken& sync_token) { TRACE_EVENT0("gpu", "ArCore SubmitFrame"); + DCHECK(webxr_->HaveProcessingFrame()); CopyCameraImageToFramebuffer(); - // We're done with the camera image for this frame, start the next ARCore - // update if we had deferred it. This will get the next frame's camera image - // and pose in parallel while we're waiting for this frame's rendered image. - if (pending_getframedata_) { - std::move(pending_getframedata_).Run(); - } - ar_image_transport_->CreateGpuFenceForSyncToken( sync_token, base::BindOnce(&ArCoreGl::OnWebXrTokenSignaled, GetWeakPtr(), frame_index)); @@ -518,11 +520,12 @@ std::unique_ptr<gfx::GpuFence> gpu_fence) { DVLOG(3) << __func__ << ": frame=" << frame_index; + DCHECK(webxr_->HaveProcessingFrame()); webxr_->TransitionFrameProcessingToRendering(); glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER, 0); - ar_image_transport_->CopyDrawnImageToFramebuffer(camera_image_size_, - webxr_transform_); + ar_image_transport_->CopyDrawnImageToFramebuffer( + webxr_.get(), camera_image_size_, shared_buffer_transform_); surface_->SwapBuffers(base::DoNothing()); DVLOG(3) << __func__ << ": frame=" << frame_index << " SwapBuffers"; @@ -535,6 +538,8 @@ submit_client_->OnSubmitFrameGpuFence( gfx::CloneHandleForIPC(gpu_fence2->GetGpuFenceHandle())); } + // We finished processing a frame, unblock a potentially waiting next frame. + webxr_->TryDeferredProcessing(); } void ArCoreGl::UpdateLayerBounds(int16_t frame_index,
diff --git a/chrome/browser/android/vr/arcore_device/arcore_gl.h b/chrome/browser/android/vr/arcore_device/arcore_gl.h index e2576a3..4e72a44e 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_gl.h +++ b/chrome/browser/android/vr/arcore_device/arcore_gl.h
@@ -130,6 +130,8 @@ // mojom::XRSessionController void SetFrameDataRestricted(bool restricted) override; + void ProcessFrameDrawnIntoTexture(int16_t frame_index, + const gpu::SyncToken& sync_token); void OnWebXrTokenSignaled(int16_t frame_index, std::unique_ptr<gfx::GpuFence> gpu_fence); @@ -147,6 +149,7 @@ mojom::XRFrameDataProvider::GetFrameDataCallback callback); bool InitializeGl(gfx::AcceleratedWidget drawing_widget); + void OnArImageTransportReady(base::OnceCallback<void(bool)> callback); bool IsOnGlThread() const; void CopyCameraImageToFramebuffer(); @@ -192,8 +195,14 @@ display::Display::Rotation display_rotation_ = display::Display::ROTATE_0; bool should_update_display_geometry_ = true; + // UV transform for drawing the camera texture, this is supplied by ARCore + // and can include 90 degree rotations or other nontrivial transforms. gfx::Transform uv_transform_; - gfx::Transform webxr_transform_; + + // UV transform for drawing received WebGL content from a shared buffer's + // texture, this is simply an identity. + gfx::Transform shared_buffer_transform_; + gfx::Transform projection_; gfx::Transform inverse_projection_; // The first run of ProduceFrame should set uv_transform_ and projection_
diff --git a/chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc b/chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc index 95518115..6a7f419 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_gl_thread.cc
@@ -34,7 +34,6 @@ arcore_gl_ = std::make_unique<ArCoreGl>( ar_image_transport_factory_->Create(std::move(mailbox_bridge_))); - std::move(initialized_callback_).Run(); }
diff --git a/chrome/browser/android/vr/mailbox_to_surface_bridge.cc b/chrome/browser/android/vr/mailbox_to_surface_bridge.cc index 5367ff1..50afd843 100644 --- a/chrome/browser/android/vr/mailbox_to_surface_bridge.cc +++ b/chrome/browser/android/vr/mailbox_to_surface_bridge.cc
@@ -144,8 +144,7 @@ namespace vr { -MailboxToSurfaceBridge::MailboxToSurfaceBridge() - : constructor_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()) { +MailboxToSurfaceBridge::MailboxToSurfaceBridge() { DVLOG(1) << __FUNCTION__; } @@ -177,20 +176,12 @@ // destruction. context_provider_ = std::move(provider); - if (on_context_provider_ready_) { - // We have a custom callback from CreateUnboundContextProvider. Run that. - // The client is responsible for running BindContextProviderToCurrentThread - // before use. - constructor_thread_task_runner_->PostTask( - FROM_HERE, std::move(on_context_provider_ready_)); - } else { - DCHECK(on_context_bound_); - constructor_thread_task_runner_->PostTask( - FROM_HERE, - base::BindOnce( - &MailboxToSurfaceBridge::BindContextProviderToCurrentThread, - base::Unretained(this))); - } + DCHECK(on_context_bound_); + gl_thread_task_runner_->PostTask( + FROM_HERE, + base::BindOnce( + &MailboxToSurfaceBridge::BindContextProviderToCurrentThread, + base::Unretained(this))); } void MailboxToSurfaceBridge::BindContextProviderToCurrentThread() { @@ -234,21 +225,11 @@ ANativeWindow_release(window); } -void MailboxToSurfaceBridge::CreateUnboundContextProvider( - base::OnceClosure callback) { - on_context_provider_ready_ = std::move(callback); - DCHECK(!on_context_bound_); - CreateContextProviderInternal(); -} - void MailboxToSurfaceBridge::CreateAndBindContextProvider( base::OnceClosure on_bound_callback) { + gl_thread_task_runner_ = base::ThreadTaskRunnerHandle::Get(); on_context_bound_ = std::move(on_bound_callback); - DCHECK(!on_context_provider_ready_); - CreateContextProviderInternal(); -} -void MailboxToSurfaceBridge::CreateContextProviderInternal() { // The callback to run in this thread. It is necessary to keep |surface| alive // until the context becomes available. So pass it on to the callback, so that // it stays alive, and is destroyed on the same thread once done. @@ -292,17 +273,19 @@ } void MailboxToSurfaceBridge::ResizeSurface(int width, int height) { + surface_width_ = width; + surface_height_ = height; + if (!IsConnected()) { // We're not initialized yet, save the requested size for later. needs_resize_ = true; - resize_width_ = width; - resize_height_ = height; return; } - DVLOG(1) << __FUNCTION__ << ": resize Surface to " << width << "x" << height; - gl_->ResizeCHROMIUM(width, height, 1.f, GL_COLOR_SPACE_UNSPECIFIED_CHROMIUM, - false); - gl_->Viewport(0, 0, width, height); + DVLOG(1) << __FUNCTION__ << ": resize Surface to " << surface_width_ << "x" + << surface_height_; + gl_->ResizeCHROMIUM(surface_width_, surface_height_, 1.f, + GL_COLOR_SPACE_UNSPECIFIED_CHROMIUM, false); + gl_->Viewport(0, 0, surface_width_, surface_height_); } bool MailboxToSurfaceBridge::CopyMailboxToSurfaceAndSwap( @@ -315,13 +298,20 @@ } TRACE_EVENT0("gpu", __FUNCTION__); + if (needs_resize_) { - ResizeSurface(resize_width_, resize_height_); + ResizeSurface(surface_width_, surface_height_); needs_resize_ = false; } DCHECK(mailbox.mailbox.IsSharedImage()); + // While it's not an error to use a zero-sized Surface, it's not going to + // produce any visible output. Show a debug mode warning in that case to avoid + // another annoying debugging session. + DLOG_IF(WARNING, !surface_width_ || !surface_height_) + << "Surface is zero-sized. Missing call to ResizeSurface?"; + GLuint sourceTexture = ConsumeTexture(gl_, mailbox); gl_->BeginSharedImageAccessDirectCHROMIUM( sourceTexture, GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM);
diff --git a/chrome/browser/android/vr/mailbox_to_surface_bridge.h b/chrome/browser/android/vr/mailbox_to_surface_bridge.h index 2d9d02f..6b58838 100644 --- a/chrome/browser/android/vr/mailbox_to_surface_bridge.h +++ b/chrome/browser/android/vr/mailbox_to_surface_bridge.h
@@ -41,6 +41,10 @@ class MailboxToSurfaceBridge { public: + // It's OK to create an object instance and pass it to a different thread, + // i.e. to enable dependency injection for a unit test, but all methods on it + // must be called consistently on a single GL thread. This is verified by + // DCHECKs. MailboxToSurfaceBridge(); virtual ~MailboxToSurfaceBridge(); @@ -52,40 +56,16 @@ // is active. Requires initialization to be complete. bool IsGpuWorkaroundEnabled(int32_t workaround); + // This call is needed for Surface transport, in that case it must be called + // on the GL thread with a valid local native GL context. If it's not used, + // only the SharedBuffer transport methods are available. void CreateSurface(gl::SurfaceTexture*); - // This class can be used in a couple ways using these sequences: - // - // To use entirely on the GL thread: - // Call CreateAndBindContextProvider(callback) from your thread. - // When the callback is invoked, the object is ready for calls that use the - // context, such as CreateSharedImage(). - // - // To create on one thread and use GL on another: - // Call CreateUnboundContextProvider(callback) and then make sure - // to call BindContextProviderToCurrentThread() from your GL - // thread afterwards before making a context-related calls. - // Asynchronously create the context using the surface provided by an earlier // CreateSurface call, or an offscreen context if that wasn't called. Also - // binds the context provider to the thread used for constructing the - // MailboxToSurfaceBridge object, and calls the callback on the constructor - // thread. Use this if constructing the object on the intended GL thread. - void CreateAndBindContextProvider(base::OnceClosure callback); - - // Variant of above, use this if the MailboxToSurfaceBridge constructor - // wasn't run on the GL thread. The provided callback is run on the - // constructor thread. After that, you can pass the MailboxToSurfaceBridge - // to another thread. You must call BindContextProviderToCurrentThread() - // on the target GL thread before using any context-related methods. - // The context-related methods check that they are called on this thread, so - // there will be a DCHECK error if they are not used consistently. - virtual void CreateUnboundContextProvider(base::OnceClosure callback); - - // Client must call this on the target (GL) thread after - // CreateUnboundContextProvider. It's called automatically when using - // CreateAndBindContextProvider. - virtual void BindContextProviderToCurrentThread(); + // binds the context provider to the current thread (making it the GL thread), + // and calls the callback on the GL thread. + virtual void CreateAndBindContextProvider(base::OnceClosure callback); // All other public methods below must be called on the GL thread // (except when marked otherwise). @@ -127,7 +107,7 @@ void DestroySharedImage(const gpu::MailboxHolder& mailbox_holder); private: - void CreateContextProviderInternal(); + void BindContextProviderToCurrentThread(); void OnContextAvailableOnUiThread( scoped_refptr<viz::ContextProvider> provider); void InitializeRenderer(); @@ -142,19 +122,19 @@ // TODO(https://crbug.com/836524): shouldn't have both of these closures // in the same class like this. base::OnceClosure on_context_bound_; - base::OnceClosure on_context_provider_ready_; - // Saved state for a pending resize, the dimensions are only - // valid if needs_resize_ is true. + int surface_width_ = 0; + int surface_height_ = 0; + + // If true, surface width/height is the intended size that should be applied + // to the surface once it's ready for use. bool needs_resize_ = false; - int resize_width_; - int resize_height_; // A swap ID which is passed to GL swap. Incremented each call. uint64_t swap_id_ = 0; - // A task runner for the thread the object was created on. - scoped_refptr<base::SingleThreadTaskRunner> constructor_thread_task_runner_; + // A task runner for the GL thread + scoped_refptr<base::SingleThreadTaskRunner> gl_thread_task_runner_; // Must be last. base::WeakPtrFactory<MailboxToSurfaceBridge> weak_ptr_factory_{this};
diff --git a/chrome/browser/apps/app_service/app_service_metrics.cc b/chrome/browser/apps/app_service/app_service_metrics.cc index 1f43c42..77800c1 100644 --- a/chrome/browser/apps/app_service/app_service_metrics.cc +++ b/chrome/browser/apps/app_service/app_service_metrics.cc
@@ -15,21 +15,6 @@ namespace { -// The built-in app's histogram name. This is used for logging so do not change -// the order of this enum. -// This is the copy from -// src/chrome/browser/ui/app_list/internal_app/internal_app_metadata.h -enum class BuiltInAppName { - kKeyboardShortcutViewer = 0, - kSettings = 1, - kContinueReading = 2, - kCamera = 3, - kDiscover = 4, - kPluginVm = 5, - kReleaseNotes = 6, - kMaxValue = kReleaseNotes, -}; - // The default Essential app's histogram name. This is used for logging so do // not change the order of this enum. // https://docs.google.com/document/d/1WJ-BjlVOM87ygIsdDBCyXxdKw3iS5EtNGm1fWiWhfIs @@ -85,7 +70,7 @@ } } -void RecordBuiltInAppLaunch(BuiltInAppName built_in_app_name, +void RecordBuiltInAppLaunch(apps::BuiltInAppName built_in_app_name, apps::mojom::LaunchSource launch_source) { switch (launch_source) { case apps::mojom::LaunchSource::kUnknown:
diff --git a/chrome/browser/apps/app_service/app_service_metrics.h b/chrome/browser/apps/app_service/app_service_metrics.h index 8537858..dc488dbd 100644 --- a/chrome/browser/apps/app_service/app_service_metrics.h +++ b/chrome/browser/apps/app_service/app_service_metrics.h
@@ -12,6 +12,19 @@ namespace apps { +// The built-in app's histogram name. This is used for logging so do not change +// the order of this enum. +enum class BuiltInAppName { + kKeyboardShortcutViewer = 0, + kSettings = 1, + kContinueReading = 2, + kCamera = 3, + kDiscover = 4, + kPluginVm = 5, + kReleaseNotes = 6, + kMaxValue = kReleaseNotes, +}; + void RecordAppLaunch(const std::string& app_id, apps::mojom::LaunchSource launch_source);
diff --git a/chrome/browser/apps/app_service/built_in_chromeos_apps.cc b/chrome/browser/apps/app_service/built_in_chromeos_apps.cc index ab2df65..8d1e74a 100644 --- a/chrome/browser/apps/app_service/built_in_chromeos_apps.cc +++ b/chrome/browser/apps/app_service/built_in_chromeos_apps.cc
@@ -10,6 +10,7 @@ #include "ash/public/cpp/app_list/app_list_metrics.h" #include "base/time/time.h" #include "chrome/browser/apps/app_service/app_icon_factory.h" +#include "chrome/browser/apps/app_service/app_service_metrics.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/app_list/internal_app/internal_app_item.h" #include "chrome/browser/ui/app_list/internal_app/internal_app_metadata.h" @@ -108,16 +109,14 @@ // moved here, it might mean calling sync_sessions::SessionSyncService's // SubscribeToForeignSessionsChanged. See also app_search_provider.cc's // InternalDataSource. - if (internal_app.internal_app_name == - app_list::InternalAppName::kContinueReading) { + if (internal_app.internal_app_name == BuiltInAppName::kContinueReading) { continue; } apps::mojom::AppPtr app = Convert(internal_app); if (!app.is_null()) { if (hide_settings_app_for_testing_ && - (internal_app.internal_app_name == - app_list::InternalAppName::kSettings)) { + (internal_app.internal_app_name == BuiltInAppName::kSettings)) { app->show_in_search = apps::mojom::OptionalBool::kFalse; } apps.push_back(std::move(app));
diff --git a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc index ee1f204..2871438 100644 --- a/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc +++ b/chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc
@@ -775,8 +775,9 @@ // Tests that if a <webview> is focused before navigation then the guest starts // off focused. +// Flaky. https://crbug.com/1013552 IN_PROC_BROWSER_TEST_F(WebViewFocusInteractiveTest, - Focus_FocusBeforeNavigation) { + DISABLED_Focus_FocusBeforeNavigation) { TestHelper("testFocusBeforeNavigation", "web_view/focus", NO_TEST_SERVER); }
diff --git a/chrome/browser/chromeos/logging_browsertest.cc b/chrome/browser/chromeos/logging_browsertest.cc index 48be878..fa98e6b 100644 --- a/chrome/browser/chromeos/logging_browsertest.cc +++ b/chrome/browser/chromeos/logging_browsertest.cc
@@ -19,9 +19,9 @@ #include "components/account_id/account_id.h" #include "components/session_manager/core/session_manager.h" #include "components/session_manager/session_manager_types.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/common/content_switches.h" -#include "content/public/common/service_names.mojom.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "services/network/public/mojom/network_service_test.mojom.h" #include "testing/gtest/include/gtest/gtest.h" @@ -49,9 +49,9 @@ } void LogToNetworkService(std::string message) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); mojo::ScopedAllowSyncCallForTesting allow_sync_call; network_service_test->Log(message); }
diff --git a/chrome/browser/chromeos/login/active_directory_login_browsertest.cc b/chrome/browser/chromeos/login/active_directory_login_browsertest.cc index ac74c89..d654778 100644 --- a/chrome/browser/chromeos/login/active_directory_login_browsertest.cc +++ b/chrome/browser/chromeos/login/active_directory_login_browsertest.cc
@@ -18,12 +18,11 @@ #include "chrome/browser/chromeos/login/wizard_controller.h" #include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "components/user_manager/user_names.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" namespace chromeos { @@ -39,9 +38,9 @@ const std::string& expected_value) { std::string value; if (content::IsOutOfProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); mojo::ScopedAllowSyncCallForTesting allow_sync_call; network_service_test->GetEnvironmentVariableValue(name, &value); } else {
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc index 63eb55e..3560207e 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.cc
@@ -275,7 +275,7 @@ else pairing_update->SetKey(kKeyDevices, devices.Clone()); - RefreshCryptohomeKeysIfPossible(); + CheckCryptohomeKeysAndMaybeHardlock(); } proximity_auth::ProximityAuthPrefManager* @@ -339,7 +339,7 @@ registrar_.Init(profile()->GetPrefs()); registrar_.Add( proximity_auth::prefs::kProximityAuthIsChromeOSLoginEnabled, - base::Bind(&EasyUnlockServiceRegular::RefreshCryptohomeKeysIfPossible, + base::Bind(&EasyUnlockServiceRegular::CheckCryptohomeKeysAndMaybeHardlock, weak_ptr_factory_.GetWeakPtr())); // If |device_sync_client_| is not ready yet, wait for it to call back on @@ -473,16 +473,16 @@ // if EasyUnlock was enabled through the setup app. if (!public_keys_after_sync.empty()) { if (public_keys_before_sync.empty()) { - multidevice_setup::MultiDeviceSetupDialog* multidevice_setup_dialog = - multidevice_setup::MultiDeviceSetupDialog::Get(); - if (multidevice_setup_dialog) { - // Delay showing the "Chromebook added" notification until the - // MultiDeviceSetupDialog is closed. - multidevice_setup_dialog->AddOnCloseCallback(base::BindOnce( - &EasyUnlockServiceRegular::ShowChromebookAddedNotification, - weak_ptr_factory_.GetWeakPtr())); - return; - } + multidevice_setup::MultiDeviceSetupDialog* multidevice_setup_dialog = + multidevice_setup::MultiDeviceSetupDialog::Get(); + if (multidevice_setup_dialog) { + // Delay showing the "Chromebook added" notification until the + // MultiDeviceSetupDialog is closed. + multidevice_setup_dialog->AddOnCloseCallback(base::BindOnce( + &EasyUnlockServiceRegular::ShowChromebookAddedNotification, + weak_ptr_factory_.GetWeakPtr())); + return; + } notification_controller_->ShowChromebookAddedNotification(); } else { @@ -557,10 +557,6 @@ // Nothing to do. } -void EasyUnlockServiceRegular::RefreshCryptohomeKeysIfPossible() { - CheckCryptohomeKeysAndMaybeHardlock(); -} - multidevice::RemoteDeviceRefList EasyUnlockServiceRegular::GetUnlockKeys() { multidevice::RemoteDeviceRefList unlock_keys; for (const auto& remote_device : device_sync_client_->GetSyncedDevices()) {
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h index a0dc8628..3ce20307 100644 --- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h +++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_service_regular.h
@@ -123,10 +123,6 @@ override; void OnFocusedUserChanged(const AccountId& account_id) override; - // Refreshes the ChromeOS cryptohome keys if the user has reauthed recently. - // Otherwise, hardlock the device. - void RefreshCryptohomeKeysIfPossible(); - multidevice::RemoteDeviceRefList GetUnlockKeys(); // The timestamp for the most recent time when the lock screen was shown. The
diff --git a/chrome/browser/chromeos/login/webview_login_browsertest.cc b/chrome/browser/chromeos/login/webview_login_browsertest.cc index b131575..98bdff12 100644 --- a/chrome/browser/chromeos/login/webview_login_browsertest.cc +++ b/chrome/browser/chromeos/login/webview_login_browsertest.cc
@@ -43,7 +43,9 @@ #include "chrome/browser/ui/webui/signin/signin_utils.h" #include "chrome/test/base/ui_test_utils.h" #include "chromeos/constants/chromeos_switches.h" +#include "chromeos/dbus/cryptohome/fake_cryptohome_client.h" #include "chromeos/dbus/session_manager/fake_session_manager_client.h" +#include "chromeos/tpm/tpm_token_loader.h" #include "components/content_settings/core/common/pref_names.h" #include "components/guest_view/browser/guest_view_manager.h" #include "components/onc/onc_constants.h" @@ -62,7 +64,9 @@ #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" +#include "crypto/nss_util.h" #include "crypto/nss_util_internal.h" +#include "crypto/scoped_test_nss_db.h" #include "crypto/scoped_test_system_nss_key_slot.h" #include "media/base/media_switches.h" #include "mojo/public/cpp/bindings/remote.h" @@ -424,33 +428,14 @@ EXPECT_FALSE(getUserMediaSuccess); } -class WebviewClientCertsLoginTest : public WebviewLoginTest { +// Base class for tests of the client certificates in the sign-in frame. +class WebviewClientCertsLoginTestBase : public WebviewLoginTest { public: - WebviewClientCertsLoginTest() {} - - // Installs a testing system slot and imports a client certificate into it. - void SetUpClientCertInSystemSlot() { - { - bool system_slot_constructed_successfully = false; - base::RunLoop loop; - base::PostTaskAndReply( - FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&WebviewClientCertsLoginTest::SetUpTestSystemSlotOnIO, - base::Unretained(this), - &system_slot_constructed_successfully), - loop.QuitClosure()); - loop.Run(); - ASSERT_TRUE(system_slot_constructed_successfully); - } - - // Import a second client cert signed by another CA than client_1 into the - // system wide key slot. - base::ScopedAllowBlockingForTesting allow_io; - client_cert_ = net::ImportClientCertAndKeyFromFile( - net::GetTestCertsDirectory(), "client_1.pem", "client_1.pk8", - test_system_slot_->slot()); - ASSERT_TRUE(client_cert_.get()); - } + WebviewClientCertsLoginTestBase() = default; + WebviewClientCertsLoginTestBase(const WebviewClientCertsLoginTestBase&) = + delete; + WebviewClientCertsLoginTestBase& operator=( + const WebviewClientCertsLoginTestBase&) = delete; // Sets up the DeviceLoginScreenAutoSelectCertificateForUrls policy. void SetAutoSelectCertificatePatterns( @@ -567,34 +552,16 @@ WebviewLoginTest::SetUpInProcessBrowserTestFixture(); } - void TearDownOnMainThread() override { - TearDownTestSystemSlot(); - WebviewLoginTest::TearDownOnMainThread(); + bool ImportSystemSlotClientCert(PK11SlotInfo* system_slot) { + base::ScopedAllowBlockingForTesting allow_io; + scoped_refptr<net::X509Certificate> client_cert = + net::ImportClientCertAndKeyFromFile(net::GetTestCertsDirectory(), + "client_1.pem", "client_1.pk8", + system_slot); + return client_cert.get() != nullptr; } private: - void SetUpTestSystemSlotOnIO(bool* out_system_slot_constructed_successfully) { - DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - test_system_slot_ = std::make_unique<crypto::ScopedTestSystemNSSKeySlot>(); - *out_system_slot_constructed_successfully = - test_system_slot_->ConstructedSuccessfully(); - } - - void TearDownTestSystemSlot() { - if (!test_system_slot_) - return; - - base::RunLoop loop; - base::PostTaskAndReply( - FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&WebviewClientCertsLoginTest::TearDownTestSystemSlotOnIO, - base::Unretained(this)), - loop.QuitClosure()); - loop.Run(); - } - - void TearDownTestSystemSlotOnIO() { test_system_slot_.reset(); } - // Builds a device ONC dictionary defining a single untrusted authority // certificate. base::DictionaryValue BuildDeviceOncDictForUntrustedAuthority( @@ -619,12 +586,61 @@ } policy::DevicePolicyBuilder device_policy_builder_; - std::unique_ptr<crypto::ScopedTestSystemNSSKeySlot> test_system_slot_; - scoped_refptr<net::X509Certificate> client_cert_; std::unique_ptr<net::SpawnedTestServer> https_server_; DeviceStateMixin device_state_{ &mixin_host_, DeviceStateMixin::State::OOBE_COMPLETED_CLOUD_ENROLLED}; +}; + +// Tests of the client certificates in the sign-in frame. The testing system +// slot is pre-initialized with a client cert. +class WebviewClientCertsLoginTest : public WebviewClientCertsLoginTestBase { + public: + WebviewClientCertsLoginTest() = default; + + // Installs a testing system slot and imports a client certificate into it. + void SetUpClientCertInSystemSlot() { + bool system_slot_constructed_successfully = false; + base::RunLoop loop; + base::PostTaskAndReply( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&WebviewClientCertsLoginTest::SetUpTestSystemSlotOnIO, + base::Unretained(this), + &system_slot_constructed_successfully), + loop.QuitClosure()); + loop.Run(); + ASSERT_TRUE(system_slot_constructed_successfully); + + ASSERT_TRUE(ImportSystemSlotClientCert(test_system_slot_->slot())); + } + + protected: + void TearDownOnMainThread() override { + TearDownTestSystemSlot(); + WebviewClientCertsLoginTestBase::TearDownOnMainThread(); + } + + private: + void SetUpTestSystemSlotOnIO(bool* out_system_slot_constructed_successfully) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + test_system_slot_ = std::make_unique<crypto::ScopedTestSystemNSSKeySlot>(); + *out_system_slot_constructed_successfully = + test_system_slot_->ConstructedSuccessfully(); + } + + void TearDownTestSystemSlot() { + base::RunLoop loop; + base::PostTaskAndReply( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&WebviewClientCertsLoginTest::TearDownTestSystemSlotOnIO, + base::Unretained(this)), + loop.QuitClosure()); + loop.Run(); + } + + void TearDownTestSystemSlotOnIO() { test_system_slot_.reset(); } + + std::unique_ptr<crypto::ScopedTestSystemNSSKeySlot> test_system_slot_; DISALLOW_COPY_AND_ASSIGN(WebviewClientCertsLoginTest); }; @@ -880,6 +896,142 @@ EXPECT_EQ("got no client cert", https_reply_content); } +// Tests the scenario where the system token is not initialized initially (due +// to the TPM not being ready). +class WebviewClientCertsTokenLoadingLoginTest + : public WebviewClientCertsLoginTestBase { + public: + WebviewClientCertsTokenLoadingLoginTest() + : cryptohome_client_(new FakeCryptohomeClient) { + cryptohome_client_->set_tpm_is_ready(false); + } + + WebviewClientCertsTokenLoadingLoginTest( + const WebviewClientCertsTokenLoadingLoginTest&) = delete; + WebviewClientCertsTokenLoadingLoginTest& operator=( + const WebviewClientCertsTokenLoadingLoginTest&) = delete; + + FakeCryptohomeClient* cryptohome_client() { return cryptohome_client_; } + + // Prepares a testing system slot (without injecting it as an already + // initialized yet) and imports a client certificate into it. + void PrepareSystemSlot() { + bool out_system_slot_prepared_successfully = false; + base::RunLoop loop; + base::PostTaskAndReply( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce( + &WebviewClientCertsTokenLoadingLoginTest::PrepareSystemSlotOnIO, + base::Unretained(this), &out_system_slot_prepared_successfully), + loop.QuitClosure()); + loop.Run(); + ASSERT_TRUE(out_system_slot_prepared_successfully); + + ASSERT_TRUE(ImportSystemSlotClientCert(test_system_slot_nss_db_->slot())); + } + + protected: + void SetUpOnMainThread() override { + TPMTokenLoader::Get()->enable_tpm_loading_for_testing(true); + WebviewClientCertsLoginTestBase::SetUpOnMainThread(); + } + + void TearDownOnMainThread() override { + TearDownTestSystemSlot(); + WebviewClientCertsLoginTestBase::TearDownOnMainThread(); + } + + private: + void PrepareSystemSlotOnIO(bool* out_system_slot_prepared_successfully) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + test_system_slot_nss_db_ = std::make_unique<crypto::ScopedTestNSSDB>(); + crypto::SetSystemKeySlotWithoutInitializingTPMForTesting( + crypto::ScopedPK11Slot( + PK11_ReferenceSlot(test_system_slot_nss_db_->slot()))); + *out_system_slot_prepared_successfully = + test_system_slot_nss_db_->is_open(); + } + + void TearDownTestSystemSlot() { + base::RunLoop loop; + base::PostTaskAndReply( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&WebviewClientCertsTokenLoadingLoginTest:: + TearDownTestSystemSlotOnIO, + base::Unretained(this)), + loop.QuitClosure()); + loop.Run(); + } + + void TearDownTestSystemSlotOnIO() { + crypto::SetSystemKeySlotWithoutInitializingTPMForTesting(/*slot=*/nullptr); + test_system_slot_nss_db_.reset(); + } + + // Owned by the CryptohomeClient singleton. + FakeCryptohomeClient* cryptohome_client_; + + std::unique_ptr<crypto::ScopedTestNSSDB> test_system_slot_nss_db_; +}; + +namespace { + +bool IsTpmTokenReady() { + base::RunLoop run_loop; + bool is_ready = false; + base::PostTaskAndReplyWithResult( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&crypto::IsTPMTokenReady, + /*callback=*/base::OnceClosure()), + base::BindOnce( + [](base::OnceClosure run_loop_quit_closure, bool* is_ready, + bool is_tpm_token_ready) { + *is_ready = is_tpm_token_ready; + std::move(run_loop_quit_closure).Run(); + }, + run_loop.QuitClosure(), base::Unretained(&is_ready))); + run_loop.Run(); + return is_ready; +} + +} // namespace + +// Test that the system slot becomes initialized and the client certificate +// authentication works in the sign-in frame after the TPM gets reported as +// ready. +IN_PROC_BROWSER_TEST_F(WebviewClientCertsTokenLoadingLoginTest, + SystemSlotInitialization) { + ASSERT_NO_FATAL_FAILURE(PrepareSystemSlot()); + net::SpawnedTestServer::SSLOptions ssl_options; + ssl_options.request_client_certificate = true; + ASSERT_NO_FATAL_FAILURE(StartHttpsServer(ssl_options)); + + const std::vector<std::string> autoselect_patterns = { + R"({"pattern": "*", "filter": {"ISSUER": {"CN": "B CA"}}})"}; + SetAutoSelectCertificatePatterns(autoselect_patterns); + + WaitForGaiaPageLoadAndPropertyUpdate(); + + base::RunLoop().RunUntilIdle(); + EXPECT_FALSE(IsTpmTokenReady()); + + // Report the TPM as ready, triggering the system token initialization by + // SystemTokenCertDBInitializer. + cryptohome_client()->set_tpm_is_ready(true); + cryptohome_client()->NotifyTpmInitStatusUpdated( + /*ready=*/true, /*owned=*/true, + /*was_owned_this_boot=*/false); + + const std::string https_reply_content = + RequestClientCertTestPageInFrame({"gaia-signin", gaia_frame_parent_}); + EXPECT_EQ( + "got client cert with fingerprint: " + "c66145f49caca4d1325db96ace0f12f615ba4981", + https_reply_content); + + EXPECT_TRUE(IsTpmTokenReady()); +} + class WebviewProxyAuthLoginTest : public WebviewLoginTest { public: WebviewProxyAuthLoginTest() @@ -1041,4 +1193,5 @@ // so the sign-in screen will not display user pods. ExpectIdentifierPage(); } + } // namespace chromeos
diff --git a/chrome/browser/chromeos/network_change_manager_client_browsertest.cc b/chrome/browser/chromeos/network_change_manager_client_browsertest.cc index e9ce181b..06873de 100644 --- a/chrome/browser/chromeos/network_change_manager_client_browsertest.cc +++ b/chrome/browser/chromeos/network_change_manager_client_browsertest.cc
@@ -7,8 +7,7 @@ #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/shill/shill_service_client.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" -#include "content/public/common/service_names.mojom.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/network_change_notifier.h" #include "services/network/public/cpp/network_connection_tracker.h" #include "services/network/public/mojom/network_service_test.mojom.h" @@ -152,9 +151,9 @@ // Manually call SimulateCrash instead of // BrowserTestBase::SimulateNetworkServiceCrash to avoid the cleanup and // reconnection work it does for you. - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->SimulateCrash(); service_client()->AddService("wifi", "wifi", "wifi", shill::kTypeWifi,
diff --git a/chrome/browser/chromeos/night_light/night_light_client.cc b/chrome/browser/chromeos/night_light/night_light_client.cc index 9209c0bb..7fe9e59e 100644 --- a/chrome/browser/chromeos/night_light/night_light_client.cc +++ b/chrome/browser/chromeos/night_light/night_light_client.cc
@@ -53,7 +53,7 @@ void NightLightClient::OnScheduleTypeChanged( ash::NightLightController::ScheduleType new_type) { - if (new_type != ash::NightLightController::ScheduleType::kSunsetToSunrise) { + if (new_type == ash::NightLightController::ScheduleType::kNone) { using_geoposition_ = false; timer_->Stop(); return; @@ -117,7 +117,7 @@ const base::TimeDelta elapsed) { if (!using_geoposition_) { // A response might arrive after the schedule type is no longer "sunset to - // sunrise", which means we should not push any positions to the + // sunrise" or "custom", which means we should not push any positions to the // NightLightController. return; }
diff --git a/chrome/browser/chromeos/night_light/night_light_client.h b/chrome/browser/chromeos/night_light/night_light_client.h index 6377d5df..a90602d 100644 --- a/chrome/browser/chromeos/night_light/night_light_client.h +++ b/chrome/browser/chromeos/night_light/night_light_client.h
@@ -35,7 +35,7 @@ // Starts watching changes in the Night Light schedule type in order to begin // periodically pushing user's IP-based geoposition to NightLightController as - // long as the type is set to "sunset to sunrise". + // long as the type is set to "sunset to sunrise" or "custom". void Start(); // ash::NightLightController::Observer: @@ -103,8 +103,9 @@ // The ID of the current timezone in the fromat similar to "America/Chicago". base::string16 current_timezone_id_; - // True as long as the schedule type is set to "sunset to sunrise", which - // means this client will be retrieving the IP-based geoposition once per day. + // True as long as the schedule type is set to "sunset to sunrise" or + // "custom", which means this client will be retrieving the IP-based + // geoposition once per day. bool using_geoposition_ = false; DISALLOW_COPY_AND_ASSIGN(NightLightClient);
diff --git a/chrome/browser/chromeos/night_light/night_light_client_unittest.cc b/chrome/browser/chromeos/night_light/night_light_client_unittest.cc index b26aa3d..6d4ef9f 100644 --- a/chrome/browser/chromeos/night_light/night_light_client_unittest.cc +++ b/chrome/browser/chromeos/night_light/night_light_client_unittest.cc
@@ -111,7 +111,7 @@ }; // Base test fixture. -class NightLightClientTest : public testing::Test { +class NightLightClientTest : public testing::TestWithParam<ScheduleType> { public: NightLightClientTest() = default; ~NightLightClientTest() override = default; @@ -134,12 +134,14 @@ }; // Test that the client is retrieving geoposition periodically only when the -// schedule type is "sunset to sunrise". -TEST_F(NightLightClientTest, TestClientRunningOnlyWhenSunsetToSunriseSchedule) { +// schedule type is "sunset to sunrise" or "custom". +TEST_F(NightLightClientTest, + TestClientRunningWhenSunsetToSunriseOrCustomSchedule) { EXPECT_FALSE(client_.using_geoposition()); controller_.NotifyScheduleTypeChanged(ScheduleType::kNone); EXPECT_FALSE(client_.using_geoposition()); controller_.NotifyScheduleTypeChanged(ScheduleType::kCustom); + EXPECT_TRUE(client_.using_geoposition()); controller_.NotifyScheduleTypeChanged(ScheduleType::kSunsetToSunrise); task_environment_.RunUntilIdle(); EXPECT_TRUE(client_.using_geoposition()); @@ -215,14 +217,14 @@ EXPECT_EQ(expected_delay, client_.timer().GetCurrentDelay()); } -// Tests that timezone changes result in new geoposition requests only if the -// schedule type is sunset to sunrise. -TEST_F(NightLightClientTest, TestTimezoneChanges) { +// Tests that timezone changes result in new geoposition requests if the +// schedule type is sunset to sunrise or custom. +TEST_P(NightLightClientTest, TestTimezoneChanges) { EXPECT_EQ(0, controller_.position_pushes_num()); client_.SetCurrentTimezoneIdForTesting( base::ASCIIToUTF16("America/Los_Angeles")); - // When schedule type is not sunset to sunrise, timezone changes do not result + // When schedule type is none, timezone changes do not result // in geoposition requests. controller_.NotifyScheduleTypeChanged(ScheduleType::kNone); task_environment_.RunUntilIdle(); @@ -243,9 +245,9 @@ position.timestamp = base::Time::Now(); client_.set_position_to_send(position); - // Change the schedule type to sunset to sunrise, and expect the geoposition - // will be pushed. - controller_.NotifyScheduleTypeChanged(ScheduleType::kSunsetToSunrise); + // Change the schedule type to sunset to sunrise or custom, and expect the + // geoposition will be pushed. + controller_.NotifyScheduleTypeChanged(GetParam()); task_environment_.RunUntilIdle(); EXPECT_EQ(1, controller_.position_pushes_num()); EXPECT_EQ(1, client_.geoposition_requests_num()); @@ -267,4 +269,8 @@ EXPECT_EQ(GetTimezoneId(*timezone), client_.current_timezone_id()); } +INSTANTIATE_TEST_SUITE_P(, + NightLightClientTest, + ::testing::Values(ScheduleType::kSunsetToSunrise, + ScheduleType::kCustom)); } // namespace
diff --git a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc index 841e1be..a33fbb0 100644 --- a/chrome/browser/chromeos/policy/user_network_configuration_updater.cc +++ b/chrome/browser/chromeos/policy/user_network_configuration_updater.cc
@@ -77,7 +77,7 @@ // responsible for creating it. This requires |GetNSSCertDatabaseForProfile| // call, which is not safe before the profile initialization is finalized. // Thus, listen for PROFILE_ADDED notification, on which |cert_importer_| - // creation should start. + // creation should start. https://crbug.com/171406 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, content::Source<Profile>(profile));
diff --git a/chrome/browser/data_reduction_proxy/data_reduction_proxy_browsertest.cc b/chrome/browser/data_reduction_proxy/data_reduction_proxy_browsertest.cc index ba3864ffb..dacbe821 100644 --- a/chrome/browser/data_reduction_proxy/data_reduction_proxy_browsertest.cc +++ b/chrome/browser/data_reduction_proxy/data_reduction_proxy_browsertest.cc
@@ -43,12 +43,11 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/network_service_instance.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/test_navigation_observer.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/host_port_pair.h" #include "net/dns/mock_host_resolver.h" #include "net/http/http_request_headers.h" @@ -62,7 +61,6 @@ #include "services/network/public/cpp/network_switches.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #include "testing/gmock/include/gmock/gmock.h" namespace data_reduction_proxy { @@ -105,9 +103,9 @@ void SimulateNetworkChange(network::mojom::ConnectionType type) { if (!content::IsInProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop; network_service_test->SimulateNetworkChange(type, run_loop.QuitClosure()); run_loop.Run();
diff --git a/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc b/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc index 4c9b577..28acfac 100644 --- a/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc +++ b/chrome/browser/dom_distiller/lazy_dom_distiller_service.cc
@@ -32,22 +32,6 @@ LazyDomDistillerService::~LazyDomDistillerService() = default; -bool LazyDomDistillerService::HasEntry(const std::string& entry_id) { - return GetImpl()->HasEntry(entry_id); -} - -std::string LazyDomDistillerService::GetUrlForEntry( - const std::string& entry_id) { - return GetImpl()->GetUrlForEntry(entry_id); -} - -std::unique_ptr<ViewerHandle> LazyDomDistillerService::ViewEntry( - ViewRequestDelegate* delegate, - std::unique_ptr<DistillerPage> distiller_page, - const std::string& entry_id) { - return GetImpl()->ViewEntry(delegate, std::move(distiller_page), entry_id); -} - std::unique_ptr<ViewerHandle> LazyDomDistillerService::ViewUrl( ViewRequestDelegate* delegate, std::unique_ptr<DistillerPage> distiller_page,
diff --git a/chrome/browser/dom_distiller/lazy_dom_distiller_service.h b/chrome/browser/dom_distiller/lazy_dom_distiller_service.h index 9c15165..23895af 100644 --- a/chrome/browser/dom_distiller/lazy_dom_distiller_service.h +++ b/chrome/browser/dom_distiller/lazy_dom_distiller_service.h
@@ -28,12 +28,6 @@ ~LazyDomDistillerService() override; // DomDistillerServiceInterface implementation: - bool HasEntry(const std::string& entry_id) override; - std::string GetUrlForEntry(const std::string& entry_id) override; - std::unique_ptr<ViewerHandle> ViewEntry( - ViewRequestDelegate* delegate, - std::unique_ptr<DistillerPage> distiller_page, - const std::string& entry_id) override; std::unique_ptr<ViewerHandle> ViewUrl( ViewRequestDelegate* delegate, std::unique_ptr<DistillerPage> distiller_page,
diff --git a/chrome/browser/extensions/api/OWNERS b/chrome/browser/extensions/api/OWNERS deleted file mode 100644 index 7eafe92..0000000 --- a/chrome/browser/extensions/api/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -# For Chrome OS apps APIs. -tbarzic@chromium.org
diff --git a/chrome/browser/extensions/scripting_permissions_modifier.cc b/chrome/browser/extensions/scripting_permissions_modifier.cc index 56d3963..ea69b11 100644 --- a/chrome/browser/extensions/scripting_permissions_modifier.cc +++ b/chrome/browser/extensions/scripting_permissions_modifier.cc
@@ -35,10 +35,10 @@ extension.location()); } -// Iterates over |requested_permissions| and adds any permissions that should -// be granted to |granted_permissions_out|. These include any non-host +// Iterates over |requested_permissions| and returns a permission set of any +// permissions that should be granted. These include any non-host // permissions or host permissions that are present in -// |runtime_granted_permissions|. |granted_permissions_out| may contain new +// |runtime_granted_permissions|. The returned permission set may contain new // patterns not found in either |requested_permissions| or // |runtime_granted_permissions| in the case of overlapping host permissions // (such as *://*.google.com/* and https://*/*, which would intersect with @@ -363,7 +363,16 @@ if (ShouldConsiderExtension(extension)) { base::Optional<bool> pref_value = extension_prefs.GetShouldWithholdPermissions(extension.id()); - should_withhold = pref_value.has_value() && pref_value.value() == true; + if (pref_value.has_value()) { + should_withhold = pref_value.value(); + } else { + should_withhold = + extension.creation_flags() & Extension::WITHHOLD_PERMISSIONS; + } + } else { + // The withhold creation flag should never have been set in cases where + // withholding isn't allowed. + DCHECK(!(extension.creation_flags() & Extension::WITHHOLD_PERMISSIONS)); } should_withhold &= !permissions.effective_hosts().is_empty(); @@ -376,6 +385,11 @@ // permissions API. std::unique_ptr<const PermissionSet> runtime_granted_permissions = GetRuntimePermissionsFromPrefs(extension, extension_prefs); + // If there were no runtime granted permissions found in the prefs, default to + // a new empty set. + if (!runtime_granted_permissions) { + runtime_granted_permissions = std::make_unique<PermissionSet>(); + } return PartitionHostPermissions(permissions, *runtime_granted_permissions); }
diff --git a/chrome/browser/extensions/scripting_permissions_modifier.h b/chrome/browser/extensions/scripting_permissions_modifier.h index c5f2ab94..5a4240f1 100644 --- a/chrome/browser/extensions/scripting_permissions_modifier.h +++ b/chrome/browser/extensions/scripting_permissions_modifier.h
@@ -99,8 +99,8 @@ void RemoveAllGrantedHostPermissions(); // Takes in a set of permissions and withholds any permissions that should not - // be granted for the given |extension|, populating |granted_permissions_out| - // with the set of all permissions that can be granted. + // be granted for the given |extension|, returning a permission set with all + // of the permissions that can be granted. // Note: we pass in |permissions| explicitly here, as this is used during // permission initialization, where the active permissions on the extension // may not be the permissions to compare against.
diff --git a/chrome/browser/extensions/scripting_permissions_modifier_unittest.cc b/chrome/browser/extensions/scripting_permissions_modifier_unittest.cc index 85c817f..4e60128 100644 --- a/chrome/browser/extensions/scripting_permissions_modifier_unittest.cc +++ b/chrome/browser/extensions/scripting_permissions_modifier_unittest.cc
@@ -7,7 +7,7 @@ #include "base/strings/stringprintf.h" #include "chrome/browser/extensions/chrome_test_extension_loader.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/extension_service_test_base.h" +#include "chrome/browser/extensions/extension_service_test_with_install.h" #include "chrome/browser/extensions/extension_util.h" #include "chrome/browser/extensions/permissions_test_util.h" #include "chrome/browser/extensions/permissions_updater.h" @@ -61,7 +61,30 @@ updater.GrantActivePermissions(&extension); } -using ScriptingPermissionsModifierUnitTest = ExtensionServiceTestBase; +void CheckActiveHostPermissions( + const Extension& extension, + const std::vector<std::string>& explicit_hosts, + const std::vector<std::string>& scriptable_hosts) { + EXPECT_THAT(GetExplicitPatternsAsStrings(extension), + testing::UnorderedElementsAreArray(explicit_hosts)); + EXPECT_THAT(GetScriptablePatternsAsStrings(extension), + testing::UnorderedElementsAreArray(scriptable_hosts)); +} + +void CheckWithheldHostPermissions( + const Extension& extension, + const std::vector<std::string>& explicit_hosts, + const std::vector<std::string>& scriptable_hosts) { + const PermissionsData* permissions_data = extension.permissions_data(); + EXPECT_THAT(GetPatternsAsStrings( + permissions_data->withheld_permissions().explicit_hosts()), + testing::UnorderedElementsAreArray(explicit_hosts)); + EXPECT_THAT(GetPatternsAsStrings( + permissions_data->withheld_permissions().scriptable_hosts()), + testing::UnorderedElementsAreArray(scriptable_hosts)); +} + +using ScriptingPermissionsModifierUnitTest = ExtensionServiceTestWithInstall; } // namespace @@ -88,52 +111,316 @@ PermissionsUpdater(profile()).InitializePermissions(extension.get()); - const PermissionsData* permissions_data = extension->permissions_data(); - ScriptingPermissionsModifier modifier(profile(), extension); ASSERT_TRUE(modifier.CanAffectExtension()); // By default, all permissions are granted. - EXPECT_THAT(GetScriptablePatternsAsStrings(*extension), - testing::UnorderedElementsAreArray(test_case)); - EXPECT_THAT(GetExplicitPatternsAsStrings(*extension), - testing::UnorderedElementsAreArray(test_case)); - EXPECT_TRUE( - permissions_data->withheld_permissions().scriptable_hosts().is_empty()); - EXPECT_TRUE( - permissions_data->withheld_permissions().explicit_hosts().is_empty()); + { + SCOPED_TRACE("Initial state"); + CheckActiveHostPermissions(*extension, test_case, test_case); + CheckWithheldHostPermissions(*extension, {}, {}); + } // Then, withhold host permissions. modifier.SetWithholdHostPermissions(true); - - // Note: We don't use URLPatternSet::is_empty() here, since - // chrome://favicon/ can still be present in the set (it's not really a - // host permission and isn't withheld). GetPatternsAsStrings() ignores - // chrome://favicon. - EXPECT_THAT(GetScriptablePatternsAsStrings(*extension), testing::IsEmpty()); - EXPECT_THAT(GetExplicitPatternsAsStrings(*extension), testing::IsEmpty()); - - EXPECT_THAT( - GetPatternsAsStrings( - permissions_data->withheld_permissions().scriptable_hosts()), - testing::UnorderedElementsAreArray(test_case)); - EXPECT_THAT(GetPatternsAsStrings( - permissions_data->withheld_permissions().explicit_hosts()), - testing::UnorderedElementsAreArray(test_case)); + { + SCOPED_TRACE("After setting to withhold"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, test_case, test_case); + } // Finally, re-grant the withheld permissions. modifier.SetWithholdHostPermissions(false); // We should be back to our initial state - all requested permissions are // granted. - EXPECT_THAT(GetScriptablePatternsAsStrings(*extension), - testing::UnorderedElementsAreArray(test_case)); - EXPECT_THAT(GetExplicitPatternsAsStrings(*extension), - testing::UnorderedElementsAreArray(test_case)); - EXPECT_TRUE( - permissions_data->withheld_permissions().scriptable_hosts().is_empty()); - EXPECT_TRUE( - permissions_data->withheld_permissions().explicit_hosts().is_empty()); + { + SCOPED_TRACE("After setting to not withhold"); + CheckActiveHostPermissions(*extension, test_case, test_case); + CheckWithheldHostPermissions(*extension, {}, {}); + } + } +} + +// Tests that with the creation flag present, requested host permissions are +// withheld on installation, but still allow for individual permissions to be +// granted, or all permissions be set back to not being withheld by default. +TEST_F(ScriptingPermissionsModifierUnitTest, WithholdHostPermissionsOnInstall) { + InitializeEmptyExtensionService(); + + constexpr char kHostGoogle[] = "https://google.com/*"; + constexpr char kHostChromium[] = "https://chromium.org/*"; + scoped_refptr<const Extension> extension = + ExtensionBuilder("a") + .AddPermissions({kHostGoogle, kHostChromium}) + .AddContentScript("foo.js", {kHostGoogle}) + .SetLocation(Manifest::INTERNAL) + .AddFlags(Extension::WITHHOLD_PERMISSIONS) + .Build(); + + // Initialize the permissions and have the prefs built and stored. + PermissionsUpdater(profile()).InitializePermissions(extension.get()); + ExtensionPrefs::Get(profile())->OnExtensionInstalled( + extension.get(), Extension::State::ENABLED, syncer::StringOrdinal(), ""); + + ScriptingPermissionsModifier modifier(profile(), extension); + ASSERT_TRUE(modifier.CanAffectExtension()); + + // With the flag present, permissions should have been withheld. + { + SCOPED_TRACE("Initial state"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, + {kHostGoogle}); + } + + // Grant one of the permissions manually. + modifier.GrantHostPermission(GURL(kHostChromium)); + + { + SCOPED_TRACE("After granting single"); + CheckActiveHostPermissions(*extension, {kHostChromium}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle}, {kHostGoogle}); + } + + // Finally, re-grant the withheld permissions. + modifier.SetWithholdHostPermissions(false); + + // All requested permissions should now be granted granted. + { + SCOPED_TRACE("After setting to not withhold"); + CheckActiveHostPermissions(*extension, {kHostGoogle, kHostChromium}, + {kHostGoogle}); + CheckWithheldHostPermissions(*extension, {}, {}); + } +} + +// Tests that reloading an extension after withholding host permissions on +// installation retains the correct state and any changes that have been made +// since installation. +TEST_F(ScriptingPermissionsModifierUnitTest, + WithholdOnInstallPreservedOnReload) { + InitializeEmptyExtensionService(); + + constexpr char kHostGoogle[] = "https://google.com/*"; + constexpr char kHostChromium[] = "https://chromium.org/*"; + TestExtensionDir test_extension_dir; + test_extension_dir.WriteManifest( + R"({ + "name": "foo", + "manifest_version": 2, + "version": "1", + "permissions": ["https://google.com/*", "https://chromium.org/*"] + })"); + ChromeTestExtensionLoader loader(profile()); + loader.add_creation_flag(Extension::WITHHOLD_PERMISSIONS); + loader.set_pack_extension(true); + scoped_refptr<const Extension> extension = + loader.LoadExtension(test_extension_dir.UnpackedPath()); + // Cache the ID, since the extension will be invalidated across reloads. + ExtensionId extension_id = extension->id(); + + auto reload_extension = [this, &extension_id]() { + TestExtensionRegistryObserver observer(ExtensionRegistry::Get(profile())); + service()->ReloadExtension(extension_id); + return base::WrapRefCounted(observer.WaitForExtensionLoaded()); + }; + + // Permissions start withheld due to creation flag and remain withheld after + // reload. + { + SCOPED_TRACE("Initial state"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + { + SCOPED_TRACE("Reload after initial state"); + extension = reload_extension(); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + // Grant one of the permissions and check it persists after reload. + ScriptingPermissionsModifier(profile(), extension) + .GrantHostPermission(GURL(kHostGoogle)); + { + SCOPED_TRACE("Granting single"); + CheckActiveHostPermissions(*extension, {kHostGoogle}, {}); + CheckWithheldHostPermissions(*extension, {kHostChromium}, {}); + } + + { + SCOPED_TRACE("Reload after granting single"); + // TODO(tjudkins): We shouldn't have to explicitly call to grant + // permissions here, but at the moment when withholding host permissions on + // installation and then granting a permission, the reload or update detects + // that as a privilege increase and disables the extension. + service()->GrantPermissionsAndEnableExtension(extension.get()); + extension = reload_extension(); + CheckActiveHostPermissions(*extension, {kHostGoogle}, {}); + CheckWithheldHostPermissions(*extension, {kHostChromium}, {}); + } + + // Set permissions not to be withheld at all and check it persists after + // reload. + ScriptingPermissionsModifier(profile(), extension) + .SetWithholdHostPermissions(false); + { + SCOPED_TRACE("Setting to not withhold"); + CheckActiveHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + CheckWithheldHostPermissions(*extension, {}, {}); + } + + { + SCOPED_TRACE("Reload after setting to not withhold"); + // TODO(tjudkins): We shouldn't have to explicitly call to grant + // permissions here, but at the moment when withholding host permissions on + // installation and then granting a permission, the reload or update detects + // that as a privilege increase and disables the extension. + service()->GrantPermissionsAndEnableExtension(extension.get()); + extension = reload_extension(); + CheckActiveHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + CheckWithheldHostPermissions(*extension, {}, {}); + } + + // Finally, set permissions to be withheld again and check it persists after + // reload. + ScriptingPermissionsModifier(profile(), extension) + .SetWithholdHostPermissions(true); + { + SCOPED_TRACE("Setting back to withhold"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + { + SCOPED_TRACE("Reload after setting back to withhold"); + extension = reload_extension(); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } +} + +// Tests that updating an extension after withholding host permissions on +// installation retains the correct state and any changes that have been made +// since installation. +TEST_F(ScriptingPermissionsModifierUnitTest, + WithholdOnInstallPreservedOnUpdate) { + InitializeEmptyExtensionService(); + + constexpr char kHostGoogle[] = "https://google.com/*"; + constexpr char kHostChromium[] = "https://chromium.org/*"; + TestExtensionDir test_extension_dir; + constexpr char kManifestTemplate[] = + R"({ + "name": "foo", + "manifest_version": 2, + "version": "%s", + "permissions": ["https://google.com/*", "https://chromium.org/*"] + })"; + + test_extension_dir.WriteManifest(base::StringPrintf(kManifestTemplate, "1")); + // We need to use a pem file here for consistent update IDs. + const base::FilePath pem_path = + data_dir().AppendASCII("permissions/update.pem"); + scoped_refptr<const Extension> extension = PackAndInstallCRX( + test_extension_dir.UnpackedPath(), pem_path, INSTALL_NEW, + Extension::WITHHOLD_PERMISSIONS, Manifest::Location::INTERNAL); + // Cache the ID, since the extension will be invalidated across updates. + ExtensionId extension_id = extension->id(); + // Hold onto references for the extension dirs so they don't get deleted + // outside the lambda. + std::vector<std::unique_ptr<TestExtensionDir>> extension_dirs; + + auto update_extension = [this, &extension_id, &pem_path, &kManifestTemplate, + &extension_dirs](const char* version) { + auto update_version = std::make_unique<TestExtensionDir>(); + update_version->WriteManifest( + base::StringPrintf(kManifestTemplate, version)); + PackCRXAndUpdateExtension(extension_id, update_version->UnpackedPath(), + pem_path, ENABLED); + scoped_refptr<const Extension> updated_extension = + registry()->GetInstalledExtension(extension_id); + + EXPECT_EQ(version, updated_extension->version().GetString()); + extension_dirs.push_back(std::move(update_version)); + return updated_extension; + }; + + // Permissions start withheld due to creation flag and remain withheld after + // update. + { + SCOPED_TRACE("Initial state"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + { + SCOPED_TRACE("Update after initial state"); + extension = update_extension("2"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + // Grant one of the permissions and check it persists after update. + ScriptingPermissionsModifier(profile(), extension) + .GrantHostPermission(GURL(kHostGoogle)); + { + SCOPED_TRACE("Granting single"); + CheckActiveHostPermissions(*extension, {kHostGoogle}, {}); + CheckWithheldHostPermissions(*extension, {kHostChromium}, {}); + } + + { + SCOPED_TRACE("Update after granting single"); + // TODO(tjudkins): We shouldn't have to explicitly call to grant + // permissions here, but at the moment when withholding host permissions on + // installation and then granting a permission, the reload or update detects + // that as a privilege increase and disables the extension. + service()->GrantPermissionsAndEnableExtension(extension.get()); + extension = update_extension("3"); + CheckActiveHostPermissions(*extension, {kHostGoogle}, {}); + CheckWithheldHostPermissions(*extension, {kHostChromium}, {}); + } + + // Set permissions not to be withheld at all and check it persists after + // update. + ScriptingPermissionsModifier(profile(), extension) + .SetWithholdHostPermissions(false); + { + SCOPED_TRACE("Setting to not withhold"); + CheckActiveHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + CheckWithheldHostPermissions(*extension, {}, {}); + } + + { + SCOPED_TRACE("Update after setting to not withhold"); + // TODO(tjudkins): We shouldn't have to explicitly call to grant + // permissions here, but at the moment when withholding host permissions on + // installation and then granting a permission, the reload or update detects + // that as a privilege increase and disables the extension. + service()->GrantPermissionsAndEnableExtension(extension.get()); + extension = update_extension("4"); + CheckActiveHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + CheckWithheldHostPermissions(*extension, {}, {}); + } + + // Finally, set permissions to be withheld again and check it persists after + // update. + ScriptingPermissionsModifier(profile(), extension) + .SetWithholdHostPermissions(true); + { + SCOPED_TRACE("Setting back to withhold"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); + } + + { + SCOPED_TRACE("Update after setting back to withhold"); + extension = update_extension("5"); + CheckActiveHostPermissions(*extension, {}, {}); + CheckWithheldHostPermissions(*extension, {kHostGoogle, kHostChromium}, {}); } }
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index b974987950..3f69a9b 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -1766,8 +1766,8 @@ }, { "name": "enable-surfaces-for-videos", - "owners": [ "enne", "lethalantidote", "mlamouri" ], - "expiry_milestone": 76 + "owners": [ "ericrk", "khushalsagar", "mlamouri" ], + "expiry_milestone": 85 }, { "name": "enable-sxg-prefetch-cache-for-navigations", @@ -1973,7 +1973,7 @@ { "name": "enable-webgl2-compute-context", "owners": [ "webgl-team@google.com" ], - "expiry_milestone": 77 + "expiry_milestone": 81 }, { "name": "enable-webnfc", @@ -2264,7 +2264,7 @@ { "name": "happiness-tracking-surveys-for-desktop", "owners": [ "//chrome/browser/ui/hats/OWNERS" ], - "expiry_milestone": 78 + "expiry_milestone": 80 }, { "name": "happiness-tracking-surveys-for-desktop-demo", @@ -2272,7 +2272,7 @@ // A debugging and demo flag to allow UI/dev/testing team to always show the UI // components for the survey without being limited by the triggering mechanism. // This flag should expire along with the above feature flag. - "expiry_milestone": 78 + "expiry_milestone": 80 }, { "name": "hardware-media-key-handling", @@ -2923,9 +2923,9 @@ "expiry_milestone": 85 }, { - "name": "proactive-tab-freeze-and-discard", + "name": "proactive-tab-freeze", "owners": [ "fdoray" ], - "expiry_milestone": 75 + "expiry_milestone": 80 }, { "name": "profile-menu-revamp",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 252d3b0..28726e7a 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -2989,11 +2989,10 @@ "Put each tab switch suggestion in a separate suggestion, immediately " "following the original suggestion."; -const char kProactiveTabFreezeAndDiscardName[] = - "Proactive Tab Freeze and Discard"; -const char kProactiveTabFreezeAndDiscardDescription[] = - "Enables proactive tab freezing and discarding. This requires " - "#enable-page-almost-idle."; +const char kTabFreezeName[] = "Tab Freeze"; +const char kTabFreezeDescription[] = + "Enables freezing eligible tabs when they have been backgrounded for 5 " + "minutes."; const char kWebUIA11yEnhancementsName[] = "Enable accessibility enahncements in WebUI";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 7ddc665..10ab887 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1749,8 +1749,8 @@ extern const char kOmniboxTabSwitchSuggestionsDedicatedRowName[]; extern const char kOmniboxTabSwitchSuggestionsDedicatedRowDescription[]; -extern const char kProactiveTabFreezeAndDiscardName[]; -extern const char kProactiveTabFreezeAndDiscardDescription[]; +extern const char kTabFreezeName[]; +extern const char kTabFreezeDescription[]; extern const char kWebUIA11yEnhancementsName[]; extern const char kWebUIA11yEnhancementsDescription[];
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.h b/chrome/browser/global_keyboard_shortcuts_mac.h index 084f41e4..65ed981 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.h +++ b/chrome/browser/global_keyboard_shortcuts_mac.h
@@ -35,6 +35,9 @@ // The command to execute. -1 if none was found. int chrome_command; + // The action, if any, which the key event would trigger. + SEL action; + // Whether the command was from a mapping in the main menu. Only relevant if // command != -1. bool from_main_menu;
diff --git a/chrome/browser/global_keyboard_shortcuts_mac.mm b/chrome/browser/global_keyboard_shortcuts_mac.mm index 73378541..b414afc8 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac.mm
@@ -59,7 +59,7 @@ return result; } -int MenuCommandForKeyEvent(NSEvent* event) { +int MenuCommandForKeyEvent(NSEvent* event, SEL* action) { if ([event type] != NSKeyDown) return -1; @@ -78,8 +78,10 @@ if (!item) return -1; - if ([item action] == @selector(commandDispatch:) && [item tag] > 0) + if ([item action] == @selector(commandDispatch:) && [item tag] > 0) { + *action = [item action]; return [item tag]; + } // "Close window" doesn't use the |commandDispatch:| mechanism. Menu items // that do not correspond to IDC_ constants need no special treatment however, @@ -118,15 +120,15 @@ } CommandForKeyEventResult NoCommand() { - return {-1, /*from_main_menu=*/false}; + return {-1, nil, /*from_main_menu=*/false}; } -CommandForKeyEventResult MainMenuCommand(int cmd) { - return {cmd, /*from_main_menu=*/true}; +CommandForKeyEventResult MainMenuCommand(int cmd, SEL action) { + return {cmd, action, /*from_main_menu=*/true}; } CommandForKeyEventResult ShortcutCommand(int cmd) { - return {cmd, /*from_main_menu=*/false}; + return {cmd, nil, /*from_main_menu=*/false}; } } // namespace @@ -166,6 +168,9 @@ {true, false, false, true, kVK_ANSI_L, IDC_SHOW_DOWNLOADS}, {true, true, false, false, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT}, {true, false, false, true, kVK_ANSI_C, IDC_DEV_TOOLS_INSPECT}, + + {true, false, false, true, kVK_UpArrow, IDC_FOCUS_NEXT_PANE}, + {true, true, false, true, kVK_UpArrow, IDC_FOCUS_PREVIOUS_PANE}, }); // clang-format on return *keys; @@ -200,9 +205,10 @@ if ([event type] != NSKeyDown) return NoCommand(); - int cmdNum = MenuCommandForKeyEvent(event); + SEL action; + int cmdNum = MenuCommandForKeyEvent(event, &action); if (cmdNum != -1) - return MainMenuCommand(cmdNum); + return MainMenuCommand(cmdNum, action); // Scan through keycodes and see if it corresponds to one of the non-menu // shortcuts.
diff --git a/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm b/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm index f684271..ee40eea9 100644 --- a/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm +++ b/chrome/browser/global_keyboard_shortcuts_mac_unittest.mm
@@ -32,6 +32,19 @@ if (opt_key) modifierFlags |= NSAlternateKeyMask; + switch (vkey_code) { + case kVK_UpArrow: + case kVK_DownArrow: + case kVK_LeftArrow: + case kVK_RightArrow: + // Docs say this is set whenever a key came from the numpad *or* the arrow + // keys. + modifierFlags |= NSEventModifierFlagNumericPad; + break; + default: + break; + } + unichar shifted_character; unichar character; int result = ui::MacKeyCodeForWindowsKeyCode(
diff --git a/chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm b/chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm index 11aa31cb..ba029ab7 100644 --- a/chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm +++ b/chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm
@@ -22,6 +22,7 @@ #include "base/callback.h" #include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/feature_list.h" #include "base/logging.h" #include "base/mac/foundation_util.h" #include "base/mac/scoped_cftyperef.h" @@ -30,6 +31,7 @@ #include "base/task/post_task.h" #include "base/task/task_traits.h" #include "chrome/browser/media/webrtc/media_authorization_wrapper_mac.h" +#include "chrome/common/chrome_features.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "media/base/media_switches.h" @@ -167,6 +169,10 @@ // See https://crbug.com/993692#c3. bool IsScreenCaptureAllowed() { if (@available(macOS 10.15, *)) { + if (!base::FeatureList::IsEnabled( + features::kMacSystemScreenCapturePermissionCheck)) { + return true; + } base::ScopedCFTypeRef<CFArrayRef> window_list(CGWindowListCopyWindowInfo( kCGWindowListOptionOnScreenOnly, kCGNullWindowID)); NSUInteger num_windows = CFArrayGetCount(window_list);
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest.cc b/chrome/browser/media/webrtc/webrtc_browsertest.cc index bfe779e8..3afb1d4 100644 --- a/chrome/browser/media/webrtc/webrtc_browsertest.cc +++ b/chrome/browser/media/webrtc/webrtc_browsertest.cc
@@ -15,18 +15,16 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "media/base/media_switches.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/nqe/network_quality_estimator.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #include "third_party/blink/public/common/features.h" #if defined(OS_MACOSX) @@ -124,9 +122,9 @@ return connection_count; } - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // TODO(crbug.com/901026): Make sure the network process is started to avoid // a deadlock on Android. network_service_test.FlushForTesting();
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter.cc b/chrome/browser/metrics/process_memory_metrics_emitter.cc index da220d5..38c841c 100644 --- a/chrome/browser/metrics/process_memory_metrics_emitter.cc +++ b/chrome/browser/metrics/process_memory_metrics_emitter.cc
@@ -25,10 +25,10 @@ #include "content/public/browser/audio_service_info.h" #include "content/public/browser/render_process_host.h" #include "content/public/common/content_switches.h" -#include "content/public/common/service_names.mojom.h" #include "extensions/buildflags/buildflags.h" #include "services/metrics/public/cpp/ukm_builders.h" #include "services/metrics/public/cpp/ukm_recorder.h" +#include "services/network/public/mojom/network_service.mojom.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/browser_metrics.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" #include "url/gurl.h" @@ -771,7 +771,8 @@ EmitAudioServiceMemoryMetrics( pmd, ukm::UkmRecorder::GetNewSourceID(), GetUkmRecorder(), GetProcessUptime(now, pmd.pid()), emit_metrics_for_all_processes); - } else if (pmd.service_name() == content::mojom::kNetworkServiceName) { + } else if (pmd.service_name() == + network::mojom::NetworkService::Name_) { EmitNetworkServiceMemoryMetrics( pmd, ukm::UkmRecorder::GetNewSourceID(), GetUkmRecorder(), GetProcessUptime(now, pmd.pid()), emit_metrics_for_all_processes);
diff --git a/chrome/browser/net/network_connection_tracker_browsertest.cc b/chrome/browser/net/network_connection_tracker_browsertest.cc index b12722d3..f3576d8 100644 --- a/chrome/browser/net/network_connection_tracker_browsertest.cc +++ b/chrome/browser/net/network_connection_tracker_browsertest.cc
@@ -17,16 +17,14 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/network_service_instance.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_utils.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/network_change_notifier.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_connection_tracker.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" namespace { @@ -93,9 +91,9 @@ // Simulates a network connection change. void SimulateNetworkChange(network::mojom::ConnectionType type) { if (!content::IsInProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop; network_service_test->SimulateNetworkChange( type, base::Bind([](base::RunLoop* run_loop) { run_loop->Quit(); },
diff --git a/chrome/browser/net/network_quality_estimator_prefs_browsertest.cc b/chrome/browser/net/network_quality_estimator_prefs_browsertest.cc index fef7deb..9e377e4 100644 --- a/chrome/browser/net/network_quality_estimator_prefs_browsertest.cc +++ b/chrome/browser/net/network_quality_estimator_prefs_browsertest.cc
@@ -33,13 +33,12 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/network_service_instance.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_base.h" #include "content/public/test/browser_test_utils.h" #include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/filename_util.h" #include "net/nqe/effective_connection_type.h" #include "net/nqe/network_quality_estimator.h" @@ -48,7 +47,6 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_quality_tracker.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -160,9 +158,9 @@ DCHECK(partition->GetNetworkContext()); DCHECK(content::GetNetworkService()); - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop; network_service_test->SimulateNetworkQualityChange( type, base::BindOnce([](base::RunLoop* run_loop) { run_loop->Quit(); },
diff --git a/chrome/browser/net/network_quality_tracker_browsertest.cc b/chrome/browser/net/network_quality_tracker_browsertest.cc index 2b53d797..e43c56e3 100644 --- a/chrome/browser/net/network_quality_tracker_browsertest.cc +++ b/chrome/browser/net/network_quality_tracker_browsertest.cc
@@ -19,19 +19,17 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/network_service_instance.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test.h" #include "content/public/test/browser_test_base.h" #include "content/public/test/browser_test_utils.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/nqe/effective_connection_type.h" #include "net/nqe/network_quality_estimator.h" #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_quality_tracker.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" namespace network { @@ -140,9 +138,9 @@ DCHECK(partition->GetNetworkContext()); DCHECK(content::GetNetworkService()); - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop; network_service_test->SimulateNetworkQualityChange( type, base::BindOnce([](base::RunLoop* run_loop) { run_loop->Quit(); },
diff --git a/chrome/browser/password_manager/password_manager_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_interactive_uitest.cc index 0efdf04..fed3922 100644 --- a/chrome/browser/password_manager/password_manager_interactive_uitest.cc +++ b/chrome/browser/password_manager/password_manager_interactive_uitest.cc
@@ -179,8 +179,9 @@ prompt_observer.WaitForManagementState(); } +// Flaky. https://crbug.com/1013743 IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest, - PromptForXHRWithoutOnSubmit) { + DISABLED_PromptForXHRWithoutOnSubmit) { NavigateToFile("/password/password_xhr_submit.html"); // Verify that if XHR navigation occurs and the form is properly filled out, @@ -226,8 +227,9 @@ EXPECT_TRUE(BubbleObserver(WebContents()).IsSavePromptShownAutomatically()); } +// Flaky. https://crbug.com/1013743 IN_PROC_BROWSER_TEST_F(PasswordManagerInteractiveTest, - PromptForFetchWithNewPasswordsWithoutOnSubmit) { + DISABLED_PromptForFetchWithNewPasswordsWithoutOnSubmit) { NavigateToFile("/password/password_fetch_submit.html"); // Verify that if Fetch navigation occurs and the form is properly filled out,
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index a9c2406c..cf44c5a 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -154,6 +154,7 @@ #include "content/public/browser/download_manager.h" #include "content/public/browser/gpu_data_manager.h" #include "content/public/browser/interstitial_page.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" @@ -165,14 +166,12 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/render_widget_host.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_constants.h" #include "content/public/common/content_features.h" #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/common/url_constants.h" #include "content/public/common/web_preferences.h" #include "content/public/test/browser_test_utils.h" @@ -195,6 +194,7 @@ #include "extensions/common/extension_set.h" #include "extensions/common/switches.h" #include "media/media_buildflags.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/hash_value.h" #include "net/base/net_errors.h" #include "net/base/url_util.h" @@ -207,7 +207,7 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_switches.h" #include "services/network/public/mojom/network_service.mojom.h" -#include "services/service_manager/public/cpp/connector.h" +#include "services/network/public/mojom/network_service_test.mojom.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h" @@ -5757,9 +5757,9 @@ }; IN_PROC_BROWSER_TEST_F(HSTSPolicyTest, HSTSPolicyBypassList) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); mojo::ScopedAllowSyncCallForTesting allow_sync_call; // The port number 1234 here doesn't matter - it just needs to be a non-zero // value so that we use the unittest_default preload list.
diff --git a/chrome/browser/policy/policy_test_utils.cc b/chrome/browser/policy/policy_test_utils.cc index 3ed7f00..1d3843e 100644 --- a/chrome/browser/policy/policy_test_utils.cc +++ b/chrome/browser/policy/policy_test_utils.cc
@@ -28,13 +28,13 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/interstitial_page_delegate.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/render_view_host.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_utils.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/dns/mock_host_resolver.h" #include "net/http/transport_security_state.h" #include "services/network/public/mojom/network_service_test.mojom.h" @@ -92,9 +92,9 @@ void PolicyTest::SetShouldRequireCTForTesting(bool* required) { if (content::IsOutOfProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network::mojom::NetworkServiceTest::ShouldRequireCT required_ct; if (!required) { required_ct = network::mojom::NetworkServiceTest::ShouldRequireCT::RESET;
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc index 4bbd85dc..8f303468 100644 --- a/chrome/browser/prerender/prerender_browsertest.cc +++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -500,38 +500,6 @@ void AgentHostClosed(DevToolsAgentHost* agent_host) override {} }; -// A ContentBrowserClient that cancels all prerenderers when a new navigation -// starts. -class TestContentBrowserClient : public ChromeContentBrowserClient { - public: - TestContentBrowserClient() {} - ~TestContentBrowserClient() override {} - - // ChromeContentBrowserClient: - void OverrideNavigationParams( - content::SiteInstance* site_instance, - ui::PageTransition* transition, - bool* is_renderer_initiated, - content::Referrer* referrer, - base::Optional<url::Origin>* initiator_origin) override { - DCHECK(!already_called_); - already_called_ = true; - - PrerenderManagerFactory::GetForBrowserContext( - site_instance->GetBrowserContext()) - ->CancelAllPrerenders(); - ChromeContentBrowserClient::OverrideNavigationParams( - site_instance, transition, is_renderer_initiated, referrer, - initiator_origin); - } - - private: - // Whether the OverrideNavigationParams override above was already called. - bool already_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestContentBrowserClient); -}; - base::FilePath GetTestPath(const std::string& file_name) { return ui_test_utils::GetTestFilePath( base::FilePath(FILE_PATH_LITERAL("prerender")), @@ -1356,22 +1324,6 @@ NavigateToDestURL(); } -// Checks that the referrer is set when prerendering is cancelled. -IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderCancelReferrer) { - std::unique_ptr<TestContentBrowserClient> test_content_browser_client( - new TestContentBrowserClient); - content::ContentBrowserClient* original_browser_client = - content::SetBrowserClientForTesting(test_content_browser_client.get()); - - PrerenderTestURL("/prerender/prerender_referrer.html", FINAL_STATUS_CANCELLED, - 1); - OpenDestURLViaClick(); - - EXPECT_TRUE(DidDisplayPass(GetActiveWebContents())); - - content::SetBrowserClientForTesting(original_browser_client); -} - // Checks that popups on a prerendered page cause cancellation. IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderPopup) { PrerenderTestURL("/prerender/prerender_popup.html", @@ -1933,30 +1885,6 @@ NavigateToDestURL(); } -// Checks that the referrer policy is used when prerendering is cancelled. -IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderCancelReferrerPolicy) { - std::unique_ptr<TestContentBrowserClient> test_content_browser_client( - new TestContentBrowserClient); - content::ContentBrowserClient* original_browser_client = - content::SetBrowserClientForTesting(test_content_browser_client.get()); - - set_loader_path("/prerender/prerender_loader_with_referrer_policy.html"); - PrerenderTestURL("/prerender/prerender_referrer_policy.html", - FINAL_STATUS_CANCELLED, 1); - OpenDestURLViaClick(); - - bool display_test_result = false; - WebContents* web_contents = - browser()->tab_strip_model()->GetActiveWebContents(); - ASSERT_TRUE(content::ExecuteScriptAndExtractBool( - web_contents, - "window.domAutomationController.send(DidDisplayPass())", - &display_test_result)); - EXPECT_TRUE(display_test_result); - - content::SetBrowserClientForTesting(original_browser_client); -} - // Test interaction of the webNavigation and tabs API with prerender. class PrerenderBrowserTestWithExtensions : public PrerenderBrowserTest, public extensions::ExtensionApiTest {
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 5f294c5..f5a7af2 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -766,7 +766,7 @@ } // Ensure that the SharingService is initialized now that io_data_ is - // initialized. + // initialized. https://crbug.com/171406 SharingServiceFactory::GetForBrowserContext(this); content::NotificationService::current()->Notify(
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc index d30b781..afea7e4 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc
@@ -632,8 +632,8 @@ bool check_heuristics = !GetStaticProactiveTabFreezeAndDiscardParams() .disable_heuristics_protections; - if (check_heuristics) - CanDiscardHeuristicsChecks(decision_details, reason); + if (reason == LifecycleUnitDiscardReason::PROACTIVE && check_heuristics) + CanProactivelyDiscardHeuristicsChecks(decision_details); #if defined(OS_CHROMEOS) if (web_contents()->GetVisibility() == content::Visibility::VISIBLE) @@ -1060,9 +1060,9 @@ } } -void TabLifecycleUnitSource::TabLifecycleUnit::CanDiscardHeuristicsChecks( - DecisionDetails* decision_details, - LifecycleUnitDiscardReason reason) const { +void TabLifecycleUnitSource::TabLifecycleUnit:: + CanProactivelyDiscardHeuristicsChecks( + DecisionDetails* decision_details) const { // We deliberately run through all of the logic without early termination. // This ensures that the decision details lists all possible reasons that // the transition can be denied. @@ -1071,21 +1071,19 @@ DecisionFailureReason::LIFECYCLES_ENTERPRISE_POLICY_OPT_OUT); } - if (reason == LifecycleUnitDiscardReason::PROACTIVE) { - auto intervention_policy = - GetTabSource()->intervention_policy_database()->GetDiscardingPolicy( - url::Origin::Create(web_contents()->GetLastCommittedURL())); + auto intervention_policy = + GetTabSource()->intervention_policy_database()->GetDiscardingPolicy( + url::Origin::Create(web_contents()->GetLastCommittedURL())); - switch (intervention_policy) { - case OriginInterventions::OPT_IN: - decision_details->AddReason(DecisionSuccessReason::GLOBAL_WHITELIST); - break; - case OriginInterventions::OPT_OUT: - decision_details->AddReason(DecisionFailureReason::GLOBAL_BLACKLIST); - break; - case OriginInterventions::DEFAULT: - break; - } + switch (intervention_policy) { + case OriginInterventions::OPT_IN: + decision_details->AddReason(DecisionSuccessReason::GLOBAL_WHITELIST); + break; + case OriginInterventions::OPT_OUT: + decision_details->AddReason(DecisionFailureReason::GLOBAL_BLACKLIST); + break; + case OriginInterventions::DEFAULT: + break; } }
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit.h b/chrome/browser/resource_coordinator/tab_lifecycle_unit.h index fca045fc..54450977 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit.h +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit.h
@@ -184,12 +184,11 @@ // feature usage. void CanFreezeHeuristicsChecks(DecisionDetails* decision_details) const; - // Runs the discarding heuristics checks on this tab and store the decision - // details in |decision_details|. If |intervention_type| indicates that - // this is a proactive intervention then more heuristics will be - // applied. This doesn't check for potential background feature usage. - void CanDiscardHeuristicsChecks(DecisionDetails* decision_details, - LifecycleUnitDiscardReason reason) const; + // Runs the proactive discarding heuristics checks on this tab and store the + // decision details in |decision_details|. This doesn't check for potential + // background feature usage. + void CanProactivelyDiscardHeuristicsChecks( + DecisionDetails* decision_details) const; // List of observers to notify when the discarded state or the auto- // discardable state of this tab changes.
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc index c82addd..1d58d59 100644 --- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
@@ -810,9 +810,17 @@ { ScopedEnterpriseOptOut enterprise_opt_out; - ExpectCanDiscardFalseAllReasons( - &tab_lifecycle_unit, - DecisionFailureReason::LIFECYCLES_ENTERPRISE_POLICY_OPT_OUT); + DecisionDetails decision_details; + EXPECT_FALSE(tab_lifecycle_unit.CanDiscard( + LifecycleUnitDiscardReason::PROACTIVE, &decision_details)); + EXPECT_EQ(DecisionFailureReason::LIFECYCLES_ENTERPRISE_POLICY_OPT_OUT, + decision_details.FailureReason()); + EXPECT_FALSE(decision_details.IsPositive()); + + decision_details.Clear(); + EXPECT_TRUE(tab_lifecycle_unit.CanDiscard( + LifecycleUnitDiscardReason::URGENT, &decision_details)); + EXPECT_TRUE(decision_details.IsPositive()); } ExpectCanDiscardTrueAllReasons(&tab_lifecycle_unit);
diff --git a/chrome/browser/resource_coordinator/tab_manager_features.cc b/chrome/browser/resource_coordinator/tab_manager_features.cc index 30e10fb..35fb02b 100644 --- a/chrome/browser/resource_coordinator/tab_manager_features.cc +++ b/chrome/browser/resource_coordinator/tab_manager_features.cc
@@ -84,6 +84,8 @@ "ProactiveTabFreezeAndDiscard"; const char kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam[] = "ShouldProactivelyDiscard"; +const char kProactiveTabFreezeAndDiscard_ShouldPeriodicallyUnfreezeParam[] = + "ShouldPeriodicallyUnfreeze"; const char kProactiveTabFreezeAndDiscard_DisableHeuristicsParam[] = "DisableHeuristicsProtections";
diff --git a/chrome/browser/resource_coordinator/tab_manager_features.h b/chrome/browser/resource_coordinator/tab_manager_features.h index c3d8f79..daef4bd 100644 --- a/chrome/browser/resource_coordinator/tab_manager_features.h +++ b/chrome/browser/resource_coordinator/tab_manager_features.h
@@ -32,6 +32,11 @@ // ProactiveTabFreezeAndDiscard feature. extern const char kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam[]; +// The name of the |ShouldPeriodicallyUnfreeze| parameter of the +// ProactiveTabFreezeAndDiscard feature. +extern const char + kProactiveTabFreezeAndDiscard_ShouldPeriodicallyUnfreezeParam[]; + // The name of the |DisableHeuristicsProtections| parameter of the // ProactiveTabFreezeAndDiscard feature. extern const char kProactiveTabFreezeAndDiscard_DisableHeuristicsParam[]; @@ -83,8 +88,8 @@ &features::kProactiveTabFreezeAndDiscard, kProactiveTabFreezeAndDiscard_ShouldProactivelyDiscardParam, false}; static constexpr base::FeatureParam<bool> kShouldPeriodicallyUnfreeze{ - &features::kProactiveTabFreezeAndDiscard, "ShouldPeriodicallyUnfreeze", - false}; + &features::kProactiveTabFreezeAndDiscard, + kProactiveTabFreezeAndDiscard_ShouldPeriodicallyUnfreezeParam, false}; static constexpr base::FeatureParam<bool> kShouldProtectTabsSharingBrowsingInstance{ &features::kProactiveTabFreezeAndDiscard, @@ -120,13 +125,12 @@ 10 * base::Time::kSecondsPerMinute}; static constexpr base::FeatureParam<int> kFreezeTimeout{ &features::kProactiveTabFreezeAndDiscard, "FreezeTimeout", - 10 * base::Time::kSecondsPerMinute}; + 5 * base::Time::kSecondsPerMinute}; static constexpr base::FeatureParam<int> kUnfreezeTimeout{ &features::kProactiveTabFreezeAndDiscard, "UnfreezeTimeout", 15 * base::Time::kSecondsPerMinute}; static constexpr base::FeatureParam<int> kRefreezeTimeout{ - &features::kProactiveTabFreezeAndDiscard, "RefreezeTimeout", - 10 * base::Time::kSecondsPerMinute}; + &features::kProactiveTabFreezeAndDiscard, "RefreezeTimeout", 10}; static constexpr base::FeatureParam<bool> kDisableHeuristicsProtections{ &features::kProactiveTabFreezeAndDiscard,
diff --git a/chrome/browser/resources/chromeos/switch_access/focus_ring_manager.js b/chrome/browser/resources/chromeos/switch_access/focus_ring_manager.js index d257a75..21ef2617 100644 --- a/chrome/browser/resources/chromeos/switch_access/focus_ring_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/focus_ring_manager.js
@@ -26,12 +26,6 @@ this.colorPattern_ = /^#[0-9A-F]{3,8}$/i; /** - * Keeps track of the scope node currently being focused. - * @private {chrome.automation.AutomationNode} - */ - this.currentScope_; - - /** * A reference to the Switch Access object. * @private {!SwitchAccessInterface} */ @@ -58,8 +52,8 @@ color: color, secondaryColor: SAConstants.Focus.SECONDARY_COLOR }); - this.rings_.set(SAConstants.Focus.ID.SCOPE, { - id: SAConstants.Focus.ID.SCOPE, + this.rings_.set(SAConstants.Focus.ID.NEXT, { + id: SAConstants.Focus.ID.NEXT, rects: [], type: chrome.accessibilityPrivate.FocusType.DASHED, color: color, @@ -88,50 +82,58 @@ } /** - * Sets the primary and scope focus rings to be around the given nodes. - * Saves the scope for future comparison. + * Sets the primary and next focus rings based on the current primary and + * group nodes used for navigation. * @param {!chrome.automation.AutomationNode} primary - * @param {!chrome.automation.AutomationNode} scope + * @param {!chrome.automation.AutomationNode} group */ - setFocusNodes(primary, scope) { + setFocusNodes(primary, group) { if (this.rings_.size === 0) return; - const focusRect = primary.location; - - // If the scope element has not changed, we want to use the previously - // calculated rect as the current scope rect. - let scopeRect = scope.location; - const currentScopeRects = this.rings_.get(SAConstants.Focus.ID.SCOPE).rects; - if (currentScopeRects.length && scope === this.currentScope_) - scopeRect = currentScopeRects[0]; - this.currentScope_ = scope; - if (primary === this.backButtonManager_.backButtonNode()) { - this.backButtonManager_.show(scopeRect); + this.backButtonManager_.show(group.location); this.rings_.get(SAConstants.Focus.ID.PRIMARY).rects = []; - this.rings_.get(SAConstants.Focus.ID.SCOPE).rects = [scopeRect]; + // Clear the dashed ring between transitions, as the animation is + // distracting. + this.rings_.get(SAConstants.Focus.ID.NEXT).rects = []; + this.updateFocusRings_(); + + this.rings_.get(SAConstants.Focus.ID.NEXT).rects = [group.location]; this.updateFocusRings_(); return; } this.backButtonManager_.hide(); - // If the current element is not the back button, the scope rect should - // expand to contain the focus rect. - scopeRect = RectHelper.expandToFitWithPadding( - SAConstants.Focus.SCOPE_BUFFER, scopeRect, focusRect); + // If the primary node is a group, show its first child as the "next" focus. + if (SwitchAccessPredicate.isGroup(primary, group)) { + const firstChild = new AutomationTreeWalker( + primary, constants.Dir.FORWARD, + SwitchAccessPredicate.restrictions(primary)) + .next() + .node; - this.rings_.get(SAConstants.Focus.ID.PRIMARY).rects = [focusRect]; - this.rings_.get(SAConstants.Focus.ID.SCOPE).rects = [scopeRect]; - this.updateFocusRings_(); - } + // Clear the dashed ring between transitions, as the animation is + // distracting. + this.rings_.get(SAConstants.Focus.ID.NEXT).rects = []; + this.updateFocusRings_(); - /** - * Clears the focus ring with the given ID. - * @param {!SAConstants.Focus.ID} id - */ - clearRing(id) { - this.rings_.get(id).rects = []; + let focusRect = primary.location; + if (firstChild && firstChild.location) { + // If the current element is not the back button, the focus rect should + // expand to contain the child rect. + focusRect = RectHelper.expandToFitWithPadding( + SAConstants.Focus.GROUP_BUFFER, focusRect, firstChild.location); + this.rings_.get(SAConstants.Focus.ID.NEXT).rects = + [firstChild.location]; + } + this.rings_.get(SAConstants.Focus.ID.PRIMARY).rects = [focusRect]; + this.updateFocusRings_(); + return; + } + + this.rings_.get(SAConstants.Focus.ID.PRIMARY).rects = [primary.location]; + this.rings_.get(SAConstants.Focus.ID.NEXT).rects = []; this.updateFocusRings_(); } @@ -144,18 +146,6 @@ } /** - * Sets the indicated focus ring to highlight the given rects. - * @param {!SAConstants.Focus.ID} id - * @param {!Array<chrome.accessibilityPrivate.ScreenRect>} rects - */ - setRing(id, rects) { - if (this.rings_.size === 0) return; - - this.rings_.get(id).rects = rects; - this.updateFocusRings_(); - } - - /** * Updates all focus rings to reflect new location, color, style, or other * changes. */
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js b/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js index 8dd90c68..ed37b67f 100644 --- a/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js +++ b/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js
@@ -48,20 +48,20 @@ * @enum {string} */ SAConstants.Focus.ID = { - // The ID for the user's current focus. + // The ID for the ring showing the user's current focus. PRIMARY: 'primary', - // The ID for the group containing the user's focus. - SCOPE: 'scope', + // The ID for the ring showing the next focus. + NEXT: 'next', // The ID for the area where text is being input. TEXT: 'text' }; /** - * The buffer (in dip) between the primary focus ring and the scope focus ring. + * The buffer (in dip) between a child's focus ring and its parent's focus ring. * @type {number} * @const */ -SAConstants.Focus.SCOPE_BUFFER = 2; +SAConstants.Focus.GROUP_BUFFER = 2; /** * The inner color of the focus rings. @@ -155,7 +155,7 @@ SCROLL_RIGHT: chrome.automation.ActionType.SCROLL_RIGHT, // Scroll the current element (or its ancestor) up. SCROLL_UP: chrome.automation.ActionType.SCROLL_UP, - // Either perform the default action or enter a new scope, as applicable. + // Either perform the default action or enter a new group, as applicable. SELECT: 'select', // Open and jump to the Switch Access settings. SETTINGS: 'settings',
diff --git a/chrome/browser/resources/chromeos/switch_access/text_input_manager.js b/chrome/browser/resources/chromeos/switch_access/text_input_manager.js index 5cbf239..a44cd12 100644 --- a/chrome/browser/resources/chromeos/switch_access/text_input_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/text_input_manager.js
@@ -17,7 +17,7 @@ } /** - * Enters the keyboard and draws the text input focus ring. + * Enters the keyboard. * @param {!chrome.automation.AutomationNode} node */ enterKeyboard(node) { @@ -25,17 +25,13 @@ return false; this.node_ = node; - this.navigationManager_.focusRingManager.setRing( - SAConstants.Focus.ID.TEXT, [this.node_.location]); return true; } - /** Resets the focus ring and the focus in |navigationManager_|. */ + /** Resets the focus in |navigationManager_|. */ returnToTextFocus() { if (!this.node_) return; - this.navigationManager_.focusRingManager.clearRing( - SAConstants.Focus.ID.TEXT); this.navigationManager_.exitCurrentScope(this.node_); this.node_ = null; }
diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js index 42b9360..e08b1132 100644 --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
@@ -57,6 +57,9 @@ // TODO(bshe): Get rid of anonymous namespace. (function() { +// Default wallpaper url +var OEM_DEFAULT_WALLPAPER_URL = 'OemDefaultWallpaper'; + /** * The following values should be kept in sync with the style sheet. */ @@ -461,7 +464,8 @@ currentWallpaperInfo => { // Initialize the "more options" buttons. var isOnlineWallpaper = !!currentWallpaperInfo; - var isDefaultWallpaper = !this.currentWallpaper_; + var isDefaultWallpaper = !this.currentWallpaper_ || + this.currentWallpaper_ == OEM_DEFAULT_WALLPAPER_URL; var visibleItemList = []; $('refresh').hidden = !isOnlineWallpaper || !this.dailyRefreshInfo_ || !this.dailyRefreshInfo_.enabled; @@ -1288,7 +1292,7 @@ if (loadTimeData.getBoolean('isOEMDefaultWallpaper')) { var defaultWallpaperInfo = { wallpaperId: null, - baseURL: 'OemDefaultWallpaper', + baseURL: OEM_DEFAULT_WALLPAPER_URL, layout: Constants.WallpaperThumbnailDefaultLayout, source: Constants.WallpaperSourceEnum.OEM, ariaLabel: loadTimeData.getString('defaultWallpaperLabel'), @@ -1704,5 +1708,4 @@ this.updateDailyRefreshItemStates_(this.dailyRefreshInfo_); this.decorateCurrentWallpaperInfoBar_(); }; - })();
diff --git a/chrome/browser/resources/settings/autofill_page/payments_section.html b/chrome/browser/resources/settings/autofill_page/payments_section.html index 1de86d2a..55257fa 100644 --- a/chrome/browser/resources/settings/autofill_page/payments_section.html +++ b/chrome/browser/resources/settings/autofill_page/payments_section.html
@@ -42,8 +42,9 @@ pref="{{prefs.autofill.credit_card_enabled}}"> </settings-toggle-button> <template is="dom-if" - if="[[isUserFIDOVerifiable_( - prefs.autofill.credit_card_enabled.value)]]"> + if="[[shouldShowFidoToggle_( + prefs.autofill.credit_card_enabled.value, + userIsFidoVerifiable_)]]"> <settings-toggle-button class="settings-box first" id="autofillCreditCardFIDOAuthToggle"
diff --git a/chrome/browser/resources/settings/autofill_page/payments_section.js b/chrome/browser/resources/settings/autofill_page/payments_section.js index d5baeda..0c71a4b4 100644 --- a/chrome/browser/resources/settings/autofill_page/payments_section.js +++ b/chrome/browser/resources/settings/autofill_page/payments_section.js
@@ -141,12 +141,12 @@ * Set to true if user can be verified through FIDO authentication. * @private */ - userIsFIDOVerifiable_: { + userIsFidoVerifiable_: { type: Boolean, value: function() { - return loadTimeData.getBoolean('userIsFIDOVerifiable'); + return loadTimeData.getBoolean( + 'fidoAuthenticationAvailableForAutofill'); }, - readOnly: true, }, /** @@ -208,6 +208,15 @@ this.creditCards = cardList; }; + // Update |userIsFidoVerifiable_| based on the availability of a platform + // authenticator. + if (window.PublicKeyCredential) { + window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() + .then(r => { + this.userIsFidoVerifiable_ = this.userIsFidoVerifiable_ && r; + }); + } + /** * @type {function(!Array<!AutofillManager.AddressEntry>, * !Array<!PaymentsManager.CreditCardEntry>)} @@ -352,8 +361,8 @@ * authentication. * @private */ - isUserFIDOVerifiable_: function(creditCardEnabled) { - return creditCardEnabled && this.userIsFIDOVerifiable_; + shouldShowFidoToggle_: function(creditCardEnabled, userIsFidoVerifiable) { + return creditCardEnabled && userIsFidoVerifiable; }, /**
diff --git a/chrome/browser/resources/tab_strip/tab.html b/chrome/browser/resources/tab_strip/tab.html index ab46a7a..3386afbc 100644 --- a/chrome/browser/resources/tab_strip/tab.html +++ b/chrome/browser/resources/tab_strip/tab.html
@@ -43,10 +43,34 @@ height: var(--favicon-size); margin-inline-end: 8px; margin-inline-start: 12px; + max-width: var(--favicon-size); + overflow: hidden; position: relative; + /* When transitioning to the default visible state, the margin and max-width + * transitions should finish first, then the opacity should be set to 1. + * This prevents the favicon and loading spinners from looking cropped + * while the element transitions. */ + transition: margin var(--tabstrip-tab-transition-duration), + max-width var(--tabstrip-tab-transition-duration), + opacity 0ms linear var(--tabstrip-tab-transition-duration); width: var(--favicon-size); } + :host([hide-icon_]) #faviconContainer { + margin-inline-end: 0; + max-width: 0; + opacity: 0; + /* When transitioning to the hidden state, set opacity immediately to 0 + * while transitioning the other values normally. */ + transition: margin var(--tabstrip-tab-transition-duration), + max-width var(--tabstrip-tab-transition-duration), + opacity 0ms; + } + + :host([pinned_]) #faviconContainer { + margin: 0; + } + #progressSpinner, #favicon, #crashedIcon { @@ -92,33 +116,33 @@ width: 6px; } - :host([waiting]) #progressSpinner, - :host([loading]) #progressSpinner { + :host([waiting_]) #progressSpinner, + :host([loading_]) #progressSpinner { display: block; } - :host([loading]) #favicon { + :host([loading_]) #favicon { border-radius: 50%; height: calc(var(--favicon-size) - 6px); overflow: hidden; width: calc(var(--favicon-size) - 6px); } - :host([waiting]) #progressSpinner { + :host([waiting_]) #progressSpinner { background-color: var(--tabstrip-tab-waiting-spinning-color); transform: /* Center first, then flip horizontally. */ translate(-50%, -50%) scaleX(-1); } - :host([waiting]) #favicon { + :host([waiting_]) #favicon { display: none; } - :host([loading]) #progressSpinner { + :host([loading_]) #progressSpinner { background-color: var(--tabstrip-tab-loading-spinning-color); } - :host([crashed]) #favicon { + :host([crashed_]) #favicon { opacity: 0; transform: translate(-50%, 100%); transition: @@ -126,7 +150,7 @@ transform var(--tabstrip-tab-transition-duration); } - :host([crashed]) #crashedIcon { + :host([crashed_]) #crashedIcon { opacity: 1; transform: translate(-50%, -50%); transition: @@ -136,7 +160,7 @@ transition-delay: var(--tabstrip-tab-transition-duration); } - :host([blocked]) #blocked { + :host([blocked_]) #blocked { display: block; } @@ -197,23 +221,23 @@ } /* Pinned tab styles */ - :host([pinned]) { + :host([pinned_]) { height: var(--tabstrip-pinned-tab-size); width: var(--tabstrip-pinned-tab-size); } - :host([pinned]) #title { + :host([pinned_]) #title { border-block-end: 0; height: 100%; } - :host([pinned]) #titleText, - :host([pinned]) #close, - :host([pinned]) #thumbnail { + :host([pinned_]) #titleText, + :host([pinned_]) #close, + :host([pinned_]) #thumbnail { display: none; } - :host([dragging]) #dragPlaceholder { + :host([dragging_]) #dragPlaceholder { background: var(--tabstrip-tab-background-color); border-radius: var(--tabstrip-tab-border-radius); height: 100%; @@ -223,7 +247,7 @@ /* When being dragged, the contents of the drag image needs to be off-screen * with nothing else on top or below obscuring it. */ - :host([dragging]) #dragImage { + :host([dragging_]) #dragImage { box-shadow: none; position: absolute; top: -999px;
diff --git a/chrome/browser/resources/tab_strip/tab.js b/chrome/browser/resources/tab_strip/tab.js index 2d6576b..1c8f22f 100644 --- a/chrome/browser/resources/tab_strip/tab.js +++ b/chrome/browser/resources/tab_strip/tab.js
@@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import {getFavicon, getFaviconForPageURL} from 'chrome://resources/js/icon.m.js'; +import {assert} from 'chrome://resources/js/assert.m.js'; +import {getFavicon} from 'chrome://resources/js/icon.m.js'; import {CustomElement} from './custom_element.js'; import {TabData, TabNetworkState, TabsApiProxy} from './tabs_api_proxy.js'; @@ -61,37 +62,34 @@ /** @param {!TabData} tab */ set tab(tab) { + assert(this.tab_ !== tab); this.toggleAttribute('active', tab.active); + this.toggleAttribute('hide-icon_', !tab.showIcon); this.toggleAttribute( - 'waiting', + 'waiting_', !tab.shouldHideThrobber && tab.networkState === TabNetworkState.WAITING); this.toggleAttribute( - 'loading', + 'loading_', !tab.shouldHideThrobber && tab.networkState === TabNetworkState.LOADING); - this.toggleAttribute('pinned', tab.pinned); + + this.toggleAttribute('pinned_', tab.pinned); this.setAttribute('draggable', tab.pinned); + this.toggleAttribute('crashed', tab.crashed); if (!this.tab_ || this.tab_.title !== tab.title) { this.titleTextEl_.textContent = tab.title; } - if (tab.favIconUrl) { - if (!this.tab_ || this.tab_.favIconUrl !== tab.favIconUrl) { - this.faviconEl_.style.backgroundImage = `url(${tab.favIconUrl})`; - } + if (tab.networkState === TabNetworkState.WAITING || + (tab.networkState === TabNetworkState.LOADING && + tab.isDefaultFavicon)) { + this.faviconEl_.style.backgroundImage = 'none'; + } else if (tab.favIconUrl) { + this.faviconEl_.style.backgroundImage = `url(${tab.favIconUrl})`; } else { - if (tab.networkState === TabNetworkState.NONE || - tab.networkState === TabNetworkState.ERROR) { - // If the tab has finished loading and there still is no favicon, - // fallback to a favicon generated by the page URL. This guarantees - // there is always some favicon, even if it's the default icon. - this.faviconEl_.style.backgroundImage = - getFaviconForPageURL(tab.url, false); - } else { - this.faviconEl_.style.backgroundImage = 'none'; - } + this.faviconEl_.style.backgroundImage = getFavicon(''); } // Expose the ID to an attribute to allow easy querySelector use @@ -156,7 +154,7 @@ * @param {boolean} dragging */ setDragging(dragging) { - this.toggleAttribute('dragging', dragging); + this.toggleAttribute('dragging_', dragging); } /**
diff --git a/chrome/browser/resources/tab_strip/tabs_api_proxy.js b/chrome/browser/resources/tab_strip/tabs_api_proxy.js index 1182936c..fbad2ca 100644 --- a/chrome/browser/resources/tab_strip/tabs_api_proxy.js +++ b/chrome/browser/resources/tab_strip/tabs_api_proxy.js
@@ -19,12 +19,15 @@ /** * @typedef {{ * active: boolean, - * favIconUrl: string, + * crashed: boolean, + * favIconUrl: (string|undefined), * id: number, * index: number, + * isDefaultFavicon: boolean, * networkState: !TabNetworkState, * pinned: boolean, * shouldHideThrobber: boolean, + * showIcon: boolean, * title: string, * url: string, * }}
diff --git a/chrome/browser/search/promos/promo_service.cc b/chrome/browser/search/promos/promo_service.cc index 574c30a..3761872 100644 --- a/chrome/browser/search/promos/promo_service.cc +++ b/chrome/browser/search/promos/promo_service.cc
@@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/callback.h" #include "base/feature_list.h" +#include "base/time/time.h" #include "base/values.h" #include "chrome/browser/search/ntp_features.h" #include "chrome/common/pref_names.h" @@ -26,6 +27,9 @@ namespace { +// The number of days until a blocklist entry expires. +const int kDaysThatBlocklistExpiresIn = 28; + const char kNewTabPromosApiPath[] = "/async/newtab_promos"; const char kXSSIResponsePreamble[] = ")]}'"; @@ -187,7 +191,7 @@ PromoService::Status status; if (JsonToPromoData(value, &result)) { - bool is_blocked = IsBlocked(result->promo_id); + bool is_blocked = IsBlockedAfterClearingExpired(result->promo_id); if (is_blocked) result = PromoData(); status = is_blocked ? Status::OK_BUT_BLOCKED : Status::OK_WITH_PROMO; @@ -213,7 +217,7 @@ // static void PromoService::RegisterProfilePrefs(PrefRegistrySimple* registry) { - registry->RegisterListPref(prefs::kNtpPromoBlocklist); + registry->RegisterDictionaryPref(prefs::kNtpPromoBlocklist); } void PromoService::AddObserver(PromoServiceObserver* observer) { @@ -225,11 +229,14 @@ } void PromoService::BlocklistPromo(const std::string& promo_id) { - if (!CanBlockPromos() || promo_id.empty() || IsBlocked(promo_id)) + if (!CanBlockPromos() || promo_id.empty() || + IsBlockedAfterClearingExpired(promo_id)) { return; + } - ListPrefUpdate update(pref_service_, prefs::kNtpPromoBlocklist); - update->Append(promo_id); + DictionaryPrefUpdate update(pref_service_, prefs::kNtpPromoBlocklist); + double now = base::Time::Now().ToDeltaSinceWindowsEpoch().InSecondsF(); + update->SetDoubleKey(promo_id, now); if (promo_data_ && promo_data_->promo_id == promo_id) { promo_data_ = PromoData(); @@ -256,16 +263,34 @@ } } -bool PromoService::IsBlocked(const std::string& promo_id) const { +bool PromoService::IsBlockedAfterClearingExpired( + const std::string& promo_id) const { if (promo_id.empty() || !CanBlockPromos()) return false; - const auto* blocklist = pref_service_->GetList(prefs::kNtpPromoBlocklist); - for (const auto& blocked : blocklist->GetList()) { - if (blocked.GetString() == promo_id) - return true; + auto expired_delta = base::TimeDelta::FromDays(kDaysThatBlocklistExpiresIn); + auto expired_time = base::Time::Now() - expired_delta; + double expired = expired_time.ToDeltaSinceWindowsEpoch().InSecondsF(); + + bool found = false; + + std::vector<std::string> expired_ids; + + for (const auto& blocked : + pref_service_->GetDictionary(prefs::kNtpPromoBlocklist)->DictItems()) { + if (!blocked.second.is_double() || blocked.second.GetDouble() < expired) + expired_ids.emplace_back(blocked.first); + else if (!found && blocked.first == promo_id) + found = true; // Don't break; keep clearing expired prefs. } - return false; + + if (!expired_ids.empty()) { + DictionaryPrefUpdate update(pref_service_, prefs::kNtpPromoBlocklist); + for (const std::string& key : expired_ids) + update->RemoveKey(key); + } + + return found; } GURL PromoService::GetLoadURLForTesting() const {
diff --git a/chrome/browser/search/promos/promo_service.h b/chrome/browser/search/promos/promo_service.h index e4b185f..2471db0 100644 --- a/chrome/browser/search/promos/promo_service.h +++ b/chrome/browser/search/promos/promo_service.h
@@ -85,8 +85,9 @@ void NotifyObservers(); - // Whether or not |promo_id| has been blocked by the user. - bool IsBlocked(const std::string& promo_id) const; + // Clears any expired blocklist entries and determines whether |promo_id| has + // been blocked by the user. + bool IsBlockedAfterClearingExpired(const std::string& promo_id) const; scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; std::unique_ptr<network::SimpleURLLoader> simple_loader_;
diff --git a/chrome/browser/search/promos/promo_service_unittest.cc b/chrome/browser/search/promos/promo_service_unittest.cc index d448358..60d7db45 100644 --- a/chrome/browser/search/promos/promo_service_unittest.cc +++ b/chrome/browser/search/promos/promo_service_unittest.cc
@@ -61,7 +61,7 @@ } PromoService* service() { return service_.get(); } - PrefService* pref_service() { return &pref_service_; } + PrefService* prefs() { return &pref_service_; } private: // Required to run tests from UI and threads. @@ -208,8 +208,9 @@ feature_list.InitAndEnableFeature(features::kDismissNtpPromos); { - ListPrefUpdate update(pref_service(), prefs::kNtpPromoBlocklist); - update->Append("42"); + DictionaryPrefUpdate update(prefs(), prefs::kNtpPromoBlocklist); + base::Time recent = base::Time::Now() - base::TimeDelta::FromHours(2); + update->SetDoubleKey("42", recent.ToDeltaSinceWindowsEpoch().InSecondsF()); } std::string response_string = @@ -248,14 +249,73 @@ EXPECT_EQ(service()->promo_data(), promo); EXPECT_EQ(service()->promo_status(), PromoService::Status::OK_WITH_PROMO); - ASSERT_EQ(0u, pref_service()->GetList(prefs::kNtpPromoBlocklist)->GetSize()); + ASSERT_EQ(0u, prefs()->GetDictionary(prefs::kNtpPromoBlocklist)->size()); service()->BlocklistPromo("42"); EXPECT_EQ(service()->promo_data(), PromoData()); EXPECT_EQ(service()->promo_status(), PromoService::Status::OK_BUT_BLOCKED); - const auto* blocklist = pref_service()->GetList(prefs::kNtpPromoBlocklist); - ASSERT_EQ(1u, blocklist->GetSize()); - EXPECT_EQ("42", blocklist->GetList()[0].GetString()); + const auto* blocklist = prefs()->GetDictionary(prefs::kNtpPromoBlocklist); + ASSERT_EQ(1u, blocklist->size()); + ASSERT_TRUE(blocklist->HasKey("42")); +} + +TEST_F(PromoServiceTest, BlocklistExpiration) { + base::test::ScopedFeatureList feature_list; + feature_list.InitAndEnableFeature(features::kDismissNtpPromos); + + { + DictionaryPrefUpdate update(prefs(), prefs::kNtpPromoBlocklist); + ASSERT_EQ(0u, update->size()); + base::Time past = base::Time::Now() - base::TimeDelta::FromDays(365); + update->SetDoubleKey("42", past.ToDeltaSinceWindowsEpoch().InSecondsF()); + } + + ASSERT_EQ(1u, prefs()->GetDictionary(prefs::kNtpPromoBlocklist)->size()); + + std::string response_string = + "{\"update\":{\"promos\":{\"middle\":\"<style></style><div><script></" + "script></div>\", \"log_url\":\"/log_url?id=42\", \"id\": \"42\"}}}"; + SetUpResponseWithData(service()->GetLoadURLForTesting(), response_string); + + service()->Refresh(); + base::RunLoop().RunUntilIdle(); + + // The year-old entry of {promo_id: "42", time: <1y ago>} should be gone. + ASSERT_EQ(0u, prefs()->GetDictionary(prefs::kNtpPromoBlocklist)->size()); + + // The promo should've still been shown, as expiration should take precedence. + PromoData promo; + promo.promo_html = "<style></style><div><script></script></div>"; + promo.promo_log_url = GURL("https://www.google.com/log_url?id=42"); + promo.promo_id = "42"; + + EXPECT_EQ(service()->promo_data(), promo); + EXPECT_EQ(service()->promo_status(), PromoService::Status::OK_WITH_PROMO); +} + +TEST_F(PromoServiceTest, BlocklistWrongExpiryType) { + base::test::ScopedFeatureList feature_list; + feature_list.InitAndEnableFeature(features::kDismissNtpPromos); + + { + DictionaryPrefUpdate update(prefs(), prefs::kNtpPromoBlocklist); + ASSERT_EQ(0u, update->size()); + update->SetDoubleKey("42", 5); + update->SetStringKey("84", "wrong type"); + } + + ASSERT_GT(prefs()->GetDictionary(prefs::kNtpPromoBlocklist)->size(), 0u); + + std::string response_string = + "{\"update\":{\"promos\":{\"middle\":\"<style></style><div><script></" + "script></div>\", \"log_url\":\"/log_url?id=42\", \"id\": \"42\"}}}"; + SetUpResponseWithData(service()->GetLoadURLForTesting(), response_string); + + service()->Refresh(); + base::RunLoop().RunUntilIdle(); + + // All the invalid formats should've been removed from the pref. + ASSERT_EQ(0u, prefs()->GetDictionary(prefs::kNtpPromoBlocklist)->size()); }
diff --git a/chrome/browser/site_isolation/site_isolation_policy.cc b/chrome/browser/site_isolation/site_isolation_policy.cc index 69c2be7..a91cfd0 100644 --- a/chrome/browser/site_isolation/site_isolation_policy.cc +++ b/chrome/browser/site_isolation/site_isolation_policy.cc
@@ -58,11 +58,25 @@ // static bool SiteIsolationPolicy::ShouldDisableSiteIsolationDueToMemoryThreshold() { - // Using 1077 rather than 1024 because 1) it helps ensure that devices with - // exactly 1GB of RAM won't get included because of inaccuracies or off-by-one - // errors and 2) this is the bucket boundary in Memory.Stats.Win.TotalPhys2. - // See also https://crbug.com/844118. + // The memory threshold behavior differs for desktop and Android: + // - Android uses a 1900MB default threshold, which is the threshold used by + // password-triggered site isolation - see docs in + // https://crbug.com/849815. This can be overridden via a param defined in + // a kSitePerProcessOnlyForHighMemoryClients field trial. + // - Desktop does not enforce a default memory threshold, but for now we + // still support a threshold defined via a + // kSitePerProcessOnlyForHighMemoryClients field trial. The trial + // typically carries the threshold in a param; if it doesn't, use a default + // that's slightly higher than 1GB (see https://crbug.com/844118). + // + // TODO(alexmos): currently, this threshold applies to all site isolation + // modes. Eventually, we may need separate thresholds for different modes, + // such as full site isolation vs. password-triggered site isolation. +#if defined(OS_ANDROID) + constexpr int kDefaultMemoryThresholdMb = 1900; +#else constexpr int kDefaultMemoryThresholdMb = 1077; +#endif // TODO(acolwell): Rename feature since it now affects more than just the // site-per-process case.
diff --git a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc index b03e24b..074eb371 100644 --- a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc +++ b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
@@ -60,6 +60,7 @@ #include "content/public/browser/interstitial_page.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_types.h" #include "content/public/browser/reload_type.h" @@ -68,15 +69,14 @@ #include "content/public/browser/security_style_explanations.h" #include "content/public/browser/ssl_status.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/common/page_type.h" #include "content/public/common/referrer.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/url_loader_interceptor.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/net_errors.h" #include "net/cert/cert_database.h" #include "net/cert/cert_status_flags.h" @@ -94,7 +94,6 @@ #include "net/test/embedded_test_server/http_response.h" #include "net/test/embedded_test_server/request_handler_util.h" #include "net/test/test_data_directory.h" -#include "services/service_manager/public/cpp/connector.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/mojom/choosers/file_chooser.mojom.h" #include "third_party/boringssl/src/include/openssl/ssl.h" @@ -1191,9 +1190,9 @@ void TearDownOnMainThread() override { mojo::ScopedAllowSyncCallForTesting allow_sync_call; - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->SetTransportSecurityStateSource(0); // This test class intentionally does not call the parent @@ -1204,9 +1203,9 @@ void EnableStaticPins() { mojo::ScopedAllowSyncCallForTesting allow_sync_call; - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // The tests don't depend on reporting, so the port doesn't matter. network_service_test->SetTransportSecurityStateSource(80);
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc index 7450d63..ed93b8d 100644 --- a/chrome/browser/ssl/ssl_browsertest.cc +++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -121,13 +121,11 @@ #include "content/public/browser/restore_type.h" #include "content/public/browser/ssl_status.h" #include "content/public/browser/storage_partition.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" #include "content/public/common/page_state.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/common/url_constants.h" #include "content/public/common/web_preferences.h" #include "content/public/test/browser_test_utils.h" @@ -138,6 +136,7 @@ #include "crypto/sha2.h" #include "extensions/common/extension.h" #include "mojo/public/cpp/bindings/associated_remote.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "net/base/escape.h" #include "net/base/host_port_pair.h" @@ -168,7 +167,6 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_switches.h" #include "services/network/public/mojom/network_service.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/features.h" #include "ui/base/l10n/l10n_util.h" @@ -6906,9 +6904,9 @@ } void SetShouldNotRequireCTForTesting() { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network::mojom::NetworkServiceTest::ShouldRequireCT required_ct = network::mojom::NetworkServiceTest::ShouldRequireCT::DONT_REQUIRE; @@ -7530,9 +7528,9 @@ if (content::IsOutOfProcessNetworkService()) { mojo::ScopedAllowSyncCallForTesting allow_sync_call; - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->SetTransportSecurityStateSource(0); } else { RunOnIOThreadBlocking(base::BindOnce( @@ -7550,9 +7548,9 @@ partition->FlushNetworkInterfaceForTesting(); if (content::IsOutOfProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->SetTransportSecurityStateSource(reporting_port); } else { // TODO(https://crbug.com/1008175): This code is not threadsafe, as the
diff --git a/chrome/browser/ui/DEPS b/chrome/browser/ui/DEPS index 91fd5180..6801b1b 100644 --- a/chrome/browser/ui/DEPS +++ b/chrome/browser/ui/DEPS
@@ -5,3 +5,11 @@ "+services/content/public", "+services/device/public/mojom", ] + +specific_include_rules = { + "browser_finder_chromeos_browsertest\.cc": [ + "+ash/wm/desks/desk.h", + "+ash/wm/desks/desks_controller.h", + "+ash/wm/desks/desks_test_util.h", + ], +}
diff --git a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc index 55cbe31..44a0589 100644 --- a/chrome/browser/ui/app_list/arc/arc_app_unittest.cc +++ b/chrome/browser/ui/app_list/arc/arc_app_unittest.cc
@@ -1488,7 +1488,8 @@ } // Validate that arc model contains expected elements on restart. -TEST_P(ArcAppModelBuilderRecreate, AppModelRestart) { +// Flaky. https://crbug.com/1013813 +TEST_P(ArcAppModelBuilderRecreate, DISABLED_AppModelRestart) { // No apps on initial start. ValidateHaveApps(std::vector<arc::mojom::AppInfo>()); @@ -1515,7 +1516,9 @@ // Verifies that no OnAppRegistered/OnAppRemoved is called in case ARC++ started // next time disabled. -TEST_P(ArcAppModelBuilderRecreate, AppsNotReportedNextSessionDisabled) { +// Flaky. https://crbug.com/1013813 +TEST_P(ArcAppModelBuilderRecreate, + DISABLED_AppsNotReportedNextSessionDisabled) { ArcAppListPrefs* prefs = ArcAppListPrefs::Get(profile_.get()); ASSERT_TRUE(prefs);
diff --git a/chrome/browser/ui/app_list/internal_app/internal_app_context_menu.cc b/chrome/browser/ui/app_list/internal_app/internal_app_context_menu.cc index b9e0ba4..2ab3b539 100644 --- a/chrome/browser/ui/app_list/internal_app/internal_app_context_menu.cc +++ b/chrome/browser/ui/app_list/internal_app/internal_app_context_menu.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/app_list/internal_app/internal_app_context_menu.h" #include "ash/public/cpp/app_menu_constants.h" +#include "chrome/browser/apps/app_service/app_service_metrics.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_util.h" #include "chrome/browser/ui/app_list/internal_app/internal_app_metadata.h" @@ -21,7 +22,7 @@ bool InternalAppContextMenu::IsCommandIdEnabled(int command_id) const { if (command_id == ash::STOP_APP) { DCHECK_EQ(app_list::FindInternalApp(app_id())->internal_app_name, - app_list::InternalAppName::kPluginVm); + apps::BuiltInAppName::kPluginVm); return plugin_vm::IsPluginVmRunning(profile()); } return app_list::AppContextMenu::IsCommandIdEnabled(command_id); @@ -31,7 +32,7 @@ switch (command_id) { case ash::STOP_APP: DCHECK_EQ(app_list::FindInternalApp(app_id())->internal_app_name, - app_list::InternalAppName::kPluginVm); + apps::BuiltInAppName::kPluginVm); plugin_vm::PluginVmManager::GetForProfile(profile())->StopPluginVm(); return; } @@ -43,7 +44,7 @@ const auto* internal_app = app_list::FindInternalApp(app_id()); DCHECK(internal_app); - if (internal_app->internal_app_name == app_list::InternalAppName::kPluginVm) { + if (internal_app->internal_app_name == apps::BuiltInAppName::kPluginVm) { AddContextMenuOption(menu_model, ash::STOP_APP, IDS_PLUGIN_VM_SHUT_DOWN_MENU_ITEM); }
diff --git a/chrome/browser/ui/app_list/internal_app/internal_app_metadata.cc b/chrome/browser/ui/app_list/internal_app/internal_app_metadata.cc index 6fa7a39..728b4164 100644 --- a/chrome/browser/ui/app_list/internal_app/internal_app_metadata.cc +++ b/chrome/browser/ui/app_list/internal_app/internal_app_metadata.cc
@@ -19,6 +19,7 @@ #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" +#include "chrome/browser/apps/app_service/app_service_metrics.h" #include "chrome/browser/apps/launch_service/launch_service.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_util.h" @@ -68,21 +69,21 @@ /*recommendable=*/false, /*searchable=*/true, /*show_in_launcher=*/false, - InternalAppName::kKeyboardShortcutViewer, + apps::BuiltInAppName::kKeyboardShortcutViewer, IDS_LAUNCHER_SEARCHABLE_KEYBOARD_SHORTCUT_VIEWER}, {ash::kInternalAppIdContinueReading, IDS_INTERNAL_APP_CONTINUOUS_READING, IDR_PRODUCT_LOGO_256, /*recommendable=*/true, /*searchable=*/false, - /*show_in_launcher=*/false, InternalAppName::kContinueReading, + /*show_in_launcher=*/false, apps::BuiltInAppName::kContinueReading, /*searchable_string_resource_id=*/0}, {ash::kReleaseNotesAppId, IDS_RELEASE_NOTES_NOTIFICATION_TITLE, IDR_RELEASE_NOTES_APP_192, /*recommendable=*/true, /*searchable=*/false, - /*show_in_launcher=*/false, InternalAppName::kReleaseNotes, + /*show_in_launcher=*/false, apps::BuiltInAppName::kReleaseNotes, /*searchable_string_resource_id=*/0}}); static base::NoDestructor<std::vector<InternalApp>> internal_app_list; @@ -98,7 +99,7 @@ /*recommendable=*/true, /*searchable=*/true, /*show_in_launcher=*/true, - InternalAppName::kCamera, + apps::BuiltInAppName::kCamera, /*searchable_string_resource_id=*/0}); } @@ -111,7 +112,7 @@ IDR_DISCOVER_APP_192, /*recommendable=*/false, /*searchable=*/true, - /*show_in_launcher=*/true, InternalAppName::kDiscover, + /*show_in_launcher=*/true, apps::BuiltInAppName::kDiscover, /*searchable_string_resource_id=*/IDS_INTERNAL_APP_DISCOVER}); } @@ -124,7 +125,7 @@ IDR_SETTINGS_LOGO_192, /*recommendable=*/true, /*searchable=*/true, - /*show_in_launcher=*/true, InternalAppName::kSettings, + /*show_in_launcher=*/true, apps::BuiltInAppName::kSettings, /*searchable_string_resource_id=*/0}); } @@ -134,7 +135,7 @@ IDR_LOGO_PLUGIN_VM_DEFAULT_192, /*recommendable=*/true, /*searchable=*/true, - /*show_in_launcher=*/true, InternalAppName::kPluginVm, + /*show_in_launcher=*/true, apps::BuiltInAppName::kPluginVm, /*searchable_string_resource_id=*/0}); } return *internal_app_list; @@ -313,8 +314,7 @@ return has_recommendation; } -InternalAppName GetInternalAppNameByAppId( - const std::string& app_id) { +apps::BuiltInAppName GetInternalAppNameByAppId(const std::string& app_id) { const auto* app = FindInternalApp(app_id); DCHECK(app); return app->internal_app_name;
diff --git a/chrome/browser/ui/app_list/internal_app/internal_app_metadata.h b/chrome/browser/ui/app_list/internal_app/internal_app_metadata.h index ea2605ea..7f49f16b 100644 --- a/chrome/browser/ui/app_list/internal_app/internal_app_metadata.h +++ b/chrome/browser/ui/app_list/internal_app/internal_app_metadata.h
@@ -13,29 +13,16 @@ class Profile; class GURL; +namespace apps { +enum class BuiltInAppName; +} + namespace sync_sessions { class OpenTabsUIDelegate; } // namespace sync_sessions namespace app_list { -// The internal app's histogram name of the chrome search result. This is used -// for logging so do not change the order of this enum. -// It has been copied to chrome/browser/apps/app_service/app_service_metrics.cc, -// so please update in app_service_metrics.cc as well. -// TODO(crbug.com/1005640): delete this enum here, and use the enum in -// app_service_metrics.cc. -enum class InternalAppName { - kKeyboardShortcutViewer = 0, - kSettings = 1, - kContinueReading = 2, - kCamera = 3, - kDiscover = 4, - kPluginVm = 5, - kReleaseNotes = 6, - kMaxValue = kReleaseNotes, -}; - // Metadata about an internal app. // Internal apps are these Chrome OS special apps, e.g. Settings, or these apps // can run in Chrome OS directly, e.g. Keyboard Shortcut Viewer. @@ -56,7 +43,7 @@ // Can show in launcher apps grid. bool show_in_launcher; - InternalAppName internal_app_name; + apps::BuiltInAppName internal_app_name; // The string used for search query in addition to the name. int searchable_string_resource_id = 0; @@ -106,9 +93,8 @@ GURL* url, sync_sessions::OpenTabsUIDelegate* test_delegate); -// Returns the InternalAppName of an internal app. -InternalAppName GetInternalAppNameByAppId( - const std::string& app_id); +// Returns the BuiltInAppName of an internal app. +apps::BuiltInAppName GetInternalAppNameByAppId(const std::string& app_id); // Returns the number of internal apps which can show in launcher. // If |apps_name| is not nullptr, it will be the concatenated string of these
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc index 3f0d4fc6..a170f0d6 100644 --- a/chrome/browser/ui/apps/chrome_app_delegate.cc +++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -6,6 +6,7 @@ #include <memory> #include <utility> +#include <vector> #include "base/bind.h" #include "base/macros.h" @@ -69,10 +70,12 @@ content::WebContents* OpenURLFromTabInternal( content::BrowserContext* context, const content::OpenURLParams& params) { + NavigateParams new_tab_params(static_cast<Browser*>(nullptr), params.url, + params.transition); + new_tab_params.FillNavigateParamsFromOpenURLParams(params); + // Force all links to open in a new tab, even if they were trying to open a // window. - NavigateParams new_tab_params(static_cast<Browser*>(NULL), params.url, - params.transition); if (params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) { new_tab_params.disposition = WindowOpenDisposition::NEW_BACKGROUND_TAB; } else { @@ -143,6 +146,7 @@ private: std::vector<std::unique_ptr<content::WebContents>> owned_contents_; + DISALLOW_COPY_AND_ASSIGN(NewWindowContentsDelegate); };
diff --git a/chrome/browser/ui/ash/launcher/DEPS b/chrome/browser/ui/ash/launcher/DEPS index 4710e30..3922377 100644 --- a/chrome/browser/ui/ash/launcher/DEPS +++ b/chrome/browser/ui/ash/launcher/DEPS
@@ -14,4 +14,9 @@ "browser_shortcut_launcher_item_controller\.cc": [ "+ash/wm/desks/desks_util.h", ], + "chrome_launcher_controller_browsertest.cc": [ + "+ash/wm/desks/desk.h", + "+ash/wm/desks/desks_controller.h", + "+ash/wm/desks/desks_test_util.h", + ], }
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc index 9f4bad9..451debe 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_browsertest.cc
@@ -9,6 +9,7 @@ #include "ash/public/cpp/app_list/app_list_features.h" #include "ash/public/cpp/app_list/app_list_switches.h" #include "ash/public/cpp/app_menu_constants.h" +#include "ash/public/cpp/ash_features.h" #include "ash/public/cpp/shelf_item_delegate.h" #include "ash/public/cpp/shelf_model.h" #include "ash/public/cpp/tablet_mode.h" @@ -23,6 +24,9 @@ #include "ash/shelf/shelf_view_test_api.h" #include "ash/shelf/shelf_widget.h" #include "ash/shell.h" +#include "ash/wm/desks/desk.h" +#include "ash/wm/desks/desks_controller.h" +#include "ash/wm/desks/desks_test_util.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "base/macros.h" #include "base/run_loop.h" @@ -30,6 +34,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/test/bind_test_util.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/scoped_feature_list.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" @@ -351,12 +356,13 @@ } // Select an item and flush mojo calls to allow async callbacks to run. - void SelectItemAndFlushMojoCallsForAppService( + ash::ShelfAction SelectItemAndFlushMojoCallsForAppService( const ash::ShelfID& id, ui::EventType event_type = ui::ET_MOUSE_PRESSED, int64_t display_id = display::kInvalidDisplayId) { - SelectItem(id, event_type, display_id); + const ash::ShelfAction action = SelectItem(id, event_type, display_id); FlushMojoCallsForAppService(); + return action; } ChromeLauncherController* controller_ = nullptr; @@ -2058,3 +2064,56 @@ EXPECT_EQ(ash::HotseatState::kHidden, controller->shelf()->shelf_layout_manager()->hotseat_state()); } + +namespace { + +class ShelfAppBrowserTestWithDesks : public ShelfAppBrowserTest { + public: + ShelfAppBrowserTestWithDesks() = default; + ~ShelfAppBrowserTestWithDesks() override = default; + + // ShelfAppBrowserTest: + void SetUp() override { + scoped_feature_list_.InitAndEnableFeature(ash::features::kVirtualDesks); + ShelfAppBrowserTest::SetUp(); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; + + DISALLOW_COPY_AND_ASSIGN(ShelfAppBrowserTestWithDesks); +}; + +} // namespace + +IN_PROC_BROWSER_TEST_F(ShelfAppBrowserTestWithDesks, MultipleDesks) { + auto* desks_controller = ash::DesksController::Get(); + desks_controller->NewDesk(ash::DesksCreationRemovalSource::kButton); + + // Tests starts with an existing browser on desk_1. + EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); + + // Activate desk_2 and click on the browser's icon on the shelf while being on + // that desk. This should not switch back to desk_1, but rather create a new + // browser window. + ASSERT_EQ(2u, desks_controller->desks().size()); + auto* desk_2 = desks_controller->desks()[1].get(); + ash::ActivateDesk(desk_2); + + const int browser_index = GetIndexOfShelfItemType(ash::TYPE_BROWSER_SHORTCUT); + ash::ShelfID browser_id = shelf_model()->items()[browser_index].id; + + SelectItemAndFlushMojoCallsForAppService(browser_id); + EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); + EXPECT_FALSE(desks_controller->AreDesksBeingModified()); + EXPECT_TRUE(desk_2->is_active()); + + // The shelf context menu should show 2 items for both browsers. No new items + // should be created and existing window should not be minimized. + EXPECT_EQ(ash::ShelfAction::SHELF_ACTION_NONE, + SelectItemAndFlushMojoCallsForAppService(browser_id)); + EXPECT_EQ( + 2u, controller_ + ->GetAppMenuItemsForTesting(shelf_model()->items()[browser_index]) + .size()); +}
diff --git a/chrome/browser/ui/ash/launcher/internal_app_shelf_context_menu.cc b/chrome/browser/ui/ash/launcher/internal_app_shelf_context_menu.cc index 738913d..95f7f62 100644 --- a/chrome/browser/ui/ash/launcher/internal_app_shelf_context_menu.cc +++ b/chrome/browser/ui/ash/launcher/internal_app_shelf_context_menu.cc
@@ -9,6 +9,7 @@ #include "ash/public/cpp/app_menu_constants.h" #include "ash/public/cpp/shelf_item.h" +#include "chrome/browser/apps/app_service/app_service_metrics.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_manager.h" #include "chrome/browser/chromeos/plugin_vm/plugin_vm_util.h" #include "chrome/browser/ui/app_list/internal_app/internal_app_metadata.h" @@ -43,8 +44,7 @@ AddContextMenuOption(menu_model, ash::MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); - if (internal_app->internal_app_name == - app_list::InternalAppName::kPluginVm && + if (internal_app->internal_app_name == apps::BuiltInAppName::kPluginVm && plugin_vm::IsPluginVmRunning(controller()->profile())) { AddContextMenuOption(menu_model, ash::STOP_APP, IDS_PLUGIN_VM_SHUT_DOWN_MENU_ITEM); @@ -59,8 +59,7 @@ const auto* internal_app = app_list::FindInternalApp(item().id.app_id); DCHECK(internal_app); - DCHECK_EQ(internal_app->internal_app_name, - app_list::InternalAppName::kPluginVm); + DCHECK_EQ(internal_app->internal_app_name, apps::BuiltInAppName::kPluginVm); if (command_id == ash::STOP_APP) { plugin_vm::PluginVmManager::GetForProfile(controller()->profile()) ->StopPluginVm();
diff --git a/chrome/browser/ui/ash/launcher_drag_interactive_uitest.cc b/chrome/browser/ui/ash/launcher_drag_interactive_uitest.cc index 920961f..f852a75 100644 --- a/chrome/browser/ui/ash/launcher_drag_interactive_uitest.cc +++ b/chrome/browser/ui/ash/launcher_drag_interactive_uitest.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/test/base/perf/drag_event_generator.h" #include "chrome/test/base/perf/performance_test.h" +#include "chromeos/constants/chromeos_switches.h" #include "ui/base/test/ui_controls.h" #include "ui/display/display.h" #include "ui/display/screen.h" @@ -80,6 +81,16 @@ start_point, end_point, base::TimeDelta::FromMilliseconds(1000))); generator->Wait(); + const bool is_tablet_mode = GetParam(); + if (is_tablet_mode && chromeos::switches::ShouldShowShelfHotseat()) { + // The first swipe should show the hotseat, a second swipe is required to + // show the applist. + auto generator = ui_test_utils::DragEventGenerator::CreateForTouch( + std::make_unique<ui_test_utils::InterpolatedProducer>( + start_point, end_point, base::TimeDelta::FromMilliseconds(1000))); + generator->Wait(); + } + shell_test_api.WaitForLauncherAnimationState( ash::AppListViewState::kFullscreenAllApps); }
diff --git a/chrome/browser/ui/browser_finder.cc b/chrome/browser/ui/browser_finder.cc index d7c009c..7892106 100644 --- a/chrome/browser/ui/browser_finder.cc +++ b/chrome/browser/ui/browser_finder.cc
@@ -18,14 +18,6 @@ #include "ui/display/display.h" #include "ui/display/screen.h" -#if defined(OS_WIN) -#include <shobjidl.h> -#include <wrl/client.h> -#include "base/win/windows_version.h" -#include "ui/aura/window.h" -#include "ui/aura/window_tree_host.h" -#endif - #if defined(OS_CHROMEOS) #include "ash/public/cpp/multi_user_window_manager.h" #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" @@ -38,59 +30,17 @@ namespace { // Type used to indicate to match anything. -const int kMatchAny = 0; +const uint32_t kMatchAny = 0; // See BrowserMatches for details. -const int kMatchOriginalProfile = 1 << 0; -const int kMatchCanSupportWindowFeature = 1 << 1; -const int kMatchNormal = 1 << 2; -const int kMatchDisplayId = 1 << 3; -#if defined(OS_WIN) -const int kMatchCurrentWorkspace = 1 << 4; +const uint32_t kMatchOriginalProfile = 1 << 0; +const uint32_t kMatchCanSupportWindowFeature = 1 << 1; +const uint32_t kMatchNormal = 1 << 2; +const uint32_t kMatchDisplayId = 1 << 3; +#if defined(OS_WIN) || defined(OS_CHROMEOS) +const uint32_t kMatchCurrentWorkspace = 1 << 4; #endif -#if defined(OS_WIN) -// Returns true if the browser window is on another virtual desktop, false if -// we can't tell, or it's on the current virtual desktop. -// Must not be called while application is dispatching an input synchronous -// call like SendMessage, because IsWindowOnCurrentVirtualDesktop will return -// an error. -bool IsOnOtherVirtualDesktop(Browser* browser) { - if (base::win::GetVersion() < base::win::Version::WIN10) - return false; - - Microsoft::WRL::ComPtr<IVirtualDesktopManager> virtual_desktop_manager; - if (!SUCCEEDED(::CoCreateInstance(__uuidof(VirtualDesktopManager), nullptr, - CLSCTX_ALL, - IID_PPV_ARGS(&virtual_desktop_manager)))) { - return false; - } - BrowserWindow* window = browser->window(); - // In tests, |window| can be null. - if (!window) - return false; - - BOOL on_current_desktop; - aura::Window* native_win = window->GetNativeWindow(); - if (!native_win || - FAILED(virtual_desktop_manager->IsWindowOnCurrentVirtualDesktop( - native_win->GetHost()->GetAcceleratedWidget(), - &on_current_desktop)) || - on_current_desktop) { - return false; - } - - // IsWindowOnCurrentVirtualDesktop() is flaky for newly opened windows, - // which causes test flakiness. Occasionally, it incorrectly says a window - // is not on the current virtual desktop when it is. In this situation, - // it also returns GUID_NULL for the desktop id. - GUID workspace_guid; - return SUCCEEDED(virtual_desktop_manager->GetWindowDesktopId( - native_win->GetHost()->GetAcceleratedWidget(), &workspace_guid)) && - workspace_guid != GUID_NULL; -} -#endif // OS_WIN - // Returns true if the specified |browser| matches the specified arguments. // |match_types| is a bitmask dictating what parameters to match: // . If it contains kMatchOriginalProfile then the original profile of the @@ -148,9 +98,10 @@ if ((match_types & kMatchNormal) && !browser->is_type_normal()) return false; -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_CHROMEOS) + // Note that |browser->window()| might be nullptr in tests. if ((match_types & kMatchCurrentWorkspace) && - IsOnOtherVirtualDesktop(browser)) { + (!browser->window() || !browser->window()->IsOnCurrentWorkspace())) { return false; } #endif // OS_WIN @@ -197,7 +148,7 @@ match_types |= kMatchOriginalProfile; if (display_id != display::kInvalidDisplayId) match_types |= kMatchDisplayId; -#if defined(OS_WIN) +#if defined(OS_WIN) || defined(OS_CHROMEOS) if (match_current_workspace) match_types |= kMatchCurrentWorkspace; #endif
diff --git a/chrome/browser/ui/browser_finder_chromeos_browsertest.cc b/chrome/browser/ui/browser_finder_chromeos_browsertest.cc new file mode 100644 index 0000000..ebe48ee --- /dev/null +++ b/chrome/browser/ui/browser_finder_chromeos_browsertest.cc
@@ -0,0 +1,135 @@ +// 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/browser_finder.h" + +#include "ash/public/cpp/ash_features.h" +#include "ash/wm/desks/desk.h" +#include "ash/wm/desks/desks_controller.h" +#include "ash/wm/desks/desks_test_util.h" +#include "base/macros.h" +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_window.h" +#include "chrome/test/base/in_process_browser_test.h" + +namespace { + +class BrowserFinderWithDesksTest : public InProcessBrowserTest { + public: + BrowserFinderWithDesksTest() = default; + ~BrowserFinderWithDesksTest() override = default; + + // InProcessBrowserTest: + void SetUp() override { + scoped_feature_list_.InitAndEnableFeature(ash::features::kVirtualDesks); + InProcessBrowserTest::SetUp(); + } + + void SetUpOnMainThread() override { + InProcessBrowserTest::SetUpOnMainThread(); + // Create three desks (two other than the default). + auto* desks_controller = ash::DesksController::Get(); + desks_controller->NewDesk(ash::DesksCreationRemovalSource::kButton); + desks_controller->NewDesk(ash::DesksCreationRemovalSource::kButton); + } + + void ActivateBrowser(Browser* browser) { browser->window()->Activate(); } + + Browser* CreateTestBrowser() { + Browser* new_browser = CreateBrowser(browser()->profile()); + new_browser->window()->Show(); + ActivateBrowser(new_browser); + return new_browser; + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; + + DISALLOW_COPY_AND_ASSIGN(BrowserFinderWithDesksTest); +}; + +} // namespace + +IN_PROC_BROWSER_TEST_F(BrowserFinderWithDesksTest, FindAnyBrowser) { + auto* desks_controller = ash::DesksController::Get(); + ASSERT_EQ(3u, desks_controller->desks().size()); + auto* desk_1 = desks_controller->desks()[0].get(); + auto* desk_2 = desks_controller->desks()[1].get(); + auto* desk_3 = desks_controller->desks()[2].get(); + + Browser* browser_1 = CreateTestBrowser(); + CloseBrowserSynchronously(browser()); + SelectFirstBrowser(); + auto* window_1 = browser_1->window()->GetNativeWindow(); + EXPECT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); + EXPECT_TRUE(desk_1->is_active()); + EXPECT_TRUE(desks_controller->BelongsToActiveDesk(window_1)); + EXPECT_EQ(browser_1, chrome::FindAnyBrowser(browser()->profile(), true)); + + // Switch to desk_2 and create a browser there. + ash::ActivateDesk(desk_2); + EXPECT_TRUE(desk_2->is_active()); + Browser* browser_2 = CreateTestBrowser(); + auto* window_2 = browser_2->window()->GetNativeWindow(); + EXPECT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); + EXPECT_FALSE(desks_controller->BelongsToActiveDesk(window_1)); + EXPECT_TRUE(desks_controller->BelongsToActiveDesk(window_2)); + + // FindAnyBrowser should return the MRU browser, which is browser_2 in this + // case. + EXPECT_EQ(browser_2, chrome::FindAnyBrowser(browser()->profile(), true)); + + // Switch to desk_3, no browsers on this desk, however, FindAnyBrowser should + // still return browser_2. + ash::ActivateDesk(desk_3); + EXPECT_TRUE(desk_3->is_active()); + EXPECT_FALSE(desks_controller->BelongsToActiveDesk(window_1)); + EXPECT_FALSE(desks_controller->BelongsToActiveDesk(window_2)); + EXPECT_EQ(browser_2, chrome::FindAnyBrowser(browser()->profile(), true)); + + // Switch to desk_1 by activating browser_1. When we switch back to desk_3, + // FindAnyBrowser() will return browser_1 as the MRU browser. + ash::DeskSwitchAnimationWaiter waiter; + ActivateBrowser(browser_1); + waiter.Wait(); + + EXPECT_TRUE(desk_1->is_active()); + EXPECT_TRUE(desks_controller->BelongsToActiveDesk(window_1)); + EXPECT_EQ(browser_1, chrome::FindAnyBrowser(browser()->profile(), true)); + + ash::ActivateDesk(desk_3); + EXPECT_TRUE(desk_3->is_active()); + EXPECT_EQ(browser_1, chrome::FindAnyBrowser(browser()->profile(), true)); +} + +IN_PROC_BROWSER_TEST_F(BrowserFinderWithDesksTest, FindTabbedBrowser) { + auto* desks_controller = ash::DesksController::Get(); + ASSERT_EQ(3u, desks_controller->desks().size()); + auto* desk_1 = desks_controller->desks()[0].get(); + auto* desk_2 = desks_controller->desks()[1].get(); + auto* desk_3 = desks_controller->desks()[2].get(); + + Browser* browser_1 = CreateTestBrowser(); + CloseBrowserSynchronously(browser()); + SelectFirstBrowser(); + auto* window_1 = browser_1->window()->GetNativeWindow(); + EXPECT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); + EXPECT_TRUE(desk_1->is_active()); + EXPECT_TRUE(desks_controller->BelongsToActiveDesk(window_1)); + EXPECT_EQ(browser_1, chrome::FindTabbedBrowser(browser()->profile(), true)); + + // Switch to desk_2, expect that FindTabbedBrowser() favors the current desk. + ash::ActivateDesk(desk_2); + EXPECT_TRUE(desk_2->is_active()); + EXPECT_FALSE(chrome::FindTabbedBrowser(browser()->profile(), true)); + + // Create a browser on desk_2, and expect that FindTabbedBrowser() to find it. + Browser* browser_2 = CreateTestBrowser(); + EXPECT_EQ(browser_2, chrome::FindTabbedBrowser(browser()->profile(), true)); + + ash::ActivateDesk(desk_3); + EXPECT_TRUE(desk_3->is_active()); + EXPECT_FALSE(chrome::FindTabbedBrowser(browser()->profile(), true)); +}
diff --git a/chrome/browser/ui/browser_navigator_params.cc b/chrome/browser/ui/browser_navigator_params.cc index 78c84af..bec8f5d 100644 --- a/chrome/browser/ui/browser_navigator_params.cc +++ b/chrome/browser/ui/browser_navigator_params.cc
@@ -4,9 +4,13 @@ #include "chrome/browser/ui/browser_navigator_params.h" +#include <utility> + #include "build/build_config.h" +#include "chrome/browser/profiles/profile.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/page_navigator.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #if !defined(OS_ANDROID) @@ -50,6 +54,13 @@ this->referrer = params.referrer; this->reload_type = params.reload_type; this->source_site_instance = params.source_site_instance; + if (params.source_site_instance) { + this->initiating_profile = + static_cast<Profile*>(params.source_site_instance->GetBrowserContext()); + } + this->source_contents = content::WebContents::FromRenderFrameHost( + content::RenderFrameHost::FromID(params.source_render_process_id, + params.source_render_frame_id)); this->frame_tree_node_id = params.frame_tree_node_id; this->redirect_chain = params.redirect_chain; this->extra_headers = params.extra_headers; @@ -64,4 +75,26 @@ this->user_gesture = params.user_gesture; this->blob_url_loader_factory = params.blob_url_loader_factory; this->href_translate = params.href_translate; + + // Implementation notes: + // The following NavigateParams don't have an equivalent in OpenURLParams: + // browser + // contents_to_insert + // created_with_opener + // extension_app_id + // frame_name + // group + // input_start + // navigated_or_inserted_contents + // opener + // path_behavior + // switch_to_singleton_tab + // tabstrip_add_types + // tabstrip_index + // was_activated + // window_action + // window_bounds + // + // The following OpenURLParams don't have an equivalent in NavigateParams: + // triggering_event_info }
diff --git a/chrome/browser/ui/browser_navigator_params.h b/chrome/browser/ui/browser_navigator_params.h index 042bc79..dcb92ec 100644 --- a/chrome/browser/ui/browser_navigator_params.h +++ b/chrome/browser/ui/browser_navigator_params.h
@@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ #define CHROME_BROWSER_UI_BROWSER_NAVIGATOR_PARAMS_H_ +#include <memory> #include <string> #include <vector>
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index 45f90f8cc..11d4512 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h
@@ -127,6 +127,14 @@ ////////////////////////////////////////////////////////////////////////////// // Browser specific methods: + // Returns true if the browser window is on the current workspace (a.k.a. + // virtual desktop) or if we can't tell. False otherwise. + // + // On Windows, it must not be called while application is dispatching an input + // synchronous call like SendMessage, because IsWindowOnCurrentVirtualDesktop + // will return an error. + virtual bool IsOnCurrentWorkspace() const = 0; + // Sets the shown |ratio| of the browser's top controls (a.k.a. top-chrome) as // a result of gesture scrolling in |web_contents|. virtual void SetTopControlsShownRatio(content::WebContents* web_contents,
diff --git a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm index e9e0d77..38cb375 100644 --- a/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm +++ b/chrome/browser/ui/cocoa/chrome_command_dispatcher_delegate.mm
@@ -94,17 +94,24 @@ // By not passing the event to AppKit, we do lose out on the brief // highlighting of the NSMenu. CommandForKeyEventResult result = CommandForKeyEvent(event); - if (result.found()) { - auto* bridge = - remote_cocoa::NativeWidgetNSWindowBridge::GetFromNativeWindow(window); - if (bridge) { - bool was_executed = false; - bridge->host()->ExecuteCommand( - result.chrome_command, WindowOpenDisposition::CURRENT_TAB, - true /* is_before_first_responder */, &was_executed); - if (was_executed) - return ui::PerformKeyEquivalentResult::kHandled; - } + + if (!result.found()) + return ui::PerformKeyEquivalentResult::kUnhandled; + + // If the menu item will dispatch to a different window (real-world example: + // the dictionary definition popover), don't handle the event here. + if (result.action && [NSApp targetForAction:result.action] != window) + return ui::PerformKeyEquivalentResult::kUnhandled; + + auto* bridge = + remote_cocoa::NativeWidgetNSWindowBridge::GetFromNativeWindow(window); + if (bridge) { + bool was_executed = false; + bridge->host()->ExecuteCommand( + result.chrome_command, WindowOpenDisposition::CURRENT_TAB, + true /* is_before_first_responder */, &was_executed); + if (was_executed) + return ui::PerformKeyEquivalentResult::kHandled; } return ui::PerformKeyEquivalentResult::kUnhandled;
diff --git a/chrome/browser/ui/search/local_ntp_browsertest.cc b/chrome/browser/ui/search/local_ntp_browsertest.cc index c74c1bbe..ade8263 100644 --- a/chrome/browser/ui/search/local_ntp_browsertest.cc +++ b/chrome/browser/ui/search/local_ntp_browsertest.cc
@@ -48,6 +48,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/download_test_observer.h" +#include "content/public/test/navigation_handle_observer.h" #include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_navigation_throttle_inserter.h" #include "net/test/embedded_test_server/default_handlers.h" @@ -1166,21 +1167,27 @@ a.click(); )"; content::TestNavigationObserver nav_observer(ntp_tab); + content::NavigationHandleObserver handle_observer(ntp_tab, echo_all_url); ASSERT_TRUE(content::ExecuteScript( ntp_tab, content::JsReplace(kNavScriptTemplate, echo_all_url))); nav_observer.Wait(); ASSERT_TRUE(nav_observer.last_navigation_succeeded()); + ASSERT_FALSE(handle_observer.is_error()); ASSERT_FALSE(search::IsInstantNTP(ntp_tab)); - // Extract request headers reported via /echoall test page. + // Extract and verify request headers reported via /echoall test page. const char* kHeadersExtractionScript = "document.getElementsByTagName('pre')[1].innerText;"; std::string request_headers = content::EvalJs(ntp_tab, kHeadersExtractionScript).ExtractString(); - - // Verify request headers. EXPECT_THAT(request_headers, ::testing::HasSubstr("Sec-Fetch-Site: none")); EXPECT_THAT(request_headers, ::testing::HasSubstr("same-site-cookie=1")); + + // Verify other navigation properties. + EXPECT_FALSE(nav_observer.last_initiator_origin().has_value()); + EXPECT_FALSE(handle_observer.is_renderer_initiated()); + EXPECT_TRUE(ui::PageTransitionCoreTypeIs(ui::PAGE_TRANSITION_AUTO_BOOKMARK, + handle_observer.page_transition())); } // Verifies that Chrome won't spawn a separate renderer process for
diff --git a/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc b/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc index d3c6d6ea..2642779 100644 --- a/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc +++ b/chrome/browser/ui/views/drag_and_drop_interactive_uitest.cc
@@ -842,9 +842,9 @@ EXPECT_EQ(initial_history_count + 1, controller.GetEntryCount()); } -#if defined(OS_WIN) || defined(THREAD_SANITIZER) -// Flaky: https://crbug.com/988938 -// Race condition: crbug.com/1005095 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(THREAD_SANITIZER) +// Win/Linux Flaky: https://crbug.com/988938 +// TSAN Race condition: crbug.com/1005095 #define MAYBE_DropForbiddenUrlFromOutside DISABLED_DropForbiddenUrlFromOutside #else #define MAYBE_DropForbiddenUrlFromOutside DropForbiddenUrlFromOutside
diff --git a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc index 7b2b1e4..9af8cf9 100644 --- a/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc +++ b/chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.cc
@@ -22,6 +22,7 @@ #include "base/command_line.h" #include "base/metrics/user_metrics.h" #include "base/strings/utf_string_conversions.h" +#include "build/build_config.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/profiles/profiles_state.h" @@ -31,6 +32,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_command_controller.h" #include "chrome/browser/ui/layout_constants.h" +#include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/views/frame/browser_frame.h" #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" @@ -649,6 +651,15 @@ } bool BrowserNonClientFrameViewAsh::ShouldPaint() const { +#if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) + // Normal windows that have a WebUI-based tab strip do not need a browser + // frame as no tab strip is drawn on top of the browser frame. + if (base::FeatureList::IsEnabled(features::kWebUITabStrip) && + browser_view()->IsBrowserTypeNormal()) { + return false; + } +#endif // BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) + // We need to paint when the top-of-window views are revealed in immersive // fullscreen. ImmersiveModeController* immersive_mode_controller =
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index 22134474..353a85f 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -177,6 +177,8 @@ #if defined(OS_CHROMEOS) #include "ash/public/cpp/accelerators.h" +#include "ash/public/cpp/ash_features.h" +#include "ash/public/cpp/desks_helper.h" #include "chrome/browser/ui/ash/window_properties.h" #include "chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos.h" #include "chrome/grit/chrome_unscaled_resources.h" @@ -197,6 +199,8 @@ #endif #if defined(OS_WIN) +#include <shobjidl.h> +#include <wrl/client.h> #include "base/win/windows_version.h" #include "chrome/browser/taskbar/taskbar_decorator_win.h" #include "chrome/browser/win/jumplist.h" @@ -651,6 +655,50 @@ return GetWidget() ? GetWidget()->GetNativeWindow() : nullptr; } +bool BrowserView::IsOnCurrentWorkspace() const { + // In tests, the native window can be nullptr. + gfx::NativeWindow native_win = GetNativeWindow(); + if (!native_win) + return true; + +#if defined(OS_CHROMEOS) + if (!ash::features::IsVirtualDesksEnabled()) + return true; + + return ash::DesksHelper::Get()->BelongsToActiveDesk(native_win); +#elif defined(OS_WIN) + if (base::win::GetVersion() < base::win::Version::WIN10) + return true; + + Microsoft::WRL::ComPtr<IVirtualDesktopManager> virtual_desktop_manager; + if (!SUCCEEDED(::CoCreateInstance(__uuidof(VirtualDesktopManager), nullptr, + CLSCTX_ALL, + IID_PPV_ARGS(&virtual_desktop_manager)))) { + return true; + } + + BOOL on_current_desktop; + if (!native_win || + FAILED(virtual_desktop_manager->IsWindowOnCurrentVirtualDesktop( + native_win->GetHost()->GetAcceleratedWidget(), + &on_current_desktop)) || + on_current_desktop) { + return true; + } + + // IsWindowOnCurrentVirtualDesktop() is flaky for newly opened windows, + // which causes test flakiness. Occasionally, it incorrectly says a window + // is not on the current virtual desktop when it is. In this situation, + // it also returns GUID_NULL for the desktop id. + GUID workspace_guid; + return SUCCEEDED(virtual_desktop_manager->GetWindowDesktopId( + native_win->GetHost()->GetAcceleratedWidget(), &workspace_guid)) && + workspace_guid != GUID_NULL; +#else + return true; +#endif // defined(OS_CHROMEOS) +} + void BrowserView::SetTopControlsShownRatio(content::WebContents* web_contents, float ratio) { if (top_controls_slide_controller_)
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index be4510d..4805f90c 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -287,6 +287,7 @@ ui::ZOrderLevel GetZOrderLevel() const override; void SetZOrderLevel(ui::ZOrderLevel order) override; gfx::NativeWindow GetNativeWindow() const override; + bool IsOnCurrentWorkspace() const override; void SetTopControlsShownRatio(content::WebContents* web_contents, float ratio) override; bool DoBrowserControlsShrinkRendererSize(
diff --git a/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc b/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc index 12a77c8..4d7da7b2 100644 --- a/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc +++ b/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc
@@ -259,11 +259,6 @@ } // InProcessBrowserTest: - void SetUp() override { - scoped_feature_list_.InitAndEnableFeature(features::kWebUITabStrip); - InProcessBrowserTest::SetUp(); - } - void SetUpDefaultCommandLine(base::CommandLine* command_line) override { InProcessBrowserTest::SetUpDefaultCommandLine(command_line); @@ -452,8 +447,6 @@ return std::move(controller); } - base::test::ScopedFeatureList scoped_feature_list_; - TestController* test_controller_ = nullptr; // Not owned. DISALLOW_COPY_AND_ASSIGN(TopControlsSlideControllerTest); @@ -1209,4 +1202,6 @@ TopChromeShownState::kFullyHidden); } +// TODO(crbug.com/989131): Add test coverage that covers using WebUITabStrip. + } // namespace
diff --git a/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc b/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc index 1758dc1c..9f61c3d 100644 --- a/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc +++ b/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc
@@ -589,4 +589,32 @@ // kylepay should be installed just-in-time and used for testing. ExpectBodyContains({"kylepay.com/webpay"}); } + +IN_PROC_BROWSER_TEST_F(PaymentRequestPaymentAppTest, + ReadSupportedDelegationsFromAppManifest) { + SetDownloaderAndIgnorePortInOriginComparisonForTesting(); + + // Trigger a request that specifies kylepay.com and asks for shipping address + // as well as payer's contact information. kylepay.com hosts an installable + // payment app which handles both shipping address and payer's contact + // information. + NavigateTo("/payment_request_bobpay_and_cards_test.html"); + ResetEventWaiterForDialogOpened(); + ASSERT_TRUE(content::ExecuteScript( + GetActiveWebContents(), + "testPaymentMethods([{supportedMethods: 'https://kylepay.com/webpay'}], " + "true /*= requestShippingContact */);")); + WaitForObservedEvent(); + + // Pay button should be enabled without any autofill profiles since the + // selected payment instrument (kylepay) handles all merchant required + // information. + EXPECT_TRUE(IsPayButtonEnabled()); + + ResetEventWaiterForSequence({DialogEvent::DIALOG_CLOSED}); + ClickOnDialogViewAndWait(DialogViewID::PAY_BUTTON, dialog_view()); + + // kylepay should be installed just-in-time and used for testing. + ExpectBodyContains({"kylepay.com/webpay"}); +} } // namespace payments
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc index 5b2a655..5b30808 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.cc
@@ -314,13 +314,6 @@ /* adjust_height_for_width */ true)); AddChildView(title_label_); - alert_state_label_ = new views::Label( - base::string16(), CONTEXT_BODY_TEXT_LARGE, views::style::STYLE_SECONDARY); - alert_state_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); - alert_state_label_->SetMultiLine(true); - alert_state_label_->SetVisible(false); - AddChildView(alert_state_label_); - domain_label_ = new views::Label( base::string16(), CONTEXT_BODY_TEXT_LARGE, views::style::STYLE_SECONDARY, gfx::DirectionalityMode::DIRECTIONALITY_AS_URL); @@ -347,7 +340,7 @@ layout->SetCrossAxisAlignment(views::LayoutAlignment::kStretch); layout->SetCollapseMargins(true); - constexpr int kVerticalMargin = 12; + constexpr int kVerticalMargin = 10; constexpr int kHorizontalMargin = 18; constexpr int kLineSpacing = 0; title_label_->SetProperty(views::kMarginsKey, @@ -357,9 +350,6 @@ views::FlexSpecification::ForSizeRule( views::MinimumFlexSizeRule::kScaleToMinimum, views::MaximumFlexSizeRule::kPreferred)); - alert_state_label_->SetProperty(views::kMarginsKey, - gfx::Insets(kLineSpacing, kHorizontalMargin, - kLineSpacing, kHorizontalMargin)); domain_label_->SetProperty(views::kMarginsKey, gfx::Insets(kLineSpacing, kHorizontalMargin, kVerticalMargin, kHorizontalMargin)); @@ -372,6 +362,10 @@ fade_animation_delegate_ = std::make_unique<WidgetFadeAnimationDelegate>(widget_); + constexpr int kFootnoteVerticalMargin = 8; + GetBubbleFrameView()->set_footnote_margins( + gfx::Insets(kFootnoteVerticalMargin, kHorizontalMargin, + kFootnoteVerticalMargin, kHorizontalMargin)); GetBubbleFrameView()->set_preferred_arrow_adjustment( views::BubbleFrameView::PreferredArrowAdjustment::kOffset); GetBubbleFrameView()->set_hit_test_transparent(true); @@ -518,6 +512,19 @@ return ui::DIALOG_BUTTON_NONE; } +std::unique_ptr<views::View> TabHoverCardBubbleView::CreateFootnoteView() { + if (alert_state_ == TabAlertState::NONE) + return nullptr; + + auto alert_state_label = std::make_unique<views::Label>( + base::string16(), CONTEXT_BODY_TEXT_LARGE, views::style::STYLE_PRIMARY); + alert_state_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); + alert_state_label->SetMultiLine(true); + alert_state_label->SetVisible(true); + alert_state_label->SetText(chrome::GetTabAlertStateText(alert_state_)); + return alert_state_label; +} + base::TimeDelta TabHoverCardBubbleView::GetDelay(int tab_width) const { // Delay is calculated as a logarithmic scale and bounded by a minimum width // based on the width of a pinned tab and a maximum of the standard width. @@ -557,7 +564,7 @@ void TabHoverCardBubbleView::UpdateCardContent(const Tab* tab) { base::string16 title; - TabAlertState alert_state; + TabAlertState old_alert_state = alert_state_; GURL domain_url; // Use committed URL to determine if no page has yet loaded, since the title // can be blank for some web pages. @@ -566,11 +573,11 @@ title = tab->data().IsCrashed() ? l10n_util::GetStringUTF16(IDS_HOVER_CARD_CRASHED_TITLE) : l10n_util::GetStringUTF16(IDS_TAB_LOADING_TITLE); - alert_state = TabAlertState::NONE; + alert_state_ = TabAlertState::NONE; } else { domain_url = tab->data().last_committed_url; title = tab->data().title; - alert_state = tab->data().alert_state; + alert_state_ = tab->data().alert_state; } base::string16 domain; if (domain_url.SchemeIsFile()) { @@ -589,14 +596,10 @@ net::UnescapeRule::NORMAL, nullptr, nullptr, nullptr); } title_label_->SetText(title); - // If there is no alert state do not show the label. - if (alert_state == TabAlertState::NONE) { - alert_state_label_->SetText(base::string16()); - alert_state_label_->SetVisible(false); - } else { - alert_state_label_->SetText(chrome::GetTabAlertStateText(alert_state)); - alert_state_label_->SetVisible(true); - } + + if (alert_state_ != old_alert_state) + GetBubbleFrameView()->SetFootnoteView(CreateFootnoteView()); + domain_label_->SetText(domain); // If the preview image feature is not enabled, |preview_image_| will be null.
diff --git a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h index f8e81dd..e12e59e 100644 --- a/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h +++ b/chrome/browser/ui/views/tabs/tab_hover_card_bubble_view.h
@@ -57,6 +57,7 @@ void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; ax::mojom::Role GetAccessibleWindowRole() override; int GetDialogButtons() const override; + std::unique_ptr<views::View> CreateFootnoteView() override; void set_last_mouse_exit_timestamp( base::TimeTicks last_mouse_exit_timestamp) { @@ -109,7 +110,7 @@ views::Widget* widget_ = nullptr; views::Label* title_label_ = nullptr; - views::Label* alert_state_label_ = nullptr; + TabAlertState alert_state_ = TabAlertState::NONE; views::Label* domain_label_ = nullptr; views::ImageView* preview_image_ = nullptr;
diff --git a/chrome/browser/ui/views/webview_accessibility_browsertest.cc b/chrome/browser/ui/views/webview_accessibility_browsertest.cc index 02d5b03..5c85f70 100644 --- a/chrome/browser/ui/views/webview_accessibility_browsertest.cc +++ b/chrome/browser/ui/views/webview_accessibility_browsertest.cc
@@ -74,7 +74,8 @@ DISALLOW_COPY_AND_ASSIGN(WebViewBrowserTest); }; -IN_PROC_BROWSER_TEST_F(WebViewBrowserTest, ResizeWebView) { +// Flaky. https://crbug.com/1013805 +IN_PROC_BROWSER_TEST_F(WebViewBrowserTest, DISABLED_ResizeWebView) { ui_test_utils::NavigateToURL( browser(), https_server_.GetURL("/fixed_size_document.html"));
diff --git a/chrome/browser/ui/webui/chrome_web_contents_handler.cc b/chrome/browser/ui/webui/chrome_web_contents_handler.cc index 1b97ae6..73aa8494 100644 --- a/chrome/browser/ui/webui/chrome_web_contents_handler.cc +++ b/chrome/browser/ui/webui/chrome_web_contents_handler.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" +#include <utility> + #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -46,7 +48,7 @@ new Browser(Browser::CreateParams(Browser::TYPE_NORMAL, profile, true)); } NavigateParams nav_params(browser, params.url, params.transition); - nav_params.referrer = params.referrer; + nav_params.FillNavigateParamsFromOpenURLParams(params); if (source && source->IsCrashed() && params.disposition == WindowOpenDisposition::CURRENT_TAB && ui::PageTransitionCoreTypeIs(params.transition, @@ -56,7 +58,6 @@ nav_params.disposition = params.disposition; } nav_params.window_action = NavigateParams::SHOW_WINDOW; - nav_params.user_gesture = true; Navigate(&nav_params); // Close the browser if chrome::Navigate created a new one.
diff --git a/chrome/browser/ui/webui/extensions/extensions_internals_source.cc b/chrome/browser/ui/webui/extensions/extensions_internals_source.cc index 312e18e..835595a5 100644 --- a/chrome/browser/ui/webui/extensions/extensions_internals_source.cc +++ b/chrome/browser/ui/webui/extensions/extensions_internals_source.cc
@@ -116,6 +116,8 @@ flags_value.Append("WAS_INSTALLED_BY_OEM"); if (creation_flags & extensions::Extension::MAY_BE_UNTRUSTED) flags_value.Append("MAY_BE_UNTRUSTED"); + if (creation_flags & extensions::Extension::WITHHOLD_PERMISSIONS) + flags_value.Append("WITHHOLD_PERMISSIONS"); return flags_value; }
diff --git a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc index 96511f3..a3c21e1 100644 --- a/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
@@ -1707,8 +1707,9 @@ base::size(kLocalizedStrings)); } -bool isUserFIDOVerifiable(autofill::PersonalDataManager* personal_data, - content::WebContents* web_contents) { +bool IsFidoAuthenticationAvailable(autofill::PersonalDataManager* personal_data, + content::WebContents* web_contents) { + // Don't show toggle switch if user is unable to downstream cards. if (personal_data->GetSyncSigninState() != autofill::AutofillSyncSigninState:: kSignedInAndWalletSyncTransportEnabled && @@ -1717,6 +1718,7 @@ return false; } + // If |autofill_manager| is not available, then don't show toggle switch. autofill::ContentAutofillDriverFactory* autofill_driver_factory = autofill::ContentAutofillDriverFactory::FromWebContents(web_contents); if (!autofill_driver_factory) @@ -1730,9 +1732,11 @@ if (!autofill_manager) return false; - return autofill_manager->credit_card_access_manager() - ->GetOrCreateFIDOAuthenticator() - ->IsUserVerifiable(); + // Show the toggle switch only if the flag is enabled. Once returned, this + // decision may be overridden (from true to false) by the caller in the + // payments section if no platform authenticator is found. + return base::FeatureList::IsEnabled( + autofill::features::kAutofillCreditCardAuthentication); } void AddAutofillStrings(content::WebUIDataSource* html_source, @@ -1869,8 +1873,9 @@ ProfileSyncServiceFactory::GetForProfile(profile), /*is_test_mode=*/false, /*log_manager=*/nullptr)); - html_source->AddBoolean("userIsFIDOVerifiable", - isUserFIDOVerifiable(personal_data, web_contents)); + html_source->AddBoolean( + "fidoAuthenticationAvailableForAutofill", + IsFidoAuthenticationAvailable(personal_data, web_contents)); html_source->AddBoolean( "passwordsLeakDetectionEnabled",
diff --git a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc index 51865b80..e1d6785 100644 --- a/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc +++ b/chrome/browser/ui/webui/tab_strip/tab_strip_ui.cc
@@ -14,6 +14,7 @@ #include "base/strings/string_piece.h" #include "base/values.h" #include "chrome/browser/extensions/extension_tab_util.h" +#include "chrome/browser/favicon/favicon_utils.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/themes/theme_service.h" @@ -223,12 +224,18 @@ tab_data.SetString("favIconUrl", EncodePNGAndMakeDataURI( tab_renderer_data.favicon, web_ui()->GetDeviceScaleFactor())); + tab_data.SetBoolean("isDefaultFavicon", + tab_renderer_data.favicon.BackedBySameObjectAs( + favicon::GetDefaultFavicon().AsImageSkia())); + } else { + tab_data.SetBoolean("isDefaultFavicon", true); } - + tab_data.SetBoolean("showIcon", tab_renderer_data.show_icon); tab_data.SetInteger("networkState", static_cast<int>(tab_renderer_data.network_state)); tab_data.SetBoolean("shouldHideThrobber", tab_renderer_data.should_hide_throbber); + tab_data.SetBoolean("crashed", tab_renderer_data.IsCrashed()); // TODO(johntlee): Add the rest of TabRendererData return tab_data;
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index f196895..c9e7d37 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -494,6 +494,10 @@ // Chrome's system-level media permissions. const base::Feature kMacSystemMediaPermissionsInfoUi{ "MacSystemMediaPermissionsInfoUI", base::FEATURE_DISABLED_BY_DEFAULT}; + +// Enable screen capture system permission check on Mac 10.15+. +const base::Feature kMacSystemScreenCapturePermissionCheck{ + "MacSystemScreenCapturePermissionCheck", base::FEATURE_ENABLED_BY_DEFAULT}; #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -642,11 +646,19 @@ // Controls a mode for dynamically process-isolating sites where the user has // entered a password. This is intended to be used primarily when full site // isolation is turned off. To check whether this mode is enabled, use -// ChromeSiteIsolationPolicy::IsIsolationForPasswordSitesEnabled() rather than +// SiteIsolationPolicy::IsIsolationForPasswordSitesEnabled() rather than // checking the feature directly, since that decision is influenced by other // factors as well. const base::Feature kSiteIsolationForPasswordSites{ - "site-isolation-for-password-sites", base::FEATURE_DISABLED_BY_DEFAULT}; + "site-isolation-for-password-sites", +// Enabled by default on Android; see https://crbug.com/849815. Note that this +// should not affect Android Webview, which does not include this code. +#if defined(OS_ANDROID) + base::FEATURE_ENABLED_BY_DEFAULT +#else + base::FEATURE_DISABLED_BY_DEFAULT +#endif +}; // kSitePerProcessOnlyForHighMemoryClients is checked before kSitePerProcess, // and (if enabled) can restrict if kSitePerProcess feature is checked at all -
diff --git a/chrome/common/chrome_features.h b/chrome/common/chrome_features.h index 3e7105a..329cb9d 100644 --- a/chrome/common/chrome_features.h +++ b/chrome/common/chrome_features.h
@@ -312,6 +312,9 @@ #if defined(OS_MACOSX) COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kMacSystemMediaPermissionsInfoUi; + +COMPONENT_EXPORT(CHROME_FEATURES) +extern const base::Feature kMacSystemScreenCapturePermissionCheck; #endif #if BUILDFLAG(ENABLE_EXTENSIONS)
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index 8f02ff4..610b1d16 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1247,38 +1247,6 @@ #endif } -bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) { - DCHECK(!frame->Parent()); - -#if !defined(OS_ANDROID) - // If this is the Instant process, fork all navigations originating from the - // renderer. The destination page will then be bucketed back to this Instant - // process if it is an Instant url, or to another process if not. Conversely, - // fork if this is a non-Instant process navigating to an Instant url, so that - // such navigations can also be bucketed into an Instant renderer. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kInstantProcess) || - SearchBouncer::GetInstance()->ShouldFork(url)) { - return true; - } -#endif - - // If |url| matches one of the prerendered URLs, stop this navigation and try - // to swap in the prerendered page on the browser process. If the prerendered - // page no longer exists by the time the OpenURL IPC is handled, a normal - // navigation is attempted. - if (prerender_dispatcher_.get() && - prerender_dispatcher_->IsPrerenderURL(url)) { - return true; - } - - return false; -} - void ChromeContentRendererClient::WillSendRequest( WebLocalFrame* frame, ui::PageTransition transition_type,
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h index d306846..63be9235 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -137,11 +137,6 @@ base::SingleThreadTaskRunner* compositor_thread_task_runner) override; bool RunIdleHandlerWhenWidgetsHidden() override; bool AllowPopup() override; - bool ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) override; void WillSendRequest(blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url,
diff --git a/chrome/renderer/chrome_content_renderer_client_browsertest.cc b/chrome/renderer/chrome_content_renderer_client_browsertest.cc index 44a3629..976eab2 100644 --- a/chrome/renderer/chrome_content_renderer_client_browsertest.cc +++ b/chrome/renderer/chrome_content_renderer_client_browsertest.cc
@@ -41,43 +41,10 @@ #include "third_party/blink/public/web/web_plugin_params.h" #include "url/gurl.h" -using InstantProcessNavigationTest = ChromeRenderViewTest; using ChromeContentRendererClientSearchBoxTest = ChromeRenderViewTest; const char kHtmlWithIframe[] ="<iframe srcdoc=\"Nothing here\"></iframe>"; -// Tests that renderer-initiated navigations from an Instant render process get -// bounced back to the browser to be rebucketed into a non-Instant renderer if -// necessary. -TEST_F(InstantProcessNavigationTest, ForkForNavigationsFromInstantProcess) { - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kInstantProcess); - ChromeContentRendererClient* client = - static_cast<ChromeContentRendererClient*>(content_renderer_client_.get()); - EXPECT_TRUE(client->ShouldFork(GetMainFrame(), GURL("http://foo"), "GET", - false, false)); -} - -// Tests that renderer-initiated navigations from a non-Instant render process -// to potentially Instant URLs get bounced back to the browser to be rebucketed -// into an Instant renderer if necessary. -TEST_F(InstantProcessNavigationTest, ForkForNavigationsToNewTabURLs) { - ChromeContentRendererClient* client = - static_cast<ChromeContentRendererClient*>(content_renderer_client_.get()); - chrome_render_thread_->set_io_task_runner( - base::ThreadTaskRunnerHandle::Get()); - client->RenderThreadStarted(); - SearchBouncer::GetInstance()->SetNewTabPageURL( - GURL("http://example.com/newtab")); - EXPECT_TRUE(client->ShouldFork( - GetMainFrame(), GURL("http://example.com/newtab"), "GET", false, false)); - EXPECT_FALSE(client->ShouldFork(GetMainFrame(), - GURL("http://example.com/search?q=foo"), - "GET", false, false)); - EXPECT_FALSE(client->ShouldFork(GetMainFrame(), GURL("http://example.com/"), - "GET", false, false)); -} - TEST_F(ChromeContentRendererClientSearchBoxTest, RewriteThumbnailURL) { // Instantiate a SearchBox for the main render frame. content::RenderFrame* render_frame =
diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc index ead2954..4cc3378 100644 --- a/chrome/renderer/extensions/resource_request_policy.cc +++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -61,6 +61,17 @@ CHECK(resource_url.SchemeIs(kExtensionScheme)); GURL frame_url = frame->GetDocument().Url(); + url::Origin frame_origin = frame->GetDocument().GetSecurityOrigin(); + + // Navigations from chrome://, devtools:// or chrome-search:// pages need to + // be allowed, even if the target |url| is not web-accessible. See also: + // - https://crbug.com/662602 + // - similar scheme checks in ExtensionNavigationThrottle + if (frame_origin.scheme() == content::kChromeUIScheme || + frame_origin.scheme() == content::kChromeDevToolsScheme || + frame_origin.scheme() == chrome::kChromeSearchScheme) { + return true; + } // The page_origin may be GURL("null") for unique origins like data URLs, // but this is ok for the checks below. We only care if it matches the
diff --git a/chrome/renderer/searchbox/search_bouncer.cc b/chrome/renderer/searchbox/search_bouncer.cc index 314bb5f..126a99f8 100644 --- a/chrome/renderer/searchbox/search_bouncer.cc +++ b/chrome/renderer/searchbox/search_bouncer.cc
@@ -40,10 +40,6 @@ &SearchBouncer::BindSearchBouncerReceiver, base::Unretained(this))); } -bool SearchBouncer::ShouldFork(const GURL& url) const { - return IsNewTabPage(url); -} - bool SearchBouncer::IsNewTabPage(const GURL& url) const { GURL url_no_query_or_ref = RemoveQueryAndRef(url); return url_no_query_or_ref.is_valid() &&
diff --git a/chrome/renderer/searchbox/search_bouncer.h b/chrome/renderer/searchbox/search_bouncer.h index 99daabe..929a85f 100644 --- a/chrome/renderer/searchbox/search_bouncer.h +++ b/chrome/renderer/searchbox/search_bouncer.h
@@ -27,10 +27,6 @@ void RegisterMojoInterfaces( blink::AssociatedInterfaceRegistry* associated_interfaces) override; - // Returns whether a navigation to |url| should bounce back to the browser as - // a potential Instant url. See search::ShouldAssignURLToInstantRenderer(). - bool ShouldFork(const GURL& url) const; - // Returns whether |url| is a valid Instant new tab page URL. bool IsNewTabPage(const GURL& url) const;
diff --git a/chrome/renderer/searchbox/search_bouncer_unittest.cc b/chrome/renderer/searchbox/search_bouncer_unittest.cc index 8f7f1df..0d18a93 100644 --- a/chrome/renderer/searchbox/search_bouncer_unittest.cc +++ b/chrome/renderer/searchbox/search_bouncer_unittest.cc
@@ -19,18 +19,6 @@ SearchBouncer bouncer_; }; -TEST_F(SearchBouncerTest, ShouldFork) { - EXPECT_FALSE(bouncer_.ShouldFork(GURL())); - EXPECT_FALSE(bouncer_.ShouldFork(GURL("http://notsearch.example.com"))); - EXPECT_FALSE(bouncer_.ShouldFork(GURL("http://example.com/search?q=foo"))); - EXPECT_FALSE(bouncer_.ShouldFork(GURL("http://example.com/search2#q=foo"))); - EXPECT_TRUE(bouncer_.ShouldFork(GURL("http://example.com/newtab"))); - EXPECT_TRUE(bouncer_.ShouldFork(GURL("http://example.com/newtab?q=foo"))); - EXPECT_TRUE(bouncer_.ShouldFork(GURL("http://example.com/newtab#q=foo"))); - EXPECT_TRUE( - bouncer_.ShouldFork(GURL("http://example.com/newtab#q=foo?q=foo"))); -} - TEST_F(SearchBouncerTest, IsNewTabPage) { EXPECT_FALSE(bouncer_.IsNewTabPage(GURL("http://example.com/foo"))); EXPECT_TRUE(bouncer_.IsNewTabPage(GURL("http://example.com/newtab")));
diff --git a/chrome/services/cups_proxy/public/cpp/cups_util.cc b/chrome/services/cups_proxy/public/cpp/cups_util.cc index 17242a3..258259b 100644 --- a/chrome/services/cups_proxy/public/cpp/cups_util.cc +++ b/chrome/services/cups_proxy/public/cpp/cups_util.cc
@@ -81,8 +81,12 @@ ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-uri-supported", nullptr, printer_uri.c_str()); - // Setting the display name. + // Setting the printer uuid. ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", + nullptr, printer.id().c_str()); + + // Setting the display name. + ippAddString(ret.ipp.get(), IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", nullptr, printer.display_name().c_str()); // Optional setting of the make_and_model, if known.
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 0c5dcbf1..ef5ce97 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2303,6 +2303,7 @@ "../browser/ui/ash/tab_scrubber_browsertest.cc", "../browser/ui/ash/tablet_mode_page_behavior_browsertest.cc", "../browser/ui/ash/volume_controller_browsertest.cc", + "../browser/ui/browser_finder_chromeos_browsertest.cc", "../browser/ui/views/apps/chrome_native_app_window_views_aura_ash_browsertest.cc", "../browser/ui/views/arc_app_dialog_view_browsertest.cc", "../browser/ui/views/crostini/crostini_ansible_software_config_view_browsertest.cc", @@ -3516,6 +3517,7 @@ "//skia", "//testing/gmock", "//testing/gtest", + "//testing/perf:unit_tests", "//third_party/cacheinvalidation", "//third_party/icu", "//third_party/leveldatabase",
diff --git a/chrome/test/base/perf/performance_test.cc b/chrome/test/base/perf/performance_test.cc index fa4635c..8c999c95 100644 --- a/chrome/test/base/perf/performance_test.cc +++ b/chrome/test/base/perf/performance_test.cc
@@ -12,6 +12,7 @@ #include "chrome/test/base/test_switches.h" #include "content/public/browser/tracing_controller.h" #include "services/tracing/public/cpp/trace_event_agent.h" +#include "testing/perf/luci_test_result.h" #include "ui/compositor/compositor_switches.h" #include "ui/gl/gl_switches.h" @@ -25,10 +26,10 @@ #include "ui/gfx/image/image_skia.h" #endif // OS_CHROMEOS -static const char kTraceDir[] = "trace-dir"; - namespace { +constexpr char kTraceDir[] = "trace-dir"; + #if defined(OS_CHROMEOS) // Watches if the wallpaper has been changed and runs a passed callback if so. class TestWallpaperObserver : public ash::WallpaperControllerObserver { @@ -73,6 +74,18 @@ } #endif // OS_CHROMEOS +perf_test::LuciTestResult CreateTestResult( + const base::FilePath& trace_file, + const std::vector<std::string>& tbm_metrics) { + perf_test::LuciTestResult result = + perf_test::LuciTestResult::CreateForGTest(); + result.AddOutputArtifactFile("trace/1", trace_file, "application/json"); + for (auto& metric : tbm_metrics) + result.AddTag("tbmv2", metric); + + return result; +} + } // namespace //////////////////////////////////////////////////////////////////////////////// @@ -100,6 +113,10 @@ return std::string(); } +std::vector<std::string> PerformanceTest::GetTimelineBasedMetrics() const { + return {}; +} + void PerformanceTest::SetUpOnMainThread() { setup_called_ = true; InProcessBrowserTest::SetUpOnMainThread(); @@ -119,14 +136,15 @@ } void PerformanceTest::TearDownOnMainThread() { + auto* command_line = base::CommandLine::ForCurrentProcess(); + if (should_start_trace_) { auto* controller = content::TracingController::GetInstance(); ASSERT_TRUE(controller->IsTracing()) << "Did you forget to call PerformanceTest::SetUpOnMainThread?"; base::RunLoop runloop; - base::FilePath dir = - base::CommandLine::ForCurrentProcess()->GetSwitchValuePath(kTraceDir); + base::FilePath dir = command_line->GetSwitchValuePath(kTraceDir); base::FilePath trace_file; CHECK(base::CreateTemporaryFileInDir(dir, &trace_file)); LOG(INFO) << "Created the trace file: " << trace_file; @@ -136,9 +154,13 @@ bool result = controller->StopTracing(trace_data_endpoint); runloop.Run(); CHECK(result); + + base::FilePath report_file = + trace_file.AddExtension(FILE_PATH_LITERAL("test_result.json")); + CreateTestResult(trace_file, GetTimelineBasedMetrics()) + .WriteToFile(report_file); } - bool print = base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kPerfTestPrintUmaMeans); + bool print = command_line->HasSwitch(switches::kPerfTestPrintUmaMeans); LOG_IF(INFO, print) << "=== Histogram Means ==="; for (auto name : GetUMAHistogramNames()) { EXPECT_TRUE(HasHistogram(name)) << "missing histogram:" << name; @@ -177,3 +199,7 @@ const std::string UIPerformanceTest::GetTracingCategories() const { return "benchmark,cc,viz,input,latency,gpu,rail,toplevel,ui,views,viz"; } + +std::vector<std::string> UIPerformanceTest::GetTimelineBasedMetrics() const { + return {"renderingMetric", "umaMetric"}; +}
diff --git a/chrome/test/base/perf/performance_test.h b/chrome/test/base/perf/performance_test.h index 1782cc4..c12ff56 100644 --- a/chrome/test/base/perf/performance_test.h +++ b/chrome/test/base/perf/performance_test.h
@@ -5,6 +5,7 @@ #ifndef CHROME_TEST_BASE_PERF_PERFORMANCE_TEST_H_ #define CHROME_TEST_BASE_PERF_PERFORMANCE_TEST_H_ +#include "base/time/time.h" #include "chrome/test/base/in_process_browser_test.h" // PerformanceTest is an interactive-ui-test that can be used to collect traces. @@ -21,6 +22,11 @@ virtual std::vector<std::string> GetUMAHistogramNames() const; virtual const std::string GetTracingCategories() const; + // Returns the names of timeline based metrics (TBM) to be extracted from + // the generated trace. The metrics must be defined in telemetry + // third_party/catapult/tracing/tracing/metrics/ + // so that third_party/catapult/tracing/bin/run_metric could handle them. + virtual std::vector<std::string> GetTimelineBasedMetrics() const; // InProcessBrowserTest: void SetUpOnMainThread() override; @@ -52,6 +58,8 @@ void SetUpOnMainThread() override; const std::string GetTracingCategories() const override; + // Default is "renderingMetric", "umaMetric". + std::vector<std::string> GetTimelineBasedMetrics() const override; private: DISALLOW_COPY_AND_ASSIGN(UIPerformanceTest);
diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index 7fcf156..9a55130 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc
@@ -73,6 +73,10 @@ return NULL; } +bool TestBrowserWindow::IsOnCurrentWorkspace() const { + return true; +} + void TestBrowserWindow::SetTopControlsShownRatio( content::WebContents* web_contents, float ratio) {}
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index e2d1a97..c8eb36d 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h
@@ -62,6 +62,7 @@ ui::ZOrderLevel GetZOrderLevel() const override; void SetZOrderLevel(ui::ZOrderLevel order) override {} gfx::NativeWindow GetNativeWindow() const override; + bool IsOnCurrentWorkspace() const override; void SetTopControlsShownRatio(content::WebContents* web_contents, float ratio) override; bool DoBrowserControlsShrinkRendererSize(
diff --git a/chrome/test/data/extensions/api_test/webrequest/test_websocket_auth.js b/chrome/test/data/extensions/api_test/webrequest/test_websocket_auth.js index baf3df12..f582936d 100644 --- a/chrome/test/data/extensions/api_test/webrequest/test_websocket_auth.js +++ b/chrome/test/data/extensions/api_test/webrequest/test_websocket_auth.js
@@ -69,20 +69,6 @@ } }, { - label: 'onResponseStarted', - event: 'onResponseStarted', - details: { - url: url, - type: 'websocket', - ip: '127.0.0.1', - fromCache: false, - statusCode: 401, - statusLine: 'HTTP/1.0 401 Unauthorized', - responseHeadersExist: true, - initiator: getDomain(initiators.WEB_INITIATED) - } - }, - { label: 'onErrorOccurred', event: 'onErrorOccurred', details: { @@ -98,8 +84,7 @@ [ // event order [ 'onBeforeRequest', 'onBeforeSendHeaders', 'onSendHeaders', - 'onHeadersReceived', 'onAuthRequired', 'onResponseStarted', - 'onErrorOccurred' + 'onHeadersReceived', 'onAuthRequired', 'onErrorOccurred' ] ], {urls: ['<all_urls>']}, // filter @@ -169,19 +154,6 @@ } }, { - label: 'onResponseStarted', - event: 'onResponseStarted', - details: { - url: url, - type: 'websocket', - fromCache: false, - ip: '127.0.0.1', - statusCode: 401, - statusLine: 'HTTP/1.0 401 Unauthorized', - initiator: getDomain(initiators.WEB_INITIATED) - } - }, - { label: 'onErrorOccurred', event: 'onErrorOccurred', details: { @@ -197,8 +169,7 @@ [ // event order [ 'onBeforeRequest', 'onBeforeSendHeaders', 'onSendHeaders', - 'onHeadersReceived', 'onAuthRequired', 'onResponseStarted', - 'onErrorOccurred' + 'onHeadersReceived', 'onAuthRequired', 'onErrorOccurred' ] ], {urls: ['<all_urls>']}, ['blocking']); @@ -268,19 +239,6 @@ retval: {cancel: true} }, { - label: 'onResponseStarted', - event: 'onResponseStarted', - details: { - url: url, - type: 'websocket', - fromCache: false, - ip: '127.0.0.1', - statusCode: 401, - statusLine: 'HTTP/1.0 401 Unauthorized', - initiator: getDomain(initiators.WEB_INITIATED) - } - }, - { label: 'onErrorOccurred', event: 'onErrorOccurred', details: { @@ -296,8 +254,7 @@ [ // event order [ 'onBeforeRequest', 'onBeforeSendHeaders', 'onSendHeaders', - 'onHeadersReceived', 'onAuthRequired', 'onResponseStarted', - 'onErrorOccurred' + 'onHeadersReceived', 'onAuthRequired', 'onErrorOccurred' ] ], {urls: ['<all_urls>']}, ['blocking']);
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index 0b72161f..163875a7 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/sanitizers/sanitizers.gni") import("//chrome/common/features.gni") import("//chrome/test/base/js2gtest.gni") import("//ui/webui/resources/tools/js_modulizer.gni") @@ -192,6 +193,11 @@ "$root_gen_dir/chrome/test/data/webui/test_util.m.js", ] defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ] + + # https://crbug.com/1013656 + if (is_cfi) { + defines += [ "IS_CFI" ] + } } js2gtest("browser_tests_js_mojo_lite_webui") {
diff --git a/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js b/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js index 5ebb16b..3ddc1d9 100644 --- a/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js +++ b/chrome/test/data/webui/cr_elements/cr_elements_browsertest.js
@@ -155,7 +155,14 @@ ]), }; -TEST_F('CrElementsDrawerTest', 'All', function() { +// https://crbug.com/1013656 - Flaky on Linux CFI. +GEN('#if defined(OS_LINUX) && defined(IS_CFI)'); +GEN('#define MAYBE_Drawer DISABLED_Drawer'); +GEN('#else'); +GEN('#define MAYBE_Drawer Drawer'); +GEN('#endif'); + +TEST_F('CrElementsDrawerTest', 'MAYBE_Drawer', function() { mocha.run(); });
diff --git a/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js b/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js index 3907a0a..4d7a5d1 100644 --- a/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js +++ b/chrome/test/data/webui/cr_elements/cr_toolbar_search_field_tests.js
@@ -90,6 +90,7 @@ assertEquals('', field.getValue()); assertEquals(field.$.searchInput, field.root.activeElement); assertFalse(field.hasSearchText); + assertFalse(field.spinnerActive); }); test('notifies on new searches', function() {
diff --git a/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js b/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js index 4ca0271..aa8f60a7 100644 --- a/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js +++ b/chrome/test/data/webui/settings/a11y/edit_dictionary_a11y_test.js
@@ -5,7 +5,8 @@ /** @fileoverview Define accessibility tests for the EDIT_DICTIONARY route. */ // Disable since the EDIT_DICTIONARY route does not exist on Mac. -GEN('#if !defined(OS_MACOSX)'); +// TODO(crbug.com/1012370) flaky on Linux b/c assertTrue(!!languagesPage); +GEN('#if !defined(OS_MACOSX) && !defined(OS_LINUX)'); // SettingsAccessibilityTest fixture. GEN_INCLUDE([ @@ -103,4 +104,4 @@ }, }); -GEN('#endif // !defined(OS_MACOSX)'); +GEN('#endif // !defined(OS_MACOSX) && !defined(OS_LINUX)');
diff --git a/chrome/test/data/webui/settings/payments_section_test.js b/chrome/test/data/webui/settings/payments_section_test.js index 5eb49068..0b18c6dd 100644 --- a/chrome/test/data/webui/settings/payments_section_test.js +++ b/chrome/test/data/webui/settings/payments_section_test.js
@@ -66,6 +66,20 @@ return section; } + // Fakes the existence of a platform authenticator. + function addFakePlatformAuthenticator() { + if (!window.PublicKeyCredential) { + window.PublicKeyCredential = {}; + } + window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable = + function() { + return new Promise(callback => { + callback(true); + }); + }; + } + + /** * Returns an array containing the local and server credit card items. * @return {!Array<!chrome.autofillPrivate.CreditCardEntry>} @@ -450,8 +464,10 @@ }); test('verifyFIDOAuthToggleShownIfUserIsVerifiable', function() { - // Set |userIsFIDOVerifiable| to true. - loadTimeData.overrideValues({userIsFIDOVerifiable: true}); + // Set |fidoAuthenticationAvailableForAutofill| to true. + loadTimeData.overrideValues( + {fidoAuthenticationAvailableForAutofill: true}); + addFakePlatformAuthenticator(); const section = createPaymentsSection([], {credit_card_enabled: {value: true}}); @@ -459,8 +475,9 @@ }); test('verifyFIDOAuthToggleNotShownIfUserIsNotVerifiable', function() { - // Set |userIsFIDOVerifiable| to false. - loadTimeData.overrideValues({userIsFIDOVerifiable: false}); + // Set |fidoAuthenticationAvailableForAutofill| to false. + loadTimeData.overrideValues( + {fidoAuthenticationAvailableForAutofill: false}); const section = createPaymentsSection([], {credit_card_enabled: {value: true}}); assertFalse(!!section.$$('#autofillCreditCardFIDOAuthToggle')); @@ -468,7 +485,9 @@ test('verifyFIDOAuthToggleCheckedIfOptedIn', function() { // Set FIDO auth pref value to true. - loadTimeData.overrideValues({userIsFIDOVerifiable: true}); + loadTimeData.overrideValues( + {fidoAuthenticationAvailableForAutofill: true}); + addFakePlatformAuthenticator(); const section = createPaymentsSection([], { credit_card_enabled: {value: true}, credit_card_fido_auth_enabled: {value: true} @@ -478,7 +497,9 @@ test('verifyFIDOAuthToggleUncheckedIfOptedOut', function() { // Set FIDO auth pref value to false. - loadTimeData.overrideValues({userIsFIDOVerifiable: true}); + loadTimeData.overrideValues( + {fidoAuthenticationAvailableForAutofill: true}); + addFakePlatformAuthenticator(); const section = createPaymentsSection([], { credit_card_enabled: {value: true}, credit_card_fido_auth_enabled: {value: false}
diff --git a/chrome/test/data/webui/tab_strip/tab_test.js b/chrome/test/data/webui/tab_strip/tab_test.js index c2a7413f..c8c4ae4 100644 --- a/chrome/test/data/webui/tab_strip/tab_test.js +++ b/chrome/test/data/webui/tab_strip/tab_test.js
@@ -4,7 +4,7 @@ import 'chrome://tab-strip/tab.js'; -import {getFavicon, getFaviconForPageURL} from 'chrome://resources/js/icon.m.js'; +import {getFavicon} from 'chrome://resources/js/icon.m.js'; import {TabNetworkState, TabsApiProxy} from 'chrome://tab-strip/tabs_api_proxy.js'; import {TestTabsApiProxy} from './test_tabs_api_proxy.js'; @@ -58,29 +58,45 @@ assertFalse(tabElement.hasAttribute('active')); }); + test( + 'toggles a [hide-icon] attribute when the icon container should be shown', + () => { + tabElement.tab = Object.assign({}, tab, {showIcon: true}); + assertFalse(tabElement.hasAttribute('hide-icon_')); + tabElement.tab = Object.assign({}, tab, {showIcon: false}); + assertTrue(tabElement.hasAttribute('hide-icon_')); + }); + test('toggles a [pinned] attribute when pinned', () => { tabElement.tab = Object.assign({}, tab, {pinned: true}); - assertTrue(tabElement.hasAttribute('pinned')); + assertTrue(tabElement.hasAttribute('pinned_')); tabElement.tab = Object.assign({}, tab, {pinned: false}); - assertFalse(tabElement.hasAttribute('pinned')); + assertFalse(tabElement.hasAttribute('pinned_')); }); test('toggles a [loading] attribute when loading', () => { tabElement.tab = Object.assign({}, tab, {networkState: TabNetworkState.LOADING}); - assertTrue(tabElement.hasAttribute('loading')); + assertTrue(tabElement.hasAttribute('loading_')); tabElement.tab = Object.assign({}, tab, {networkState: TabNetworkState.NONE}); - assertFalse(tabElement.hasAttribute('loading')); + assertFalse(tabElement.hasAttribute('loading_')); }); test('toggles a [waiting] attribute when waiting', () => { tabElement.tab = Object.assign({}, tab, {networkState: TabNetworkState.WAITING}); - assertTrue(tabElement.hasAttribute('waiting')); + assertTrue(tabElement.hasAttribute('waiting_')); tabElement.tab = Object.assign({}, tab, {networkState: TabNetworkState.NONE}); - assertFalse(tabElement.hasAttribute('waiting')); + assertFalse(tabElement.hasAttribute('waiting_')); + }); + + test('toggles a [crashed] attribute when crashed', () => { + tabElement.tab = Object.assign({}, tab, {crashed: true}); + assertTrue(tabElement.hasAttribute('crashed')); + tabElement.tab = Object.assign({}, tab, {crashed: false}); + assertFalse(tabElement.hasAttribute('crashed')); }); test('clicking on the element activates the tab', () => { @@ -115,21 +131,33 @@ faviconElement.style.backgroundImage, `url("${expectedFaviconUrl}")`); }); - test('sets the favicon to the page URL if favicon URL does not exist', () => { - const expectedPageUrl = 'http://google.com'; - tabElement.tab = Object.assign({}, tab, {url: expectedPageUrl}); + test( + 'sets the favicon to the default favicon URL if there is none provided', + () => { + const updatedTab = Object.assign({}, tab); + delete updatedTab.favIconUrl; + tabElement.tab = updatedTab; + const faviconElement = tabElement.shadowRoot.querySelector('#favicon'); + assertEquals(faviconElement.style.backgroundImage, getFavicon('')); + }); + + test('removes the favicon if the tab is waiting', () => { + tabElement.tab = Object.assign({}, tab, { + favIconUrl: 'data:mock-favicon', + networkState: TabNetworkState.WAITING, + }); const faviconElement = tabElement.shadowRoot.querySelector('#favicon'); - assertEquals( - faviconElement.style.backgroundImage, - getFaviconForPageURL(expectedPageUrl, false)); + assertEquals(faviconElement.style.backgroundImage, 'none'); }); test( - 'removes the favicon if the tab is loading and there is no favicon URL', + 'removes the favicon if the tab is loading with a default favicon', () => { - delete tab.favIconUrl; - tabElement.tab = - Object.assign({}, tab, {networkState: TabNetworkState.LOADING}); + tabElement.tab = Object.assign({}, tab, { + favIconUrl: 'data:mock-favicon', + hasDefaultFavicon: true, + networkState: TabNetworkState.WAITING, + }); const faviconElement = tabElement.shadowRoot.querySelector('#favicon'); assertEquals(faviconElement.style.backgroundImage, 'none'); }); @@ -154,9 +182,9 @@ test('setting dragging state toggles an attribute', () => { tabElement.setDragging(true); - assertTrue(tabElement.hasAttribute('dragging')); + assertTrue(tabElement.hasAttribute('dragging_')); tabElement.setDragging(false); - assertFalse(tabElement.hasAttribute('dragging')); + assertFalse(tabElement.hasAttribute('dragging_')); }); test('getting the drag image grabs the contents', () => {
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc index 3f418f3..11102a31fa 100644 --- a/chrome/test/ppapi/ppapi_browsertest.cc +++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -30,11 +30,10 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/nacl/common/buildflags.h" #include "components/nacl/common/nacl_switches.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/javascript_test_observer.h" @@ -60,7 +59,6 @@ #include "services/network/public/mojom/tls_socket.mojom.h" #include "services/network/public/mojom/udp_socket.mojom.h" #include "services/network/test/test_network_context.h" -#include "services/service_manager/public/cpp/connector.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" @@ -365,9 +363,9 @@ if (content::IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->CrashOnResolveHost("crash.com"); RunTestViaHTTP(STRIP_PREFIXES(TCPSocketPrivateCrash_Resolve)); @@ -1272,9 +1270,9 @@ if (content::IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->CrashOnResolveHost("crash.com"); RunTestViaHTTP(STRIP_PREFIXES(HostResolverCrash_Basic));
diff --git a/chromecast/app/cast_test_launcher.cc b/chromecast/app/cast_test_launcher.cc index 34693e3..186c3147f2 100644 --- a/chromecast/app/cast_test_launcher.cc +++ b/chromecast/app/cast_test_launcher.cc
@@ -9,6 +9,7 @@ #include "base/test/test_suite.h" #include "build/build_config.h" #include "chromecast/app/cast_main_delegate.h" +#include "content/public/common/network_service_util.h" #include "content/public/test/test_launcher.h" #include "ipc/ipc_channel.h" #include "mojo/core/embedder/embedder.h" @@ -56,5 +57,6 @@ } chromecast::shell::CastTestLauncherDelegate launcher_delegate; mojo::core::Init(); + content::ForceInProcessNetworkService(true); return content::LaunchTests(&launcher_delegate, parallel_jobs, argc, argv); }
diff --git a/chromecast/media/cma/backend/mixer/filter_group.cc b/chromecast/media/cma/backend/mixer/filter_group.cc index 46a5dd4..7d8fec0 100644 --- a/chromecast/media/cma/backend/mixer/filter_group.cc +++ b/chromecast/media/cma/backend/mixer/filter_group.cc
@@ -144,7 +144,7 @@ } } - mixed_->ToInterleaved<::media::FloatSampleTypeTraits<float>>( + mixed_->ToInterleaved<::media::FloatSampleTypeTraitsNoClip<float>>( input_frames_per_write_, interleaved_.data()); // Mix FilterGroups
diff --git a/chromeos/constants/chromeos_features.cc b/chromeos/constants/chromeos_features.cc index 89dc1b4..1141137 100644 --- a/chromeos/constants/chromeos_features.cc +++ b/chromeos/constants/chromeos_features.cc
@@ -187,6 +187,10 @@ const base::Feature kShelfScrollable{"ShelfScrollable", base::FEATURE_ENABLED_BY_DEFAULT}; +// Enables or disables the shelf hotseat. +const base::Feature kShelfHotseat{"ShelfHotseat", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Enables or disables a toggle to enable Bluetooth debug logs. const base::Feature kShowBluetoothDebugLogToggle{ "ShowBluetoothDebugLogToggle", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chromeos/constants/chromeos_features.h b/chromeos/constants/chromeos_features.h index 85085ff8..dc6c817 100644 --- a/chromeos/constants/chromeos_features.h +++ b/chromeos/constants/chromeos_features.h
@@ -89,6 +89,8 @@ COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kShelfScrollable; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) +extern const base::Feature kShelfHotseat; +COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kShowBluetoothDebugLogToggle; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kShowBluetoothDeviceBattery;
diff --git a/chromeos/constants/chromeos_switches.cc b/chromeos/constants/chromeos_switches.cc index 5342fe9..e098b0e 100644 --- a/chromeos/constants/chromeos_switches.cc +++ b/chromeos/constants/chromeos_switches.cc
@@ -547,7 +547,8 @@ } bool ShouldShowShelfHotseat() { - return base::CommandLine::ForCurrentProcess()->HasSwitch(kShelfHotseat); + return base::FeatureList::IsEnabled(features::kShelfHotseat) || + base::CommandLine::ForCurrentProcess()->HasSwitch(kShelfHotseat); } bool ShouldShowShelfHoverPreviews() {
diff --git a/chromeos/dbus/cryptohome/fake_cryptohome_client.cc b/chromeos/dbus/cryptohome/fake_cryptohome_client.cc index 769a7772..8453d0cd 100644 --- a/chromeos/dbus/cryptohome/fake_cryptohome_client.cc +++ b/chromeos/dbus/cryptohome/fake_cryptohome_client.cc
@@ -175,7 +175,7 @@ void FakeCryptohomeClient::TpmIsReady(DBusMethodCallback<bool> callback) { base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, base::BindOnce(std::move(callback), true)); + FROM_HERE, base::BindOnce(std::move(callback), tpm_is_ready_)); } void FakeCryptohomeClient::TpmIsEnabled(DBusMethodCallback<bool> callback) { @@ -900,6 +900,14 @@ observer.AsyncCallStatusWithData(async_id, return_status, data); } +void FakeCryptohomeClient::NotifyTpmInitStatusUpdated( + bool ready, + bool owned, + bool was_owned_this_boot) { + for (auto& observer : observer_list_) + observer.TpmInitStatusUpdated(ready, owned, was_owned_this_boot); +} + void FakeCryptohomeClient::NotifyDircryptoMigrationProgress( cryptohome::DircryptoMigrationStatus status, uint64_t current,
diff --git a/chromeos/dbus/cryptohome/fake_cryptohome_client.h b/chromeos/dbus/cryptohome/fake_cryptohome_client.h index 9abe2695..e34ea7e 100644 --- a/chromeos/dbus/cryptohome/fake_cryptohome_client.h +++ b/chromeos/dbus/cryptohome/fake_cryptohome_client.h
@@ -255,6 +255,9 @@ // unavailable. Expects service not to be available when called. void ReportServiceIsNotAvailable(); + // Changes the behavior of TpmIsReady(). + void set_tpm_is_ready(bool value) { tpm_is_ready_ = value; } + // Changes the behavior of TpmIsEnabled(). void set_tpm_is_enabled(bool value) { tpm_is_enabled_ = value; } @@ -344,6 +347,11 @@ void SetTpmAttestationDeviceKeyPayload(const std::string& key_name, const std::string& payload); + // Calls TpmInitStatusUpdated() on Observer instances. + void NotifyTpmInitStatusUpdated(bool ready, + bool owned, + bool was_owned_this_boot); + // Calls DircryptoMigrationProgress() on Observer instances. void NotifyDircryptoMigrationProgress( cryptohome::DircryptoMigrationStatus status, @@ -476,6 +484,7 @@ bool supports_low_entropy_credentials_ = false; // Controls if CheckKeyEx actually checks the key. bool enable_auth_check_ = false; + bool tpm_is_ready_ = true; bool tpm_is_enabled_ = true; // Reply to GetRsuDeviceId().
diff --git a/chromeos/tpm/tpm_token_loader.cc b/chromeos/tpm/tpm_token_loader.cc index 9aa8eb5..851b2cc 100644 --- a/chromeos/tpm/tpm_token_loader.cc +++ b/chromeos/tpm/tpm_token_loader.cc
@@ -33,13 +33,13 @@ // static void TPMTokenLoader::Initialize() { CHECK(!g_tpm_token_loader); - g_tpm_token_loader = new TPMTokenLoader(false /*for_test*/); + g_tpm_token_loader = new TPMTokenLoader(/*initialized_for_test=*/false); } // static void TPMTokenLoader::InitializeForTest() { CHECK(!g_tpm_token_loader); - g_tpm_token_loader = new TPMTokenLoader(true /*for_test*/); + g_tpm_token_loader = new TPMTokenLoader(/*initialized_for_test=*/true); } // static @@ -61,8 +61,8 @@ return g_tpm_token_loader; } -TPMTokenLoader::TPMTokenLoader(bool for_test) - : initialized_for_test_(for_test), +TPMTokenLoader::TPMTokenLoader(bool initialized_for_test) + : initialized_for_test_(initialized_for_test), tpm_token_state_(TPM_STATE_UNKNOWN), tpm_token_info_getter_(TPMTokenInfoGetter::CreateForSystemToken( CryptohomeClient::Get(), @@ -112,8 +112,9 @@ // TPM loading is enabled on non-ChromeOS environments, e.g. when running // tests on Linux. // Treat TPM as disabled for guest users since they do not store certs. - return initialized_for_test_ || (base::SysInfo::IsRunningOnChromeOS() && - !LoginState::Get()->IsGuestSessionUser()); + return initialized_for_test_ || enable_tpm_loading_for_testing_ || + (base::SysInfo::IsRunningOnChromeOS() && + !LoginState::Get()->IsGuestSessionUser()); } void TPMTokenLoader::MaybeStartTokenInitialization() {
diff --git a/chromeos/tpm/tpm_token_loader.h b/chromeos/tpm/tpm_token_loader.h index fc44a31..cd72cd9d 100644 --- a/chromeos/tpm/tpm_token_loader.h +++ b/chromeos/tpm/tpm_token_loader.h
@@ -50,7 +50,8 @@ // The global instance will immediately start observing |LoginState|. static void Initialize(); - // Sets the global. stubbed out, instance. To be used in tests. + // Sets the global, stubbed out with the already initialized token, instance. + // To be used in tests. static void InitializeForTest(); // Destroys the global instance. @@ -81,8 +82,13 @@ std::string tpm_user_pin() const { return tpm_user_pin_; } + // Allows tests to enable the TPM token loading logic in this class. + void enable_tpm_loading_for_testing(bool enable) { + enable_tpm_loading_for_testing_ = enable; + } + private: - explicit TPMTokenLoader(bool for_test); + explicit TPMTokenLoader(bool initialized_for_test); ~TPMTokenLoader() override; bool IsTPMLoadingEnabled() const; @@ -104,6 +110,8 @@ // LoginState::Observer void LoggedInStateChanged() override; + bool enable_tpm_loading_for_testing_ = false; + bool initialized_for_test_; TPMReadyCallbackList tpm_ready_callback_list_;
diff --git a/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc b/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc index ea5efc5..3ea5f38 100644 --- a/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc +++ b/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc
@@ -30,8 +30,6 @@ namespace { // Default timeout for user to respond to WebAuthn prompt. constexpr int kWebAuthnTimeoutMs = 3 * 60 * 1000; // 3 minutes -// Timeout to wait for synchronous version of IsUserVerifiable(). -constexpr int kIsUserVerifiableTimeoutMs = 1000; constexpr char kGooglePaymentsRpid[] = "google.com"; constexpr char kGooglePaymentsRpName[] = "Google Payments"; @@ -138,21 +136,6 @@ } } -bool CreditCardFIDOAuthenticator::IsUserVerifiable() { - if (user_is_verifiable_.has_value()) - return user_is_verifiable_.value(); - - IsUserVerifiable( - base::BindOnce(&CreditCardFIDOAuthenticator::SetUserIsVerifiable, - weak_ptr_factory_.GetWeakPtr())); - - user_is_verifiable_callback_received_.declare_only_used_while_idle(); - user_is_verifiable_callback_received_.TimedWait( - base::TimeDelta::FromMilliseconds(kIsUserVerifiableTimeoutMs)); - - return user_is_verifiable_.value_or(false); -} - bool CreditCardFIDOAuthenticator::IsUserOptedIn() { return base::FeatureList::IsEnabled( features::kAutofillCreditCardAuthentication) && @@ -602,9 +585,4 @@ creation_options.FindStringKey("challenge"); } -void CreditCardFIDOAuthenticator::SetUserIsVerifiable(bool user_is_verifiable) { - user_is_verifiable_ = user_is_verifiable; - user_is_verifiable_callback_received_.Signal(); -} - } // namespace autofill
diff --git a/components/autofill/core/browser/payments/credit_card_fido_authenticator.h b/components/autofill/core/browser/payments/credit_card_fido_authenticator.h index 9588187..1a5df30b 100644 --- a/components/autofill/core/browser/payments/credit_card_fido_authenticator.h +++ b/components/autofill/core/browser/payments/credit_card_fido_authenticator.h
@@ -101,9 +101,6 @@ // and enabled. Otherwise invokes callback with false. virtual void IsUserVerifiable(base::OnceCallback<void(bool)> callback); - // The synchronous version of IsUserVerifiable. Used on settings page load. - bool IsUserVerifiable(); - // Returns true only if the user has opted-in to use WebAuthn for autofill. virtual bool IsUserOptedIn(); @@ -202,9 +199,6 @@ // Returns true if |request_options| contains a challenge. bool IsValidCreationOptions(const base::Value& creation_options); - // Sets the value for |user_is_verifiable_|. - void SetUserIsVerifiable(bool user_is_verifiable); - // Card being unmasked. const CreditCard* card_; @@ -242,9 +236,6 @@ std::unique_ptr<FidoAuthenticationStrikeDatabase> fido_authentication_strike_database_; - // Set when callback for IsUserVerifiable() is invoked with passed value. - base::Optional<bool> user_is_verifiable_ = base::nullopt; - // Signaled when callback for IsUserVerifiable() is invoked. base::WaitableEvent user_is_verifiable_callback_received_;
diff --git a/components/autofill/core/browser/payments/credit_card_fido_authenticator_unittest.cc b/components/autofill/core/browser/payments/credit_card_fido_authenticator_unittest.cc index 59a19aa..557ee80 100644 --- a/components/autofill/core/browser/payments/credit_card_fido_authenticator_unittest.cc +++ b/components/autofill/core/browser/payments/credit_card_fido_authenticator_unittest.cc
@@ -304,10 +304,6 @@ EXPECT_FALSE(requester_->is_user_verifiable().value()); } -TEST_F(CreditCardFIDOAuthenticatorTest, Sync_IsUserVerifiable_False) { - EXPECT_FALSE(fido_authenticator_->IsUserVerifiable()); -} - TEST_F(CreditCardFIDOAuthenticatorTest, ParseRequestOptions) { base::Value request_options_json = GetTestRequestOptions( kTestChallenge, kTestRelyingPartyId, kTestCredentialId);
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc index 00b9e8116..a1863fb 100644 --- a/components/autofill/core/common/autofill_payments_features.cc +++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -75,7 +75,7 @@ // Autofill strike database (new version). const base::Feature kAutofillLocalCardMigrationUsesStrikeSystemV2{ "AutofillLocalCardMigrationUsesStrikeSystemV2", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // When enabled, will remove the option to save unmasked server cards as // FULL_SERVER_CARDs upon successful unmask.
diff --git a/components/dom_distiller/core/dom_distiller_service.cc b/components/dom_distiller/core/dom_distiller_service.cc index 82fa073..309595b 100644 --- a/components/dom_distiller/core/dom_distiller_service.cc +++ b/components/dom_distiller/core/dom_distiller_service.cc
@@ -56,21 +56,6 @@ std::move(handle)); } -bool DomDistillerService::HasEntry(const std::string& entry_id) { - return false; -} - -std::string DomDistillerService::GetUrlForEntry(const std::string& entry_id) { - return ""; -} - -std::unique_ptr<ViewerHandle> DomDistillerService::ViewEntry( - ViewRequestDelegate* delegate, - std::unique_ptr<DistillerPage> distiller_page, - const std::string& entry_id) { - return nullptr; -} - std::unique_ptr<ViewerHandle> DomDistillerService::ViewUrl( ViewRequestDelegate* delegate, std::unique_ptr<DistillerPage> distiller_page,
diff --git a/components/dom_distiller/core/dom_distiller_service.h b/components/dom_distiller/core/dom_distiller_service.h index 21ad150..bb9d000 100644 --- a/components/dom_distiller/core/dom_distiller_service.h +++ b/components/dom_distiller/core/dom_distiller_service.h
@@ -34,14 +34,6 @@ typedef base::Callback<void(bool)> ArticleAvailableCallback; virtual ~DomDistillerServiceInterface() {} - // TODO(crbug.com/1007942): Remove these methods; no entries ever exist. - virtual bool HasEntry(const std::string& entry_id) = 0; - virtual std::string GetUrlForEntry(const std::string& entry_id) = 0; - virtual std::unique_ptr<ViewerHandle> ViewEntry( - ViewRequestDelegate* delegate, - std::unique_ptr<DistillerPage> distiller_page, - const std::string& entry_id) = 0; - // Request to view an article by url. // Use CreateDefaultDistillerPage() to create a default |distiller_page|. // The provided |distiller_page| is only used if there is not already a @@ -78,12 +70,6 @@ ~DomDistillerService() override; // DomDistillerServiceInterface implementation. - bool HasEntry(const std::string& entry_id) override; - std::string GetUrlForEntry(const std::string& entry_id) override; - std::unique_ptr<ViewerHandle> ViewEntry( - ViewRequestDelegate* delegate, - std::unique_ptr<DistillerPage> distiller_page, - const std::string& entry_id) override; std::unique_ptr<ViewerHandle> ViewUrl( ViewRequestDelegate* delegate, std::unique_ptr<DistillerPage> distiller_page,
diff --git a/components/dom_distiller/core/dom_distiller_service_android.cc b/components/dom_distiller/core/dom_distiller_service_android.cc index 039288a..0d001186 100644 --- a/components/dom_distiller/core/dom_distiller_service_android.cc +++ b/components/dom_distiller/core/dom_distiller_service_android.cc
@@ -34,18 +34,14 @@ JNIEnv* env, const JavaParamRef<jobject>& obj, const JavaParamRef<jstring>& j_entry_id) { - const std::string entry_id = - base::android::ConvertJavaStringToUTF8(env, j_entry_id); - return service_->HasEntry(entry_id); + return false; } ScopedJavaLocalRef<jstring> DomDistillerServiceAndroid::GetUrlForEntry( JNIEnv* env, const JavaParamRef<jobject>& obj, const JavaParamRef<jstring>& j_entry_id) { - const std::string entry_id = - base::android::ConvertJavaStringToUTF8(env, j_entry_id); - return ConvertUTF8ToJavaString(env, service_->GetUrlForEntry(entry_id)); + return ConvertUTF8ToJavaString(env, std::string()); } jlong DomDistillerServiceAndroid::GetDistilledPagePrefsPtr(JNIEnv* env) {
diff --git a/components/dom_distiller/core/dom_distiller_service_android.h b/components/dom_distiller/core/dom_distiller_service_android.h index 5714572..a0d94aec 100644 --- a/components/dom_distiller/core/dom_distiller_service_android.h +++ b/components/dom_distiller/core/dom_distiller_service_android.h
@@ -24,6 +24,8 @@ // Returns native pointer to native DistilledPagePrefs registered with // DomDistillerService. jlong GetDistilledPagePrefsPtr(JNIEnv* env); + // TODO(crbug.com/1007942): Remove HasEntry and GetUrlForEntry, they always + // return false / empty string. bool HasEntry(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj, const base::android::JavaParamRef<jstring>& entry_id);
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc index 6fa4702..ea7d805 100644 --- a/components/dom_distiller/core/viewer.cc +++ b/components/dom_distiller/core/viewer.cc
@@ -270,10 +270,7 @@ } if (has_valid_entry_id) { - return dom_distiller_service->ViewEntry( - view_request_delegate, - dom_distiller_service->CreateDefaultDistillerPage(render_view_size), - entry_id); + return nullptr; } if (has_valid_url) { return dom_distiller_service->ViewUrl(
diff --git a/components/dom_distiller/core/viewer_unittest.cc b/components/dom_distiller/core/viewer_unittest.cc index 9e7a238..20285cd 100644 --- a/components/dom_distiller/core/viewer_unittest.cc +++ b/components/dom_distiller/core/viewer_unittest.cc
@@ -41,8 +41,6 @@ TestDomDistillerService() {} ~TestDomDistillerService() override {} - MOCK_METHOD1(HasEntry, bool(const std::string&)); - MOCK_METHOD1(GetUrlForEntry, std::string(const std::string&)); MOCK_METHOD0(ViewUrlImpl, ViewerHandle*()); std::unique_ptr<ViewerHandle> ViewUrl( ViewRequestDelegate*, @@ -50,13 +48,6 @@ const GURL&) override { return std::unique_ptr<ViewerHandle>(ViewUrlImpl()); } - MOCK_METHOD0(ViewEntryImpl, ViewerHandle*()); - std::unique_ptr<ViewerHandle> ViewEntry( - ViewRequestDelegate*, - std::unique_ptr<DistillerPage> distiller_page, - const std::string&) override { - return std::unique_ptr<ViewerHandle>(ViewEntryImpl()); - } std::unique_ptr<DistillerPage> CreateDefaultDistillerPage( const gfx::Size& render_view_size) override { return std::unique_ptr<DistillerPage>(); @@ -89,26 +80,13 @@ ViewerHandle* viewer_handle(new ViewerHandle(ViewerHandle::CancelCallback())); EXPECT_CALL(*service_, ViewUrlImpl()) .WillOnce(testing::Return(viewer_handle)); - EXPECT_CALL(*service_, ViewEntryImpl()).Times(0); CreateViewRequest(GetDistillerViewUrlFromUrl("http://www.example.com/"), view_request_delegate.get()); } -TEST_F(DomDistillerViewerTest, TestCreatingViewEntryRequest) { - std::unique_ptr<FakeViewRequestDelegate> view_request_delegate( - new FakeViewRequestDelegate()); - ViewerHandle* viewer_handle(new ViewerHandle(ViewerHandle::CancelCallback())); - EXPECT_CALL(*service_, ViewEntryImpl()) - .WillOnce(testing::Return(viewer_handle)); - EXPECT_CALL(*service_, ViewUrlImpl()).Times(0); - CreateViewRequest(GetDistillerViewUrlFromEntryId("abc-def"), - view_request_delegate.get()); -} - TEST_F(DomDistillerViewerTest, TestCreatingInvalidViewRequest) { std::unique_ptr<FakeViewRequestDelegate> view_request_delegate( new FakeViewRequestDelegate()); - EXPECT_CALL(*service_, ViewEntryImpl()).Times(0); EXPECT_CALL(*service_, ViewUrlImpl()).Times(0); // Specify none of the required query parameters. CreateViewRequest(GURL(std::string(kDomDistillerScheme) + "://host?foo=bar"),
diff --git a/components/exo/client_controlled_shell_surface.cc b/components/exo/client_controlled_shell_surface.cc index 41d54b1..6dceed3 100644 --- a/components/exo/client_controlled_shell_surface.cc +++ b/components/exo/client_controlled_shell_surface.cc
@@ -322,6 +322,8 @@ // operation on a to-be-destroyed window. |widget_| can be nullptr in tests. if (GetWidget()) GetWindowState()->SetDelegate(nullptr); + if (client_controlled_state_) + client_controlled_state_->ResetDelegate(); wide_frame_.reset(); display::Screen::GetScreen()->RemoveObserver(this); if (current_pin_ != ash::WindowPinType::kNone) @@ -1065,6 +1067,11 @@ } +void ClientControlledShellSurface::OnSurfaceDestroying(Surface* surface) { + client_controlled_state_->ResetDelegate(); + ShellSurfaceBase::OnSurfaceDestroying(surface); +} + //////////////////////////////////////////////////////////////////////////////// // ClientControlledShellSurface, private:
diff --git a/components/exo/client_controlled_shell_surface.h b/components/exo/client_controlled_shell_surface.h index a7b8ae8..1d8abb7 100644 --- a/components/exo/client_controlled_shell_surface.h +++ b/components/exo/client_controlled_shell_surface.h
@@ -265,6 +265,7 @@ gfx::Point GetSurfaceOrigin() const override; bool OnPreWidgetCommit() override; void OnPostWidgetCommit() override; + void OnSurfaceDestroying(Surface* surface) override; // Update frame status. This may create (or destroy) a wide frame // that spans the full work area width if the surface didn't cover
diff --git a/components/exo/pointer.cc b/components/exo/pointer.cc index 5f9e65d..89335b67 100644 --- a/components/exo/pointer.cc +++ b/components/exo/pointer.cc
@@ -125,8 +125,11 @@ pinch_delegate_->OnPointerDestroying(this); if (relative_pointer_delegate_) relative_pointer_delegate_->OnPointerDestroying(this); - if (pointer_constraint_delegate_) + if (pointer_constraint_delegate_) { + pointer_constraint_delegate_->GetConstrainedSurface() + ->RemoveSurfaceObserver(this); pointer_constraint_delegate_->OnConstraintBroken(); + } WMHelper* helper = WMHelper::GetInstance(); helper->RemovePreTargetHandler(this); // TODO(sky): CursorClient does not exist in mash @@ -309,6 +312,9 @@ if (!base::FeatureList::IsEnabled(kPointerCapture)) return false; + if (!capture_surface->HasSurfaceObserver(this)) + capture_surface->AddSurfaceObserver(this); + capture_window_ = capture_surface->window(); auto* capture_client = WMHelper::GetInstance()->GetCaptureClient(); @@ -342,6 +348,12 @@ // SurfaceObserver overrides: void Pointer::OnSurfaceDestroying(Surface* surface) { + if (surface && pointer_constraint_delegate_ && + surface == pointer_constraint_delegate_->GetConstrainedSurface()) { + surface->RemoveSurfaceObserver(this); + pointer_constraint_delegate_->OnConstraintBroken(); + UnconstrainPointer(); + } if (surface == focus_surface_) { SetFocus(nullptr, gfx::PointF(), 0); return;
diff --git a/components/language/core/common/language_util.cc b/components/language/core/common/language_util.cc index f7bf4497..e5ee28d 100644 --- a/components/language/core/common/language_util.cc +++ b/components/language/core/common/language_util.cc
@@ -25,10 +25,13 @@ // // If this table is updated, please sync this with the synonym table in // chrome/browser/resources/settings/languages_page/languages.js. -const LanguageCodePair kLanguageCodeSimilitudes[] = { +const LanguageCodePair kChromeToTranslateLanguageMap[] = { {"no", "nb"}, {"tl", "fil"}, }; +const LanguageCodePair kTranslateToChromeLanguageMap[] = { + {"tl", "fil"}, +}; // Some languages have changed codes over the years and sometimes the older // codes are used, so we must see them as synonyms. @@ -52,9 +55,10 @@ }; void ToTranslateLanguageSynonym(std::string* language) { - for (size_t i = 0; i < base::size(kLanguageCodeSimilitudes); ++i) { - if (*language == kLanguageCodeSimilitudes[i].chrome_language) { - *language = kLanguageCodeSimilitudes[i].translate_language; + for (size_t i = 0; i < base::size(kChromeToTranslateLanguageMap); ++i) { + if (*language == kChromeToTranslateLanguageMap[i].chrome_language) { + *language = + std::string(kChromeToTranslateLanguageMap[i].translate_language); return; } } @@ -93,9 +97,9 @@ } void ToChromeLanguageSynonym(std::string* language) { - for (size_t i = 0; i < base::size(kLanguageCodeSimilitudes); ++i) { - if (*language == kLanguageCodeSimilitudes[i].translate_language) { - *language = kLanguageCodeSimilitudes[i].chrome_language; + for (size_t i = 0; i < base::size(kTranslateToChromeLanguageMap); ++i) { + if (*language == kTranslateToChromeLanguageMap[i].translate_language) { + *language = std::string(kTranslateToChromeLanguageMap[i].chrome_language); return; } }
diff --git a/components/language/core/common/language_util_unittest.cc b/components/language/core/common/language_util_unittest.cc index 20eff9b..f3406f3 100644 --- a/components/language/core/common/language_util_unittest.cc +++ b/components/language/core/common/language_util_unittest.cc
@@ -49,8 +49,12 @@ TEST_F(LanguageUtilTest, ToChromeLanguageSynonym) { std::string language; + // Norwegian (no) and Norwegian Bokmal (nb) are both supported. language = std::string("no"); language::ToChromeLanguageSynonym(&language); + EXPECT_EQ("no", language); + language = std::string("nb"); + language::ToChromeLanguageSynonym(&language); EXPECT_EQ("nb", language); // Preserve a sub code
diff --git a/components/payments/content/BUILD.gn b/components/payments/content/BUILD.gn index 25df858..4730ae1 100644 --- a/components/payments/content/BUILD.gn +++ b/components/payments/content/BUILD.gn
@@ -68,6 +68,7 @@ ] deps = [ + "//content/public/browser", "//skia", ] }
diff --git a/components/payments/content/service_worker_payment_instrument.cc b/components/payments/content/service_worker_payment_instrument.cc index 97c2728..c3ad7af 100644 --- a/components/payments/content/service_worker_payment_instrument.cc +++ b/components/payments/content/service_worker_payment_instrument.cc
@@ -231,6 +231,7 @@ installable_web_app_info_->sw_js_url, installable_web_app_info_->sw_scope, installable_web_app_info_->sw_use_cache, installable_enabled_method_, + installable_web_app_info_->supported_delegations, base::BindOnce( &IdentityObserver::SetInvokedServiceWorkerIdentity, identity_observer_, @@ -523,36 +524,36 @@ if (!spec_->request_shipping()) return false; - return stored_payment_app_info_ - ? stored_payment_app_info_->supported_delegations.shipping_address - : false; + return needs_installation_ + ? installable_web_app_info_->supported_delegations.shipping_address + : stored_payment_app_info_->supported_delegations.shipping_address; } bool ServiceWorkerPaymentInstrument::HandlesPayerName() const { if (!spec_->request_payer_name()) return false; - return stored_payment_app_info_ - ? stored_payment_app_info_->supported_delegations.payer_name - : false; + return needs_installation_ + ? installable_web_app_info_->supported_delegations.payer_name + : stored_payment_app_info_->supported_delegations.payer_name; } bool ServiceWorkerPaymentInstrument::HandlesPayerEmail() const { if (!spec_->request_payer_email()) return false; - return stored_payment_app_info_ - ? stored_payment_app_info_->supported_delegations.payer_email - : false; + return needs_installation_ + ? installable_web_app_info_->supported_delegations.payer_email + : stored_payment_app_info_->supported_delegations.payer_email; } bool ServiceWorkerPaymentInstrument::HandlesPayerPhone() const { if (!spec_->request_payer_phone()) return false; - return stored_payment_app_info_ - ? stored_payment_app_info_->supported_delegations.payer_phone - : false; + return needs_installation_ + ? installable_web_app_info_->supported_delegations.payer_phone + : stored_payment_app_info_->supported_delegations.payer_phone; } } // namespace payments
diff --git a/components/payments/content/utility/payment_manifest_parser.cc b/components/payments/content/utility/payment_manifest_parser.cc index 2b0f6cf8..3bad47c 100644 --- a/components/payments/content/utility/payment_manifest_parser.cc +++ b/components/payments/content/utility/payment_manifest_parser.cc
@@ -27,6 +27,8 @@ const size_t kMaximumNumberOfItems = 100U; const size_t kMaximumNumberOfSupportedOrigins = 100000; +const size_t kMaximumNumberOfSupportedDelegations = 4U; +const size_t kMaximumPrintedStringLength = 100U; const char* const kDefaultApplications = "default_applications"; const char* const kFingerprints = "fingerprints"; @@ -34,6 +36,7 @@ const char* const kHttpsPrefix = "https://"; const char* const kId = "id"; const char* const kMinVersion = "min_version"; +const char* const kPayment = "payment"; const char* const kPlatform = "platform"; const char* const kPlay = "play"; const char* const kPreferRelatedApplications = "prefer_related_applications"; @@ -42,6 +45,7 @@ const char* const kServiceWorker = "serviceworker"; const char* const kServiceWorkerSrc = "src"; const char* const kServiceWorkerUseCache = "use_cache"; +const char* const kSupportedDelegations = "supported_delegations"; const char* const kSupportedOrigins = "supported_origins"; const char* const kWebAppIcons = "icons"; const char* const kWebAppIconSizes = "sizes"; @@ -49,6 +53,21 @@ const char* const kWebAppIconType = "type"; const char* const kWebAppName = "name"; +// Truncates a std::string to 100 chars. This returns an empty string when the +// input should be ASCII but it's not. +const std::string ValidateAndTruncateIfNeeded(const std::string& input, + bool* out_is_ASCII) { + if (out_is_ASCII) { + *out_is_ASCII = base::IsStringASCII(input); + if (!*out_is_ASCII) + return ""; + } + + return input.size() > kMaximumPrintedStringLength + ? (input.substr(0, kMaximumPrintedStringLength) + "...") + : input; +} + // Parses the "default_applications": ["https://some/url"] from |dict| into // |web_app_manifest_urls|. Returns 'false' for invalid data. bool ParseDefaultApplications(base::DictionaryValue* dict, @@ -87,10 +106,13 @@ GURL url(item); if (!UrlUtil::IsValidManifestUrl(url)) { - log.Error(base::StringPrintf( - "\"%s\" entry in \"%s\" is not a valid URL with HTTPS scheme and is " - "not a valid localhost URL with HTTP scheme.", - item.c_str(), kDefaultApplications)); + const std::string item_to_print = + ValidateAndTruncateIfNeeded(item, nullptr); + log.Error( + base::StringPrintf("\"%s\" entry in \"%s\" is not a valid URL with " + "HTTPS scheme and is " + "not a valid localhost URL with HTTP scheme.", + item_to_print.c_str(), kDefaultApplications)); web_app_manifest_urls->clear(); return false; } @@ -163,10 +185,13 @@ GURL url(item); if (!UrlUtil::IsValidSupportedOrigin(url)) { supported_origins->clear(); + const std::string item_to_print = + ValidateAndTruncateIfNeeded(item, nullptr); log.Error(base::StringPrintf( - "\"%s\" entry in \"%s\" is not a valid origin with HTTPS scheme and " + "\"%s\" entry in \"%s\" is not a valid origin with HTTPS scheme " + "and " "is not a valid localhost origin with HTTP scheme.", - item.c_str(), kSupportedOrigins)); + item_to_print.c_str(), kSupportedOrigins)); return false; } @@ -634,6 +659,53 @@ ParsePreferredRelatedApplicationIdentifiers( *dict, log, &installation_info->preferred_app_ids); + base::DictionaryValue* payment_dict = nullptr; + if (dict->GetDictionary(kPayment, &payment_dict)) { + const base::ListValue* delegation_list = nullptr; + if (payment_dict->GetList(kSupportedDelegations, &delegation_list)) { + if (delegation_list->empty() || + delegation_list->GetSize() > kMaximumNumberOfSupportedDelegations) { + log.Error(base::StringPrintf( + "\"%s.%s\" must be a non-empty list of at most %zu entries.", + kPayment, kSupportedDelegations, + kMaximumNumberOfSupportedDelegations)); + return false; + } + for (const auto& delegation_item : *delegation_list) { + std::string delegation_name = delegation_item.GetString(); + if (delegation_name == "shippingAddress") { + installation_info->supported_delegations.shipping_address = true; + } else if (delegation_name == "payerName") { + installation_info->supported_delegations.payer_name = true; + } else if (delegation_name == "payerEmail") { + installation_info->supported_delegations.payer_email = true; + } else if (delegation_name == "payerPhone") { + installation_info->supported_delegations.payer_phone = true; + } else { // delegation_name is not valid + bool is_ASCII; + const std::string delegation_name_to_print = + ValidateAndTruncateIfNeeded(delegation_name, &is_ASCII); + if (!is_ASCII) { + log.Error("Entries in delegation list must be ASCII strings."); + } else { // ASCII string. + log.Error(base::StringPrintf( + "\"%s\" is not a valid value in \"%s\" array.", + delegation_name_to_print.c_str(), kSupportedDelegations)); + } + return false; + } + } + } else { // !payment_dict->GetList(kSupportedDelegations, &delegation_list) + log.Error(base::StringPrintf("\"%s\" member must have \"%s\" list", + kPayment, kSupportedDelegations)); + return false; + } + } else if (dict->HasKey(kPayment)) { + log.Error( + base::StringPrintf("\"%s\" member must be a dictionary", kPayment)); + return false; + } + return true; }
diff --git a/components/payments/content/utility/payment_manifest_parser_unittest.cc b/components/payments/content/utility/payment_manifest_parser_unittest.cc index 5ec89b1d..8b08fe37 100644 --- a/components/payments/content/utility/payment_manifest_parser_unittest.cc +++ b/components/payments/content/utility/payment_manifest_parser_unittest.cc
@@ -814,6 +814,84 @@ ExpectUnableToParseInstallInfo("{\"serviceworker\": {\"src\": \"\"}}"); } +// Test "payment" member format when every other member is well formed. +void TestPaymentMemberFormat(const std::string& payment_format) { + ExpectUnableToParseInstallInfo( + "{ " + " \"name\": \"Pay with BobPay\"," + " \"icons\": [{" + " \"src\": \"bobpay.png\"," + " \"sizes\": \"48x48\"," + " \"type\": \"image/png\"" + " }]," + " \"serviceworker\": {" + " \"src\": \"sw.js\"," + " \"scope\": \"/some/scope/\"," + " \"use_cache\": true" + " }," + " \"prefer_related_applications\": true," + " \"related_applications\": [{" + " \"platform\": \"play\"," + " \"id\": \"com.bobpay\"" + " }]," + + payment_format + "}"); +} + +TEST(PaymentManifestParserTest, EmptyPaymentMemberIsMalformed) { + TestPaymentMemberFormat("\"payment\": {}"); +} + +TEST(PaymentManifestParserTest, PaymentMemberMustBeADictionary_List) { + TestPaymentMemberFormat("\"payment\": [\"supported_delegations\"]"); +} + +TEST(PaymentManifestParserTest, PaymentMemberMustBeADictionary_String) { + TestPaymentMemberFormat("\"payment\": \"supported_delegations\""); +} + +TEST(PaymentManifestParserTest, PaymentMemberMustBeADictionary_Integer) { + TestPaymentMemberFormat("\"payment\": 1"); +} + +TEST(PaymentManifestParserTest, InvalidKeyInPaymentMemberIsMalformed) { + TestPaymentMemberFormat("\"payment\": {\"key\": \"value\"}"); +} + +TEST(PaymentManifestParserTest, SupportedDelegationsMustBeAList_String) { + TestPaymentMemberFormat( + "\"payment\": {\"supported_delegations\": \"string\"}"); +} + +TEST(PaymentManifestParserTest, SupportedDelegationsMustBeAList_Dictionary) { + TestPaymentMemberFormat( + "\"payment\": {\"supported_delegations\": {\"key\": \"value\"}}"); +} + +TEST(PaymentManifestParserTest, SupportedDelegationsMustBeAList_Integer) { + TestPaymentMemberFormat("\"payment\": {\"supported_delegations\": 1}"); +} + +TEST(PaymentManifestParserTest, EmptyListSupportedDelegationsIsMalformed) { + TestPaymentMemberFormat("\"payment\": {\"supported_delegations\": []}"); +} + +TEST(PaymentManifestParserTest, InvalidSupportedDelegationsIsMalformed) { + TestPaymentMemberFormat( + "\"payment\": {\"supported_delegations\": [\"random string\"]}"); +} + +TEST(PaymentManifestParserTest, + NonASCIICharsInSupportedDelegationsIsMalformed) { + TestPaymentMemberFormat("\"payment\": {\"supported_delegations\": [\"β\"]}"); +} + +TEST(PaymentManifestParserTest, TooLongSupportedDelegationsListIsMalformed) { + TestPaymentMemberFormat( + "\"payment\": {\"supported_delegations\": [" + + base::JoinString(std::vector<std::string>(101, "\"payerEmail\""), ", ") + + "]}"); +} + TEST(PaymentManifestParserTest, MinimumWellFormedInstallInfo) { WebAppInstallationInfo expected_installation_info; expected_installation_info.sw_js_url = "sw.js"; @@ -838,6 +916,10 @@ expected_installation_info.sw_scope = "/some/scope/"; expected_installation_info.sw_use_cache = true; expected_installation_info.preferred_app_ids = {"com.bobpay"}; + expected_installation_info.supported_delegations.shipping_address = true; + expected_installation_info.supported_delegations.payer_email = true; + expected_installation_info.supported_delegations.payer_name = false; + expected_installation_info.supported_delegations.payer_phone = false; PaymentManifestParser::WebAppIcon expected_icon; expected_icon.src = "bobpay.png"; @@ -863,7 +945,10 @@ " \"related_applications\": [{" " \"platform\": \"play\"," " \"id\": \"com.bobpay\"" - " }]" + " }]," + " \"payment\": {" + " \"supported_delegations\": [\"shippingAddress\", \"payerEmail\"]" + " }" "}", expected_installation_info, expected_icons); }
diff --git a/components/payments/content/web_app_manifest.h b/components/payments/content/web_app_manifest.h index 6bc94fec..bce3cbd2 100644 --- a/components/payments/content/web_app_manifest.h +++ b/components/payments/content/web_app_manifest.h
@@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "content/public/browser/supported_delegations.h" #include "third_party/skia/include/core/SkBitmap.h" namespace payments { @@ -43,6 +44,9 @@ // If "prefer_related_applications" is true in web app manifest, this is the // list of all "related_applications.id" values where "platform" is "play". std::vector<std::string> preferred_app_ids; + + // List of supported delegations for this payment app. + content::SupportedDelegations supported_delegations; }; } // namespace payments
diff --git a/components/prefs/json_pref_store.cc b/components/prefs/json_pref_store.cc index dc80ccd..3b9553c 100644 --- a/components/prefs/json_pref_store.cc +++ b/components/prefs/json_pref_store.cc
@@ -482,12 +482,11 @@ const bool success = serializer.Serialize(*prefs_); if (!success) { // Failed to serialize prefs file. Backup the existing prefs file and - // reset our existing prefs. + // crash. BackupPrefsFile(path_); CHECK(false) << "Failed to serialize preferences : " << path_ << "\nBacked up under " << path_.ReplaceExtension(kBadExtension); - prefs_.reset(new base::DictionaryValue()); } return success; }
diff --git a/components/prefs/pref_service.cc b/components/prefs/pref_service.cc index f0796fe..3c067f48 100644 --- a/components/prefs/pref_service.cc +++ b/components/prefs/pref_service.cc
@@ -465,34 +465,32 @@ } void PrefService::Set(const std::string& path, const base::Value& value) { - SetUserPrefValue(path, value.CreateDeepCopy()); + SetUserPrefValue(path, value.Clone()); } void PrefService::SetBoolean(const std::string& path, bool value) { - SetUserPrefValue(path, std::make_unique<base::Value>(value)); + SetUserPrefValue(path, base::Value(value)); } void PrefService::SetInteger(const std::string& path, int value) { - SetUserPrefValue(path, std::make_unique<base::Value>(value)); + SetUserPrefValue(path, base::Value(value)); } void PrefService::SetDouble(const std::string& path, double value) { - SetUserPrefValue(path, std::make_unique<base::Value>(value)); + SetUserPrefValue(path, base::Value(value)); } void PrefService::SetString(const std::string& path, const std::string& value) { - SetUserPrefValue(path, std::make_unique<base::Value>(value)); + SetUserPrefValue(path, base::Value(value)); } void PrefService::SetFilePath(const std::string& path, const base::FilePath& value) { - SetUserPrefValue( - path, base::Value::ToUniquePtrValue(base::CreateFilePathValue(value))); + SetUserPrefValue(path, base::CreateFilePathValue(value)); } void PrefService::SetInt64(const std::string& path, int64_t value) { - SetUserPrefValue(path, - base::Value::ToUniquePtrValue(util::Int64ToValue(value))); + SetUserPrefValue(path, util::Int64ToValue(value)); } int64_t PrefService::GetInt64(const std::string& path) const { @@ -503,8 +501,7 @@ } void PrefService::SetUint64(const std::string& path, uint64_t value) { - SetUserPrefValue(path, - std::make_unique<base::Value>(base::NumberToString(value))); + SetUserPrefValue(path, base::Value(base::NumberToString(value))); } uint64_t PrefService::GetUint64(const std::string& path) const { @@ -523,8 +520,7 @@ } void PrefService::SetTime(const std::string& path, base::Time value) { - SetUserPrefValue(path, - base::Value::ToUniquePtrValue(util::TimeToValue(value))); + SetUserPrefValue(path, util::TimeToValue(value)); } base::Time PrefService::GetTime(const std::string& path) const { @@ -535,8 +531,7 @@ } void PrefService::SetTimeDelta(const std::string& path, base::TimeDelta value) { - SetUserPrefValue( - path, base::Value::ToUniquePtrValue(util::TimeDeltaToValue(value))); + SetUserPrefValue(path, util::TimeDeltaToValue(value)); } base::TimeDelta PrefService::GetTimeDelta(const std::string& path) const { @@ -604,7 +599,7 @@ } void PrefService::SetUserPrefValue(const std::string& path, - std::unique_ptr<base::Value> new_value) { + base::Value new_value) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); const Preference* pref = FindPreference(path); @@ -612,14 +607,15 @@ NOTREACHED() << "Trying to write an unregistered pref: " << path; return; } - if (pref->GetType() != new_value->type()) { + if (pref->GetType() != new_value.type()) { NOTREACHED() << "Trying to set pref " << path << " of type " - << pref->GetType() << " to value of type " - << new_value->type(); + << pref->GetType() << " to value of type " << new_value.type(); return; } - user_pref_store_->SetValue(path, std::move(new_value), GetWriteFlags(pref)); + user_pref_store_->SetValue( + path, base::Value::ToUniquePtrValue(std::move(new_value)), + GetWriteFlags(pref)); } void PrefService::UpdateCommandLinePrefStore(PrefStore* command_line_store) {
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h index 9580b48..b50a31c 100644 --- a/components/prefs/pref_service.h +++ b/components/prefs/pref_service.h
@@ -428,8 +428,7 @@ // Sets the value for this pref path in the user pref store and informs the // PrefNotifier of the change. - void SetUserPrefValue(const std::string& path, - std::unique_ptr<base::Value> new_value); + void SetUserPrefValue(const std::string& path, base::Value new_value); // Load preferences from storage, attempting to diagnose and handle errors. // This should only be called from the constructor.
diff --git a/components/prefs/pref_service_unittest.cc b/components/prefs/pref_service_unittest.cc index 3bdcf35..4dc3d11 100644 --- a/components/prefs/pref_service_unittest.cc +++ b/components/prefs/pref_service_unittest.cc
@@ -399,7 +399,7 @@ EXPECT_EQ(entry.write_flags, flag_checker->GetLastFlagsAndClear()); prefs->SetUserPrefValue(entry.pref_name, - std::make_unique<base::DictionaryValue>()); + base::Value(base::Value::Type::DICTIONARY)); EXPECT_TRUE(flag_checker->last_write_flags_set()); EXPECT_EQ(entry.write_flags, flag_checker->GetLastFlagsAndClear()); }
diff --git a/components/test/components_test_suite.cc b/components/test/components_test_suite.cc index 62432e1..fa1e25f 100644 --- a/components/test/components_test_suite.cc +++ b/components/test/components_test_suite.cc
@@ -27,6 +27,7 @@ #include "components/test/ios_components_test_initializer.h" #else #include "content/public/common/content_client.h" +#include "content/public/common/network_service_util.h" #include "content/public/test/content_test_suite_base.h" #include "content/public/test/test_content_client_initializer.h" #include "content/public/test/unittest_test_suite.h" @@ -60,6 +61,8 @@ #if !defined(OS_IOS) gl::GLSurfaceTestSupport::InitializeOneOff(); + content::ForceInProcessNetworkService(true); + // Setup content scheme statics. { content::ContentClient content_client;
diff --git a/components/test/data/payments/bobpay_and_cards.js b/components/test/data/payments/bobpay_and_cards.js index 12917f2..5dd8806 100644 --- a/components/test/data/payments/bobpay_and_cards.js +++ b/components/test/data/payments/bobpay_and_cards.js
@@ -12,12 +12,29 @@ * * @param {!Array<!Object>} methods: Payment methods data for PaymentRequest * constructor. + * @param {boolean} requestShippingContact: Whether or not shipping address and + * payer's contact information are required. */ -function testPaymentMethods(methods) { +function testPaymentMethods(methods, requestShippingContact = false) { + const shippingOptions = requestShippingContact + ? [{ + id: 'freeShippingOption', + label: 'Free global shipping', + amount: {currency: 'USD', value: '0'}, + selected: true, + }] + : []; try { new PaymentRequest( methods, - {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}}) + {total: {label: 'Total', amount: {currency: 'USD', value: '5.00'}}, + shippingOptions}, + { + requestShipping: requestShippingContact, + requestPayerEmail: requestShippingContact, + requestPayerName: requestShippingContact, + requestPayerPhone: requestShippingContact, + }) .show() .then(function(resp) { resp.complete('success') @@ -42,7 +59,7 @@ * Launches the PaymentRequest UI with Bob Pay and credit cards as payment * methods. */ -function buy() { // eslint-disable-line no-unused-vars +function buy() { // eslint-disable-line no-unused-vars testPaymentMethods([ {supportedMethods: 'https://bobpay.com'}, { @@ -56,7 +73,7 @@ * Launches the PaymentRequest UI with kylepay.com and basic-card as payment * methods. kylepay.com hosts an installable payment app. */ -function testInstallableAppAndCard() { // eslint-disable-line no-unused-vars +function testInstallableAppAndCard() { // eslint-disable-line no-unused-vars testPaymentMethods([ {supportedMethods: 'https://kylepay.com/webpay'}, {supportedMethods: 'basic-card'},
diff --git a/components/test/data/payments/kylepay.com/app.js b/components/test/data/payments/kylepay.com/app.js index 856a895..cae2db1 100644 --- a/components/test/data/payments/kylepay.com/app.js +++ b/components/test/data/payments/kylepay.com/app.js
@@ -12,5 +12,27 @@ evt.respondWith({ methodName: evt.methodData[0].supportedMethods, details: {transactionId: '123'}, + shippingAddress: evt.paymentOptions.requestShipping + ? { + city: 'Reston', + country: 'US', + dependentLocality: '', + organization: 'Google', + phone: '+15555555555', + postalCode: '20190', + recipient: 'Jon Doe', + region: 'VA', + sortingCode: '', + addressLine: [ + '1875 Explorer St #1000', + ], + } + : {}, + shippingOption: evt.paymentOptions.requestShipping + ? evt.shippingOptions[0].id + : '', + payerName: evt.paymentOptions.requestPayerName ? 'Bob' : '', + payerEmail: evt.paymentOptions.requestPayerEmail ? 'bob@gmail.com' : '', + payerPhone: evt.paymentOptions.requestPayerPhone ? '+15555555555' : '', }); });
diff --git a/components/test/data/payments/kylepay.com/app.json b/components/test/data/payments/kylepay.com/app.json index 989d729..51e3a46 100644 --- a/components/test/data/payments/kylepay.com/app.json +++ b/components/test/data/payments/kylepay.com/app.json
@@ -10,5 +10,8 @@ "src": "app.js", "use_cache": false, "scope": "/webpay" + }, + "payment": { + "supported_delegations": ["shippingAddress", "payerName", "payerEmail", "payerPhone"] } }
diff --git a/components/ui_devtools/devtools_server_unittest.cc b/components/ui_devtools/devtools_server_unittest.cc index 3a17a96..2e37d37 100644 --- a/components/ui_devtools/devtools_server_unittest.cc +++ b/components/ui_devtools/devtools_server_unittest.cc
@@ -40,8 +40,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); auto network_service = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); mojo::Remote<network::mojom::NetworkContext> network_context_remote; network_service_ptr->CreateNetworkContext( network_context_remote.BindNewPipeAndPassReceiver(),
diff --git a/components/zucchini/fuzzers/BUILD.gn b/components/zucchini/fuzzers/BUILD.gn index e2720fc..effc22d 100644 --- a/components/zucchini/fuzzers/BUILD.gn +++ b/components/zucchini/fuzzers/BUILD.gn
@@ -5,10 +5,21 @@ import("//testing/libfuzzer/fuzzer_test.gni") import("//third_party/protobuf/proto_library.gni") +static_library("zucchini_fuzz_utils") { + sources = [ + "fuzz_utils.cc", + "fuzz_utils.h", + ] + deps = [ + "//base", + "//components/zucchini:zucchini_lib", + ] +} + # To download the corpus for local fuzzing use: # gsutil -m rsync \ # gs://clusterfuzz-corpus/libfuzzer/zucchini_disassembler_dex_fuzzer \ -# components/zucchini/fuzzing/testdata/disassembler_dex_fuzzer +# components/zucchini/fuzzing/testdata/disassembler_dex_fuzzer/ fuzzer_test("zucchini_disassembler_dex_fuzzer") { sources = [ "disassembler_dex_fuzzer.cc", @@ -22,12 +33,28 @@ # To download the corpus for local fuzzing use: # gsutil -m rsync \ # gs://clusterfuzz-corpus/libfuzzer/zucchini_disassembler_win32_fuzzer \ -# components/zucchini/fuzzing/testdata/disassembler_win32_fuzzer +# components/zucchini/fuzzing/testdata/disassembler_win32_fuzzer/ fuzzer_test("zucchini_disassembler_win32_fuzzer") { sources = [ "disassembler_win32_fuzzer.cc", ] deps = [ + ":zucchini_fuzz_utils", + "//base", + "//components/zucchini:zucchini_lib", + ] +} + +# To download the corpus for local fuzzing use: +# gsutil -m rsync \ +# gs://clusterfuzz-corpus/libfuzzer/zucchini_disassembler_elf_fuzzer \ +# components/zucchini/fuzzing/testdata/disassembler_elf_fuzzer/ +fuzzer_test("zucchini_disassembler_elf_fuzzer") { + sources = [ + "disassembler_elf_fuzzer.cc", + ] + deps = [ + ":zucchini_fuzz_utils", "//base", "//components/zucchini:zucchini_lib", ]
diff --git a/components/zucchini/fuzzers/disassembler_elf_fuzzer.cc b/components/zucchini/fuzzers/disassembler_elf_fuzzer.cc new file mode 100644 index 0000000..16c885d4 --- /dev/null +++ b/components/zucchini/fuzzers/disassembler_elf_fuzzer.cc
@@ -0,0 +1,45 @@ +// 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 "base/logging.h" +#include "components/zucchini/buffer_view.h" +#include "components/zucchini/disassembler.h" +#include "components/zucchini/disassembler_elf.h" +#include "components/zucchini/fuzzers/fuzz_utils.h" + +namespace { + +struct Environment { + Environment() { logging::SetMinLogLevel(logging::LOG_FATAL); } +}; + +} // namespace + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + static Environment env; + if (!size) + return 0; + // Prepare data. + std::vector<uint8_t> mutable_data(data, data + size); + zucchini::ConstBufferView image(mutable_data.data(), mutable_data.size()); + + // Create disassembler. Early exit on failure. + auto disassembler_elf_x64 = + zucchini::Disassembler::Make<zucchini::DisassemblerElfX64>(image); + if (disassembler_elf_x64) { + zucchini::ReadAndWriteReferences(std::move(disassembler_elf_x64), + &mutable_data); + return 0; + } + + auto disassembler_elf_x86 = + zucchini::Disassembler::Make<zucchini::DisassemblerElfX86>(image); + if (disassembler_elf_x86) + zucchini::ReadAndWriteReferences(std::move(disassembler_elf_x86), + &mutable_data); + return 0; +}
diff --git a/components/zucchini/fuzzers/disassembler_win32_fuzzer.cc b/components/zucchini/fuzzers/disassembler_win32_fuzzer.cc index e2f0f67..34a3565 100644 --- a/components/zucchini/fuzzers/disassembler_win32_fuzzer.cc +++ b/components/zucchini/fuzzers/disassembler_win32_fuzzer.cc
@@ -13,6 +13,7 @@ #include "components/zucchini/buffer_view.h" #include "components/zucchini/disassembler.h" #include "components/zucchini/disassembler_win32.h" +#include "components/zucchini/fuzzers/fuzz_utils.h" namespace { @@ -22,33 +23,6 @@ } }; -// Helper function that uses |disassembler| to read all references from -// |mutable_image| and write them back. -void ReadAndWriteReferences( - std::unique_ptr<zucchini::Disassembler> disassembler, - std::vector<uint8_t>* mutable_data) { - zucchini::MutableBufferView mutable_image(mutable_data->data(), - disassembler->size()); - std::vector<zucchini::Reference> references; - auto groups = disassembler->MakeReferenceGroups(); - std::map<zucchini::PoolTag, std::vector<zucchini::Reference>> - references_of_pool; - for (const auto& group : groups) { - auto reader = group.GetReader(disassembler.get()); - std::vector<zucchini::Reference>* refs = - &references_of_pool[group.pool_tag()]; - for (auto ref = reader->GetNext(); ref.has_value(); - ref = reader->GetNext()) { - refs->push_back(ref.value()); - } - } - for (const auto& group : groups) { - auto writer = group.GetWriter(mutable_image, disassembler.get()); - for (const auto& ref : references_of_pool[group.pool_tag()]) - writer->PutNext(ref); - } -} - } // namespace // Entry point for LibFuzzer. @@ -64,13 +38,15 @@ auto disassembler_win32x86 = zucchini::Disassembler::Make<zucchini::DisassemblerWin32X86>(image); if (disassembler_win32x86) { - ReadAndWriteReferences(std::move(disassembler_win32x86), &mutable_data); + zucchini::ReadAndWriteReferences(std::move(disassembler_win32x86), + &mutable_data); return 0; } auto disassembler_win32x64 = zucchini::Disassembler::Make<zucchini::DisassemblerWin32X64>(image); if (disassembler_win32x64) - ReadAndWriteReferences(std::move(disassembler_win32x64), &mutable_data); + zucchini::ReadAndWriteReferences(std::move(disassembler_win32x64), + &mutable_data); return 0; }
diff --git a/components/zucchini/fuzzers/fuzz_utils.cc b/components/zucchini/fuzzers/fuzz_utils.cc new file mode 100644 index 0000000..1fd89fa --- /dev/null +++ b/components/zucchini/fuzzers/fuzz_utils.cc
@@ -0,0 +1,40 @@ +// 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 "components/zucchini/fuzzers/fuzz_utils.h" + +#include <map> +#include <memory> +#include <vector> + +#include "components/zucchini/disassembler.h" + +namespace zucchini { + +void ReadAndWriteReferences( + std::unique_ptr<zucchini::Disassembler> disassembler, + std::vector<uint8_t>* mutable_data) { + zucchini::MutableBufferView mutable_image(mutable_data->data(), + disassembler->size()); + std::vector<zucchini::Reference> references; + auto groups = disassembler->MakeReferenceGroups(); + std::map<zucchini::PoolTag, std::vector<zucchini::Reference>> + references_of_pool; + for (const auto& group : groups) { + auto reader = group.GetReader(disassembler.get()); + std::vector<zucchini::Reference>* refs = + &references_of_pool[group.pool_tag()]; + for (auto ref = reader->GetNext(); ref.has_value(); + ref = reader->GetNext()) { + refs->push_back(ref.value()); + } + } + for (const auto& group : groups) { + auto writer = group.GetWriter(mutable_image, disassembler.get()); + for (const auto& ref : references_of_pool[group.pool_tag()]) + writer->PutNext(ref); + } +} + +} // namespace zucchini
diff --git a/components/zucchini/fuzzers/fuzz_utils.h b/components/zucchini/fuzzers/fuzz_utils.h new file mode 100644 index 0000000..0caaab4 --- /dev/null +++ b/components/zucchini/fuzzers/fuzz_utils.h
@@ -0,0 +1,25 @@ +// 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 COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_ +#define COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_ + +#include <stdint.h> + +#include <memory> +#include <vector> + +#include "components/zucchini/disassembler.h" + +namespace zucchini { + +// Helper function that uses |disassembler| to read all references from +// |mutable_data| and write them back. +void ReadAndWriteReferences( + std::unique_ptr<zucchini::Disassembler> disassembler, + std::vector<uint8_t>* mutable_data); + +} // namespace zucchini + +#endif // COMPONENTS_ZUCCHINI_FUZZERS_FUZZ_UTILS_H_
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index e6f870a..169176b6 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -165,7 +165,6 @@ "//services/metrics/public/cpp:metrics_cpp", "//services/network:network_service", "//services/network/public/cpp", - "//services/network/public/cpp:manifest", "//services/network/public/mojom", "//services/resource_coordinator:lib", "//services/resource_coordinator/public/cpp:resource_coordinator_cpp",
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc index a88a9b43..5245c01 100644 --- a/content/browser/back_forward_cache_browsertest.cc +++ b/content/browser/back_forward_cache_browsertest.cc
@@ -2517,8 +2517,15 @@ ExpectEvictedIsEmpty(FROM_HERE); } +#if defined(OS_LINUX) || defined(OS_WIN) +// Flaky. https://crbug.com/1013802 +#define MAYBE_DisableBackForwardCacheIframe \ + DISABLED_DisableBackForwardCacheIframe +#else +#define MAYBE_DisableBackForwardCacheIframe DisableBackForwardCacheIframe +#endif IN_PROC_BROWSER_TEST_F(BackForwardCacheBrowserTest, - DisableBackForwardCacheIframe) { + MAYBE_DisableBackForwardCacheIframe) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url_a(embedded_test_server()->GetURL( "a.com", "/cross_site_iframe_factory.html?a(b)"));
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc index 7133a03..57e4876 100644 --- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc +++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/containers/flat_set.h" #include "base/metrics/histogram_macros.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -159,28 +160,32 @@ std::unique_ptr<device::BluetoothDiscoveryFilter> ComputeScanFilter( const base::Optional< std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters) { - std::unordered_set<BluetoothUUID, device::BluetoothUUIDHash> services; - - if (filters) { - for (const auto& filter : filters.value()) { - if (!filter->services) { - continue; - } - for (const auto& service : filter->services.value()) { - services.insert(service); - } - } - } - // There isn't much support for GATT over BR/EDR from neither platforms nor // devices so performing a Dual scan will find devices that the API is not // able to interact with. To avoid wasting power and confusing users with // devices they are not able to interact with, we only perform an LE Scan. auto discovery_filter = std::make_unique<device::BluetoothDiscoveryFilter>( device::BLUETOOTH_TRANSPORT_LE); - for (const BluetoothUUID& service : services) { - discovery_filter->AddUUID(service); + + if (filters) { + for (const auto& filter : filters.value()) { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + bool useful_filter = false; + if (filter->services) { + device_filter.uuids = + base::flat_set<device::BluetoothUUID>(filter->services.value()); + useful_filter = true; + } + if (filter->name) { + device_filter.name = filter->name.value(); + useful_filter = true; + } + if (useful_filter) { + discovery_filter->AddDeviceFilter(device_filter); + } + } } + return discovery_filter; }
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 49febb0..3ccddc6 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -80,6 +80,7 @@ #include "content/browser/media/media_internals.h" #include "content/browser/media/media_keys_listener_manager_impl.h" #include "content/browser/net/browser_online_state_observer.h" +#include "content/browser/network_service_instance_impl.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/scheduler/browser_task_executor.h" @@ -103,6 +104,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/gpu_data_manager_observer.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/site_isolation_policy.h" #include "content/public/browser/system_connector.h" @@ -1090,6 +1092,8 @@ memory_pressure_monitor_.reset(); + ShutDownNetworkService(); + #if defined(OS_MACOSX) BrowserCompositorMac::DisableRecyclingForShutdown(); #endif
diff --git a/content/browser/browsing_data/browsing_data_browsertest_utils.cc b/content/browser/browsing_data/browsing_data_browsertest_utils.cc index d93ac23..61ee6f4 100644 --- a/content/browser/browsing_data/browsing_data_browsertest_utils.cc +++ b/content/browser/browsing_data/browsing_data_browsertest_utils.cc
@@ -15,16 +15,17 @@ #include "components/network_session_configurator/common/network_switches.h" #include "content/browser/browsing_data/browsing_data_test_utils.h" #include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/browser/service_worker_context.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_usage_info.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/content_browser_test_utils.h" +#include "mojo/public/cpp/bindings/remote.h" #include "net/base/url_util.h" #include "net/test/embedded_test_server/http_response.h" +#include "services/network/public/mojom/network_service.mojom.h" #include "services/network/public/mojom/network_service_test.mojom.h" #include "testing/gtest/include/gtest/gtest.h" @@ -163,9 +164,9 @@ } void SetUpMockCertVerifier(int32_t default_result) { - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); network_service_test->MockCertVerifierSetDefaultResult(
diff --git a/content/browser/builtin_service_manifests.cc b/content/browser/builtin_service_manifests.cc index 7d7b13e..2be52db 100644 --- a/content/browser/builtin_service_manifests.cc +++ b/content/browser/builtin_service_manifests.cc
@@ -14,7 +14,6 @@ #include "content/public/app/content_utility_manifest.h" #include "content/public/browser/content_browser_client.h" #include "content/public/common/content_features.h" -#include "content/public/common/network_service_util.h" #include "content/public/common/service_names.mojom.h" #include "media/mojo/buildflags.h" #include "media/mojo/services/cdm_manifest.h" @@ -24,7 +23,6 @@ #include "services/device/public/cpp/manifest.h" #include "services/media_session/public/cpp/manifest.h" #include "services/metrics/public/cpp/manifest.h" -#include "services/network/public/cpp/manifest.h" #include "services/service_manager/public/cpp/manifest_builder.h" #include "services/tracing/manifest.h" @@ -67,11 +65,6 @@ device::GetManifest(), media_session::GetManifest(), metrics::GetManifest(), - network::GetManifest( - IsInProcessNetworkService() - ? service_manager::Manifest::ExecutionMode::kInProcessBuiltin - : service_manager::Manifest::ExecutionMode:: - kOutOfProcessBuiltin), tracing::GetManifest(), }}; return *manifests;
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc index 9b2628d..60266cc 100644 --- a/content/browser/frame_host/navigation_request.cc +++ b/content/browser/frame_host/navigation_request.cc
@@ -1200,9 +1200,20 @@ // starting SiteInstance. starting_site_instance_ = frame_tree_node->current_frame_host()->GetSiteInstance(); - site_url_ = GetSiteForCommonParamsURL(); + // Let the NTP override the navigation params and pretend that this is a + // browser-initiated, bookmark-like navigation. + bool is_renderer_initiated = !browser_initiated_; + Referrer referrer(*common_params_->referrer); + GetContentClient()->browser()->OverrideNavigationParams( + starting_site_instance_.get(), &common_params_->transition, + &is_renderer_initiated, &referrer, &common_params_->initiator_origin); + common_params_->referrer = + blink::mojom::Referrer::New(referrer.url, referrer.policy); + browser_initiated_ = !is_renderer_initiated; + commit_params_->is_browser_initiated = browser_initiated_; + // Compute the redirect chain. // TODO(clamy): Try to simplify this and have the redirects be part of // CommonNavigationParams. @@ -1841,7 +1852,7 @@ // anymore from now while the error page is being loaded. loader_.reset(); - common_params_->previews_state = content::PREVIEWS_OFF; + common_params_->previews_state = PREVIEWS_OFF; if (status.ssl_info.has_value()) ssl_info_ = status.ssl_info; @@ -2795,7 +2806,7 @@ void NavigationRequest::RecordDownloadUseCountersPrePolicyCheck( NavigationDownloadPolicy download_policy) { - content::RenderFrameHost* rfh = frame_tree_node_->current_frame_host(); + RenderFrameHost* rfh = frame_tree_node_->current_frame_host(); GetContentClient()->browser()->LogWebFeatureForCurrentPage( rfh, blink::mojom::WebFeature::kDownloadPrePolicyCheck); @@ -2845,7 +2856,7 @@ void NavigationRequest::RecordDownloadUseCountersPostPolicyCheck() { DCHECK(is_download_); - content::RenderFrameHost* rfh = frame_tree_node_->current_frame_host(); + RenderFrameHost* rfh = frame_tree_node_->current_frame_host(); GetContentClient()->browser()->LogWebFeatureForCurrentPage( rfh, blink::mojom::WebFeature::kDownloadPostPolicyCheck); }
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h index 4c2d6246..affb435 100644 --- a/content/browser/frame_host/navigation_request.h +++ b/content/browser/frame_host/navigation_request.h
@@ -842,10 +842,13 @@ // modified during redirects. // Note: |commit_params_| is not const because was_discarded will // be set in CreatedNavigationRequest. + // Note: |browser_initiated_| and |common_params_| may be mutated by + // ContentBrowserClient::OverrideNavigationParams at StartNavigation time + // (i.e. before we actually kick off the navigation). mojom::CommonNavigationParamsPtr common_params_; mojom::BeginNavigationParamsPtr begin_params_; mojom::CommitNavigationParamsPtr commit_params_; - const bool browser_initiated_; + bool browser_initiated_; // Stores the NavigationUIData for this navigation until the NavigationHandle // is created. This can be null if the embedded did not provide a
diff --git a/content/browser/frame_host/navigator_impl.cc b/content/browser/frame_host/navigator_impl.cc index 869f6f5..66c8a81 100644 --- a/content/browser/frame_host/navigator_impl.cc +++ b/content/browser/frame_host/navigator_impl.cc
@@ -474,10 +474,6 @@ params.blob_url_loader_factory = std::move(blob_url_loader_factory); params.href_translate = href_translate; - GetContentClient()->browser()->OverrideNavigationParams( - current_site_instance, ¶ms.transition, ¶ms.is_renderer_initiated, - ¶ms.referrer, ¶ms.initiator_origin); - if (delegate_) delegate_->OpenURL(params); } @@ -529,14 +525,8 @@ return; } - SiteInstance* current_site_instance = render_frame_host->GetSiteInstance(); - base::Optional<url::Origin> final_initiator_origin = initiator_origin; - GetContentClient()->browser()->OverrideNavigationParams( - current_site_instance, &page_transition, &is_renderer_initiated, - &referrer_to_use, &final_initiator_origin); - controller_->NavigateFromFrameProxy( - render_frame_host, url, final_initiator_origin, is_renderer_initiated, + render_frame_host, url, initiator_origin, is_renderer_initiated, source_site_instance, referrer_to_use, page_transition, should_replace_current_entry, download_policy, method, post_body, extra_headers, std::move(blob_url_loader_factory));
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index 08a8d9f..6fe07e1 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -4303,10 +4303,19 @@ main_frame->BindBrowserInterfaceBrokerReceiver( browser_interface_broker.InitWithNewPipeAndPassReceiver()); + // TODO(danakj): The main frame's RenderWidgetHost has no RenderWidgetHostView + // yet here. It seems like it should though? In the meantime we send some + // nonsense with a semi-valid but incorrect ScreenInfo (it needs a + // RenderWidgetHostView to be correct). An updates VisualProperties will get + // to the RenderWidget eventually. + VisualProperties visual_properties; + main_frame->GetLocalRenderWidgetHost()->GetScreenInfo( + &visual_properties.screen_info); + mojom::CreateNewWindowReplyPtr reply = mojom::CreateNewWindowReply::New( main_frame->GetRenderViewHost()->GetRoutingID(), main_frame->GetRoutingID(), - main_frame->GetRenderViewHost()->GetWidget()->GetRoutingID(), + main_frame->GetLocalRenderWidgetHost()->GetRoutingID(), visual_properties, mojom::DocumentScopedInterfaceBundle::New( std::move(main_frame_interface_provider_info), std::move(document_interface_broker_content),
diff --git a/content/browser/navigation_browsertest.cc b/content/browser/navigation_browsertest.cc index 1204266..5d20d6b 100644 --- a/content/browser/navigation_browsertest.cc +++ b/content/browser/navigation_browsertest.cc
@@ -57,7 +57,6 @@ #include "mojo/public/cpp/bindings/pending_associated_remote.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "net/base/features.h" -#include "net/base/filename_util.h" #include "net/base/load_flags.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/controllable_http_response.h" @@ -782,121 +781,6 @@ controller.GetLastCommittedEntry()->GetVirtualURL()); } -class NavigationDisableWebSecurityTest : public NavigationBrowserTest { - public: - NavigationDisableWebSecurityTest() { - // To get around DataUrlNavigationThrottle. Other attempts at getting around - // it don't work, i.e.: - // -if the request is made in a child frame then the frame is torn down - // immediately on process killing so the navigation doesn't complete - // -if it's classified as same document, then a DCHECK in - // NavigationRequest::CreateRendererInitiated fires - feature_list_.InitAndEnableFeature( - features::kAllowContentInitiatedDataUrlNavigations); - } - - protected: - void SetUpCommandLine(base::CommandLine* command_line) override { - // Simulate a compromised renderer, otherwise the cross-origin request to - // file: is blocked. - command_line->AppendSwitch(switches::kDisableWebSecurity); - NavigationBrowserTest::SetUpCommandLine(command_line); - } - - private: - base::test::ScopedFeatureList feature_list_; -}; - -// Test to verify that an exploited renderer process trying to specify a -// non-empty URL for base_url_for_data_url on navigation is correctly -// terminated. -// TODO(nasko): Move this test to security_exploit_browsertest.cc. -IN_PROC_BROWSER_TEST_P(NavigationDisableWebSecurityTest, - ValidateBaseUrlForDataUrl) { - GURL start_url(embedded_test_server()->GetURL("/title1.html")); - EXPECT_TRUE(NavigateToURL(shell(), start_url)); - - RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( - shell()->web_contents()->GetMainFrame()); - - GURL data_url("data:text/html,foo"); - base::FilePath file_path = GetTestFilePath("", "simple_page.html"); - GURL file_url = net::FilePathToFileURL(file_path); - - // Setup a BeginNavigate IPC with non-empty base_url_for_data_url. - mojom::CommonNavigationParamsPtr common_params = - mojom::CommonNavigationParams::New( - data_url, url::Origin::Create(data_url), - blink::mojom::Referrer::New(), ui::PAGE_TRANSITION_LINK, - mojom::NavigationType::DIFFERENT_DOCUMENT, NavigationDownloadPolicy(), - false /* should_replace_current_entry */, - file_url, /* base_url_for_data_url */ - GURL() /* history_url_for_data_url */, PREVIEWS_UNSPECIFIED, - base::TimeTicks::Now() /* navigation_start */, "GET", - nullptr /* post_data */, base::Optional<SourceLocation>(), - false /* started_from_context_menu */, false /* has_user_gesture */, - InitiatorCSPInfo(), - std::vector<int>() /* initiator_origin_trial_features */, - std::string() /* href_translate */, - false /* is_history_navigation_in_new_child_frame */, - base::TimeTicks()); - mojom::BeginNavigationParamsPtr begin_params = - mojom::BeginNavigationParams::New( - std::string() /* headers */, net::LOAD_NORMAL, - false /* skip_service_worker */, - blink::mojom::RequestContextType::LOCATION, - blink::WebMixedContentContextType::kBlockable, - false /* is_form_submission */, - false /* was_initiated_by_link_click */, - GURL() /* searchable_form_url */, - std::string() /* searchable_form_encoding */, - GURL() /* client_side_redirect_url */, - base::nullopt /* devtools_initiator_info */); - - // Receiving the invalid IPC message should lead to renderer process - // termination. - RenderProcessHostKillWaiter process_kill_waiter(rfh->GetProcess()); - - mojo::PendingAssociatedRemote<mojom::NavigationClient> navigation_client; - if (IsPerNavigationMojoInterfaceEnabled()) { - auto navigation_client_receiver = - navigation_client.InitWithNewEndpointAndPassReceiver(); - rfh->frame_host_receiver_for_testing().impl()->BeginNavigation( - std::move(common_params), std::move(begin_params), mojo::NullRemote(), - std::move(navigation_client), mojo::NullRemote()); - } else { - rfh->frame_host_receiver_for_testing().impl()->BeginNavigation( - std::move(common_params), std::move(begin_params), mojo::NullRemote(), - mojo::NullAssociatedRemote(), mojo::NullRemote()); - } - EXPECT_EQ(bad_message::RFH_BASE_URL_FOR_DATA_URL_SPECIFIED, - process_kill_waiter.Wait()); - - EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( - rfh->GetProcess()->GetID(), file_path)); - - // Reload the page to create another renderer process. - TestNavigationObserver tab_observer(shell()->web_contents(), 1); - shell()->web_contents()->GetController().Reload(ReloadType::NORMAL, false); - tab_observer.Wait(); - - // Make an XHR request to check if the page has access. - std::string script = base::StringPrintf( - "var xhr = new XMLHttpRequest()\n" - "xhr.open('GET', '%s', false);\n" - "try { xhr.send(); } catch (e) {}\n" - "window.domAutomationController.send(xhr.responseText);", - file_url.spec().c_str()); - std::string result; - EXPECT_TRUE( - ExecuteScriptAndExtractString(shell()->web_contents(), script, &result)); - EXPECT_TRUE(result.empty()); -} - -INSTANTIATE_TEST_SUITE_P(/* no prefix */, - NavigationDisableWebSecurityTest, - ::testing::Bool()); - IN_PROC_BROWSER_TEST_P(NavigationBrowserTest, BackFollowedByReload) { // First, make two history entries. GURL url1(embedded_test_server()->GetURL("/title1.html"));
diff --git a/content/browser/network_service_browsertest.cc b/content/browser/network_service_browsertest.cc index fbc15ff..0055fa4b 100644 --- a/content/browser/network_service_browsertest.cc +++ b/content/browser/network_service_browsertest.cc
@@ -11,7 +11,6 @@ #include "content/browser/storage_partition_impl.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/url_data_source.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_observer.h" @@ -20,7 +19,6 @@ #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/common/url_utils.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" @@ -40,7 +38,6 @@ #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #if defined(OS_ANDROID) #include "base/android/application_status_listener.h" @@ -344,9 +341,9 @@ if (IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // TODO(crbug.com/901026): Make sure the network process is started to avoid a // deadlock on Android. network_service_test.FlushForTesting(); @@ -373,20 +370,19 @@ if (IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); - network::mojom::NetworkServiceTestPtrInfo network_service_test_info = - network_service_test.PassInterface(); + mojo::PendingRemote<network::mojom::NetworkServiceTest> + pending_network_service_test; + GetNetworkService()->BindTestInterface( + pending_network_service_test.InitWithNewPipeAndPassReceiver()); net::EmbeddedTestServer http_server; http_server.AddDefaultHandlers(GetTestDataFilePath()); http_server.RegisterRequestMonitor(base::BindLambdaForTesting( [&](const net::test_server::HttpRequest& request) { if (request.relative_url == "/hung") { - network::mojom::NetworkServiceTestPtr network_service_test2( - std::move(network_service_test_info)); - network_service_test2->SimulateCrash(); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test( + std::move(pending_network_service_test)); + network_service_test->SimulateCrash(); } })); EXPECT_TRUE(http_server.Start()); @@ -402,9 +398,9 @@ if (IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); network_service_test->CrashOnGetCookieList(); EXPECT_TRUE(
diff --git a/content/browser/network_service_instance_impl.cc b/content/browser/network_service_instance_impl.cc index b4d6e97..a0e11b11 100644 --- a/content/browser/network_service_instance_impl.cc +++ b/content/browser/network_service_instance_impl.cc
@@ -13,6 +13,7 @@ #include "base/deferred_sequenced_task_runner.h" #include "base/environment.h" #include "base/feature_list.h" +#include "base/message_loop/message_pump_type.h" #include "base/metrics/histogram_macros.h" #include "base/no_destructor.h" #include "base/strings/string_util.h" @@ -20,6 +21,7 @@ #include "base/synchronization/waitable_event.h" #include "base/task/post_task.h" #include "base/threading/sequence_local_storage_slot.h" +#include "base/threading/thread.h" #include "build/build_config.h" #include "content/browser/browser_main_loop.h" #include "content/browser/network_service_client.h" @@ -27,16 +29,17 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/service_process_host.h" #include "content/public/common/network_service_util.h" #include "content/public/common/service_names.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" #include "net/log/net_log_util.h" #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/network_switches.h" #include "services/network/public/mojom/net_log.mojom.h" #include "services/network/public/mojom/network_change_manager.mojom.h" -#include "services/service_manager/public/cpp/connector.h" +#include "services/network/public/mojom/network_service_test.mojom.h" namespace content { @@ -68,6 +71,55 @@ return service->GetOrCreateValue(); } +// If this feature is enabled, the Network Service will run on its own thread +// when running in-process; otherwise it will run on the IO thread. +// +// On Chrome OS, the Network Service must run on the IO thread because +// ProfileIOData and NetworkContext both try to set up NSS, which has to be +// called from the IO thread. +const base::Feature kNetworkServiceDedicatedThread { + "NetworkServiceDedicatedThread", +#if defined(OS_CHROMEOS) + base::FEATURE_DISABLED_BY_DEFAULT +#else + base::FEATURE_ENABLED_BY_DEFAULT +#endif +}; + +base::Thread& GetNetworkServiceDedicatedThread() { + static base::NoDestructor<base::Thread> thread{"NetworkService"}; + DCHECK(base::FeatureList::IsEnabled(kNetworkServiceDedicatedThread)); + return *thread; +} + +void CreateInProcessNetworkServiceOnThread( + mojo::PendingReceiver<network::mojom::NetworkService> receiver) { + // The test interface doesn't need to be implemented in the in-process case. + auto registry = std::make_unique<service_manager::BinderRegistry>(); + registry->AddInterface(base::BindRepeating( + [](mojo::PendingReceiver<network::mojom::NetworkServiceTest>) {})); + + static base::NoDestructor<network::NetworkService> service( + std::move(registry), std::move(receiver)); +} + +void CreateInProcessNetworkService( + mojo::PendingReceiver<network::mojom::NetworkService> receiver) { + scoped_refptr<base::SingleThreadTaskRunner> task_runner; + if (base::FeatureList::IsEnabled(kNetworkServiceDedicatedThread)) { + base::Thread::Options options(base::MessagePumpType::IO, 0); + GetNetworkServiceDedicatedThread().StartWithOptions(options); + task_runner = GetNetworkServiceDedicatedThread().task_runner(); + } else { + task_runner = base::CreateSingleThreadTaskRunner({BrowserThread::IO}); + } + + GetNetworkTaskRunner()->StartWithTaskRunner(task_runner); + task_runner->PostTask(FROM_HERE, + base::BindOnce(&CreateInProcessNetworkServiceOnThread, + std::move(receiver))); +} + network::mojom::NetworkServiceParamsPtr CreateNetworkServiceParams() { network::mojom::NetworkServiceParamsPtr network_service_params = network::mojom::NetworkServiceParams::New(); @@ -166,6 +218,13 @@ return net::NetLogCaptureMode::kDefault; } +scoped_refptr<base::DeferredSequencedTaskRunner>& +GetNetworkTaskRunnerStorage() { + static base::NoDestructor<scoped_refptr<base::DeferredSequencedTaskRunner>> + storage; + return *storage; +} + } // namespace network::mojom::NetworkService* GetNetworkService() { @@ -183,12 +242,21 @@ auto request = mojo::MakeRequest(g_network_service_ptr); auto leaked_pipe = request.PassMessagePipe().release(); } else { - if (GetSystemConnector() && // null in unit tests. - !g_force_create_network_service_directly) { - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - g_network_service_ptr); + if (!g_force_create_network_service_directly) { + mojo::PendingReceiver<network::mojom::NetworkService> receiver = + mojo::MakeRequest(g_network_service_ptr); g_network_service_ptr->set_connection_error_handler( base::BindOnce(&OnNetworkServiceCrash)); + if (IsInProcessNetworkService()) { + CreateInProcessNetworkService(std::move(receiver)); + } else { + ServiceProcessHost::Launch( + std::move(receiver), + ServiceProcessHost::Options() + .WithSandboxType(service_manager::SANDBOX_TYPE_NETWORK) + .WithDisplayName(base::UTF8ToUTF16("Network Service")) + .Pass()); + } } else { // This should only be reached in unit tests. if (BrowserThread::CurrentlyOn(BrowserThread::IO)) { @@ -368,9 +436,10 @@ scoped_refptr<base::DeferredSequencedTaskRunner> GetNetworkTaskRunner() { DCHECK(IsInProcessNetworkService()); - static base::NoDestructor<scoped_refptr<base::DeferredSequencedTaskRunner>> - instance(new base::DeferredSequencedTaskRunner()); - return instance->get(); + auto& storage = GetNetworkTaskRunnerStorage(); + if (!storage) + storage = base::MakeRefCounted<base::DeferredSequencedTaskRunner>(); + return storage; } void ForceCreateNetworkServiceDirectlyForTesting() { @@ -378,8 +447,13 @@ } void ResetNetworkServiceForTesting() { + ShutDownNetworkService(); +} + +void ShutDownNetworkService() { delete g_network_service_ptr; g_network_service_ptr = nullptr; + GetNetworkTaskRunnerStorage().reset(); } NetworkServiceAvailability GetNetworkServiceAvailability() {
diff --git a/content/browser/network_service_instance_impl.h b/content/browser/network_service_instance_impl.h index 9960e94..fd7c315 100644 --- a/content/browser/network_service_instance_impl.h +++ b/content/browser/network_service_instance_impl.h
@@ -59,6 +59,10 @@ CONTENT_EXPORT void AddNetworkServiceDebugEvent(const std::string& event); CONTENT_EXPORT std::string GetNetworkServiceDebugEventsString(); +// Shuts down the in-process network service or disconnects from the out-of- +// process one, allowing it to shut down. +CONTENT_EXPORT void ShutDownNetworkService(); + } // namespace content #endif // CONTENT_BROWSER_NETWORK_SERVICE_INSTANCE_IMPL_H_
diff --git a/content/browser/network_service_restart_browsertest.cc b/content/browser/network_service_restart_browsertest.cc index 94b43ac..15c6d94 100644 --- a/content/browser/network_service_restart_browsertest.cc +++ b/content/browser/network_service_restart_browsertest.cc
@@ -29,11 +29,9 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" @@ -52,7 +50,6 @@ #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/network_service.mojom.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #include "third_party/blink/public/common/features.h" #if BUILDFLAG(ENABLE_PLUGINS) @@ -1202,18 +1199,19 @@ MAYBE_SyncCallDuringRestart) { if (IsInProcessNetworkService()) return; - network::mojom::NetworkServiceTestPtr network_service_test; base::RunLoop run_loop; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // Crash the network service, but do not wait for full startup. - network_service_test.set_connection_error_handler(run_loop.QuitClosure()); + network_service_test.set_disconnect_handler(run_loop.QuitClosure()); network_service_test->SimulateCrash(); run_loop.Run(); - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + network_service_test.reset(); + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // Sync call should be fine, even though network process is still starting up. mojo::ScopedAllowSyncCallForTesting allow_sync_call;
diff --git a/content/browser/payments/payment_app_database.cc b/content/browser/payments/payment_app_database.cc index f86adc3..376f1b3 100644 --- a/content/browser/payments/payment_app_database.cc +++ b/content/browser/payments/payment_app_database.cc
@@ -87,9 +87,9 @@ return instrument; } -StoredSupportedDelegations ToStoredSupportedDelegations( +SupportedDelegations ToSupportedDelegations( const content::SupportedDelegationsProto& supported_delegations_proto) { - StoredSupportedDelegations supported_delegations; + SupportedDelegations supported_delegations; if (supported_delegations_proto.has_shipping_address()) { supported_delegations.shipping_address = supported_delegations_proto.shipping_address(); @@ -126,7 +126,7 @@ } app->user_hint = app_proto.user_hint(); app->supported_delegations = - ToStoredSupportedDelegations(app_proto.supported_delegations()); + ToSupportedDelegations(app_proto.supported_delegations()); if (!app_proto.icon().empty()) { std::string icon_raw_data; @@ -541,6 +541,7 @@ const std::string& name, const std::string& icon, const std::string& method, + const SupportedDelegations& supported_delegations, SetPaymentAppInfoCallback callback) { DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId()); @@ -548,7 +549,7 @@ registration_id, base::BindOnce(&PaymentAppDatabase::DidFindRegistrationToSetPaymentApp, weak_ptr_factory_.GetWeakPtr(), instrument_key, name, icon, - method, std::move(callback))); + method, supported_delegations, std::move(callback))); } void PaymentAppDatabase::DidFindRegistrationToSetPaymentApp( @@ -556,6 +557,7 @@ const std::string& name, const std::string& icon, const std::string& method, + const SupportedDelegations& supported_delegations, SetPaymentAppInfoCallback callback, blink::ServiceWorkerStatusCode status, scoped_refptr<ServiceWorkerRegistration> registration) { @@ -572,6 +574,19 @@ payment_app_proto.set_name(name); payment_app_proto.set_icon(icon); + // Set supported delegations. + auto supported_delegations_proto = + std::make_unique<SupportedDelegationsProto>(); + supported_delegations_proto->set_shipping_address( + supported_delegations.shipping_address); + supported_delegations_proto->set_payer_name(supported_delegations.payer_name); + supported_delegations_proto->set_payer_phone( + supported_delegations.payer_phone); + supported_delegations_proto->set_payer_email( + supported_delegations.payer_email); + payment_app_proto.set_allocated_supported_delegations( + supported_delegations_proto.release()); + std::string serialized_payment_app; bool success = payment_app_proto.SerializeToString(&serialized_payment_app); DCHECK(success);
diff --git a/content/browser/payments/payment_app_database.h b/content/browser/payments/payment_app_database.h index 9e4a527..92ef8f8 100644 --- a/content/browser/payments/payment_app_database.h +++ b/content/browser/payments/payment_app_database.h
@@ -89,6 +89,7 @@ const std::string& name, const std::string& icon, const std::string& method, + const SupportedDelegations& supported_delegations, SetPaymentAppInfoCallback callback); private: @@ -233,6 +234,7 @@ const std::string& name, const std::string& icon, const std::string& method, + const SupportedDelegations& supported_delegations, SetPaymentAppInfoCallback callback, blink::ServiceWorkerStatusCode status, scoped_refptr<ServiceWorkerRegistration> registration);
diff --git a/content/browser/payments/payment_app_installer.cc b/content/browser/payments/payment_app_installer.cc index 2cbc101..7d5827e 100644 --- a/content/browser/payments/payment_app_installer.cc +++ b/content/browser/payments/payment_app_installer.cc
@@ -35,12 +35,14 @@ const GURL& sw_url, const GURL& scope, const std::string& method, + const SupportedDelegations& supported_delegations, PaymentAppInstaller::InstallPaymentAppCallback callback) : app_name_(app_name), app_icon_(app_icon), sw_url_(sw_url), scope_(scope), method_(method), + supported_delegations_(supported_delegations), callback_(std::move(callback)) { DCHECK_CURRENTLY_ON(BrowserThread::UI); } @@ -142,7 +144,8 @@ FROM_HERE, ServiceWorkerContext::GetCoreThreadId(), base::BindOnce(&SelfDeleteInstaller::SetPaymentAppInfoOnCoreThread, this, payment_app_context, registration_id_, - scope_.spec(), app_name_, app_icon_, method_)); + scope_.spec(), app_name_, app_icon_, method_, + supported_delegations_)); } void SetPaymentAppInfoOnCoreThread( @@ -151,12 +154,14 @@ const std::string& instrument_key, const std::string& name, const std::string& app_icon, - const std::string& method) { + const std::string& method, + const SupportedDelegations& supported_delegations) { DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId()); payment_app_context->payment_app_database() ->SetPaymentAppInfoForRegisteredServiceWorker( registration_id, instrument_key, name, app_icon, method, + supported_delegations, base::BindOnce(&SelfDeleteInstaller::OnSetPaymentAppInfo, this)); } @@ -199,6 +204,7 @@ GURL sw_url_; GURL scope_; std::string method_; + SupportedDelegations supported_delegations_; PaymentAppInstaller::InstallPaymentAppCallback callback_; int64_t registration_id_ = -1; // Take -1 as an invalid registration Id. @@ -210,18 +216,21 @@ } // namespace. // Static -void PaymentAppInstaller::Install(WebContents* web_contents, - const std::string& app_name, - const std::string& app_icon, - const GURL& sw_url, - const GURL& scope, - bool use_cache, - const std::string& method, - InstallPaymentAppCallback callback) { +void PaymentAppInstaller::Install( + WebContents* web_contents, + const std::string& app_name, + const std::string& app_icon, + const GURL& sw_url, + const GURL& scope, + bool use_cache, + const std::string& method, + const SupportedDelegations& supported_delegations, + InstallPaymentAppCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); auto installer = base::MakeRefCounted<SelfDeleteInstaller>( - app_name, app_icon, sw_url, scope, method, std::move(callback)); + app_name, app_icon, sw_url, scope, method, supported_delegations, + std::move(callback)); installer->Init(web_contents, use_cache); }
diff --git a/content/browser/payments/payment_app_installer.h b/content/browser/payments/payment_app_installer.h index 6522799..bdba077f 100644 --- a/content/browser/payments/payment_app_installer.h +++ b/content/browser/payments/payment_app_installer.h
@@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/macros.h" +#include "content/public/browser/supported_delegations.h" class GURL; @@ -33,6 +34,7 @@ // |scope| is the registration scope. // |use_cache| indicates whether to use cache. // |enabled_methods| are the enabled methods of the app. + // |supported_delegations| are the supported delegations of the payment app. // |callback| to send back registration result. static void Install(WebContents* web_contents, const std::string& app_name, @@ -41,6 +43,7 @@ const GURL& scope, bool use_cache, const std::string& method, + const SupportedDelegations& supported_delegations, InstallPaymentAppCallback callback); private:
diff --git a/content/browser/payments/payment_app_provider_impl.cc b/content/browser/payments/payment_app_provider_impl.cc index 0f9858c..3b813cb 100644 --- a/content/browser/payments/payment_app_provider_impl.cc +++ b/content/browser/payments/payment_app_provider_impl.cc
@@ -657,6 +657,7 @@ const std::string& sw_scope, bool sw_use_cache, const std::string& method, + const SupportedDelegations& supported_delegations, RegistrationIdCallback registration_id_callback, InvokePaymentAppCallback callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -687,7 +688,7 @@ PaymentAppInstaller::Install( web_contents, app_name, string_encoded_icon, url, scope, sw_use_cache, - method, + method, supported_delegations, base::BindOnce(&OnInstallPaymentApp, url::Origin::Create(scope), std::move(event_data), std::move(registration_id_callback), std::move(callback)));
diff --git a/content/browser/payments/payment_app_provider_impl.h b/content/browser/payments/payment_app_provider_impl.h index b73a924..28a5424 100644 --- a/content/browser/payments/payment_app_provider_impl.h +++ b/content/browser/payments/payment_app_provider_impl.h
@@ -35,6 +35,7 @@ const std::string& sw_scope, bool sw_use_cache, const std::string& method, + const SupportedDelegations& supported_delegations, RegistrationIdCallback registration_id_callback, InvokePaymentAppCallback callback) override; void CanMakePayment(BrowserContext* browser_context,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index 46a62c9..9756706 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -3673,9 +3673,6 @@ void RenderProcessHostImpl::FilterURL(RenderProcessHost* rph, bool empty_allowed, GURL* url) { - ChildProcessSecurityPolicyImpl* policy = - ChildProcessSecurityPolicyImpl::GetInstance(); - if (empty_allowed && url->is_empty()) return; @@ -3688,6 +3685,8 @@ return; } + ChildProcessSecurityPolicyImpl* policy = + ChildProcessSecurityPolicyImpl::GetInstance(); if (!policy->CanRequestURL(rph->GetID(), *url)) { // If this renderer is not permitted to request this URL, we invalidate the // URL. This prevents us from storing the blocked URL and becoming confused
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc index 5b93be81..81b0494 100644 --- a/content/browser/security_exploit_browsertest.cc +++ b/content/browser/security_exploit_browsertest.cc
@@ -14,6 +14,7 @@ #include "base/test/scoped_feature_list.h" #include "build/build_config.h" #include "content/browser/bad_message.h" +#include "content/browser/child_process_security_policy_impl.h" #include "content/browser/dom_storage/dom_storage_context_wrapper.h" #include "content/browser/dom_storage/session_storage_namespace_impl.h" #include "content/browser/frame_host/navigator.h" @@ -37,8 +38,10 @@ #include "content/public/browser/interstitial_page_delegate.h" #include "content/public/browser/resource_context.h" #include "content/public/browser/storage_partition.h" +#include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" #include "content/public/common/navigation_policy.h" +#include "content/public/common/url_constants.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" @@ -57,6 +60,7 @@ #include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/strong_associated_binding.h" #include "mojo/public/cpp/test_support/test_utils.h" +#include "net/base/filename_util.h" #include "net/base/network_isolation_key.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/controllable_http_response.h" @@ -1515,4 +1519,191 @@ } } +class SecurityExploitViaDisabledWebSecurityTest + : public SecurityExploitBrowserTest { + public: + SecurityExploitViaDisabledWebSecurityTest() { + // To get around BlockedSchemeNavigationThrottle. Other attempts at getting + // around it don't work, i.e.: + // -if the request is made in a child frame then the frame is torn down + // immediately on process killing so the navigation doesn't complete + // -if it's classified as same document, then a DCHECK in + // NavigationRequest::CreateRendererInitiated fires + feature_list_.InitAndEnableFeature( + features::kAllowContentInitiatedDataUrlNavigations); + } + + protected: + void SetUpCommandLine(base::CommandLine* command_line) override { + // Simulate a compromised renderer, otherwise the cross-origin request to + // file: is blocked. + command_line->AppendSwitch(switches::kDisableWebSecurity); + SecurityExploitBrowserTest::SetUpCommandLine(command_line); + } + + private: + base::test::ScopedFeatureList feature_list_; +}; + +// Test to verify that an exploited renderer process trying to specify a +// non-empty URL for base_url_for_data_url on navigation is correctly +// terminated. +IN_PROC_BROWSER_TEST_F(SecurityExploitViaDisabledWebSecurityTest, + ValidateBaseUrlForDataUrl) { + GURL start_url(embedded_test_server()->GetURL("/title1.html")); + EXPECT_TRUE(NavigateToURL(shell(), start_url)); + + RenderFrameHostImpl* rfh = static_cast<RenderFrameHostImpl*>( + shell()->web_contents()->GetMainFrame()); + + GURL data_url("data:text/html,foo"); + base::FilePath file_path = GetTestFilePath("", "simple_page.html"); + GURL file_url = net::FilePathToFileURL(file_path); + + // Setup a BeginNavigate IPC with non-empty base_url_for_data_url. + mojom::CommonNavigationParamsPtr common_params = + mojom::CommonNavigationParams::New( + data_url, url::Origin::Create(data_url), + blink::mojom::Referrer::New(), ui::PAGE_TRANSITION_LINK, + mojom::NavigationType::DIFFERENT_DOCUMENT, NavigationDownloadPolicy(), + false /* should_replace_current_entry */, + file_url, /* base_url_for_data_url */ + GURL() /* history_url_for_data_url */, PREVIEWS_UNSPECIFIED, + base::TimeTicks::Now() /* navigation_start */, "GET", + nullptr /* post_data */, base::Optional<SourceLocation>(), + false /* started_from_context_menu */, false /* has_user_gesture */, + InitiatorCSPInfo(), + std::vector<int>() /* initiator_origin_trial_features */, + std::string() /* href_translate */, + false /* is_history_navigation_in_new_child_frame */, + base::TimeTicks()); + mojom::BeginNavigationParamsPtr begin_params = + mojom::BeginNavigationParams::New( + std::string() /* headers */, net::LOAD_NORMAL, + false /* skip_service_worker */, + blink::mojom::RequestContextType::LOCATION, + blink::WebMixedContentContextType::kBlockable, + false /* is_form_submission */, + false /* was_initiated_by_link_click */, + GURL() /* searchable_form_url */, + std::string() /* searchable_form_encoding */, + GURL() /* client_side_redirect_url */, + base::nullopt /* devtools_initiator_info */); + + // Receiving the invalid IPC message should lead to renderer process + // termination. + RenderProcessHostKillWaiter process_kill_waiter(rfh->GetProcess()); + + mojo::PendingAssociatedRemote<mojom::NavigationClient> navigation_client; + if (IsPerNavigationMojoInterfaceEnabled()) { + auto navigation_client_receiver = + navigation_client.InitWithNewEndpointAndPassReceiver(); + rfh->frame_host_receiver_for_testing().impl()->BeginNavigation( + std::move(common_params), std::move(begin_params), mojo::NullRemote(), + std::move(navigation_client), mojo::NullRemote()); + } else { + rfh->frame_host_receiver_for_testing().impl()->BeginNavigation( + std::move(common_params), std::move(begin_params), mojo::NullRemote(), + mojo::NullAssociatedRemote(), mojo::NullRemote()); + } + EXPECT_EQ(bad_message::RFH_BASE_URL_FOR_DATA_URL_SPECIFIED, + process_kill_waiter.Wait()); + + EXPECT_FALSE(ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( + rfh->GetProcess()->GetID(), file_path)); + + // Reload the page to create another renderer process. + TestNavigationObserver tab_observer(shell()->web_contents(), 1); + shell()->web_contents()->GetController().Reload(ReloadType::NORMAL, false); + tab_observer.Wait(); + + // Make an XHR request to check if the page has access. + std::string script = base::StringPrintf( + "var xhr = new XMLHttpRequest()\n" + "xhr.open('GET', '%s', false);\n" + "try { xhr.send(); } catch (e) {}\n" + "window.domAutomationController.send(xhr.responseText);", + file_url.spec().c_str()); + std::string result; + EXPECT_TRUE( + ExecuteScriptAndExtractString(shell()->web_contents(), script, &result)); + EXPECT_TRUE(result.empty()); +} + +// Tests what happens when a web renderer asks to begin navigating to a file +// url. +IN_PROC_BROWSER_TEST_F(SecurityExploitViaDisabledWebSecurityTest, + WebToFileNavigation) { + // Navigate to a web page. + GURL start_url(embedded_test_server()->GetURL("/title1.html")); + EXPECT_TRUE(NavigateToURL(shell(), start_url)); + + // Have the webpage attempt to open a window with a file URL. + // + // Note that such attempt would normally be blocked in the renderer ("Not + // allowed to load local resource: file:///..."), but the test here simulates + // a compromised renderer by using --disable-web-security cmdline flag. + GURL file_url = GetTestUrl("", "simple_page.html"); + WebContentsAddedObserver new_window_observer; + TestNavigationObserver nav_observer(nullptr); + nav_observer.StartWatchingNewWebContents(); + ASSERT_TRUE(ExecJs(shell()->web_contents(), + JsReplace("window.open($1, '_blank')", file_url))); + WebContents* new_window = new_window_observer.GetWebContents(); + nav_observer.WaitForNavigationFinished(); + + // Verify that the navigation got blocked. + EXPECT_TRUE(nav_observer.last_navigation_succeeded()); + EXPECT_EQ(GURL(kBlockedURL), nav_observer.last_navigation_url()); + EXPECT_EQ(GURL(kBlockedURL), + new_window->GetMainFrame()->GetLastCommittedURL()); + EXPECT_EQ(shell()->web_contents()->GetMainFrame()->GetLastCommittedOrigin(), + new_window->GetMainFrame()->GetLastCommittedOrigin()); + EXPECT_EQ(shell()->web_contents()->GetMainFrame()->GetProcess(), + new_window->GetMainFrame()->GetProcess()); + + // Even though the navigation is blocked, we expect the opener relationship to + // be established between the 2 windows. + EXPECT_EQ(true, ExecJs(new_window, "!!window.opener")); +} + +// Tests what happens when a web renderer asks to begin navigating to a +// view-source url. +IN_PROC_BROWSER_TEST_F(SecurityExploitViaDisabledWebSecurityTest, + WebToViewSourceNavigation) { + // Navigate to a web page. + GURL start_url(embedded_test_server()->GetURL("/title1.html")); + EXPECT_TRUE(NavigateToURL(shell(), start_url)); + + // Have the webpage attempt to open a window with a view-source URL. + // + // Note that such attempt would normally be blocked in the renderer ("Not + // allowed to load local resource: view-source:///..."), but the test here + // simulates a compromised renderer by using --disable-web-security flag. + base::FilePath file_path = GetTestFilePath("", "simple_page.html"); + GURL view_source_url = + GURL(std::string(kViewSourceScheme) + ":" + start_url.spec()); + WebContentsAddedObserver new_window_observer; + TestNavigationObserver nav_observer(nullptr); + nav_observer.StartWatchingNewWebContents(); + ASSERT_TRUE(ExecJs(shell()->web_contents(), + JsReplace("window.open($1, '_blank')", view_source_url))); + WebContents* new_window = new_window_observer.GetWebContents(); + nav_observer.WaitForNavigationFinished(); + + // Verify that the navigation got blocked. + EXPECT_TRUE(nav_observer.last_navigation_succeeded()); + EXPECT_EQ(GURL(kBlockedURL), nav_observer.last_navigation_url()); + EXPECT_EQ(GURL(kBlockedURL), + new_window->GetMainFrame()->GetLastCommittedURL()); + EXPECT_EQ(shell()->web_contents()->GetMainFrame()->GetLastCommittedOrigin(), + new_window->GetMainFrame()->GetLastCommittedOrigin()); + EXPECT_EQ(shell()->web_contents()->GetMainFrame()->GetProcess(), + new_window->GetMainFrame()->GetProcess()); + + // Even though the navigation is blocked, we expect the opener relationship to + // be established between the 2 windows. + EXPECT_EQ(true, ExecJs(new_window, "!!window.opener")); +} + } // namespace content
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc index bc736a1..d728f6e 100644 --- a/content/browser/service_manager/service_manager_context.cc +++ b/content/browser/service_manager/service_manager_context.cc
@@ -45,7 +45,6 @@ #include "content/public/common/content_client.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -#include "content/public/common/network_service_util.h" #include "content/public/common/service_manager_connection.h" #include "content/public/common/service_names.mojom.h" #include "media/audio/audio_manager.h" @@ -66,7 +65,6 @@ #include "services/media_session/public/mojom/constants.mojom.h" #include "services/metrics/metrics_mojo_service.h" #include "services/metrics/public/mojom/constants.mojom.h" -#include "services/network/network_service.h" #include "services/network/public/cpp/cross_thread_shared_url_loader_factory_info.h" #include "services/network/public/mojom/network_service_test.mojom.h" #include "services/service_manager/public/cpp/connector.h" @@ -101,20 +99,6 @@ base::LazyInstance<std::map<std::string, base::WeakPtr<UtilityProcessHost>>>:: Leaky g_active_process_groups; -// If enabled, network service will run in it's own thread when running -// in-process, otherwise it is run on the IO thread. -// On ChromeOS the network service has to run on the IO thread because -// ProfileIOData and NetworkContext both try to set up NSS, which has has to be -// called from the IO thread. -const base::Feature kNetworkServiceDedicatedThread{ - "NetworkServiceDedicatedThread", -#if defined(OS_CHROMEOS) - base::FEATURE_DISABLED_BY_DEFAULT -#else - base::FEATURE_ENABLED_BY_DEFAULT -#endif -}; - service_manager::Manifest GetContentSystemManifest() { // TODO(https://crbug.com/961869): This is a bit of a temporary hack so that // we can make the global service instance a singleton. For now we just mirror @@ -246,16 +230,6 @@ DISALLOW_COPY_AND_ASSIGN(DeviceServiceURLLoaderFactory); }; -std::unique_ptr<service_manager::Service> CreateNetworkService( - service_manager::mojom::ServiceRequest service_request) { - // The test interface doesn't need to be implemented in the in-process case. - auto registry = std::make_unique<service_manager::BinderRegistry>(); - registry->AddInterface(base::BindRepeating( - [](network::mojom::NetworkServiceTestRequest request) {})); - return std::make_unique<network::NetworkService>( - std::move(registry), nullptr /* request */, std::move(service_request)); -} - bool AudioServiceOutOfProcess() { // Returns true iff kAudioServiceOutOfProcess feature is enabled and if the // embedder does not provide its own in-process AudioManager. @@ -612,20 +586,6 @@ base::BindRepeating(&CreateTracingService)); } - if (IsInProcessNetworkService()) { - scoped_refptr<base::SequencedTaskRunner> task_runner = - service_manager_thread_task_runner_; - if (base::FeatureList::IsEnabled(kNetworkServiceDedicatedThread)) { - base::Thread::Options options(base::MessagePumpType::IO, 0); - network_service_thread_.StartWithOptions(options); - task_runner = network_service_thread_.task_runner(); - } - - GetNetworkTaskRunner()->StartWithTaskRunner(task_runner); - RegisterInProcessService(mojom::kNetworkServiceName, task_runner, - base::BindRepeating(&CreateNetworkService)); - } - in_process_context_->Start( manifests, std::move(system_remote), base::BindRepeating(&ServiceManagerContext::RunServiceInstance,
diff --git a/content/browser/service_manager/service_manager_context.h b/content/browser/service_manager/service_manager_context.h index 540e083bd..1bd9a20 100644 --- a/content/browser/service_manager/service_manager_context.h +++ b/content/browser/service_manager/service_manager_context.h
@@ -12,7 +12,6 @@ #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" -#include "base/threading/thread.h" #include "content/common/content_export.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "services/service_manager/public/cpp/identity.h" @@ -54,7 +53,6 @@ scoped_refptr<base::SingleThreadTaskRunner> service_manager_thread_task_runner_; scoped_refptr<InProcessServiceManagerContext> in_process_context_; - base::Thread network_service_thread_{"NetworkService"}; base::WeakPtrFactory<ServiceManagerContext> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ServiceManagerContext);
diff --git a/content/browser/service_worker/service_worker_client_utils.cc b/content/browser/service_worker/service_worker_client_utils.cc index a693910..8e21d2f 100644 --- a/content/browser/service_worker/service_worker_client_utils.cc +++ b/content/browser/service_worker/service_worker_client_utils.cc
@@ -259,10 +259,6 @@ params.open_app_window_if_possible = type == WindowType::NEW_TAB_WINDOW; params.initiator_origin = url::Origin::Create(script_url.GetOrigin()); - GetContentClient()->browser()->OverrideNavigationParams( - site_instance, ¶ms.transition, ¶ms.is_renderer_initiated, - ¶ms.referrer, ¶ms.initiator_origin); - // End of RequestOpenURL copy. GetContentClient()->browser()->OpenURL(
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc index 08618d9..e7b7e83 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc
@@ -515,7 +515,7 @@ base::Optional<std::string> UtilityProcessHost::GetServiceName() { if (!service_identity_) - return base::nullopt; + return metrics_name_; return service_identity_->name(); }
diff --git a/content/common/frame.mojom b/content/common/frame.mojom index f0d9cafc..03d5268b 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom
@@ -337,6 +337,9 @@ // The ID of the widget for the main frame. int32 main_frame_widget_route_id; + // Initial properties for the main frame RenderWidget. + VisualProperties visual_properties; + DocumentScopedInterfaceBundle main_frame_interface_bundle; // Duplicated from CreateNewWindowParams because legacy code.
diff --git a/content/common/renderer.mojom b/content/common/renderer.mojom index fbb4196..4e4c161 100644 --- a/content/common/renderer.mojom +++ b/content/common/renderer.mojom
@@ -75,9 +75,9 @@ // Whether or not the frame has previously committed a real load. bool has_committed_real_load; - // Initial state for the RenderWidget and RenderView. - // TODO(danakj): The RenderView properties should be sent separately when - // there is not main_frame_routing_id, and this field should not be included. + // Initial state for the main frame RenderWidget. + // TODO(danakj): This should be optional and not included when there is no + // main_frame_widget_routing_id. VisualProperties visual_properties; // Whether lookup of frames in the created RenderView (e.g. lookup via
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn index 4c8c1d3..d7cf72e 100644 --- a/content/public/browser/BUILD.gn +++ b/content/public/browser/BUILD.gn
@@ -337,6 +337,8 @@ "storage_usage_info.h", "stored_payment_app.cc", "stored_payment_app.h", + "supported_delegations.cc", + "supported_delegations.h", "swap_metrics_driver.h", "system_connector.h", "touch_selection_controller_client_manager.h",
diff --git a/content/public/browser/payment_app_provider.h b/content/public/browser/payment_app_provider.h index 10de961..256a268 100644 --- a/content/public/browser/payment_app_provider.h +++ b/content/public/browser/payment_app_provider.h
@@ -65,6 +65,7 @@ const std::string& sw_scope, bool sw_use_cache, const std::string& method, + const SupportedDelegations& supported_delegations, RegistrationIdCallback registration_id_callback, InvokePaymentAppCallback callback) = 0; virtual void CanMakePayment(
diff --git a/content/public/browser/stored_payment_app.cc b/content/public/browser/stored_payment_app.cc index cc7c58d7..7d1a747 100644 --- a/content/public/browser/stored_payment_app.cc +++ b/content/public/browser/stored_payment_app.cc
@@ -16,10 +16,6 @@ StoredCapabilities::~StoredCapabilities() = default; -StoredSupportedDelegations::StoredSupportedDelegations() = default; - -StoredSupportedDelegations::~StoredSupportedDelegations() = default; - StoredPaymentApp::StoredPaymentApp() = default; StoredPaymentApp::~StoredPaymentApp() = default;
diff --git a/content/public/browser/stored_payment_app.h b/content/public/browser/stored_payment_app.h index 32024f00..0c9d06e 100644 --- a/content/public/browser/stored_payment_app.h +++ b/content/public/browser/stored_payment_app.h
@@ -10,6 +10,7 @@ #include <vector> #include "content/common/content_export.h" +#include "content/public/browser/supported_delegations.h" #include "third_party/skia/include/core/SkBitmap.h" #include "url/gurl.h" @@ -37,17 +38,6 @@ std::vector<int32_t> supported_card_types; }; -// This class represents the supported delegations of the StoredPaymentApp. -struct CONTENT_EXPORT StoredSupportedDelegations { - StoredSupportedDelegations(); - ~StoredSupportedDelegations(); - - bool shipping_address = false; - bool payer_name = false; - bool payer_phone = false; - bool payer_email = false; -}; - // This class represents the stored payment app. struct CONTENT_EXPORT StoredPaymentApp { StoredPaymentApp(); @@ -89,7 +79,7 @@ std::string user_hint; // List of supported delegations for this payment app. - StoredSupportedDelegations supported_delegations; + SupportedDelegations supported_delegations; }; } // namespace content
diff --git a/content/public/browser/supported_delegations.cc b/content/public/browser/supported_delegations.cc new file mode 100644 index 0000000..d9066345 --- /dev/null +++ b/content/public/browser/supported_delegations.cc
@@ -0,0 +1,13 @@ +// 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 "content/public/browser/supported_delegations.h" + +namespace content { + +SupportedDelegations::SupportedDelegations() = default; + +SupportedDelegations::~SupportedDelegations() = default; + +} // namespace content \ No newline at end of file
diff --git a/content/public/browser/supported_delegations.h b/content/public/browser/supported_delegations.h new file mode 100644 index 0000000..817e5155 --- /dev/null +++ b/content/public/browser/supported_delegations.h
@@ -0,0 +1,25 @@ +// 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 CONTENT_PUBLIC_BROWSER_SUPPORTED_DELEGATIONS_H_ +#define CONTENT_PUBLIC_BROWSER_SUPPORTED_DELEGATIONS_H_ + +#include "content/common/content_export.h" + +namespace content { + +// This class represents the supported delegations of the StoredPaymentApp. +struct CONTENT_EXPORT SupportedDelegations { + SupportedDelegations(); + ~SupportedDelegations(); + + bool shipping_address = false; + bool payer_name = false; + bool payer_phone = false; + bool payer_email = false; +}; + +} // namespace content + +#endif // CONTENT_PUBLIC_BROWSER_SUPPORTED_DELEGATIONS_H_
diff --git a/content/public/common/service_names.mojom b/content/public/common/service_names.mojom index d51243a5..d381d33b 100644 --- a/content/public/common/service_names.mojom +++ b/content/public/common/service_names.mojom
@@ -34,6 +34,3 @@ // The default service name used to identify utility processes when connecting // them to the Service Manager. const string kUtilityServiceName = "content_utility"; - -// The name for the network service running in the utility process. -const string kNetworkServiceName = "network";
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc index ed275b4a..ccd9c50 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc
@@ -105,14 +105,6 @@ } #endif -bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) { - return false; -} - void ContentRendererClient::WillSendRequest(blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url,
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index 902bd02..c1ed9f0 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h
@@ -212,13 +212,6 @@ bool is_redirect); #endif - // Returns true if we should fork a new process for the given navigation. - virtual bool ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect); - // Notifies the embedder that the given frame is requesting the resource at // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. The |attach_same_site_cookies| output parameter
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc index a21a9c2..5a3af74 100644 --- a/content/public/test/browser_test_base.cc +++ b/content/public/test/browser_test_base.cc
@@ -34,6 +34,7 @@ #include "build/build_config.h" #include "content/browser/browser_main_loop.h" #include "content/browser/browser_thread_impl.h" +#include "content/browser/network_service_instance_impl.h" #include "content/browser/renderer_host/render_process_host_impl.h" #include "content/browser/scheduler/browser_task_executor.h" #include "content/browser/startup_data_impl.h" @@ -44,12 +45,10 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" #include "content/public/common/main_function_params.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/no_renderer_crashes_assertion.h" #include "content/public/test/test_launcher.h" @@ -57,13 +56,13 @@ #include "content/test/content_browser_sanity_checker.h" #include "gpu/command_buffer/service/gpu_switches.h" #include "gpu/config/gpu_switches.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "services/network/public/cpp/features.h" #include "services/network/public/mojom/network_service_test.mojom.h" #include "services/service_manager/embedder/switches.h" -#include "services/service_manager/public/cpp/connector.h" #include "services/tracing/public/cpp/trace_startup.h" #include "ui/compositor/compositor_switches.h" #include "ui/display/display_switches.h" @@ -476,6 +475,7 @@ { base::ScopedAllowBaseSyncPrimitivesForTesting allow_wait; // Shutting these down will block the thread. + ShutDownNetworkService(); service_manager_env.reset(); discardable_shared_memory_manager.reset(); spawned_test_server_.reset(); @@ -513,12 +513,12 @@ void BrowserTestBase::SimulateNetworkServiceCrash() { CHECK(!IsInProcessNetworkService()) << "Can't crash the network service if it's running in-process!"; - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); - network_service_test.set_connection_error_handler(run_loop.QuitClosure()); + network_service_test.set_disconnect_handler(run_loop.QuitClosure()); network_service_test->SimulateCrash(); run_loop.Run(); @@ -776,9 +776,9 @@ if (mojo_rules.empty()) return; - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); // Send the DNS rules to network service process. Android needs the RunLoop // to dispatch a Java callback that makes network process to enter native
diff --git a/content/public/test/content_mock_cert_verifier.cc b/content/public/test/content_mock_cert_verifier.cc index 3b25a01..1aaf9087 100644 --- a/content/public/test/content_mock_cert_verifier.cc +++ b/content/public/test/content_mock_cert_verifier.cc
@@ -5,16 +5,14 @@ #include "content/public/test/content_mock_cert_verifier.h" #include "base/command_line.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/network_service_test_helper.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "services/network/network_context.h" #include "services/network/public/cpp/features.h" -#include "services/service_manager/public/cpp/connector.h" namespace content { @@ -68,9 +66,10 @@ void ContentMockCertVerifier::CertVerifier:: EnsureNetworkServiceTestInitialized() { - if (!network_service_test_ || network_service_test_.encountered_error()) { - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test_); + if (!network_service_test_ || !network_service_test_.is_connected()) { + network_service_test_.reset(); + GetNetworkService()->BindTestInterface( + network_service_test_.BindNewPipeAndPassReceiver()); } // TODO(crbug.com/901026): Make sure the network process is started to avoid a // deadlock on Android.
diff --git a/content/public/test/content_mock_cert_verifier.h b/content/public/test/content_mock_cert_verifier.h index fd6a14a..699abd8 100644 --- a/content/public/test/content_mock_cert_verifier.h +++ b/content/public/test/content_mock_cert_verifier.h
@@ -7,6 +7,7 @@ #include <memory> +#include "mojo/public/cpp/bindings/remote.h" #include "net/cert/mock_cert_verifier.h" #include "services/network/public/mojom/network_service_test.mojom.h" @@ -59,7 +60,7 @@ void EnsureNetworkServiceTestInitialized(); net::MockCertVerifier* verifier_; - network::mojom::NetworkServiceTestPtr network_service_test_; + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test_; DISALLOW_COPY_AND_ASSIGN(CertVerifier); };
diff --git a/content/public/test/network_connection_change_simulator.cc b/content/public/test/network_connection_change_simulator.cc index aa9cef9..162b810 100644 --- a/content/public/test/network_connection_change_simulator.cc +++ b/content/public/test/network_connection_change_simulator.cc
@@ -9,13 +9,11 @@ #include "base/bind.h" #include "base/run_loop.h" #include "content/public/browser/network_service_instance.h" -#include "content/public/browser/system_connector.h" #include "content/public/common/network_service_util.h" -#include "content/public/common/service_names.mojom.h" #include "mojo/public/cpp/bindings/remote.h" #include "net/base/network_change_notifier.h" +#include "services/network/public/mojom/network_service.mojom.h" #include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/connector.h" #if defined(OS_CHROMEOS) #include "net/base/network_change_notifier_posix.h" @@ -93,9 +91,9 @@ void NetworkConnectionChangeSimulator::SimulateNetworkChange( network::mojom::ConnectionType type) { if (IsOutOfProcessNetworkService()) { - network::mojom::NetworkServiceTestPtr network_service_test; - GetSystemConnector()->BindInterface(mojom::kNetworkServiceName, - &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); base::RunLoop run_loop(kRunLoopType); network_service_test->SimulateNetworkChange(type, run_loop.QuitClosure()); run_loop.Run();
diff --git a/content/renderer/input/widget_input_handler_impl.cc b/content/renderer/input/widget_input_handler_impl.cc index f233eab7..8bca69e2 100644 --- a/content/renderer/input/widget_input_handler_impl.cc +++ b/content/renderer/input/widget_input_handler_impl.cc
@@ -123,10 +123,8 @@ const gfx::Range& range, int32_t relative_cursor_position, WidgetInputHandlerImpl::ImeCommitTextCallback callback) { - if (render_widget) { - render_widget->OnImeCommitText(text, ime_text_spans, range, - relative_cursor_position); - } + render_widget->OnImeCommitText(text, ime_text_spans, range, + relative_cursor_position); callback_task_runner->PostTask(FROM_HERE, std::move(callback)); }
diff --git a/content/renderer/page_properties.h b/content/renderer/page_properties.h index f611e16..3097c26 100644 --- a/content/renderer/page_properties.h +++ b/content/renderer/page_properties.h
@@ -25,23 +25,9 @@ explicit PageProperties(CompositorDependencies* compositor_deps); ~PageProperties(); - const ScreenInfo& GetScreenInfo() const { return screen_info_; } - void SetScreenInfo(const ScreenInfo& screen_info) { - screen_info_ = screen_info; - } - - // Convenience method for reading the device scale factor from - // ScreenInfo. This is probably the most commonly used field in ScreenInfo - // so having the added accessor clarifies information coupling and - // reduces boilerplate code. - float GetDeviceScaleFactor() { return screen_info_.device_scale_factor; } - CompositorDependencies* GetCompositorDependencies(); private: - // Properties of the screen hosting the page. - ScreenInfo screen_info_; - CompositorDependencies* compositor_deps_ = nullptr; };
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index aa5f214..123a5b0 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -2117,8 +2117,9 @@ RenderWidgetFullscreenPepper* widget = RenderWidgetFullscreenPepper::Create( fullscreen_widget_routing_id, std::move(show_callback), GetLocalRootRenderWidget()->compositor_deps(), - render_view()->page_properties(), plugin, std::move(main_frame_url), - std::move(widget_channel_receiver)); + render_view()->page_properties(), + GetLocalRootRenderWidget()->GetOriginalScreenInfo(), plugin, + std::move(main_frame_url), std::move(widget_channel_receiver)); // TODO(nick): The show() handshake seems like unnecessary complexity here, // since there's no real delay between CreateFullscreenWidget and // ShowCreatedFullscreenWidget. Would it be simpler to have the @@ -2159,10 +2160,6 @@ replacement_range, 0); } -void RenderFrameImpl::SimulateImeFinishComposingText(bool keep_selection) { - GetMainFrameRenderWidget()->OnImeFinishComposingText(keep_selection); -} - void RenderFrameImpl::OnImeSetComposition( const base::string16& text, const std::vector<blink::WebImeTextSpan>& ime_text_spans, @@ -5961,7 +5958,7 @@ // suite). render_view_->PropagatePageZoomToNewlyAttachedFrame( render_widget_->compositor_deps()->IsUseZoomForDSFEnabled(), - render_view_->page_properties()->GetDeviceScaleFactor()); + render_widget_->GetScreenInfo().device_scale_factor); } // Remember that we've already processed this request, so we don't update @@ -6309,34 +6306,9 @@ // All navigations to or from WebUI URLs or within WebUI-enabled // RenderProcesses must be handled by the browser process so that the // correct bindings and data sources can be registered. - // Similarly, navigations to view-source URLs or within ViewSource mode - // must be handled by the browser process (except for reloads - those are - // safe to leave within the renderer). - // Lastly, access to file:// URLs from non-file:// URL pages must be - // handled by the browser so that ordinary renderer processes don't get - // blessed with file permissions. int cumulative_bindings = RenderProcess::current()->GetEnabledBindings(); - bool is_initial_navigation = render_view_->history_list_length_ == 0; - bool should_fork = - HasWebUIScheme(url) || HasWebUIScheme(old_url) || - (cumulative_bindings & kWebUIBindingsPolicyMask) || - url.SchemeIs(kViewSourceScheme) || - (frame_->IsViewSourceModeEnabled() && - info->navigation_type != blink::kWebNavigationTypeReload); - if (!should_fork && url.SchemeIs(url::kFileScheme)) { - // Fork non-file to file opens. Note that this may fork unnecessarily if - // another tab (hosting a file or not) targeted this one before its - // initial navigation, but that shouldn't cause a problem. - should_fork = !old_url.SchemeIs(url::kFileScheme); - } - - if (!should_fork) { - // Give the embedder a chance. - should_fork = GetContentClient()->renderer()->ShouldFork( - frame_, url, info->url_request.HttpMethod().Utf8(), - is_initial_navigation, false /* is_redirect */); - } - + bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || + (cumulative_bindings & kWebUIBindingsPolicyMask); if (should_fork) { OpenURL(std::move(info)); return; // Suppress the load here. @@ -7556,8 +7528,7 @@ } float RenderFrameImpl::GetDeviceScaleFactor() { - // TODO(danakj): Get this from the RenderWidget. - return render_view_->page_properties()->GetDeviceScaleFactor(); + return GetLocalRootRenderWidget()->GetScreenInfo().device_scale_factor; } } // namespace content
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index bb3870a..24de718 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -413,7 +413,6 @@ const base::string16& text, const std::vector<blink::WebImeTextSpan>& ime_text_spans, const gfx::Range& replacement_range); - void SimulateImeFinishComposingText(bool keep_selection); // TODO(jam): remove these once the IPC handler moves from RenderView to // RenderFrame.
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc index 9de7887..e005197b 100644 --- a/content/renderer/render_view_browsertest.cc +++ b/content/renderer/render_view_browsertest.cc
@@ -914,73 +914,6 @@ FrameHostMsg_OpenURL::ID)); } -class AlwaysForkingRenderViewTest : public RenderViewImplTest { - public: - ContentRendererClient* CreateContentRendererClient() override { - return new TestContentRendererClient; - } - - private: - class TestContentRendererClient : public ContentRendererClient { - public: - bool ShouldFork(blink::WebLocalFrame* frame, - const GURL& url, - const std::string& http_method, - bool is_initial_navigation, - bool is_server_redirect) override { - return true; - } - }; -}; - -TEST_F(AlwaysForkingRenderViewTest, BeginNavigationDoesNotForkEmptyUrl) { - GURL example_url("http://example.com"); - GURL empty_url(""); - - LoadHTMLWithUrlOverride("<body></body", example_url.spec().c_str()); - EXPECT_EQ(example_url, - GURL(frame()->GetWebFrame()->GetDocumentLoader()->GetUrl())); - - // Empty url should never fork. - blink::WebURLRequest request(empty_url); - request.SetMode(network::mojom::RequestMode::kNavigate); - request.SetRedirectMode(network::mojom::RedirectMode::kManual); - request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL); - request.SetRequestorOrigin(blink::WebSecurityOrigin::Create(example_url)); - auto navigation_info = std::make_unique<blink::WebNavigationInfo>(); - navigation_info->url_request = request; - navigation_info->frame_type = - network::mojom::RequestContextFrameType::kTopLevel; - navigation_info->navigation_policy = blink::kWebNavigationPolicyCurrentTab; - frame()->BeginNavigation(std::move(navigation_info)); - EXPECT_FALSE(render_thread_->sink().GetUniqueMessageMatching( - FrameHostMsg_OpenURL::ID)); -} - -TEST_F(AlwaysForkingRenderViewTest, BeginNavigationDoesNotForkAboutBlank) { - GURL example_url("http://example.com"); - GURL blank_url(url::kAboutBlankURL); - - LoadHTMLWithUrlOverride("<body></body", example_url.spec().c_str()); - EXPECT_EQ(example_url, - GURL(frame()->GetWebFrame()->GetDocumentLoader()->GetUrl())); - - // about:blank should never fork. - blink::WebURLRequest request(blank_url); - request.SetMode(network::mojom::RequestMode::kNavigate); - request.SetRedirectMode(network::mojom::RedirectMode::kManual); - request.SetRequestContext(blink::mojom::RequestContextType::INTERNAL); - request.SetRequestorOrigin(blink::WebSecurityOrigin::Create(example_url)); - auto navigation_info = std::make_unique<blink::WebNavigationInfo>(); - navigation_info->url_request = request; - navigation_info->frame_type = - network::mojom::RequestContextFrameType::kTopLevel; - navigation_info->navigation_policy = blink::kWebNavigationPolicyCurrentTab; - frame()->BeginNavigation(std::move(navigation_info)); - EXPECT_FALSE(render_thread_->sink().GetUniqueMessageMatching( - FrameHostMsg_OpenURL::ID)); -} - // This test verifies that when device emulation is enabled, RenderFrameProxy // continues to receive the original ScreenInfo and not the emualted // ScreenInfo.
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index db4ecc92..4dc489f 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -482,8 +482,6 @@ bool has_show_callback = !!show_callback; #endif - page_properties()->SetScreenInfo(params->visual_properties.screen_info); - WebFrame* opener_frame = RenderFrameImpl::ResolveOpener(params->opener_frame_route_id); @@ -1394,9 +1392,6 @@ // TODO(vangelis): Can we tell if the new view will be a background page? bool never_visible = false; - VisualProperties visual_properties = VisualProperties(); - visual_properties.screen_info = page_properties()->GetScreenInfo(); - // The initial hidden state for the RenderViewImpl here has to match what the // browser will eventually decide for the given disposition. Since we have to // return from this call synchronously, we just have to make our best guess @@ -1433,7 +1428,7 @@ view_params->devtools_main_frame_token = reply->devtools_main_frame_token; view_params->hidden = is_background_tab; view_params->never_visible = never_visible; - view_params->visual_properties = visual_properties; + view_params->visual_properties = reply->visual_properties; // Unretained() is safe here because our calling function will also call // show().
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 1dd61f7..7dce266 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc
@@ -823,8 +823,7 @@ UpdateSurfaceAndScreenInfo( visual_properties.local_surface_id_allocation.value_or( viz::LocalSurfaceIdAllocation()), - visual_properties.compositor_viewport_pixel_rect, - page_properties_->GetScreenInfo()); + visual_properties.compositor_viewport_pixel_rect, screen_info_); // This will call back into this class to set the widget size, visible // viewport size, screen info and screen rects, based on the device @@ -844,7 +843,7 @@ if (visual_properties.is_fullscreen_granted != is_fullscreen_granted_ || visual_properties.display_mode != display_mode_ || visual_properties.screen_info.device_scale_factor != - page_properties_->GetDeviceScaleFactor()) + screen_info_.device_scale_factor) ignore_resize_ipc = false; } @@ -882,7 +881,7 @@ // be responsible for setting values onto the RenderView. render_frame->SetPreferCompositingToLCDTextEnabledOnRenderView( ComputePreferCompositingToLCDText( - compositor_deps_, page_properties_->GetDeviceScaleFactor())); + compositor_deps_, screen_info_.device_scale_factor)); } if (!auto_resize_mode_) { @@ -956,8 +955,8 @@ if (!device_emulator_) { device_emulator_ = std::make_unique<RenderWidgetScreenMetricsEmulator>( - this, page_properties_->GetScreenInfo(), size_, visible_viewport_size_, - widget_screen_rect_, window_screen_rect_); + this, screen_info_, size_, visible_viewport_size_, widget_screen_rect_, + window_screen_rect_); } device_emulator_->ChangeEmulationParams(params); } @@ -1735,8 +1734,8 @@ // and change compositing state. So ResizeWebWidget() must come after this // call, as it runs the entire document lifecycle. render_frame->SetPreferCompositingToLCDTextEnabledOnRenderView( - ComputePreferCompositingToLCDText( - compositor_deps_, page_properties_->GetDeviceScaleFactor())); + ComputePreferCompositingToLCDText(compositor_deps_, + screen_info_.device_scale_factor)); visible_viewport_size_ = visible_viewport_size; size_ = widget_size; @@ -2074,7 +2073,7 @@ } blink::WebScreenInfo RenderWidget::GetScreenInfo() { - const ScreenInfo& info = page_properties_->GetScreenInfo(); + const ScreenInfo& info = screen_info_; blink::WebScreenInfo web_screen_info; web_screen_info.device_scale_factor = info.device_scale_factor; @@ -2202,10 +2201,8 @@ const gfx::Point& location) { has_host_context_menu_location_ = true; host_context_menu_location_ = location; - if (GetWebWidget()) { - GetWebWidget()->ShowContextMenu( - static_cast<blink::WebMenuSourceType>(source_type)); - } + GetWebWidget()->ShowContextMenu( + static_cast<blink::WebMenuSourceType>(source_type)); has_host_context_menu_location_ = false; } @@ -2285,8 +2282,6 @@ } #endif - if (!GetWebWidget()) - return; ImeEventGuard guard(this); input_handler_->set_handling_input_event(true); if (auto* controller = GetInputMethodController()) { @@ -2303,15 +2298,12 @@ const gfx::Rect& compositor_viewport_pixel_rect, const ScreenInfo& new_screen_info) { bool orientation_changed = - page_properties_->GetScreenInfo().orientation_angle != - new_screen_info.orientation_angle || - page_properties_->GetScreenInfo().orientation_type != - new_screen_info.orientation_type; + screen_info_.orientation_angle != new_screen_info.orientation_angle || + screen_info_.orientation_type != new_screen_info.orientation_type; ScreenInfo previous_original_screen_info = GetOriginalScreenInfo(); local_surface_id_allocation_from_parent_ = new_local_surface_id_allocation; - - page_properties_->SetScreenInfo(new_screen_info); + screen_info_ = new_screen_info; // Note carefully that the DSF specified in |new_screen_info| is not the // DSF used by the compositor during device emulation! @@ -2323,7 +2315,7 @@ // which is set above. layer_tree_host_->SetViewportVisibleRect(ViewportVisibleRect()); layer_tree_host_->SetRasterColorSpace( - page_properties_->GetScreenInfo().color_space.GetRasterColorSpace()); + screen_info_.color_space.GetRasterColorSpace()); if (orientation_changed) OnOrientationChange(); @@ -2342,7 +2334,7 @@ // be responsible for setting values onto the RenderView. render_frame->SetDeviceScaleFactorOnRenderView( compositor_deps_->IsUseZoomForDSFEnabled(), - page_properties_->GetDeviceScaleFactor()); + screen_info_.device_scale_factor); } // Propagate changes down to child local root RenderWidgets and BrowserPlugins @@ -2372,10 +2364,9 @@ layer_tree_host_->RequestNewLocalSurfaceId(); gfx::Rect compositor_viewport_pixel_rect(gfx::ScaleToCeiledSize( - new_window_rect.size(), page_properties_->GetDeviceScaleFactor())); + new_window_rect.size(), screen_info_.device_scale_factor)); UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_, - compositor_viewport_pixel_rect, - page_properties_->GetScreenInfo()); + compositor_viewport_pixel_rect, screen_info_); visible_viewport_size_ = new_window_rect.size(); size_ = new_window_rect.size(); @@ -2702,8 +2693,6 @@ void RenderWidget::UpdateSelectionBounds() { TRACE_EVENT0("renderer", "RenderWidget::UpdateSelectionBounds"); - if (!GetWebWidget()) - return; if (ime_event_guard_) return; @@ -2759,12 +2748,11 @@ // calculation of |new_compositor_viewport_pixel_rect| does not appear to // take into account device emulation. layer_tree_host_->RequestNewLocalSurfaceId(); - gfx::Rect new_compositor_viewport_pixel_rect = - gfx::Rect(gfx::ScaleToCeiledSize( - size_, page_properties_->GetDeviceScaleFactor())); + gfx::Rect new_compositor_viewport_pixel_rect = gfx::Rect( + gfx::ScaleToCeiledSize(size_, screen_info_.device_scale_factor)); UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_, new_compositor_viewport_pixel_rect, - page_properties_->GetScreenInfo()); + screen_info_); } } @@ -3707,7 +3695,7 @@ const ScreenInfo& RenderWidget::GetOriginalScreenInfo() const { if (device_emulator_) return device_emulator_->original_screen_info(); - return page_properties_->GetScreenInfo(); + return screen_info_; } gfx::PointF RenderWidget::ConvertWindowPointToViewport( @@ -3804,7 +3792,7 @@ // new viz::LocalSurfaceId to avoid surface invariants violations in tests. layer_tree_host_->RequestNewLocalSurfaceId(); - ScreenInfo info = page_properties_->GetScreenInfo(); + ScreenInfo info = screen_info_; info.device_scale_factor = factor; gfx::Size viewport_pixel_size = gfx::ScaleToCeiledSize(size_, factor); UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_, @@ -3815,8 +3803,8 @@ RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(GetFrameWidget()->LocalRoot()); render_frame->SetPreferCompositingToLCDTextEnabledOnRenderView( - ComputePreferCompositingToLCDText( - compositor_deps_, page_properties_->GetDeviceScaleFactor())); + ComputePreferCompositingToLCDText(compositor_deps_, + screen_info_.device_scale_factor)); // Make sure to override any future OnSynchronizeVisualProperties IPCs. device_scale_factor_for_testing_ = factor; @@ -3841,7 +3829,7 @@ // new viz::LocalSurfaceId to avoid surface invariants violations in tests. layer_tree_host_->RequestNewLocalSurfaceId(); - ScreenInfo info = page_properties_->GetScreenInfo(); + ScreenInfo info = screen_info_; info.color_space = color_space; UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_, CompositorViewportRect(), info); @@ -3854,8 +3842,7 @@ void RenderWidget::EnableAutoResizeForTesting(const gfx::Size& min_size, const gfx::Size& max_size) { - SetAutoResizeMode(true, min_size, max_size, - page_properties_->GetDeviceScaleFactor()); + SetAutoResizeMode(true, min_size, max_size, screen_info_.device_scale_factor); } void RenderWidget::DisableAutoResizeForTesting(const gfx::Size& new_size) { @@ -3863,7 +3850,7 @@ return; SetAutoResizeMode(false, gfx::Size(), gfx::Size(), - page_properties_->GetDeviceScaleFactor()); + screen_info_.device_scale_factor); // The |new_size| is empty when resetting auto resize in between tests. In // this case the current size should just be preserved.
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index 92e4661..cd546b6b 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h
@@ -1067,6 +1067,10 @@ int pending_window_rect_count_ = 0; gfx::Rect pending_window_rect_; + // Properties of the screen hosting the RenderWidget. Rects in this structure + // do not include any scaling by device scale factor, so are logical pixels + // not physical device pixels. + ScreenInfo screen_info_; // The screen rects of the view and the window that contains it. These do not // include any scaling by device scale factor, so are logical pixels not // physical device pixels.
diff --git a/content/renderer/render_widget_fullscreen_pepper.cc b/content/renderer/render_widget_fullscreen_pepper.cc index 08978ef..40953e4 100644 --- a/content/renderer/render_widget_fullscreen_pepper.cc +++ b/content/renderer/render_widget_fullscreen_pepper.cc
@@ -276,6 +276,7 @@ RenderWidget::ShowCallback show_callback, CompositorDependencies* compositor_deps, PageProperties* page_properties, + const ScreenInfo& screen_info, PepperPluginInstanceImpl* plugin, const blink::WebURL& local_main_frame_url, mojo::PendingReceiver<mojom::Widget> widget_receiver) { @@ -286,7 +287,7 @@ std::move(widget_receiver)); widget->InitForPepperFullscreen( std::move(show_callback), new PepperWidget(widget, local_main_frame_url), - page_properties->GetScreenInfo()); + screen_info); return widget; }
diff --git a/content/renderer/render_widget_fullscreen_pepper.h b/content/renderer/render_widget_fullscreen_pepper.h index e78e161c..772716f0 100644 --- a/content/renderer/render_widget_fullscreen_pepper.h +++ b/content/renderer/render_widget_fullscreen_pepper.h
@@ -38,6 +38,7 @@ RenderWidget::ShowCallback show_callback, CompositorDependencies* compositor_deps, PageProperties* page_properties, + const ScreenInfo& screen_info, PepperPluginInstanceImpl* plugin, const blink::WebURL& local_main_frame_url, mojo::PendingReceiver<mojom::Widget> widget_receiver);
diff --git a/content/renderer/render_widget_unittest.cc b/content/renderer/render_widget_unittest.cc index 16a721c..695ee28 100644 --- a/content/renderer/render_widget_unittest.cc +++ b/content/renderer/render_widget_unittest.cc
@@ -169,7 +169,8 @@ class InteractiveRenderWidget : public RenderWidget { public: InteractiveRenderWidget(CompositorDependencies* compositor_deps, - PageProperties* page_properties) + PageProperties* page_properties, + const ScreenInfo& screen_info) : RenderWidget(++next_routing_id_, compositor_deps, page_properties, @@ -180,7 +181,7 @@ mojo::NullReceiver()), always_overscroll_(false) { UnconditionalInit(base::NullCallback()); - LivingInit(&mock_webwidget_, page_properties->GetScreenInfo()); + LivingInit(&mock_webwidget_, screen_info); mock_input_handler_host_ = std::make_unique<MockWidgetInputHandlerHost>(); @@ -257,8 +258,8 @@ RenderWidgetUnittest() : page_properties_(&compositor_deps_) {} void SetUp() override { - widget_ = std::make_unique<InteractiveRenderWidget>(&compositor_deps_, - &page_properties_); + widget_ = std::make_unique<InteractiveRenderWidget>( + &compositor_deps_, &page_properties_, ScreenInfo()); } void TearDown() override {
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc index a580e67..a0ef754 100644 --- a/content/test/content_test_suite.cc +++ b/content/test/content_test_suite.cc
@@ -12,6 +12,7 @@ #include "build/build_config.h" #include "content/public/common/content_client.h" #include "content/public/common/content_paths.h" +#include "content/public/common/network_service_util.h" #include "content/public/test/test_content_client_initializer.h" #include "gpu/ipc/test_gpu_thread_holder.h" #include "media/base/media.h" @@ -68,6 +69,8 @@ display::win::SetDefaultDeviceScaleFactor(1.0f); #endif + ForceInProcessNetworkService(true); + ContentTestSuiteBase::Initialize(); { ContentClient client;
diff --git a/content/utility/services.cc b/content/utility/services.cc index be0e50a..4213a1bd 100644 --- a/content/utility/services.cc +++ b/content/utility/services.cc
@@ -9,7 +9,10 @@ #include "base/no_destructor.h" #include "base/threading/thread_task_runner_handle.h" #include "content/public/utility/content_utility_client.h" +#include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "mojo/public/cpp/bindings/service_factory.h" +#include "services/network/network_service.h" +#include "services/service_manager/public/cpp/binder_registry.h" #include "services/video_capture/public/mojom/video_capture_service.mojom.h" #include "services/video_capture/video_capture_service_impl.h" @@ -17,12 +20,27 @@ namespace { +auto RunNetworkService( + mojo::PendingReceiver<network::mojom::NetworkService> receiver) { + auto binders = std::make_unique<service_manager::BinderRegistry>(); + GetContentClient()->utility()->RegisterNetworkBinders(binders.get()); + return std::make_unique<network::NetworkService>(std::move(binders), + std::move(receiver)); +} + auto RunVideoCapture( mojo::PendingReceiver<video_capture::mojom::VideoCaptureService> receiver) { return std::make_unique<video_capture::VideoCaptureServiceImpl>( std::move(receiver), base::ThreadTaskRunnerHandle::Get()); } +mojo::ServiceFactory& GetIOThreadServiceFactory() { + static base::NoDestructor<mojo::ServiceFactory> factory{ + RunNetworkService, + }; + return *factory; +} + mojo::ServiceFactory& GetMainThreadServiceFactory() { static base::NoDestructor<mojo::ServiceFactory> factory{ RunVideoCapture, @@ -35,6 +53,9 @@ void HandleServiceRequestOnIOThread( mojo::GenericPendingReceiver receiver, base::SequencedTaskRunner* main_thread_task_runner) { + if (GetIOThreadServiceFactory().MaybeRunService(&receiver)) + return; + // If the request was handled already, we should not reach this point. DCHECK(receiver.is_valid()); auto* embedder_factory =
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc index 0fc7abb..2c1c7f9 100644 --- a/content/utility/utility_service_factory.cc +++ b/content/utility/utility_service_factory.cc
@@ -60,10 +60,6 @@ namespace { -void TerminateThisProcess() { - UtilityThread::Get()->ReleaseProcess(); -} - #if BUILDFLAG(ENABLE_LIBRARY_CDMS) std::unique_ptr<media::CdmAuxiliaryHelper> CreateCdmHelper( @@ -101,26 +97,6 @@ #endif // BUILDFLAG(ENABLE_LIBRARY_CDMS) -void RunNetworkServiceOnIOThread( - service_manager::mojom::ServiceRequest service_request, - std::unique_ptr<service_manager::BinderRegistry> network_registry, - scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner) { - auto service = std::make_unique<network::NetworkService>( - std::move(network_registry), nullptr /* request */, - std::move(service_request), true); - - // Transfer ownership of the service to itself, and have it post to the main - // thread on self-termination to kill the process. - auto* raw_service = service.get(); - raw_service->set_termination_closure(base::BindOnce( - [](std::unique_ptr<network::NetworkService> service, - scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner) { - main_thread_task_runner->PostTask( - FROM_HERE, base::BindOnce(&TerminateThisProcess)); - }, - std::move(service), std::move(main_thread_task_runner))); -} - } // namespace UtilityServiceFactory::UtilityServiceFactory() @@ -154,17 +130,6 @@ !base::FeatureList::IsEnabled( features::kTracingServiceInProcess)) { service = std::make_unique<tracing::TracingService>(std::move(request)); - } else if (service_name == mojom::kNetworkServiceName) { - // Unlike other services supported by the utility process, the network - // service runs on the IO thread and never self-terminates. - GetContentClient()->utility()->RegisterNetworkBinders( - network_registry_.get()); - ChildProcess::current()->io_task_runner()->PostTask( - FROM_HERE, - base::BindOnce(&RunNetworkServiceOnIOThread, std::move(request), - std::move(network_registry_), - base::SequencedTaskRunnerHandle::Get())); - return; } #if BUILDFLAG(ENABLE_LIBRARY_CDMS) else if (service_name == media::mojom::kCdmServiceName) {
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc index a46d60b..8d8a29c 100644 --- a/crypto/nss_util.cc +++ b/crypto/nss_util.cc
@@ -580,6 +580,19 @@ } } + void SetSystemKeySlotWithoutInitializingTPMForTesting(ScopedPK11Slot slot) { + DCHECK(thread_checker_.CalledOnValidThread()); + + // Ensure that a previous value of test_system_slot_ is not overwritten. + // Unsetting, i.e. setting a nullptr, however is allowed. + DCHECK(!slot || !test_system_slot_); + if (tpm_slot_ && tpm_slot_ == test_system_slot_) { + // Unset |tpm_slot_| if it was initialized from |test_system_slot_|. + tpm_slot_.reset(); + } + test_system_slot_ = std::move(slot); + } + void SetPrivateSoftwareSlotForChromeOSUserForTesting(ScopedPK11Slot slot) { DCHECK(thread_checker_.CalledOnValidThread()); @@ -632,11 +645,7 @@ private: friend struct base::LazyInstanceTraitsBase<NSSInitSingleton>; - NSSInitSingleton() - : tpm_token_enabled_for_nss_(false), - initializing_tpm_token_(false), - chaps_module_(nullptr), - root_(nullptr) { + NSSInitSingleton() { // Initializing NSS causes us to do blocking IO. // Temporarily allow it until we fix // http://code.google.com/p/chromium/issues/detail?id=59847 @@ -755,14 +764,14 @@ return module; } - bool tpm_token_enabled_for_nss_; - bool initializing_tpm_token_; - typedef std::vector<base::OnceClosure> TPMReadyCallbackList; - TPMReadyCallbackList tpm_ready_callback_list_; - SECMODModule* chaps_module_; - crypto::ScopedPK11Slot tpm_slot_; - SECMODModule* root_; + SECMODModule* root_ = nullptr; #if defined(OS_CHROMEOS) + bool tpm_token_enabled_for_nss_ = false; + bool initializing_tpm_token_ = false; + using TPMReadyCallbackList = std::vector<base::OnceClosure>; + TPMReadyCallbackList tpm_ready_callback_list_; + SECMODModule* chaps_module_ = nullptr; + crypto::ScopedPK11Slot tpm_slot_; std::map<std::string, std::unique_ptr<ChromeOSUserData>> chromeos_user_map_; ScopedPK11Slot test_system_slot_; ScopedPK11Slot prepared_test_private_slot_; @@ -823,6 +832,11 @@ g_nss_singleton.Get().SetSystemKeySlotForTesting(std::move(slot)); } +void SetSystemKeySlotWithoutInitializingTPMForTesting(ScopedPK11Slot slot) { + g_nss_singleton.Get().SetSystemKeySlotWithoutInitializingTPMForTesting( + std::move(slot)); +} + void EnableTPMTokenForNSS() { g_nss_singleton.Get().EnableTPMTokenForNSS(); }
diff --git a/crypto/nss_util_internal.h b/crypto/nss_util_internal.h index 56e22c6..80b97eb 100644 --- a/crypto/nss_util_internal.h +++ b/crypto/nss_util_internal.h
@@ -63,6 +63,14 @@ // |slot| is nullptr, the test system slot is unset. CRYPTO_EXPORT void SetSystemKeySlotForTesting(ScopedPK11Slot slot); +// Injects the given |slot| as a system slot set by the future +// |InitializeTPMTokenAndSystemSlot| call. +// This must must not be called consecutively with a |slot| != nullptr. If +// |slot| is nullptr and the system slot is already initialized to the +// previously passed test value, the system slot is unset. +CRYPTO_EXPORT void SetSystemKeySlotWithoutInitializingTPMForTesting( + ScopedPK11Slot slot); + // Prepare per-user NSS slot mapping. It is safe to call this function multiple // times. Returns true if the user was added, or false if it already existed. CRYPTO_EXPORT bool InitializeNSSForChromeOSUser(
diff --git a/device/bluetooth/bluetooth_adapter_mac_unittest.mm b/device/bluetooth/bluetooth_adapter_mac_unittest.mm index 1468c63..817338f 100644 --- a/device/bluetooth/bluetooth_adapter_mac_unittest.mm +++ b/device/bluetooth/bluetooth_adapter_mac_unittest.mm
@@ -306,7 +306,9 @@ new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE)); // Adding uuid to first discovery session so that there is a change to be made // when starting the second session. - discovery_filter->AddUUID(device::BluetoothUUID("1000")); + BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(device::BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(device_filter); adapter_mac_->StartDiscoverySessionWithFilter( std::move(discovery_filter), base::BindRepeating(
diff --git a/device/bluetooth/bluetooth_adapter_unittest.cc b/device/bluetooth/bluetooth_adapter_unittest.cc index 2448a76..6ccca22 100644 --- a/device/bluetooth/bluetooth_adapter_unittest.cc +++ b/device/bluetooth/bluetooth_adapter_unittest.cc
@@ -69,6 +69,13 @@ namespace device { +void AddDeviceFilterWithUUID(BluetoothDiscoveryFilter* filter, + BluetoothUUID uuid) { + BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid); + filter->AddDeviceFilter(device_filter); +} + namespace { class TestBluetoothAdapter : public BluetoothAdapter { @@ -399,15 +406,13 @@ } TEST_F(BluetoothAdapterTest, TestQueueingLogic) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df->AddUUID(device::BluetoothUUID("1001")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + AddDeviceFilterWithUUID(discovery_filter.get(), BluetoothUUID("1001")); - BluetoothDiscoveryFilter* df2 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df->AddUUID(device::BluetoothUUID("1002")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter2(df2); + auto discovery_filter2 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + AddDeviceFilterWithUUID(discovery_filter2.get(), BluetoothUUID("1002")); // Start a discovery session base::RunLoop run_loop1; @@ -460,10 +465,9 @@ TEST_F(BluetoothAdapterTest, ShortCircuitUpdateTest) { auto discovery_filter_default1 = std::make_unique<BluetoothDiscoveryFilter>(); - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-30); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-30); base::RunLoop run_loop; adapter_->StartSessionWithFilter(std::move(discovery_filter_default1), @@ -535,15 +539,13 @@ uint16_t resulting_pathloss; std::unique_ptr<BluetoothDiscoveryFilter> resulting_filter; - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-30); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-30); - BluetoothDiscoveryFilter* df2 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df2->SetRSSI(-65); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter2(df2); + auto discovery_filter2 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter2->SetRSSI(-65); // Make sure adapter has one session without filtering. adapter_->InjectFilteredSession(std::move(discovery_filter)); @@ -579,13 +581,11 @@ scoped_refptr<TestBluetoothAdapter> adapter = new TestBluetoothAdapter(); std::unique_ptr<BluetoothDiscoveryFilter> resulting_filter; - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_CLASSIC); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_CLASSIC); - BluetoothDiscoveryFilter* df2 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter2(df2); + auto discovery_filter2 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); adapter_->InjectFilteredSession(std::move(discovery_filter)); @@ -599,10 +599,10 @@ resulting_filter = adapter_->GetMergedDiscoveryFilter(); EXPECT_EQ(BLUETOOTH_TRANSPORT_DUAL, resulting_filter->GetTransport()); - BluetoothDiscoveryFilter* df3 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df3->CopyFrom(BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_DUAL)); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter3(df3); + auto discovery_filter3 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter3->CopyFrom( + BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_DUAL)); // Merging empty filter in should result in empty filter adapter_->InjectFilteredSession(std::move(discovery_filter3)); @@ -617,27 +617,23 @@ int16_t resulting_rssi; std::set<device::BluetoothUUID> resulting_uuids; - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-60); - df->AddUUID(device::BluetoothUUID("1000")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-60); + AddDeviceFilterWithUUID(discovery_filter.get(), BluetoothUUID("1000")); - BluetoothDiscoveryFilter* df2 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df2->SetRSSI(-85); - df2->SetTransport(BLUETOOTH_TRANSPORT_LE); - df2->AddUUID(device::BluetoothUUID("1020")); - df2->AddUUID(device::BluetoothUUID("1001")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter2(df2); + auto discovery_filter2 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter2->SetRSSI(-85); + AddDeviceFilterWithUUID(discovery_filter2.get(), BluetoothUUID("1020")); + AddDeviceFilterWithUUID(discovery_filter2.get(), BluetoothUUID("1001")); - BluetoothDiscoveryFilter* df3 = - new BluetoothDiscoveryFilter(BLUETOOTH_TRANSPORT_LE); - df3->SetRSSI(-65); - df3->SetTransport(BLUETOOTH_TRANSPORT_CLASSIC); - df3->AddUUID(device::BluetoothUUID("1020")); - df3->AddUUID(device::BluetoothUUID("1003")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter3(df3); + auto discovery_filter3 = + std::make_unique<BluetoothDiscoveryFilter>(BLUETOOTH_TRANSPORT_LE); + discovery_filter3->SetRSSI(-65); + discovery_filter3->SetTransport(BLUETOOTH_TRANSPORT_CLASSIC); + AddDeviceFilterWithUUID(discovery_filter3.get(), BluetoothUUID("1020")); + AddDeviceFilterWithUUID(discovery_filter3.get(), BluetoothUUID("1003")); adapter_->InjectFilteredSession(std::move(discovery_filter)); adapter_->InjectFilteredSession(std::move(discovery_filter2)); @@ -1696,21 +1692,19 @@ base::WeakPtr<BluetoothLocalGattCharacteristic> characteristic1 = BluetoothLocalGattCharacteristic::Create( BluetoothUUID(kTestUUIDGenericAttribute), - device::BluetoothLocalGattCharacteristic::Properties(), - device::BluetoothLocalGattCharacteristic::Permissions(), - service.get()); + BluetoothLocalGattCharacteristic::Properties(), + BluetoothLocalGattCharacteristic::Permissions(), service.get()); base::WeakPtr<BluetoothLocalGattCharacteristic> characteristic2 = BluetoothLocalGattCharacteristic::Create( BluetoothUUID(kTestUUIDGenericAttribute), - device::BluetoothLocalGattCharacteristic::Properties(), - device::BluetoothLocalGattCharacteristic::Permissions(), - service.get()); + BluetoothLocalGattCharacteristic::Properties(), + BluetoothLocalGattCharacteristic::Permissions(), service.get()); base::WeakPtr<BluetoothLocalGattDescriptor> descriptor = BluetoothLocalGattDescriptor::Create( BluetoothUUID(kTestUUIDGenericAttribute), - device::BluetoothLocalGattCharacteristic::Permissions(), + BluetoothLocalGattCharacteristic::Permissions(), characteristic1.get()); service->Register(GetCallback(Call::EXPECTED), @@ -1865,9 +1859,8 @@ SimulateConnectedLowEnergyDevice(ConnectedDeviceType::GENERIC_DEVICE); SimulateConnectedLowEnergyDevice(ConnectedDeviceType::HEART_RATE_DEVICE); BluetoothDiscoveryFilter discovery_filter(BLUETOOTH_TRANSPORT_LE); - device::BluetoothUUID heart_service_uuid = - device::BluetoothUUID(kTestUUIDHeartRate); - discovery_filter.AddUUID(heart_service_uuid); + BluetoothUUID heart_service_uuid = BluetoothUUID(kTestUUIDHeartRate); + AddDeviceFilterWithUUID(&discovery_filter, heart_service_uuid); std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet> result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( discovery_filter); @@ -1900,7 +1893,7 @@ SimulateConnectedLowEnergyDevice(ConnectedDeviceType::GENERIC_DEVICE); SimulateConnectedLowEnergyDevice(ConnectedDeviceType::HEART_RATE_DEVICE); BluetoothDiscoveryFilter discovery_filter(BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(device::BluetoothUUID(kTestUUIDLinkLoss)); + AddDeviceFilterWithUUID(&discovery_filter, BluetoothUUID(kTestUUIDLinkLoss)); std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet> result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( discovery_filter); @@ -1929,12 +1922,10 @@ SimulateConnectedLowEnergyDevice(ConnectedDeviceType::GENERIC_DEVICE); SimulateConnectedLowEnergyDevice(ConnectedDeviceType::HEART_RATE_DEVICE); BluetoothDiscoveryFilter discovery_filter(BLUETOOTH_TRANSPORT_LE); - device::BluetoothUUID heart_service_uuid = - device::BluetoothUUID(kTestUUIDHeartRate); - discovery_filter.AddUUID(heart_service_uuid); - device::BluetoothUUID generic_service_uuid = - device::BluetoothUUID(kTestUUIDGenericAccess); - discovery_filter.AddUUID(generic_service_uuid); + BluetoothUUID heart_service_uuid = BluetoothUUID(kTestUUIDHeartRate); + AddDeviceFilterWithUUID(&discovery_filter, heart_service_uuid); + BluetoothUUID generic_service_uuid = BluetoothUUID(kTestUUIDGenericAccess); + AddDeviceFilterWithUUID(&discovery_filter, generic_service_uuid); std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet> result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( discovery_filter); @@ -1977,9 +1968,8 @@ SimulateConnectedLowEnergyDevice(ConnectedDeviceType::GENERIC_DEVICE); SimulateConnectedLowEnergyDevice(ConnectedDeviceType::HEART_RATE_DEVICE); BluetoothDiscoveryFilter discovery_filter(BLUETOOTH_TRANSPORT_LE); - device::BluetoothUUID heart_service_uuid = - device::BluetoothUUID(kTestUUIDHeartRate); - discovery_filter.AddUUID(heart_service_uuid); + BluetoothUUID heart_service_uuid = BluetoothUUID(kTestUUIDHeartRate); + AddDeviceFilterWithUUID(&discovery_filter, heart_service_uuid); std::unordered_map<BluetoothDevice*, BluetoothDevice::UUIDSet> result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( discovery_filter);
diff --git a/device/bluetooth/bluetooth_discovery_filter.cc b/device/bluetooth/bluetooth_discovery_filter.cc index f591b63..7a99105 100644 --- a/device/bluetooth/bluetooth_discovery_filter.cc +++ b/device/bluetooth/bluetooth_discovery_filter.cc
@@ -23,6 +23,23 @@ BluetoothDiscoveryFilter::~BluetoothDiscoveryFilter() = default; +BluetoothDiscoveryFilter::DeviceInfoFilter::DeviceInfoFilter() = default; +BluetoothDiscoveryFilter::DeviceInfoFilter::DeviceInfoFilter( + const DeviceInfoFilter& other) = default; +BluetoothDiscoveryFilter::DeviceInfoFilter::~DeviceInfoFilter() = default; +bool BluetoothDiscoveryFilter::DeviceInfoFilter::operator==( + const BluetoothDiscoveryFilter::DeviceInfoFilter& other) const { + return uuids == other.uuids && name == other.name; +} + +bool BluetoothDiscoveryFilter::DeviceInfoFilter::operator<( + const BluetoothDiscoveryFilter::DeviceInfoFilter& other) const { + if (name == other.name) + return uuids < other.uuids; + + return name < other.name; +} + bool BluetoothDiscoveryFilter::GetRSSI(int16_t* out_rssi) const { DCHECK(out_rssi); if (!rssi_) @@ -61,30 +78,25 @@ void BluetoothDiscoveryFilter::GetUUIDs( std::set<device::BluetoothUUID>& out_uuids) const { out_uuids.clear(); - - for (const auto& uuid : uuids_) - out_uuids.insert(*uuid); + for (const auto& device_filter : device_filters_) { + for (const auto& uuid : device_filter.uuids) { + out_uuids.insert(uuid); + } + } } -void BluetoothDiscoveryFilter::AddUUID(const device::BluetoothUUID& uuid) { - DCHECK(uuid.IsValid()); - for (const auto& uuid_it : uuids_) { - if (*uuid_it == uuid) - return; - } - - uuids_.push_back(std::make_unique<device::BluetoothUUID>(uuid)); +void BluetoothDiscoveryFilter::AddDeviceFilter( + const BluetoothDiscoveryFilter::DeviceInfoFilter& device_filter) { + device_filters_.insert(device_filter); } void BluetoothDiscoveryFilter::CopyFrom( const BluetoothDiscoveryFilter& filter) { transport_ = filter.transport_; - uuids_.clear(); - if (filter.uuids_.size()) { - for (const auto& uuid : filter.uuids_) - AddUUID(*uuid); - } + device_filters_.clear(); + for (const auto& device_filter : filter.device_filters_) + AddDeviceFilter(device_filter); rssi_ = filter.rssi_; pathloss_ = filter.pathloss_; @@ -113,15 +125,13 @@ // if both filters have uuids, them merge them. Otherwise uuids filter should // be left empty - if (filter_a->uuids_.size() && filter_b->uuids_.size()) { - std::set<device::BluetoothUUID> uuids; - filter_a->GetUUIDs(uuids); - for (auto& uuid : uuids) - result->AddUUID(uuid); + if (!filter_a->device_filters_.empty() && + !filter_b->device_filters_.empty()) { + for (const auto& device_filter : filter_a->device_filters_) + result->AddDeviceFilter(device_filter); - filter_b->GetUUIDs(uuids); - for (auto& uuid : uuids) - result->AddUUID(uuid); + for (const auto& device_filter : filter_b->device_filters_) + result->AddDeviceFilter(device_filter); } if ((filter_a->rssi_ && filter_b->pathloss_) || @@ -155,17 +165,14 @@ if (transport_ != other.transport_) return false; - std::set<device::BluetoothUUID> uuids_a, uuids_b; - GetUUIDs(uuids_a); - other.GetUUIDs(uuids_b); - if (uuids_a != uuids_b) + if (device_filters_ != other.device_filters_) return false; return true; } bool BluetoothDiscoveryFilter::IsDefault() const { - return !(rssi_ || pathloss_ || uuids_.size() || + return !(rssi_ || pathloss_ || !device_filters_.empty() || transport_ != BLUETOOTH_TRANSPORT_DUAL); }
diff --git a/device/bluetooth/bluetooth_discovery_filter.h b/device/bluetooth/bluetooth_discovery_filter.h index 7749635..b76a372 100644 --- a/device/bluetooth/bluetooth_discovery_filter.h +++ b/device/bluetooth/bluetooth_discovery_filter.h
@@ -9,8 +9,10 @@ #include <memory> #include <set> +#include <string> #include <vector> +#include "base/containers/flat_set.h" #include "base/macros.h" #include "base/optional.h" #include "device/bluetooth/bluetooth_common.h" @@ -19,13 +21,48 @@ namespace device { -// Used to keep a discovery filter that can be used to limit reported devices. +// ***************************************************************************** +// BluetoothDiscoveryFilter is a class which stores information used to filter +// out Bluetooth devices at the operating system level while doing discovery. +// If you want to filter by RSSI or path loss set them directly in the class +// with the SetRSSI() and SetPathloss() functions. However, if you are looking +// for a device with a particular name and/or set of services you must add a +// DeviceInfoFilter. +// Here is an example usage for DeviceInfoFilters: +// +// BluetoothDiscoveryFilter discovery_filter(BLUETOOTH_TRANSPORT_LE); +// BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; +// device_filter.uuids.insert(BluetoothUUID("1019")); +// device_filter.uuids.insert(BluetoothUUID("1020")); +// discovery_filter.AddDeviceFilter(device_filter); +// +// BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; +// device_filter2.uuids.insert(BluetoothUUID("1021")); +// device_filter2.name = "this device"; +// discovery_filter.AddDeviceFilter(device_filter2); +// +// When we add |device_filter| to |discovery_filter| our filter will only return +// devices that have both the uuid 1019 AND 1020. When we add |device_filter2| +// we will then allow devices though that have either (uuid 1019 AND 1020) OR +// (uuid 1021 and a device name of "this device"). +// ***************************************************************************** + class DEVICE_BLUETOOTH_EXPORT BluetoothDiscoveryFilter { public: BluetoothDiscoveryFilter(); BluetoothDiscoveryFilter(BluetoothTransport transport); ~BluetoothDiscoveryFilter(); + struct DEVICE_BLUETOOTH_EXPORT DeviceInfoFilter { + DeviceInfoFilter(); + DeviceInfoFilter(const DeviceInfoFilter& other); + ~DeviceInfoFilter(); + bool operator==(const DeviceInfoFilter& other) const; + bool operator<(const DeviceInfoFilter& other) const; + base::flat_set<device::BluetoothUUID> uuids; + std::string name; + }; + // These getters return true when given field is set in filter, and copy this // value to |out_*| parameter. If value is not set, returns false. // These setters assign given value to proper filter field. @@ -38,12 +75,14 @@ BluetoothTransport GetTransport() const; void SetTransport(BluetoothTransport transport); - // Make |out_uuids| represent all uuids assigned to this filter. + // Make |out_uuids| represent all uuids in the |device_filters_| set. void GetUUIDs(std::set<device::BluetoothUUID>& out_uuids) const; - // Add UUID to internal UUIDs filter. If UUIDs filter doesn't exist, it will - // be created. - void AddUUID(const device::BluetoothUUID& uuid); + // Add new DeviceInfoFilter to our array of DeviceInfoFilters, + void AddDeviceFilter(const DeviceInfoFilter& device_filter); + + // Returns a const pointer of our list of DeviceInfoFilters, device_filters_. + const base::flat_set<DeviceInfoFilter>* GetDeviceFilters(); // Copy content of |filter| and assigns it to this filter. void CopyFrom(const BluetoothDiscoveryFilter& filter); @@ -64,7 +103,7 @@ base::Optional<int16_t> rssi_; base::Optional<uint16_t> pathloss_; BluetoothTransport transport_; - std::vector<std::unique_ptr<device::BluetoothUUID>> uuids_; + base::flat_set<DeviceInfoFilter> device_filters_; DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoveryFilter); };
diff --git a/device/bluetooth/bluetooth_discovery_filter_unittest.cc b/device/bluetooth/bluetooth_discovery_filter_unittest.cc index 53c19aceb..1b24f0d 100644 --- a/device/bluetooth/bluetooth_discovery_filter_unittest.cc +++ b/device/bluetooth/bluetooth_discovery_filter_unittest.cc
@@ -9,6 +9,7 @@ #include "base/macros.h" #include "device/bluetooth/bluetooth_common.h" #include "device/bluetooth/bluetooth_discovery_session.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -16,6 +17,8 @@ const device::BluetoothUUID uuid1003("1003"); const device::BluetoothUUID uuid1004("1004"); const device::BluetoothUUID uuid1020("1020"); +const device::BluetoothUUID uuid1057("1027"); +const device::BluetoothUUID uuid1019("1019"); } // namespace @@ -24,20 +27,46 @@ TEST(BluetoothDiscoveryFilterTest, Equal) { BluetoothDiscoveryFilter df1(BLUETOOTH_TRANSPORT_CLASSIC); df1.SetRSSI(-65); - df1.AddUUID(uuid1020); - df1.AddUUID(uuid1003); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df1.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1003); + df1.AddDeviceFilter(device_filter); + } BluetoothDiscoveryFilter df2(BLUETOOTH_TRANSPORT_CLASSIC); df2.SetRSSI(-65); - df2.AddUUID(uuid1020); - df2.AddUUID(uuid1004); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df2.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1004); + df2.AddDeviceFilter(device_filter); + } // uuids are not same, so should fail ASSERT_FALSE(df1.Equals(df2)); // make filters equal - df1.AddUUID(uuid1004); - df2.AddUUID(uuid1003); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1004); + df1.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1003); + df2.AddDeviceFilter(device_filter); + } ASSERT_TRUE(df1.Equals(df2)); // now transport don't match @@ -52,11 +81,41 @@ df1.SetRSSI(-30); ASSERT_FALSE(df1.Equals(df2)); + // set RSSIs to be the same and confirm that + // the filters match to prepare for next test + df2.SetRSSI(-30); + ASSERT_TRUE(df1.Equals(df2)); + + // add filters with the same uuid but different names + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter_no_name; + device_filter_no_name.uuids.insert(uuid1019); + df1.AddDeviceFilter(device_filter_no_name); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter_name; + device_filter_name.uuids.insert(uuid1019); + device_filter_name.name = "device 1019"; + df2.AddDeviceFilter(device_filter_name); + + // with different names the filters should not be the same + ASSERT_FALSE(df1.Equals(df2)); + BluetoothDiscoveryFilter df3(BLUETOOTH_TRANSPORT_CLASSIC); df3.SetPathloss(45); - df3.AddUUID(uuid1020); - df3.AddUUID(uuid1003); - df3.AddUUID(uuid1004); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df3.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1003); + df3.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1004); + df3.AddDeviceFilter(device_filter); + } // Having Pathloss and RSSI set in two different filter makes them unequal. ASSERT_FALSE(df1.Equals(df3)); @@ -65,8 +124,17 @@ TEST(BluetoothDiscoveryFilterTest, CopyFrom) { BluetoothDiscoveryFilter df1(BLUETOOTH_TRANSPORT_CLASSIC); df1.SetRSSI(-65); - df1.AddUUID(uuid1020); - df1.AddUUID(uuid1003); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df1.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1003); + df1.AddDeviceFilter(device_filter); + } BluetoothDiscoveryFilter df2(BLUETOOTH_TRANSPORT_CLASSIC); @@ -82,18 +150,37 @@ EXPECT_EQ(BLUETOOTH_TRANSPORT_CLASSIC, df2.GetTransport()); df2.GetUUIDs(out_uuids); - EXPECT_TRUE(out_uuids.find(uuid1020) != out_uuids.end()); - EXPECT_TRUE(out_uuids.find(uuid1003) != out_uuids.end()); + EXPECT_THAT(out_uuids, testing::Contains(uuid1020)); + EXPECT_THAT(out_uuids, testing::Contains(uuid1057)); + EXPECT_THAT(out_uuids, testing::Contains(uuid1003)); } TEST(BluetoothDiscoveryFilterTest, MergeUUIDs) { BluetoothDiscoveryFilter df1(BLUETOOTH_TRANSPORT_LE); - df1.AddUUID(uuid1020); - df1.AddUUID(uuid1003); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df1.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1003); + df1.AddDeviceFilter(device_filter); + } BluetoothDiscoveryFilter df2(BLUETOOTH_TRANSPORT_LE); - df2.AddUUID(uuid1020); - df2.AddUUID(uuid1004); + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1020); + device_filter.uuids.insert(uuid1057); + df2.AddDeviceFilter(device_filter); + } + { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid1004); + df2.AddDeviceFilter(device_filter); + } std::unique_ptr<BluetoothDiscoveryFilter> df3 = BluetoothDiscoveryFilter::Merge(&df1, &df2);
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc index 0daebdc..e7f8620 100644 --- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc +++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -1334,15 +1334,18 @@ TestBluetoothAdapterObserver observer(adapter_); - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-60); - df->AddUUID(BluetoothUUID("1000")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-60); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); adapter_->SetPowered( true, base::Bind(&BluetoothBlueZTest::Callback, base::Unretained(this)), base::Bind(&BluetoothBlueZTest::ErrorCallback, base::Unretained(this))); + + auto* comparison_filter_holder = discovery_filter.get(); adapter_->StartDiscoverySessionWithFilter( std::move(discovery_filter), base::Bind(&BluetoothBlueZTest::DiscoverySessionCallback, @@ -1357,7 +1360,8 @@ ASSERT_TRUE(adapter_->IsDiscovering()); ASSERT_EQ((size_t)1, discovery_sessions_.size()); ASSERT_TRUE(discovery_sessions_[0]->IsActive()); - ASSERT_TRUE(df->Equals(*discovery_sessions_[0]->GetDiscoveryFilter())); + ASSERT_TRUE(comparison_filter_holder->Equals( + *discovery_sessions_[0]->GetDiscoveryFilter())); auto* filter = fake_bluetooth_adapter_client_->GetDiscoveryFilter(); EXPECT_NE(nullptr, filter); @@ -1394,11 +1398,12 @@ TestBluetoothAdapterObserver observer(adapter_); - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-60); - df->AddUUID(BluetoothUUID("1000")); - std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); + auto discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-60); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); adapter_->SetPowered( true, base::Bind(&BluetoothBlueZTest::Callback, base::Unretained(this)), @@ -1445,25 +1450,30 @@ for (int i = 0; i < 3; i++) { std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter; if (i == 0) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-85); - df->AddUUID(BluetoothUUID("1000")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-85); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } else if (i == 1) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-60); - df->AddUUID(BluetoothUUID("1020")); - df->AddUUID(BluetoothUUID("1001")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-60); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1020")); + device_filter.uuids.insert(BluetoothUUID("1001")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } else if (i == 2) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-65); - df->AddUUID(BluetoothUUID("1020")); - df->AddUUID(BluetoothUUID("1003")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-65); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1020")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; + device_filter2.uuids.insert(BluetoothUUID("1003")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); + discovery_filter->AddDeviceFilter(std::move(device_filter2)); } adapter_->StartDiscoverySessionWithFilter( @@ -1569,25 +1579,30 @@ std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter; if (i == 0) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-85); - df->AddUUID(BluetoothUUID("1000")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-85); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } else if (i == 1) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-60); - df->AddUUID(BluetoothUUID("1020")); - df->AddUUID(BluetoothUUID("1001")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-60); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1020")); + device_filter.uuids.insert(BluetoothUUID("1001")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } else if (i == 2) { - BluetoothDiscoveryFilter* df = - new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); - df->SetRSSI(-65); - df->AddUUID(BluetoothUUID("1020")); - df->AddUUID(BluetoothUUID("1003")); - discovery_filter.reset(df); + discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); + discovery_filter->SetRSSI(-65); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1020")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; + device_filter2.uuids.insert(BluetoothUUID("1003")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); + discovery_filter->AddDeviceFilter(std::move(device_filter2)); } adapter_->StartDiscoverySessionWithFilter( @@ -1668,7 +1683,9 @@ BluetoothDiscoveryFilter* df = new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); df->SetRSSI(-15); - df->AddUUID(BluetoothUUID("1000")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("1000")); + df->AddDeviceFilter(std::move(device_filter)); std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter(df); adapter_->StartDiscoverySessionWithFilter( @@ -1688,8 +1705,10 @@ df = new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE); df->SetRSSI(-60); - df->AddUUID(BluetoothUUID("1020")); - df->AddUUID(BluetoothUUID("1001")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; + device_filter2.uuids.insert(BluetoothUUID("1020")); + device_filter2.uuids.insert(BluetoothUUID("1001")); + df->AddDeviceFilter(device_filter2); discovery_filter = std::unique_ptr<BluetoothDiscoveryFilter>(df); adapter_->StartDiscoverySessionWithFilter( @@ -1712,8 +1731,12 @@ BluetoothDiscoveryFilter* df3 = new BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_CLASSIC); df3->SetRSSI(-65); - df3->AddUUID(BluetoothUUID("1020")); - df3->AddUUID(BluetoothUUID("1003")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter3; + device_filter3.uuids.insert(BluetoothUUID("1020")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter4; + device_filter4.uuids.insert(BluetoothUUID("1003")); + df3->AddDeviceFilter(device_filter3); + df3->AddDeviceFilter(device_filter4); std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter3(df3); adapter_->StartDiscoverySessionWithFilter(
diff --git a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc index ac533f4..fc0bc6b 100644 --- a/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc +++ b/device/bluetooth/bluez/bluetooth_gatt_bluez_unittest.cc
@@ -84,6 +84,13 @@ return true; } +void AddDeviceFilterWithUUID(BluetoothDiscoveryFilter* filter, + BluetoothUUID uuid) { + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(uuid); + filter->AddDeviceFilter(device_filter); +} + } // namespace class BluetoothGattBlueZTest : public testing::Test { @@ -324,7 +331,7 @@ AddDualDevice(); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(kBatteryServiceUUID); + AddDeviceFilterWithUUID(&discovery_filter, kBatteryServiceUUID); DeviceToUUIDs result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( @@ -340,7 +347,9 @@ BluetoothDevice* dual = AddDualDevice(); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(kGenericAccessServiceUUID); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(kGenericAccessServiceUUID); + discovery_filter.AddDeviceFilter(device_filter); DeviceToUUIDs result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( @@ -357,7 +366,7 @@ BluetoothDevice* dual = AddDualDevice(); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(kHeartRateServiceUUID); + AddDeviceFilterWithUUID(&discovery_filter, kHeartRateServiceUUID); DeviceToUUIDs result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( @@ -374,8 +383,8 @@ BluetoothDevice* dual = AddDualDevice(); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(kGenericAccessServiceUUID); - discovery_filter.AddUUID(kHeartRateServiceUUID); + AddDeviceFilterWithUUID(&discovery_filter, kGenericAccessServiceUUID); + AddDeviceFilterWithUUID(&discovery_filter, kHeartRateServiceUUID); DeviceToUUIDs result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter( @@ -393,8 +402,12 @@ AddLeDevice(); BluetoothDevice* dual = AddDualDevice(); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); - discovery_filter.AddUUID(kGenericAccessServiceUUID); - discovery_filter.AddUUID(kBatteryServiceUUID); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(kGenericAccessServiceUUID); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; + device_filter2.uuids.insert(kBatteryServiceUUID); + discovery_filter.AddDeviceFilter(device_filter); + discovery_filter.AddDeviceFilter(device_filter2); DeviceToUUIDs result = adapter_->RetrieveGattConnectedDevicesWithDiscoveryFilter(
diff --git a/device/fido/ble/fido_ble_discovery.cc b/device/fido/ble/fido_ble_discovery.cc index 6a2e73d6..f42980e 100644 --- a/device/fido/ble/fido_ble_discovery.cc +++ b/device/fido/ble/fido_ble_discovery.cc
@@ -48,12 +48,14 @@ } } - auto filter = std::make_unique<BluetoothDiscoveryFilter>( + auto discovery_filter = std::make_unique<BluetoothDiscoveryFilter>( BluetoothTransport::BLUETOOTH_TRANSPORT_LE); - filter->AddUUID(FidoServiceUUID()); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(FidoServiceUUID()); + discovery_filter->AddDeviceFilter(device_filter); adapter()->StartDiscoverySessionWithFilter( - std::move(filter), + std::move(discovery_filter), base::AdaptCallbackForRepeating( base::BindOnce(&FidoBleDiscovery::OnStartDiscoverySessionWithFilter, weak_factory_.GetWeakPtr())),
diff --git a/device/fido/cable/fido_cable_discovery.cc b/device/fido/cable/fido_cable_discovery.cc index 6f9f8710..79c4bf5 100644 --- a/device/fido/cable/fido_cable_discovery.cc +++ b/device/fido/cable/fido_cable_discovery.cc
@@ -428,19 +428,16 @@ void FidoCableDiscovery::StartAdvertisement() { DCHECK(adapter()); - if (discovery_data_.empty() && qr_generator_key_.has_value()) { - // If no caBLE extension was provided then there are no BLE advertisements - // and discovery starts immediately on the assumption that the user will - // scan a QR-code with their phone. - NotifyDiscoveryStarted(true); - return; - } - - FIDO_LOG(DEBUG) << "Starting to advertise clientEID."; + bool advertisements_pending = false; for (const auto& data : discovery_data_) { if (data.version != CableDiscoveryData::Version::V1) { continue; } + + if (!advertisements_pending) { + FIDO_LOG(DEBUG) << "Starting to advertise clientEIDs."; + advertisements_pending = true; + } adapter()->RegisterAdvertisement( ConstructAdvertisementData(data.v1->client_eid), base::AdaptCallbackForRepeating( @@ -450,6 +447,13 @@ base::BindOnce(&FidoCableDiscovery::OnAdvertisementRegisterError, weak_factory_.GetWeakPtr()))); } + + if (!advertisements_pending) { + // If no V1 extensions were provided then this discovery is ready + // immediately. Otherwise |NotifyDiscoveryStarted| will be called once + // all the advertising requests have been resolved. + NotifyDiscoveryStarted(true); + } } void FidoCableDiscovery::StopAdvertisements(base::OnceClosure callback) { @@ -575,7 +579,7 @@ auto data = std::make_unique<ObservedDeviceData>(); data->service_data = maybe_eid_from_service_data; data->uuids = uuids; - observed_devices_.emplace(std::make_pair(address, std::move(data))); + observed_devices_.insert_or_assign(address, std::move(data)); // New or updated device information. if (known) { @@ -683,9 +687,9 @@ // Attempt to match |authenticator_eid| as the result of scanning a QR code. const int64_t current_tick = CableDiscoveryData::CurrentTimeTick(); // kNumPreviousTicks is the number of previous ticks that will be accepted - // as valid. Ticks are currently 256ms so the value of eight translates to a - // couple of seconds. - constexpr int kNumPreviousTicks = 8; + // as valid. Ticks are currently 256ms so the value of sixteen translates to + // about four seconds. + constexpr int kNumPreviousTicks = 16; for (int i = 0; i < kNumPreviousTicks; i++) { auto qr_secret = CableDiscoveryData::DeriveQRSecret(*qr_generator_key_, @@ -696,6 +700,21 @@ return Result(candidate, *maybe_nonce, authenticator_eid, i); } } + + if (base::Contains(noted_obsolete_eids_, authenticator_eid)) { + for (int i = kNumPreviousTicks; i < 2 * kNumPreviousTicks; i++) { + auto qr_secret = CableDiscoveryData::DeriveQRSecret(*qr_generator_key_, + current_tick - i); + CableDiscoveryData candidate(qr_secret); + if (candidate.Match(authenticator_eid)) { + noted_obsolete_eids_.insert(authenticator_eid); + FIDO_LOG(DEBUG) + << "(EID " << base::HexEncode(authenticator_eid) << " is " << i + << " ticks old and would be valid but for the cutoff)"; + break; + } + } + } } return base::nullopt;
diff --git a/device/fido/cable/fido_cable_discovery.h b/device/fido/cable/fido_cable_discovery.h index 1ea2ffd3..96878e1e 100644 --- a/device/fido/cable/fido_cable_discovery.h +++ b/device/fido/cable/fido_cable_discovery.h
@@ -157,6 +157,9 @@ // that the device-log isn't spammed. mutable base::flat_map<std::string, std::unique_ptr<ObservedDeviceData>> observed_devices_; + // noted_obsolete_eids_ remembers QR-code EIDs that have been logged as + // valid-but-expired in order to avoid spamming the device-log. + mutable base::flat_set<CableEidArray> noted_obsolete_eids_; base::WeakPtrFactory<FidoCableDiscovery> weak_factory_{this};
diff --git a/extensions/browser/api/OWNERS b/extensions/browser/api/OWNERS deleted file mode 100644 index cdd8f14..0000000 --- a/extensions/browser/api/OWNERS +++ /dev/null
@@ -1,3 +0,0 @@ -# For Chrome OS apps APIs. -tbarzic@chromium.org -# COMPONENT: Platform>Extensions>API
diff --git a/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc b/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc index c7b265b..de68ec1 100644 --- a/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc +++ b/extensions/browser/api/bluetooth/bluetooth_event_router_unittest.cc
@@ -101,11 +101,12 @@ // This test check that calling SetDiscoveryFilter before StartDiscoverySession // for given extension will start session with proper filter. TEST_F(BluetoothEventRouterTest, SetDiscoveryFilter) { - std::unique_ptr<device::BluetoothDiscoveryFilter> discovery_filter( - new device::BluetoothDiscoveryFilter(device::BLUETOOTH_TRANSPORT_LE)); - + auto discovery_filter = std::make_unique<device::BluetoothDiscoveryFilter>( + device::BLUETOOTH_TRANSPORT_LE); discovery_filter->SetRSSI(-80); - discovery_filter->AddUUID(device::BluetoothUUID("1000")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(device::BluetoothUUID("1000")); + discovery_filter->AddDeviceFilter(std::move(device_filter)); device::BluetoothDiscoveryFilter df(device::BLUETOOTH_TRANSPORT_LE); df.CopyFrom(*discovery_filter);
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_api.cc b/extensions/browser/api/bluetooth/bluetooth_private_api.cc index 9dba360..5f4082eb 100644 --- a/extensions/browser/api/bluetooth/bluetooth_private_api.cc +++ b/extensions/browser/api/bluetooth/bluetooth_private_api.cc
@@ -519,13 +519,16 @@ discovery_filter.reset(new device::BluetoothDiscoveryFilter(transport)); if (df_param.uuids.get()) { - std::vector<device::BluetoothUUID> uuids; if (df_param.uuids->as_string.get()) { - discovery_filter->AddUUID( + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert( device::BluetoothUUID(*df_param.uuids->as_string)); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } else if (df_param.uuids->as_strings.get()) { for (const auto& iter : *df_param.uuids->as_strings) { - discovery_filter->AddUUID(device::BluetoothUUID(iter)); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(device::BluetoothUUID(iter)); + discovery_filter->AddDeviceFilter(std::move(device_filter)); } } }
diff --git a/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc index 0312f458..ce6ef3d 100644 --- a/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc +++ b/extensions/browser/api/bluetooth/bluetooth_private_apitest.cc
@@ -259,9 +259,13 @@ device::BLUETOOTH_TRANSPORT_DUAL); BluetoothDiscoveryFilter discovery_filter(device::BLUETOOTH_TRANSPORT_LE); discovery_filter.SetPathloss(50); - discovery_filter.AddUUID(BluetoothUUID("cafe")); - discovery_filter.AddUUID( + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter; + device_filter.uuids.insert(BluetoothUUID("cafe")); + device::BluetoothDiscoveryFilter::DeviceInfoFilter device_filter2; + device_filter2.uuids.insert( BluetoothUUID("0000bebe-0000-1000-8000-00805f9b34fb")); + discovery_filter.AddDeviceFilter(std::move(device_filter)); + discovery_filter.AddDeviceFilter(std::move(device_filter2)); EXPECT_CALL(*mock_adapter_, StartScanWithFilter_( IsFilterEqual(&discovery_filter), testing::_))
diff --git a/extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc b/extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc index 89455ad5..0c71e30 100644 --- a/extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc +++ b/extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc
@@ -7,10 +7,9 @@ #include "base/command_line.h" #include "base/memory/ref_counted.h" #include "base/strings/stringprintf.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -#include "content/public/common/service_names.mojom.h" #include "content/public/test/network_service_test_helper.h" #include "extensions/browser/api/sockets_tcp/sockets_tcp_api.h" #include "extensions/browser/api_test_utils.h" @@ -20,10 +19,10 @@ #include "extensions/shell/test/shell_test.h" #include "extensions/test/extension_test_message_listener.h" #include "extensions/test/result_catcher.h" +#include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/bindings/sync_call_restrictions.h" #include "net/dns/mock_host_resolver.h" #include "net/test/spawned_test_server/spawned_test_server.h" -#include "services/service_manager/public/cpp/connector.h" namespace extensions { @@ -91,12 +90,12 @@ } IN_PROC_BROWSER_TEST_F(SocketsTcpApiTest, SocketTcpExtensionTLS) { - network::mojom::NetworkServiceTestPtr network_service_test; // Because the network service runs in a utility process, the cert of the // SpawnedTestServer won't be recognized, so inject mock cert verifier through // the test helper interface. - content::GetSystemConnector()->BindInterface( - content::mojom::kNetworkServiceName, &network_service_test); + mojo::Remote<network::mojom::NetworkServiceTest> network_service_test; + content::GetNetworkService()->BindTestInterface( + network_service_test.BindNewPipeAndPassReceiver()); mojo::ScopedAllowSyncCallForTesting allow_sync_call; network_service_test->MockCertVerifierSetDefaultResult(net::OK);
diff --git a/extensions/browser/api/web_request/web_request_proxying_websocket.cc b/extensions/browser/api/web_request/web_request_proxying_websocket.cc index 2435e0d..f9c6416e3 100644 --- a/extensions/browser/api/web_request/web_request_proxying_websocket.cc +++ b/extensions/browser/api/web_request/web_request_proxying_websocket.cc
@@ -138,37 +138,6 @@ forwarding_handshake_client_->OnOpeningHandshakeStarted(std::move(request)); } -void WebRequestProxyingWebSocket::OnResponseReceived( - network::mojom::WebSocketHandshakeResponsePtr response) { - DCHECK(forwarding_handshake_client_); - - // response_.headers will be set in OnBeforeSendHeaders if - // |receiver_as_header_client_| is set. - if (!receiver_as_header_client_.is_bound()) { - response_.headers = - base::MakeRefCounted<net::HttpResponseHeaders>(base::StringPrintf( - "HTTP/%d.%d %d %s", response->http_version.major_value(), - response->http_version.minor_value(), response->status_code, - response->status_text.c_str())); - for (const auto& header : response->headers) - response_.headers->AddHeader(header->name + ": " + header->value); - } - - response_.remote_endpoint = response->remote_endpoint; - - // TODO(yhirano): OnResponseReceived is called with the original - // response headers. That means if OnHeadersReceived modified them the - // renderer won't see that modification. This is the opposite of http(s) - // requests. - forwarding_handshake_client_->OnResponseReceived(std::move(response)); - - if (!receiver_as_header_client_.is_bound() || response_.headers) { - ContinueToHeadersReceived(); - } else { - waiting_for_header_client_headers_received_ = true; - } -} - void WebRequestProxyingWebSocket::ContinueToHeadersReceived() { auto continuation = base::BindRepeating( &WebRequestProxyingWebSocket::OnHeadersReceivedComplete, @@ -195,16 +164,47 @@ mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver, const std::string& selected_protocol, const std::string& extensions, + network::mojom::WebSocketHandshakeResponsePtr response, mojo::ScopedDataPipeConsumerHandle readable) { DCHECK(forwarding_handshake_client_); DCHECK(!is_done_); is_done_ = true; + websocket_ = std::move(websocket); + client_receiver_ = std::move(client_receiver); + selected_protocol_ = selected_protocol; + extensions_ = extensions; + handshake_response_ = std::move(response); + readable_ = std::move(readable); + + response_.remote_endpoint = handshake_response_->remote_endpoint; + + // response_.headers will be set in OnBeforeSendHeaders if + // |receiver_as_header_client_| is set. + if (receiver_as_header_client_.is_bound()) { + ContinueToCompleted(); + return; + } + + response_.headers = + base::MakeRefCounted<net::HttpResponseHeaders>(base::StringPrintf( + "HTTP/%d.%d %d %s", handshake_response_->http_version.major_value(), + handshake_response_->http_version.minor_value(), + handshake_response_->status_code, + handshake_response_->status_text.c_str())); + for (const auto& header : handshake_response_->headers) + response_.headers->AddHeader(header->name + ": " + header->value); + + ContinueToHeadersReceived(); +} + +void WebRequestProxyingWebSocket::ContinueToCompleted() { + DCHECK(forwarding_handshake_client_); + DCHECK(is_done_); ExtensionWebRequestEventRouter::GetInstance()->OnCompleted( browser_context_, &info_, net::ERR_WS_UPGRADE); - forwarding_handshake_client_->OnConnectionEstablished( - std::move(websocket), std::move(client_receiver), selected_protocol, - extensions, std::move(readable)); + std::move(websocket_), std::move(client_receiver_), selected_protocol_, + extensions_, std::move(handshake_response_), std::move(readable_)); // Deletes |this|. proxies_->RemoveProxy(this); @@ -259,16 +259,9 @@ OnHeadersReceivedCallback callback) { DCHECK(receiver_as_header_client_.is_bound()); - // Note: since there are different pipes used for WebSocketClient and - // TrustedHeaderClient, there are no guarantees whether this or - // OnResponseReceived are called first. on_headers_received_callback_ = std::move(callback); response_.headers = base::MakeRefCounted<net::HttpResponseHeaders>(headers); - if (!waiting_for_header_client_headers_received_) - return; - - waiting_for_header_client_headers_received_ = false; ContinueToHeadersReceived(); } @@ -422,6 +415,9 @@ info_.AddResponseInfoFromResourceResponse(response_); ExtensionWebRequestEventRouter::GetInstance()->OnResponseStarted( browser_context_, &info_, net::OK); + + if (!receiver_as_header_client_.is_bound()) + ContinueToCompleted(); } void WebRequestProxyingWebSocket::OnAuthRequiredComplete(
diff --git a/extensions/browser/api/web_request/web_request_proxying_websocket.h b/extensions/browser/api/web_request/web_request_proxying_websocket.h index 2a644f81..5b450b5 100644 --- a/extensions/browser/api/web_request/web_request_proxying_websocket.h +++ b/extensions/browser/api/web_request/web_request_proxying_websocket.h
@@ -60,13 +60,12 @@ // network::mojom::WebSocketHandshakeClient methods: void OnOpeningHandshakeStarted( network::mojom::WebSocketHandshakeRequestPtr request) override; - void OnResponseReceived( - network::mojom::WebSocketHandshakeResponsePtr response) override; void OnConnectionEstablished( mojo::PendingRemote<network::mojom::WebSocket> websocket, mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver, const std::string& selected_protocol, const std::string& extensions, + network::mojom::WebSocketHandshakeResponsePtr response, mojo::ScopedDataPipeConsumerHandle readable) override; // network::mojom::AuthenticationHandler method: @@ -108,6 +107,7 @@ ExtensionWebRequestEventRouter::AuthRequiredResponse rv); void OnHeadersReceivedCompleteForAuth(const net::AuthChallengeInfo& auth_info, int rv); + void ContinueToCompleted(); void PauseIncomingMethodCallProcessing(); void ResumeIncomingMethodCallProcessing(); @@ -138,8 +138,13 @@ GURL redirect_url_; bool is_done_ = false; - bool waiting_for_header_client_headers_received_ = false; bool has_extra_headers_; + mojo::PendingRemote<network::mojom::WebSocket> websocket_; + mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver_; + std::string selected_protocol_; + std::string extensions_; + network::mojom::WebSocketHandshakeResponsePtr handshake_response_ = nullptr; + mojo::ScopedDataPipeConsumerHandle readable_; WebRequestInfo info_;
diff --git a/extensions/browser/extension_navigation_throttle.cc b/extensions/browser/extension_navigation_throttle.cc index cf34de5f..8214f2e 100644 --- a/extensions/browser/extension_navigation_throttle.cc +++ b/extensions/browser/extension_navigation_throttle.cc
@@ -136,8 +136,9 @@ navigation_handle()->GetInitiatorOrigin().value(); // Navigations from chrome://, devtools:// or chrome-search:// pages need to - // be allowed, even if the target |url| is not web-accessible. See - // https://crbug.com/662602. + // be allowed, even if the target |url| is not web-accessible. See also: + // - https://crbug.com/662602 + // - similar checks in extensions::ResourceRequestPolicy::CanRequestResource if (initiator_origin.scheme() == content::kChromeUIScheme || initiator_origin.scheme() == content::kChromeDevToolsScheme || ExtensionsBrowserClient::Get()->ShouldSchemeBypassNavigationChecks(
diff --git a/extensions/browser/extension_prefs.cc b/extensions/browser/extension_prefs.cc index 87da6a4..214ed12 100644 --- a/extensions/browser/extension_prefs.cc +++ b/extensions/browser/extension_prefs.cc
@@ -1997,6 +1997,8 @@ extension_dict->SetBoolean(kPrefBlacklist, true); if (dnr_ruleset_checksum) extension_dict->SetInteger(kPrefDNRRulesetChecksum, *dnr_ruleset_checksum); + if (extension->creation_flags() & Extension::WITHHOLD_PERMISSIONS) + extension_dict->SetBoolean(kGrantExtensionAllHostPermissions, false); base::FilePath::StringType path = MakePathRelative(install_directory_, extension->path());
diff --git a/extensions/browser/extensions_test.cc b/extensions/browser/extensions_test.cc index e4d57e2..8687277 100644 --- a/extensions/browser/extensions_test.cc +++ b/extensions/browser/extensions_test.cc
@@ -9,6 +9,7 @@ #include "components/prefs/pref_service_factory.h" #include "components/prefs/testing_pref_store.h" #include "content/public/common/content_client.h" +#include "content/public/common/network_service_util.h" #include "content/public/test/test_browser_context.h" #include "extensions/browser/extension_pref_value_map.h" #include "extensions/browser/extension_prefs.h" @@ -66,6 +67,7 @@ } void ExtensionsTest::SetUp() { + content::ForceInProcessNetworkService(true); content_utility_client_ = std::make_unique<TestContentUtilityClient>(); browser_context_ = std::make_unique<ExtensionTestBrowserContext>(); incognito_context_ = CreateTestIncognitoContext();
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc index 33448207..91cdd8f 100644 --- a/extensions/common/extension.cc +++ b/extensions/common/extension.cc
@@ -126,7 +126,7 @@ } // namespace -const int Extension::kInitFromValueFlagBits = 14; +const int Extension::kInitFromValueFlagBits = 15; const char Extension::kMimeType[] = "application/x-chrome-extension";
diff --git a/extensions/common/extension.h b/extensions/common/extension.h index d28ea9d..f362258 100644 --- a/extensions/common/extension.h +++ b/extensions/common/extension.h
@@ -140,6 +140,10 @@ // instead of the usual |TYPE_EXTENSION|. FOR_LOGIN_SCREEN = 1 << 13, + // |WITHHOLD_PERMISSIONS| indicates that on installation the user indicated + // for permissions to be withheld from the extension by default. + WITHHOLD_PERMISSIONS = 1 << 14, + // When adding new flags, make sure to update kInitFromValueFlagBits. };
diff --git a/fuchsia/engine/browser/web_engine_cdm_service.cc b/fuchsia/engine/browser/web_engine_cdm_service.cc index a9d3ab4..fb9c529 100644 --- a/fuchsia/engine/browser/web_engine_cdm_service.cc +++ b/fuchsia/engine/browser/web_engine_cdm_service.cc
@@ -112,6 +112,26 @@ } }; +class PlayreadyHandler : public media::FuchsiaCdmManager::KeySystemHandler { + public: + PlayreadyHandler() = default; + ~PlayreadyHandler() override = default; + + void CreateCdm( + fidl::InterfaceRequest<fuchsia::media::drm::ContentDecryptionModule> + request) override { + auto playready = base::fuchsia::ComponentContextForCurrentProcess() + ->svc() + ->Connect<fuchsia::media::drm::PlayReady>(); + playready->CreateContentDecryptionModule(std::move(request)); + } + + fuchsia::media::drm::ProvisionerPtr CreateProvisioner() override { + // Provisioning is not required for PlayReady. + return fuchsia::media::drm::ProvisionerPtr(); + } +}; + // Supported key systems: std::unique_ptr<media::FuchsiaCdmManager> CreateCdmManager() { media::FuchsiaCdmManager::KeySystemHandlerMap handlers; @@ -121,6 +141,14 @@ handlers.emplace(kWidevineKeySystem, std::make_unique<WidevineHandler>()); } + std::string playready_key_system = + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kPlayreadyKeySystem); + if (!playready_key_system.empty()) { + handlers.emplace(playready_key_system, + std::make_unique<PlayreadyHandler>()); + } + return std::make_unique<media::FuchsiaCdmManager>(std::move(handlers)); }
diff --git a/fuchsia/engine/renderer/web_engine_content_renderer_client.cc b/fuchsia/engine/renderer/web_engine_content_renderer_client.cc index 1804d217..c7a044b7 100644 --- a/fuchsia/engine/renderer/web_engine_content_renderer_client.cc +++ b/fuchsia/engine/renderer/web_engine_content_renderer_client.cc
@@ -33,6 +33,76 @@ return false; } +class PlayreadyKeySystemProperties : public ::media::KeySystemProperties { + public: + PlayreadyKeySystemProperties(const std::string& key_system_name, + media::SupportedCodecs supported_codecs, + bool persistent_license_support) + : key_system_name_(key_system_name), + supported_codecs_(supported_codecs), + persistent_license_support_(persistent_license_support) {} + + std::string GetKeySystemName() const override { return key_system_name_; } + + bool IsSupportedInitDataType( + media::EmeInitDataType init_data_type) const override { + return init_data_type == media::EmeInitDataType::CENC; + } + + media::SupportedCodecs GetSupportedCodecs() const override { + return supported_codecs_; + } + + media::SupportedCodecs GetSupportedHwSecureCodecs() const override { + return supported_codecs_; + } + + media::EmeConfigRule GetRobustnessConfigRule( + media::EmeMediaType media_type, + const std::string& requested_robustness) const override { + // Only empty robustness string is currently supported. + if (requested_robustness.empty()) { + return media::EmeConfigRule::HW_SECURE_CODECS_REQUIRED; + } + + return media::EmeConfigRule::NOT_SUPPORTED; + } + + media::EmeSessionTypeSupport GetPersistentLicenseSessionSupport() + const override { + return persistent_license_support_ + ? media::EmeSessionTypeSupport::SUPPORTED + : media::EmeSessionTypeSupport::NOT_SUPPORTED; + } + + media::EmeSessionTypeSupport GetPersistentUsageRecordSessionSupport() + const override { + return media::EmeSessionTypeSupport::NOT_SUPPORTED; + } + + media::EmeFeatureSupport GetPersistentStateSupport() const override { + return media::EmeFeatureSupport::ALWAYS_ENABLED; + } + + media::EmeFeatureSupport GetDistinctiveIdentifierSupport() const override { + return media::EmeFeatureSupport::ALWAYS_ENABLED; + } + + media::EmeConfigRule GetEncryptionSchemeConfigRule( + media::EncryptionMode encryption_mode) const override { + if (encryption_mode == ::media::EncryptionMode::kCenc) { + return media::EmeConfigRule::SUPPORTED; + } + + return media::EmeConfigRule::NOT_SUPPORTED; + } + + private: + const std::string key_system_name_; + const media::SupportedCodecs supported_codecs_; + const bool persistent_license_support_; +}; + } // namespace WebEngineContentRendererClient::WebEngineContentRendererClient() = default; @@ -82,33 +152,33 @@ void WebEngineContentRendererClient::AddSupportedKeySystems( std::vector<std::unique_ptr<media::KeySystemProperties>>* key_systems) { + media::SupportedCodecs supported_video_codecs = 0; + constexpr uint8_t kUnknownCodecLevel = 0; + if (IsSupportedHardwareVideoCodec(media::VideoType{ + media::kCodecVP9, media::VP9PROFILE_PROFILE0, kUnknownCodecLevel, + media::VideoColorSpace::REC709()})) { + supported_video_codecs |= media::EME_CODEC_VP9_PROFILE0; + } + + if (IsSupportedHardwareVideoCodec(media::VideoType{ + media::kCodecVP9, media::VP9PROFILE_PROFILE2, kUnknownCodecLevel, + media::VideoColorSpace::REC709()})) { + supported_video_codecs |= media::EME_CODEC_VP9_PROFILE2; + } + + if (IsSupportedHardwareVideoCodec(media::VideoType{ + media::kCodecH264, media::H264PROFILE_MAIN, kUnknownCodecLevel, + media::VideoColorSpace::REC709()})) { + supported_video_codecs |= media::EME_CODEC_AVC1; + } + + media::SupportedCodecs supported_audio_codecs = media::EME_CODEC_AUDIO_ALL; + + media::SupportedCodecs supported_codecs = + supported_video_codecs | supported_audio_codecs; + if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableWidevine)) { - media::SupportedCodecs supported_video_codecs = 0; - constexpr uint8_t kUnknownCodecLevel = 0; - if (IsSupportedHardwareVideoCodec(media::VideoType{ - media::kCodecVP9, media::VP9PROFILE_PROFILE0, kUnknownCodecLevel, - media::VideoColorSpace::REC709()})) { - supported_video_codecs |= media::EME_CODEC_VP9_PROFILE0; - } - - if (IsSupportedHardwareVideoCodec(media::VideoType{ - media::kCodecVP9, media::VP9PROFILE_PROFILE2, kUnknownCodecLevel, - media::VideoColorSpace::REC709()})) { - supported_video_codecs |= media::EME_CODEC_VP9_PROFILE2; - } - - if (IsSupportedHardwareVideoCodec(media::VideoType{ - media::kCodecH264, media::H264PROFILE_MAIN, kUnknownCodecLevel, - media::VideoColorSpace::REC709()})) { - supported_video_codecs |= media::EME_CODEC_AVC1; - } - - media::SupportedCodecs supported_audio_codecs = media::EME_CODEC_AUDIO_ALL; - - media::SupportedCodecs supported_codecs = - supported_video_codecs | supported_audio_codecs; - base::flat_set<media::EncryptionMode> encryption_schemes{ media::EncryptionMode::kCenc, media::EncryptionMode::kCbcs}; @@ -129,6 +199,15 @@ media::EmeFeatureSupport::ALWAYS_ENABLED, // persistent state media::EmeFeatureSupport::ALWAYS_ENABLED)); // distinctive identifier } + + std::string playready_key_system = + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kPlayreadyKeySystem); + if (!playready_key_system.empty()) { + key_systems->emplace_back( + new PlayreadyKeySystemProperties(playready_key_system, supported_codecs, + /*persistent_license_support=*/false)); + } } bool WebEngineContentRendererClient::IsSupportedVideoType(
diff --git a/fuchsia/engine/web_engine_integration_tests.cmx b/fuchsia/engine/web_engine_integration_tests.cmx index 2109685..5e29a15 100644 --- a/fuchsia/engine/web_engine_integration_tests.cmx +++ b/fuchsia/engine/web_engine_integration_tests.cmx
@@ -1,8 +1,8 @@ { "sandbox": { "features": [ - "deprecated-shell", "deprecated-ambient-replace-as-executable", + "hub", "isolated-persistent-storage", "isolated-temp" ],
diff --git a/fuchsia/http/http_service_unittest.cc b/fuchsia/http/http_service_unittest.cc index ef54550d..2a6ca9f1 100644 --- a/fuchsia/http/http_service_unittest.cc +++ b/fuchsia/http/http_service_unittest.cc
@@ -5,8 +5,6 @@ #include <fuchsia/net/oldhttp/cpp/fidl.h> #include <lib/fidl/cpp/binding.h> -#include "base/fuchsia/scoped_service_binding.h" -#include "base/fuchsia/service_directory.h" #include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/test/task_environment.h"
diff --git a/fuchsia/runners/cast/cast_runner.cmx b/fuchsia/runners/cast/cast_runner.cmx index ddd1367..4d40976 100644 --- a/fuchsia/runners/cast/cast_runner.cmx +++ b/fuchsia/runners/cast/cast_runner.cmx
@@ -10,6 +10,7 @@ "fuchsia.fonts.Provider", "fuchsia.logger.LogSink", "fuchsia.media.Audio", + "fuchsia.media.drm.PlayReady", "fuchsia.media.drm.Widevine", "fuchsia.mediacodec.CodecFactory", "fuchsia.net.NameLookup",
diff --git a/fuchsia/runners/cast/cast_runner_integration_test.cc b/fuchsia/runners/cast/cast_runner_integration_test.cc index 2aa0123..f74cf6e 100644 --- a/fuchsia/runners/cast/cast_runner_integration_test.cc +++ b/fuchsia/runners/cast/cast_runner_integration_test.cc
@@ -167,16 +167,13 @@ : run_timeout_( TestTimeouts::action_timeout(), base::MakeExpectedNotRunClosure(FROM_HERE, "Run() timed out.")) { - // Create the CastRunner, published into |test_services_|. + // Create the CastRunner, published into |outgoing_directory_|. constexpr fuchsia::web::ContextFeatureFlags kFeatures = {}; - fuchsia::web::CreateContextParams create_context_params = WebContentRunner::BuildCreateContextParams( fidl::InterfaceHandle<fuchsia::io::Directory>(), kFeatures); - const uint16_t kRemoteDebuggingAnyPort = 0; create_context_params.set_remote_debugging_port(kRemoteDebuggingAnyPort); - cast_runner_ = std::make_unique<CastRunner>( &outgoing_directory_, WebContentRunner::CreateWebContext(std::move(create_context_params))); @@ -210,7 +207,7 @@ base::StringPiece component_url) { DCHECK(!component_state_); - // Create an OutgoingDirectory and publish the ComponentContext into it. + // Create a FakeComponentContext and publish it into component_services_. component_context_ = std::make_unique<cr_fuchsia::FakeComponentContext>( base::BindRepeating(&CastRunnerIntegrationTest::OnComponentConnect, base::Unretained(this)),
diff --git a/fuchsia/runners/cast/main.cc b/fuchsia/runners/cast/main.cc index fc0f189..0b2740a 100644 --- a/fuchsia/runners/cast/main.cc +++ b/fuchsia/runners/cast/main.cc
@@ -39,6 +39,9 @@ WebContentRunner::BuildCreateContextParams( fidl::InterfaceHandle<fuchsia::io::Directory>(), features); + const char kCastPlayreadyKeySystem[] = "com.chromecast.playready"; + create_context_params.set_playready_key_system(kCastPlayreadyKeySystem); + // TODO(b/141956135): Use CrKey version provided by the Agent. create_context_params.set_user_agent_product("CrKey"); create_context_params.set_user_agent_version("0");
diff --git a/google_apis/drive/base_requests_server_unittest.cc b/google_apis/drive/base_requests_server_unittest.cc index 0ae87f7e..e0897949 100644 --- a/google_apis/drive/base_requests_server_unittest.cc +++ b/google_apis/drive/base_requests_server_unittest.cc
@@ -42,8 +42,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); network::mojom::NetworkContextParamsPtr context_params = network::mojom::NetworkContextParams::New(); network_service_ptr->CreateNetworkContext(
diff --git a/google_apis/drive/base_requests_unittest.cc b/google_apis/drive/base_requests_unittest.cc index 37cf57d6..f5589cc 100644 --- a/google_apis/drive/base_requests_unittest.cc +++ b/google_apis/drive/base_requests_unittest.cc
@@ -119,8 +119,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); network::mojom::NetworkContextParamsPtr context_params = network::mojom::NetworkContextParams::New(); network_service_ptr->CreateNetworkContext(
diff --git a/google_apis/drive/drive_api_requests_unittest.cc b/google_apis/drive/drive_api_requests_unittest.cc index a1e4dff..87ffa84 100644 --- a/google_apis/drive/drive_api_requests_unittest.cc +++ b/google_apis/drive/drive_api_requests_unittest.cc
@@ -129,8 +129,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); network::mojom::NetworkContextParamsPtr context_params = network::mojom::NetworkContextParams::New(); network_service_ptr->CreateNetworkContext(
diff --git a/google_apis/drive/files_list_request_runner_unittest.cc b/google_apis/drive/files_list_request_runner_unittest.cc index 994b535..e143305 100644 --- a/google_apis/drive/files_list_request_runner_unittest.cc +++ b/google_apis/drive/files_list_request_runner_unittest.cc
@@ -75,8 +75,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); network::mojom::NetworkContextParamsPtr context_params = network::mojom::NetworkContextParams::New(); network_service_ptr->CreateNetworkContext(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc index 43f1769..568ecd9 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_buffers.cc
@@ -10,10 +10,8 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_F(GLES3DecoderPassthroughTest, BindBufferBaseValidArgs) { - BindBufferBase bind_cmd; + cmds::BindBufferBase bind_cmd; bind_cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kClientBufferId); EXPECT_EQ(error::kNoError, ExecuteCmd(bind_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -21,11 +19,11 @@ TEST_F(GLES3DecoderPassthroughTest, BindBufferBaseValidArgsNewId) { constexpr GLuint kNewClientId = 502; - BindBufferBase cmd; + cmds::BindBufferBase cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(IsObjectHelper<IsBuffer>(kNewClientId)); + EXPECT_TRUE(IsObjectHelper<cmds::IsBuffer>(kNewClientId)); } TEST_F(GLES3DecoderPassthroughTest, BindBufferRangeValidArgs) { @@ -42,7 +40,7 @@ buffer_data_cmd.Init(kTarget, kBufferSize, 0, 0, GL_STREAM_DRAW); EXPECT_EQ(error::kNoError, ExecuteCmd(buffer_data_cmd)); - BindBufferRange bind_buffer_range_cmd; + cmds::BindBufferRange bind_buffer_range_cmd; bind_buffer_range_cmd.Init(kTarget, 2, kClientBufferId, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(bind_buffer_range_cmd)); @@ -54,7 +52,7 @@ const GLintptr kRangeOffset = 4; const GLsizeiptr kRangeSize = 8; DoBindBuffer(kTarget, kClientBufferId); - BindBufferRange cmd; + cmds::BindBufferRange cmd; cmd.Init(kTarget, 2, kClientBufferId, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -67,18 +65,18 @@ const GLsizeiptr kBufferSize = kRangeOffset + kRangeSize - 4; DoBindBuffer(kTarget, kClientBufferId); DoBufferData(kTarget, kBufferSize, nullptr, GL_STREAM_DRAW); - BindBufferRange cmd; + cmds::BindBufferRange cmd; cmd.Init(kTarget, 2, kClientBufferId, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_F(GLES3DecoderPassthroughTest, BindBufferRangeValidArgsNewId) { - BindBufferRange cmd; + cmds::BindBufferRange cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId, 4, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EXPECT_TRUE(IsObjectHelper<IsBuffer>(kNewClientId)); + EXPECT_TRUE(IsObjectHelper<cmds::IsBuffer>(kNewClientId)); } TEST_F(GLES3DecoderPassthroughTest, MapBufferRangeUnmapBufferReadSucceeds) { @@ -103,10 +101,9 @@ DoBufferSubData(kTarget, kOffset, kSize, data.data()); { // MapBufferRange - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -117,7 +114,7 @@ } { // UnmapBuffer - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -139,8 +136,7 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); int8_t* client_data = GetSharedMemoryAs<int8_t*>() + sizeof(uint32_t); DoBindBuffer(kTarget, kClientBufferId); @@ -153,7 +149,7 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); { // MapBufferRange succeeds - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -177,7 +173,7 @@ memset(client_data, kValue0, kSize); { // UnmapBuffer succeeds - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -189,7 +185,7 @@ { // Re-map the buffer to verify the data const GLbitfield kReadAccess = GL_MAP_READ_BIT; - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, 0, kTotalSize, kReadAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -207,7 +203,7 @@ } { // UnmapBuffer succeeds - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -231,8 +227,7 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); int8_t* client_data = GetSharedMemoryAs<int8_t*>() + sizeof(uint32_t); DoBindBuffer(kTarget, kClientBufferId); @@ -243,7 +238,7 @@ DoBufferData(kTarget, kTotalSize, gpu_data.data(), GL_STREAM_DRAW); { // MapBufferRange succeeds - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kMappedOffset, kMappedSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -267,13 +262,13 @@ memset(client_data, kValue0, kTotalSize); { // FlushMappedBufferRange succeeds - FlushMappedBufferRange cmd; + cmds::FlushMappedBufferRange cmd; cmd.Init(kTarget, kFlushRangeOffset, kFlushRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } { // UnmapBuffer succeeds - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -285,7 +280,7 @@ { // Re-map the buffer to verify the data const GLbitfield kReadAccess = GL_MAP_READ_BIT; - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, 0, kTotalSize, kReadAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -304,7 +299,7 @@ } { // UnmapBuffer succeeds - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -319,15 +314,14 @@ const GLbitfield kAccess = GL_MAP_READ_BIT; std::vector<int8_t> data(kSize); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 1; // Any value other than 0. uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t data_shm_id = shared_memory_id_; uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(*result); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); @@ -345,8 +339,7 @@ DoBindBuffer(kTarget, kClientBufferId); DoBufferData(kTarget, kSize + kOffset, nullptr, GL_STREAM_DRAW); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -356,7 +349,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -376,8 +369,7 @@ DoBindBuffer(kTarget, kClientBufferId); DoBufferData(kTarget, kSize + kOffset, nullptr, GL_STREAM_DRAW); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -387,7 +379,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -413,8 +405,7 @@ DoBindBuffer(kTarget, kClientBufferId); DoBufferData(kTarget, kSize + kOffset, nullptr, GL_STREAM_DRAW); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -424,7 +415,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -449,8 +440,7 @@ data[ii] = static_cast<int8_t>(ii % 255); } - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -460,7 +450,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -486,15 +476,14 @@ DoBindBuffer(kTarget, kClientBufferId); DoBufferData(kTarget, kOffset + kSize, nullptr, GL_STREAM_DRAW); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t data_shm_id = shared_memory_id_; uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(*result); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, kInvalidSharedMemoryId, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); @@ -514,7 +503,7 @@ DoBindBuffer(kTarget, kClientBufferId); - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -523,7 +512,7 @@ TEST_F(GLES3DecoderPassthroughTest, UnmapBufferWriteNoBoundBufferFails) { const GLenum kTarget = GL_ARRAY_BUFFER; - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -546,10 +535,9 @@ DoBufferData(kTarget, kSize + kOffset, nullptr, GL_STREAM_DRAW); { // MapBufferRange succeeds - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -579,7 +567,7 @@ } { // UnmapBuffer fails. - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -603,10 +591,9 @@ DoBufferData(kTarget, kSize + kOffset, nullptr, GL_STREAM_DRAW); { // MapBufferRange succeeds - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -636,7 +623,7 @@ } { // UnmapBuffer fails. - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -655,11 +642,10 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); { - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -669,7 +655,7 @@ } { - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc index 3fadfd9..5345bf00 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_commands.cc
@@ -10,8 +10,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - template <typename T> class GLES2DecoderPassthroughFixedCommandTest : public GLES2DecoderPassthroughTest {}; @@ -31,7 +29,7 @@ TYPED_TEST_SUITE_P(GLES2DecoderPassthroughImmediateNoArgCommandTest); TYPED_TEST_P(GLES2DecoderPassthroughImmediateNoArgCommandTest, InvalidCommand) { - TypeParam& cmd = *(this->template GetImmediateAs<TypeParam>()); + auto& cmd = *(this->template GetImmediateAs<TypeParam>()); cmd.SetHeader(); EXPECT_EQ(error::kUnknownCommand, this->ExecuteImmediateCmd(cmd, 64)); } @@ -45,7 +43,7 @@ TYPED_TEST_P(GLES2DecoderPassthroughImmediateSizeArgCommandTest, InvalidCommand) { - TypeParam& cmd = *(this->template GetImmediateAs<TypeParam>()); + auto& cmd = *(this->template GetImmediateAs<TypeParam>()); cmd.SetHeader(0); EXPECT_EQ(error::kUnknownCommand, this->ExecuteImmediateCmd(cmd, 0)); } @@ -53,95 +51,96 @@ InvalidCommand); using ES3FixedCommandTypes0 = - ::testing::Types<BindBufferBase, - BindBufferRange, - BindSampler, - BindTransformFeedback, - ClearBufferfi, - ClientWaitSync, - CopyBufferSubData, - CompressedTexImage3D, - CompressedTexImage3DBucket, - CompressedTexSubImage3D, - CompressedTexSubImage3DBucket, - CopyTexSubImage3D, - DeleteSync, - FenceSync, - FlushMappedBufferRange, - FramebufferTextureLayer, - GetActiveUniformBlockiv, - GetActiveUniformBlockName, - GetActiveUniformsiv, - GetFragDataLocation, - GetBufferParameteri64v, - GetInteger64v, - GetInteger64i_v, - GetIntegeri_v, - GetInternalformativ, - GetSamplerParameterfv, - GetSamplerParameteriv, - GetSynciv, - GetUniformBlockIndex, - GetUniformBlocksCHROMIUM, - GetUniformsES3CHROMIUM, - GetTransformFeedbackVarying, - GetTransformFeedbackVaryingsCHROMIUM, - GetUniformuiv, - GetUniformIndices, - GetVertexAttribIiv, - GetVertexAttribIuiv, - IsSampler, - IsSync, - IsTransformFeedback, - MapBufferRange, - PauseTransformFeedback, - ReadBuffer, - ResumeTransformFeedback, - SamplerParameterf, - SamplerParameteri, - TexImage3D, - TexStorage3D, - TexSubImage3D>; + ::testing::Types<cmds::BindBufferBase, + cmds::BindBufferRange, + cmds::BindSampler, + cmds::BindTransformFeedback, + cmds::ClearBufferfi, + cmds::ClientWaitSync, + cmds::CopyBufferSubData, + cmds::CompressedTexImage3D, + cmds::CompressedTexImage3DBucket, + cmds::CompressedTexSubImage3D, + cmds::CompressedTexSubImage3DBucket, + cmds::CopyTexSubImage3D, + cmds::DeleteSync, + cmds::FenceSync, + cmds::FlushMappedBufferRange, + cmds::FramebufferTextureLayer, + cmds::GetActiveUniformBlockiv, + cmds::GetActiveUniformBlockName, + cmds::GetActiveUniformsiv, + cmds::GetFragDataLocation, + cmds::GetBufferParameteri64v, + cmds::GetInteger64v, + cmds::GetInteger64i_v, + cmds::GetIntegeri_v, + cmds::GetInternalformativ, + cmds::GetSamplerParameterfv, + cmds::GetSamplerParameteriv, + cmds::GetSynciv, + cmds::GetUniformBlockIndex, + cmds::GetUniformBlocksCHROMIUM, + cmds::GetUniformsES3CHROMIUM, + cmds::GetTransformFeedbackVarying, + cmds::GetTransformFeedbackVaryingsCHROMIUM, + cmds::GetUniformuiv, + cmds::GetUniformIndices, + cmds::GetVertexAttribIiv, + cmds::GetVertexAttribIuiv, + cmds::IsSampler, + cmds::IsSync, + cmds::IsTransformFeedback, + cmds::MapBufferRange, + cmds::PauseTransformFeedback, + cmds::ReadBuffer, + cmds::ResumeTransformFeedback, + cmds::SamplerParameterf, + cmds::SamplerParameteri, + cmds::TexImage3D, + cmds::TexStorage3D, + cmds::TexSubImage3D>; -using ES3FixedCommandTypes1 = ::testing::Types<TransformFeedbackVaryingsBucket, - Uniform1ui, - Uniform2ui, - Uniform3ui, - Uniform4ui, - UniformBlockBinding, - UnmapBuffer, - VertexAttribI4i, - VertexAttribI4ui, - VertexAttribIPointer, - WaitSync, - BeginTransformFeedback, - EndTransformFeedback>; +using ES3FixedCommandTypes1 = + ::testing::Types<cmds::TransformFeedbackVaryingsBucket, + cmds::Uniform1ui, + cmds::Uniform2ui, + cmds::Uniform3ui, + cmds::Uniform4ui, + cmds::UniformBlockBinding, + cmds::UnmapBuffer, + cmds::VertexAttribI4i, + cmds::VertexAttribI4ui, + cmds::VertexAttribIPointer, + cmds::WaitSync, + cmds::BeginTransformFeedback, + cmds::EndTransformFeedback>; using ES3ImmediateNoArgCommandTypes0 = - ::testing::Types<ClearBufferivImmediate, - ClearBufferuivImmediate, - ClearBufferfvImmediate, - SamplerParameterfvImmediate, - SamplerParameterfvImmediate, - VertexAttribI4ivImmediate, - VertexAttribI4uivImmediate>; + ::testing::Types<cmds::ClearBufferivImmediate, + cmds::ClearBufferuivImmediate, + cmds::ClearBufferfvImmediate, + cmds::SamplerParameterfvImmediate, + cmds::SamplerParameterfvImmediate, + cmds::VertexAttribI4ivImmediate, + cmds::VertexAttribI4uivImmediate>; using ES3ImmediateSizeArgCommandTypes0 = - ::testing::Types<DeleteSamplersImmediate, - DeleteTransformFeedbacksImmediate, - GenTransformFeedbacksImmediate, - InvalidateFramebufferImmediate, - InvalidateSubFramebufferImmediate, - Uniform1uivImmediate, - Uniform2uivImmediate, - Uniform3uivImmediate, - Uniform4uivImmediate, - UniformMatrix2x3fvImmediate, - UniformMatrix2x4fvImmediate, - UniformMatrix3x2fvImmediate, - UniformMatrix3x4fvImmediate, - UniformMatrix4x2fvImmediate, - UniformMatrix4x3fvImmediate>; + ::testing::Types<cmds::DeleteSamplersImmediate, + cmds::DeleteTransformFeedbacksImmediate, + cmds::GenTransformFeedbacksImmediate, + cmds::InvalidateFramebufferImmediate, + cmds::InvalidateSubFramebufferImmediate, + cmds::Uniform1uivImmediate, + cmds::Uniform2uivImmediate, + cmds::Uniform3uivImmediate, + cmds::Uniform4uivImmediate, + cmds::UniformMatrix2x3fvImmediate, + cmds::UniformMatrix2x4fvImmediate, + cmds::UniformMatrix3x2fvImmediate, + cmds::UniformMatrix3x4fvImmediate, + cmds::UniformMatrix4x2fvImmediate, + cmds::UniformMatrix4x3fvImmediate>; INSTANTIATE_TYPED_TEST_SUITE_P(0, GLES2DecoderPassthroughFixedCommandTest,
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_discardable_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_discardable_textures.cc index 1db4511..99899cd2 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_discardable_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_discardable_textures.cc
@@ -8,8 +8,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_F(GLES2DecoderPassthroughTest, TestInitDiscardableTexture) { DoBindTexture(GL_TEXTURE_2D, kClientTextureId); EXPECT_EQ(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_drawing.cc index ef270bb..04c231e7e 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_drawing.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_drawing.cc
@@ -8,10 +8,8 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_F(GLES2WebGLDecoderPassthroughTest, DrawArraysInstancedANGLEEnablement) { - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, 3, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); @@ -20,7 +18,7 @@ } TEST_F(GLES2WebGLDecoderPassthroughTest, VertexAttribDivisorANGLEEnablement) { - VertexAttribDivisorANGLE cmd; + cmds::VertexAttribDivisorANGLE cmd; cmd.Init(0, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); @@ -29,7 +27,7 @@ } TEST_F(GLES2WebGLDecoderPassthroughTest, DrawElementsInstancedANGLEEnablement) { - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_framebuffers.cc index 56d10fc..b58264a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_framebuffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_framebuffers.cc
@@ -10,24 +10,21 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_F(GLES3DecoderPassthroughTest, ReadPixelsBufferBound) { const GLsizei kWidth = 5; const GLsizei kHeight = 3; const GLint kBytesPerPixel = 4; GLint size = kWidth * kHeight * kBytesPerPixel; - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); DoBindBuffer(GL_PIXEL_PACK_BUFFER, kClientBufferId); DoBufferData(GL_PIXEL_PACK_BUFFER, size, nullptr, GL_STATIC_DRAW); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, false); result->success = 0; @@ -39,7 +36,7 @@ const GLsizei kWidth = 5; const GLsizei kHeight = 3; - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, 0, 0, false); EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -54,7 +51,7 @@ DoBindBuffer(GL_PIXEL_PACK_BUFFER, kClientBufferId); DoBufferData(GL_PIXEL_PACK_BUFFER, size, nullptr, GL_STATIC_DRAW); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, 0, 0, false); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -64,8 +61,7 @@ const GLenum target = GL_FRAMEBUFFER; const GLsizei count = 1; const GLenum attachments[] = {GL_COLOR_EXT}; - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kUnknownCommand, ExecuteImmediateCmd(cmd, sizeof(attachments))); @@ -85,8 +81,7 @@ kClientTextureId, 0); // Put the resulting pixels and the result in shared memory - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; @@ -126,7 +121,7 @@ // written memset(dest, 0, 4 * test.w * test.h); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(test.x, test.y, test.w, test.h, kFormat, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, false); @@ -164,16 +159,15 @@ } TEST_F(GLES2DecoderPassthroughTest, ReadPixelsAsync) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); - ReadPixels read_pixels_cmd; + cmds::ReadPixels read_pixels_cmd; read_pixels_cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); @@ -198,7 +192,7 @@ EXPECT_TRUE(pending_read_pixels.waiting_async_pack_queries.empty()); } - Finish finish_cmd; + cmds::Finish finish_cmd; finish_cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(finish_cmd)); EXPECT_FALSE(GetDecoder()->HasMoreIdleWork()); @@ -206,8 +200,7 @@ } TEST_F(GLES3DecoderPassthroughTest, ReadPixelsAsyncSkippedIfPBOBound) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; @@ -227,7 +220,7 @@ // Check that there is no idle work to do when a PBO is already bound and that // the ReadPixel succeeded - ReadPixels read_pixels_cmd; + cmds::ReadPixels read_pixels_cmd; read_pixels_cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, result_shm_id, result_shm_offset, true); result->success = 0; @@ -237,15 +230,15 @@ } TEST_F(GLES2DecoderPassthroughTest, ReadPixelsAsyncModifyCommand) { - typedef ReadPixels::Result Result; size_t shm_size = 0; - Result* result = GetSharedMemoryAsWithSize<Result*>(&shm_size); + auto* result = + GetSharedMemoryAsWithSize<cmds::ReadPixels::Result*>(&shm_size); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); size_t pixels_memory_size = shm_size - 1; char* pixels = reinterpret_cast<char*>(result + 1); @@ -255,7 +248,7 @@ EXPECT_GT(pixels_memory_size, read_pixels_result_size); memset(pixels, kDummyValue, pixels_memory_size); - ReadPixels read_pixels_cmd; + cmds::ReadPixels read_pixels_cmd; read_pixels_cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); @@ -271,7 +264,7 @@ pixels_shm_offset, result_shm_id, result_shm_offset, false); - Finish finish_cmd; + cmds::Finish finish_cmd; finish_cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(finish_cmd)); EXPECT_FALSE(GetDecoder()->HasMoreIdleWork()); @@ -289,15 +282,15 @@ } TEST_F(GLES2DecoderPassthroughTest, ReadPixelsAsyncChangePackAlignment) { - typedef ReadPixels::Result Result; size_t shm_size = 0; - Result* result = GetSharedMemoryAsWithSize<Result*>(&shm_size); + auto* result = + GetSharedMemoryAsWithSize<cmds::ReadPixels::Result*>(&shm_size); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); size_t pixels_memory_size = shm_size - 1; char* pixels = reinterpret_cast<char*>(result + 1); @@ -307,7 +300,7 @@ EXPECT_GT(pixels_memory_size, read_pixels_result_size); memset(pixels, kDummyValue, pixels_memory_size); - ReadPixels read_pixels_cmd; + cmds::ReadPixels read_pixels_cmd; read_pixels_cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); @@ -317,12 +310,12 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_TRUE(GetDecoder()->HasMoreIdleWork()); - PixelStorei pixel_store_i_cmd; + cmds::PixelStorei pixel_store_i_cmd; pixel_store_i_cmd.Init(GL_PACK_ALIGNMENT, 8); EXPECT_EQ(error::kNoError, ExecuteCmd(pixel_store_i_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - Finish finish_cmd; + cmds::Finish finish_cmd; finish_cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(finish_cmd)); EXPECT_FALSE(GetDecoder()->HasMoreIdleWork()); @@ -340,18 +333,17 @@ } TEST_F(GLES2DecoderPassthroughTest, ReadPixelsAsyncError) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); // Provide parameters that will cause glReadPixels to fail with // GL_INVALID_OPERATION - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_SHORT, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); result->success = 0; @@ -365,7 +357,7 @@ RenderbufferStorageMultisampleEXTNotSupported) { DoBindRenderbuffer(GL_RENDERBUFFER, kClientRenderbufferId); // GL_EXT_framebuffer_multisample uses RenderbufferStorageMultisampleCHROMIUM. - RenderbufferStorageMultisampleEXT cmd; + cmds::RenderbufferStorageMultisampleEXT cmd; cmd.Init(GL_RENDERBUFFER, 1, GL_RGBA4, 1, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); } @@ -377,13 +369,13 @@ DoFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, kClientRenderbufferId); - GetFramebufferAttachmentParameteriv::Result* result = - static_cast<GetFramebufferAttachmentParameteriv::Result*>( + auto* result = + static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; const GLint* result_value = result->GetData(); - GetFramebufferAttachmentParameteriv cmd; + cmds::GetFramebufferAttachmentParameteriv cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, shared_memory_id_, shared_memory_offset_); @@ -399,13 +391,13 @@ DoFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, kClientTextureId, 0); - GetFramebufferAttachmentParameteriv::Result* result = - static_cast<GetFramebufferAttachmentParameteriv::Result*>( + auto* result = + static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; const GLint* result_value = result->GetData(); - GetFramebufferAttachmentParameteriv cmd; + cmds::GetFramebufferAttachmentParameteriv cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, shared_memory_id_, shared_memory_offset_);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc index 9ab5d85..97d5900f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc
@@ -90,8 +90,6 @@ } // namespace -using namespace cmds; - TEST_F(GLES2DecoderPassthroughTest, CreateAndTexStorage2DSharedImageCHROMIUM) { MemoryTypeTracker memory_tracker(nullptr); Mailbox mailbox = Mailbox::GenerateForSharedImage(); @@ -102,8 +100,8 @@ gfx::ColorSpace(), 0, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -137,8 +135,8 @@ CreateAndTexStorage2DSharedImageCHROMIUMInvalidMailbox) { // Attempt to use an invalid mailbox. Mailbox mailbox; - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); @@ -166,8 +164,8 @@ &memory_tracker); { - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -176,8 +174,8 @@ // Try to import the SharedImage a second time at the same client ID. We // should get a GL failure. { - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -201,37 +199,37 @@ &memory_tracker); shared_images.emplace_back(std::move(shared_image)); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); auto client_id = kNewClientId + i; cmd.Init(client_id, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Begin/end read access for the created image. - BeginSharedImageAccessDirectCHROMIUM read_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM read_access_cmd; read_access_cmd.Init(client_id, GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(read_access_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EndSharedImageAccessDirectCHROMIUM read_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM read_end_cmd; read_end_cmd.Init(client_id); EXPECT_EQ(error::kNoError, ExecuteCmd(read_end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Begin/end read/write access for the created image. - BeginSharedImageAccessDirectCHROMIUM readwrite_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM readwrite_access_cmd; readwrite_access_cmd.Init(client_id, GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(readwrite_access_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; readwrite_end_cmd.Init(client_id); // EXPECT_EQ(error::kNoError, ExecuteCmd(readwrite_end_cmd)); // EXPECT_EQ(GL_NO_ERROR, GetGLError()); } for (int i = 20; i > 10; --i) { - EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; readwrite_end_cmd.Init(kNewClientId + i); EXPECT_EQ(error::kNoError, ExecuteCmd(readwrite_end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -246,7 +244,7 @@ TEST_F(GLES2DecoderPassthroughTest, BeginSharedImageAccessDirectCHROMIUMInvalidMode) { // Try to begin access with an invalid mode. - BeginSharedImageAccessDirectCHROMIUM bad_mode_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM bad_mode_access_cmd; bad_mode_access_cmd.Init(kClientTextureId, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(bad_mode_access_cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -255,7 +253,7 @@ TEST_F(GLES2DecoderPassthroughTest, BeginSharedImageAccessDirectCHROMIUMNotSharedImage) { // Try to begin access with a texture that is not a shared image. - BeginSharedImageAccessDirectCHROMIUM not_shared_image_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM not_shared_image_access_cmd; not_shared_image_access_cmd.Init( kClientTextureId, GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(not_shared_image_access_cmd)); @@ -274,8 +272,8 @@ gfx::ColorSpace(), 0, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -290,7 +288,7 @@ TestSharedImageRepresentationPassthrough*>( found->second.representation()) ->set_can_access(false); - BeginSharedImageAccessDirectCHROMIUM read_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM read_access_cmd; read_access_cmd.Init(kNewClientId, GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(read_access_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -303,7 +301,7 @@ TEST_F(GLES2DecoderPassthroughTest, EndSharedImageAccessDirectCHROMIUMNotSharedImage) { // Try to end access with a texture that is not a shared image. - EndSharedImageAccessDirectCHROMIUM not_shared_image_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM not_shared_image_end_cmd; not_shared_image_end_cmd.Init(kClientTextureId); EXPECT_EQ(error::kNoError, ExecuteCmd(not_shared_image_end_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index a3147bd..3e4071b3 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -56,8 +56,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - void GLES2DecoderRGBBackbufferTest::SetUp() { InitState init; init.bind_generates_resource = true; @@ -72,12 +70,12 @@ SetupExpectationsForEnableDisable(cap, enable); } if (enable) { - Enable cmd; + cmds::Enable cmd; cmd.Init(cap); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } else { - Disable cmd; + cmds::Disable cmd; cmd.Init(cap); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -123,17 +121,17 @@ GL_MAX_RENDERBUFFER_SIZE, TestHelper::kMaxRenderbufferSize, }, }; - typedef GetIntegerv::Result Result; for (size_t ii = 0; ii < sizeof(tests) / sizeof(tests[0]); ++ii) { const TestInfo& test = tests[ii]; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); EXPECT_CALL(*gl_, GetIntegerv(test.pname, _)).Times(0); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(test.pname, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(test.pname), @@ -145,11 +143,11 @@ TEST_P(GLES2DecoderWithShaderTest, GetMaxValueInBufferCHROMIUM) { SetupIndexBuffer(); - GetMaxValueInBufferCHROMIUM::Result* result = - static_cast<GetMaxValueInBufferCHROMIUM::Result*>(shared_memory_address_); + auto* result = static_cast<cmds::GetMaxValueInBufferCHROMIUM::Result*>( + shared_memory_address_); *result = 0; - GetMaxValueInBufferCHROMIUM cmd; + cmds::GetMaxValueInBufferCHROMIUM cmd; cmd.Init(client_element_buffer_id_, kValidIndexRangeCount, GL_UNSIGNED_SHORT, kValidIndexRangeStart * 2, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -273,7 +271,7 @@ GL_RGBA, GL_UNSIGNED_BYTE); scoped_refptr<gl::GLImage> image(new gl::GLImageStub); abstract_texture->BindImage(image.get(), GetParam()); - ValidatingAbstractTextureImpl* validating_texture = + auto* validating_texture = static_cast<ValidatingAbstractTextureImpl*>(abstract_texture.get()); TextureRef* texture_ref = validating_texture->GetTextureRefForTesting(); Texture::ImageState state; @@ -460,8 +458,8 @@ TEST_P(GLES3DecoderTest, GetInternalformativValidArgsSamples) { const GLint kNumSampleCounts = 8; - typedef GetInternalformativ::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetInternalformativ::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetInternalformativ(GL_RENDERBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 1, _)) .WillOnce(SetArgPointee<4>(kNumSampleCounts)) @@ -471,7 +469,7 @@ .Times(1) .RetiresOnSaturation(); result->size = 0; - GetInternalformativ cmd; + cmds::GetInternalformativ cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA8, GL_SAMPLES, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -481,14 +479,14 @@ TEST_P(GLES3DecoderTest, GetInternalformativValidArgsNumSampleCounts) { const GLint kNumSampleCounts = 8; - typedef GetInternalformativ::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetInternalformativ::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetInternalformativ(GL_RENDERBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 1, _)) .WillOnce(SetArgPointee<4>(kNumSampleCounts)) .RetiresOnSaturation(); result->size = 0; - GetInternalformativ cmd; + cmds::GetInternalformativ cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -498,9 +496,9 @@ } TEST_P(GLES3DecoderTest, ClientWaitSyncValid) { - typedef ClientWaitSync::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - ClientWaitSync cmd; + auto* result = + static_cast<cmds::ClientWaitSync::Result*>(shared_memory_address_); + cmds::ClientWaitSync cmd; cmd.Init(client_sync_id_, GL_SYNC_FLUSH_COMMANDS_BIT, 0, shared_memory_id_, shared_memory_offset_); EXPECT_CALL(*gl_, @@ -515,9 +513,9 @@ } TEST_P(GLES3DecoderTest, ClientWaitSyncNonZeroTimeoutValid) { - typedef ClientWaitSync::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - ClientWaitSync cmd; + auto* result = + static_cast<cmds::ClientWaitSync::Result*>(shared_memory_address_); + cmds::ClientWaitSync cmd; const GLuint64 kTimeout = 0xABCDEF0123456789; cmd.Init(client_sync_id_, GL_SYNC_FLUSH_COMMANDS_BIT, kTimeout, shared_memory_id_, shared_memory_offset_); @@ -533,9 +531,9 @@ } TEST_P(GLES3DecoderTest, ClientWaitSyncInvalidSyncFails) { - typedef ClientWaitSync::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - ClientWaitSync cmd; + auto* result = + static_cast<cmds::ClientWaitSync::Result*>(shared_memory_address_); + cmds::ClientWaitSync cmd; cmd.Init(kInvalidClientId, GL_SYNC_FLUSH_COMMANDS_BIT, 0, shared_memory_id_, shared_memory_offset_); *result = GL_WAIT_FAILED; @@ -545,9 +543,9 @@ } TEST_P(GLES3DecoderTest, ClientWaitSyncResultNotInitFails) { - typedef ClientWaitSync::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - ClientWaitSync cmd; + auto* result = + static_cast<cmds::ClientWaitSync::Result*>(shared_memory_address_); + cmds::ClientWaitSync cmd; cmd.Init(client_sync_id_, GL_SYNC_FLUSH_COMMANDS_BIT, 0, shared_memory_id_, shared_memory_offset_); *result = 1; // Any value other than GL_WAIT_FAILED @@ -555,9 +553,9 @@ } TEST_P(GLES3DecoderTest, ClientWaitSyncBadSharedMemoryFails) { - typedef ClientWaitSync::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - ClientWaitSync cmd; + auto* result = + static_cast<cmds::ClientWaitSync::Result*>(shared_memory_address_); + cmds::ClientWaitSync cmd; *result = GL_WAIT_FAILED; cmd.Init(client_sync_id_, GL_SYNC_FLUSH_COMMANDS_BIT, 0, kInvalidSharedMemoryId, shared_memory_offset_); @@ -576,7 +574,7 @@ .Times(1) .RetiresOnSaturation(); - WaitSync cmd; + cmds::WaitSync cmd; cmd.Init(client_sync_id_, 0, kTimeout); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -594,22 +592,22 @@ InitState init; InitDecoder(init); - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, kInvalidClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); - BindBuffer cmd2; + cmds::BindBuffer cmd2; cmd2.Init(GL_ARRAY_BUFFER, kInvalidClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); - BindFramebuffer cmd3; + cmds::BindFramebuffer cmd3; cmd3.Init(GL_FRAMEBUFFER, kInvalidClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd3)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); - BindRenderbuffer cmd4; + cmds::BindRenderbuffer cmd4; cmd4.Init(GL_RENDERBUFFER, kInvalidClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd4)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -617,14 +615,14 @@ TEST_P(GLES2DecoderTest, EnableFeatureCHROMIUMBadBucket) { const uint32_t kBadBucketId = 123; - EnableFeatureCHROMIUM cmd; + cmds::EnableFeatureCHROMIUM cmd; cmd.Init(kBadBucketId, shared_memory_id_, shared_memory_offset_); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); } TEST_P(GLES2DecoderTest, RequestExtensionCHROMIUMBadBucket) { const uint32_t kBadBucketId = 123; - RequestExtensionCHROMIUM cmd; + cmds::RequestExtensionCHROMIUM cmd; cmd.Init(kBadBucketId); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); } @@ -634,8 +632,8 @@ } TEST_P(GLES2DecoderTest, GenQueriesEXTImmediateValidArgs) { - GenQueriesEXTImmediate* cmd = - GetImmediateAs<GenQueriesEXTImmediate>(); + cmds::GenQueriesEXTImmediate* cmd = + GetImmediateAs<cmds::GenQueriesEXTImmediate>(); GLuint temp = kNewClientId; cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); @@ -646,8 +644,8 @@ } TEST_P(GLES2DecoderTest, GenQueriesEXTImmediateDuplicateOrNullIds) { - GenQueriesEXTImmediate* cmd = - GetImmediateAs<GenQueriesEXTImmediate>(); + cmds::GenQueriesEXTImmediate* cmd = + GetImmediateAs<cmds::GenQueriesEXTImmediate>(); GLuint temp[3] = {kNewClientId, kNewClientId + 1, kNewClientId}; cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(temp))); @@ -663,8 +661,8 @@ } TEST_P(GLES2DecoderTest, GenQueriesEXTImmediateInvalidArgs) { - GenQueriesEXTImmediate* cmd = - GetImmediateAs<GenQueriesEXTImmediate>(); + cmds::GenQueriesEXTImmediate* cmd = + GetImmediateAs<cmds::GenQueriesEXTImmediate>(); cmd->Init(1, &client_query_id_); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(&client_query_id_))); @@ -681,12 +679,12 @@ InitDecoder(init); // Test end fails if no begin. - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; // Test id = 0 fails. begin_cmd.Init(GL_ANY_SAMPLES_PASSED_EXT, 0, shared_memory_id_, @@ -694,7 +692,7 @@ EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); // Test valid parameters work. EXPECT_CALL(*gl_, GenQueries(1, _)) @@ -759,7 +757,7 @@ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); // QueryCounter should fail if using a different target - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(kNewClientId, GL_TIMESTAMP, shared_memory_id_, kSharedMemoryOffset, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(query_counter_cmd)); @@ -797,7 +795,7 @@ GLenum target, GLuint client_id, GLuint service_id) { - test->GenHelper<GenQueriesEXTImmediate>(client_id); + test->GenHelper<cmds::GenQueriesEXTImmediate>(client_id); if (GL_ANY_SAMPLES_PASSED_EXT == target) { EXPECT_CALL(*gl, GenQueries(1, _)) .WillOnce(SetArgPointee<1>(service_id)) @@ -821,7 +819,7 @@ timing_queries->ExpectGPUTimerQuery(*gl, true); } - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(target, client_id, shm_id, shm_offset); return test->ExecuteCmd(begin_cmd); } @@ -849,7 +847,7 @@ #endif } - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(target, submit_count); return test->ExecuteCmd(end_cmd); } @@ -867,7 +865,7 @@ timing_queries->ExpectGPUTimeStampQuery(*gl, false); } - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(client_id, target, shm_id, @@ -917,16 +915,16 @@ init.bind_generates_resource = true; test->InitDecoder(init); - test->GenHelper<GenQueriesEXTImmediate>(client_id); + test->GenHelper<cmds::GenQueriesEXTImmediate>(client_id); // Test bad shared memory fails error::Error error = error::kNoError; if (query_type.is_counter) { - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(client_id, query_type.type, shm_id, shm_offset, 1); error = test->ExecuteCmd(query_counter_cmd); } else { - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(query_type.type, client_id, shm_id, shm_offset); error = test->ExecuteCmd(begin_cmd); } @@ -1020,9 +1018,9 @@ } TEST_P(GLES2DecoderTest, BeginEndQueryEXTCommandsIssuedCHROMIUM) { - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); // Test valid parameters work. begin_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, kNewClientId, shared_memory_id_, @@ -1038,7 +1036,7 @@ EXPECT_TRUE(query->IsActive()); // Test end succeeds. - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1047,9 +1045,9 @@ } TEST_P(GLES2DecoderTest, QueryCounterEXTCommandsIssuedTimestampCHROMIUM) { - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(kNewClientId, GL_COMMANDS_ISSUED_TIMESTAMP_CHROMIUM, shared_memory_id_, kSharedMemoryOffset, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(query_counter_cmd)); @@ -1064,9 +1062,9 @@ } TEST_P(GLES2DecoderTest, BeginEndQueryEXTGetErrorQueryCHROMIUM) { - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); // Test valid parameters work. begin_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, kNewClientId, shared_memory_id_, @@ -1082,13 +1080,13 @@ EXPECT_TRUE(query->IsActive()); // Test end succeeds. - QuerySync* sync = static_cast<QuerySync*>(shared_memory_address_); + auto* sync = static_cast<QuerySync*>(shared_memory_address_); EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_INVALID_VALUE)) .RetiresOnSaturation(); - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_GET_ERROR_QUERY_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1099,7 +1097,7 @@ } TEST_P(GLES2DecoderTest, SetDisjointValueSync) { - SetDisjointValueSyncCHROMIUM cmd; + cmds::SetDisjointValueSyncCHROMIUM cmd; cmd.Init(static_cast<uint32_t>(-1), 0u); EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); @@ -1126,9 +1124,9 @@ init.bind_generates_resource = true; InitDecoder(init); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -1151,7 +1149,7 @@ .RetiresOnSaturation(); #endif - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1200,9 +1198,9 @@ init.bind_generates_resource = true; InitDecoder(init); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -1238,7 +1236,7 @@ init.bind_generates_resource = true; InitDecoder(init); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); EXPECT_CALL(*gl_, GenQueries(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) @@ -1249,7 +1247,7 @@ EXPECT_CALL(*gl_, QueryCounter(kNewServiceId, GL_TIMESTAMP)) .Times(1) .RetiresOnSaturation(); - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(kNewClientId, GL_TIMESTAMP, shared_memory_id_, kSharedMemoryOffset, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(query_counter_cmd)); @@ -1272,9 +1270,9 @@ init.bind_generates_resource = true; InitDecoder(init); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(kNewClientId, GL_TIMESTAMP, shared_memory_id_, kSharedMemoryOffset, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(query_counter_cmd)); @@ -1293,17 +1291,17 @@ GL_DEPTH_TEST, GL_STENCIL_TEST, }; for (size_t ii = 0; ii < base::size(kStates); ++ii) { - Enable enable_cmd; + cmds::Enable enable_cmd; GLenum state = kStates[ii]; enable_cmd.Init(state); EXPECT_EQ(error::kNoError, ExecuteCmd(enable_cmd)); - IsEnabled::Result* result = - static_cast<IsEnabled::Result*>(shared_memory_address_); - IsEnabled is_enabled_cmd; + auto* result = + static_cast<cmds::IsEnabled::Result*>(shared_memory_address_); + cmds::IsEnabled is_enabled_cmd; is_enabled_cmd.Init(state, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(is_enabled_cmd)); EXPECT_NE(0u, *result); - Disable disable_cmd; + cmds::Disable disable_cmd; disable_cmd.Init(state); EXPECT_EQ(error::kNoError, ExecuteCmd(disable_cmd)); EXPECT_EQ(error::kNoError, ExecuteCmd(is_enabled_cmd)); @@ -1387,7 +1385,7 @@ EXPECT_CALL(*gl_, TexStorage2DEXT(GL_TEXTURE_2D, 1, GL_RGBA8, 8, 4)) .Times(1) .RetiresOnSaturation(); - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 8, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(128u, memory_tracker_ptr->GetSize()); @@ -1418,7 +1416,7 @@ target, level, internal_format, 0, 0, width, height, border)) .Times(1) .RetiresOnSaturation(); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(128u, memory_tracker_ptr->GetSize()); @@ -1442,7 +1440,7 @@ EXPECT_CALL(*gl_, RenderbufferStorageEXT(GL_RENDERBUFFER, GL_RGBA, 8, 4)) .Times(1) .RetiresOnSaturation(); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA4, 8, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1465,7 +1463,7 @@ EXPECT_CALL(*gl_, BufferData(GL_ARRAY_BUFFER, 128, _, GL_STREAM_DRAW)) .Times(1) .RetiresOnSaturation(); - BufferData cmd; + cmds::BufferData cmd; cmd.Init(GL_ARRAY_BUFFER, 128, 0, 0, GL_STREAM_DRAW); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1504,12 +1502,12 @@ TexStorage2DEXT( kTarget, kLevels, kSizedInternalFormat, kWidth, kHeight)) .Times(1); - CopyTexImage2D copy_cmd; + cmds::CopyTexImage2D copy_cmd; copy_cmd.Init(kTarget, kLevel, kInternalFormat, 0, 0, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(copy_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexStorage2DEXT storage_cmd; + cmds::TexStorage2DEXT storage_cmd; storage_cmd.Init(kTarget, kLevels, kSizedInternalFormat, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(storage_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1523,7 +1521,7 @@ TEST_P(GLES2DecoderTest, LoseContextCHROMIUMGuilty) { EXPECT_CALL(*mock_decoder_, MarkContextLost(error::kInnocent)) .Times(1); - LoseContextCHROMIUM cmd; + cmds::LoseContextCHROMIUM cmd; cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1534,7 +1532,7 @@ TEST_P(GLES2DecoderTest, LoseContextCHROMIUMUnkown) { EXPECT_CALL(*mock_decoder_, MarkContextLost(error::kUnknown)) .Times(1); - LoseContextCHROMIUM cmd; + cmds::LoseContextCHROMIUM cmd; cmd.Init(GL_UNKNOWN_CONTEXT_RESET_ARB, GL_UNKNOWN_CONTEXT_RESET_ARB); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1545,7 +1543,7 @@ TEST_P(GLES2DecoderTest, LoseContextCHROMIUMInvalidArgs0_0) { EXPECT_CALL(*mock_decoder_, MarkContextLost(_)) .Times(0); - LoseContextCHROMIUM cmd; + cmds::LoseContextCHROMIUM cmd; cmd.Init(GL_NONE, GL_GUILTY_CONTEXT_RESET_ARB); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1554,7 +1552,7 @@ TEST_P(GLES2DecoderTest, LoseContextCHROMIUMInvalidArgs1_0) { EXPECT_CALL(*mock_decoder_, MarkContextLost(_)) .Times(0); - LoseContextCHROMIUM cmd; + cmds::LoseContextCHROMIUM cmd; cmd.Init(GL_GUILTY_CONTEXT_RESET_ARB, GL_NONE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1575,12 +1573,12 @@ } protected: - Enable cmds_[3]; + cmds::Enable cmds_[3]; int entries_per_cmd_; }; TEST_P(GLES3DecoderTest, BeginInvalidTargetQueryFails) { - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(0xdeadbeef, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -1591,8 +1589,8 @@ TEST_P(GLES3DecoderTest, BindTransformFeedbackValidArgs) { EXPECT_CALL(*gl_, BindTransformFeedback(GL_TRANSFORM_FEEDBACK, kServiceTransformFeedbackId)); - SpecializedSetup<BindTransformFeedback, 0>(true); - BindTransformFeedback cmd; + SpecializedSetup<cmds::BindTransformFeedback, 0>(true); + cmds::BindTransformFeedback cmd; cmd.Init(GL_TRANSFORM_FEEDBACK, client_transformfeedback_id_); EXPECT_CALL(*gl_, BindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, 0)) .Times(1) @@ -1602,9 +1600,9 @@ } TEST_P(GLES3DecoderTest, DeleteTransformFeedbacksImmediateInvalidArgs) { - DeleteTransformFeedbacksImmediate& cmd = - *GetImmediateAs<DeleteTransformFeedbacksImmediate>(); - SpecializedSetup<DeleteTransformFeedbacksImmediate, 0>(false); + cmds::DeleteTransformFeedbacksImmediate& cmd = + *GetImmediateAs<cmds::DeleteTransformFeedbacksImmediate>(); + SpecializedSetup<cmds::DeleteTransformFeedbacksImmediate, 0>(false); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); @@ -1613,10 +1611,10 @@ TEST_P(GLES3DecoderTest, GetIntegeri_vValidArgs) { EXPECT_CALL(*gl_, GetIntegeri_v(_, _, _)).Times(0); - typedef GetIntegeri_v::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegeri_v::Result*>(shared_memory_address_); result->size = 0; - GetIntegeri_v cmd; + cmds::GetIntegeri_v cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, 2, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1628,10 +1626,10 @@ TEST_P(GLES3DecoderTest, GetInteger64i_vValidArgs) { EXPECT_CALL(*gl_, GetInteger64i_v(_, _, _)).Times(0); - typedef GetInteger64i_v::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetInteger64i_v::Result*>(shared_memory_address_); result->size = 0; - GetInteger64i_v cmd; + cmds::GetInteger64i_v cmd; cmd.Init(GL_UNIFORM_BUFFER_SIZE, 2, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1659,8 +1657,8 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef cmds::GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); cmds::GetIntegerv cmd; cmd.Init(GL_SAMPLER_BINDING, shared_memory_id_, shared_memory_offset_); result->size = 0; @@ -1685,8 +1683,8 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef cmds::GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); cmds::GetIntegerv cmd; cmd.Init( GL_TRANSFORM_FEEDBACK_BINDING, shared_memory_id_, shared_memory_offset_); @@ -1831,7 +1829,7 @@ .WillOnce(Return(GL_ALREADY_SIGNALED)) .RetiresOnSaturation(); - DescheduleUntilFinishedCHROMIUM cmd; + cmds::DescheduleUntilFinishedCHROMIUM cmd; cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0, deschedule_until_finished_callback_count_); @@ -1848,7 +1846,7 @@ .WillOnce(Return(GL_TIMEOUT_EXPIRED)) .RetiresOnSaturation(); - DescheduleUntilFinishedCHROMIUM cmd; + cmds::DescheduleUntilFinishedCHROMIUM cmd; cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(0, deschedule_until_finished_callback_count_);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc index 75bad05..54be1035 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_3.cc
@@ -29,8 +29,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - class GLES2DecoderTest3 : public GLES2DecoderTestBase { public: GLES2DecoderTest3() = default; @@ -59,79 +57,79 @@ } template <> -void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix3fvImmediate, 0>( +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3fvImmediate, 0>( bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT3); } template <> -void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix4fvImmediate, 0>( +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4fvImmediate, 0>( bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT4); } template <> -void GLES2DecoderTestBase::SpecializedSetup<UniformMatrix2x3fvImmediate, 0>( - bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2x3fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT2x3); } template <> -void GLES2DecoderTestBase::SpecializedSetup< - UniformMatrix2x4fvImmediate, 0>(bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix2x4fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT2x4); } template <> -void GLES2DecoderTestBase::SpecializedSetup< - UniformMatrix3x2fvImmediate, 0>(bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3x2fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT3x2); } template <> -void GLES2DecoderTestBase::SpecializedSetup< - UniformMatrix3x4fvImmediate, 0>(bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix3x4fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT3x4); } template <> -void GLES2DecoderTestBase::SpecializedSetup< - UniformMatrix4x2fvImmediate, 0>(bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4x2fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT4x2); } template <> -void GLES2DecoderTestBase::SpecializedSetup< - UniformMatrix4x3fvImmediate, 0>(bool /* valid */) { +void GLES2DecoderTestBase::SpecializedSetup<cmds::UniformMatrix4x3fvImmediate, + 0>(bool /* valid */) { SetupShaderForUniform(GL_FLOAT_MAT4x3); } template <> -void GLES2DecoderTestBase::SpecializedSetup<UseProgram, 0>( +void GLES2DecoderTestBase::SpecializedSetup<cmds::UseProgram, 0>( bool /* valid */) { // Needs the same setup as LinkProgram. - SpecializedSetup<LinkProgram, 0>(false); + SpecializedSetup<cmds::LinkProgram, 0>(false); EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId)) .Times(1) .RetiresOnSaturation(); - LinkProgram link_cmd; + cmds::LinkProgram link_cmd; link_cmd.Init(client_program_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd)); } template <> -void GLES2DecoderTestBase::SpecializedSetup<ValidateProgram, 0>( +void GLES2DecoderTestBase::SpecializedSetup<cmds::ValidateProgram, 0>( bool /* valid */) { // Needs the same setup as LinkProgram. - SpecializedSetup<LinkProgram, 0>(false); + SpecializedSetup<cmds::LinkProgram, 0>(false); EXPECT_CALL(*gl_, LinkProgram(kServiceProgramId)) .Times(1) .RetiresOnSaturation(); - LinkProgram link_cmd; + cmds::LinkProgram link_cmd; link_cmd.Init(client_program_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(link_cmd)); @@ -149,14 +147,14 @@ SetBucketAsCString(kCategoryBucketId, kCategory); SetBucketAsCString(kNameBucketId, kName); - TraceBeginCHROMIUM begin_cmd; + cmds::TraceBeginCHROMIUM begin_cmd; begin_cmd.Init(kCategoryBucketId, kNameBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); } TEST_P(GLES2DecoderTest3, TraceEndCHROMIUM) { // Test end fails if no begin. - TraceEndCHROMIUM end_cmd; + cmds::TraceEndCHROMIUM end_cmd; end_cmd.Init(); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -169,7 +167,7 @@ SetBucketAsCString(kCategoryBucketId, kCategory); SetBucketAsCString(kNameBucketId, kName); - TraceBeginCHROMIUM begin_cmd; + cmds::TraceBeginCHROMIUM begin_cmd; begin_cmd.Init(kCategoryBucketId, kNameBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_4.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_4.cc index 31fe2a5..7dad01f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_4.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_4.cc
@@ -29,8 +29,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - class GLES2DecoderTest4 : public GLES2DecoderTestBase { public: GLES2DecoderTest4() = default;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc index 631e3bf..de2a399 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -49,8 +49,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_P(GLES2DecoderTest, DisableVertexAttribArrayValidArgs) { SetDriverVertexAttribEnabled(1, false); SpecializedSetup<cmds::DisableVertexAttribArray, 0>(true); @@ -92,7 +90,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -102,12 +100,12 @@ TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervSucceeds) { const GLuint kOffsetToTestFor = sizeof(float) * 4; const GLuint kIndexToTest = 1; - GetVertexAttribPointerv::Result* result = - static_cast<GetVertexAttribPointerv::Result*>(shared_memory_address_); + auto* result = static_cast<cmds::GetVertexAttribPointerv::Result*>( + shared_memory_address_); result->size = 0; const GLuint* result_value = result->GetData(); // Test that initial value is 0. - GetVertexAttribPointerv cmd; + cmds::GetVertexAttribPointerv cmd; cmd.Init(kIndexToTest, GL_VERTEX_ATTRIB_ARRAY_POINTER, shared_memory_id_, @@ -129,12 +127,12 @@ TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervBadArgsFails) { const GLuint kIndexToTest = 1; - GetVertexAttribPointerv::Result* result = - static_cast<GetVertexAttribPointerv::Result*>(shared_memory_address_); + auto* result = static_cast<cmds::GetVertexAttribPointerv::Result*>( + shared_memory_address_); result->size = 0; const GLuint* result_value = result->GetData(); // Test pname invalid fails. - GetVertexAttribPointerv cmd; + cmds::GetVertexAttribPointerv cmd; cmd.Init(kIndexToTest, GL_VERTEX_ATTRIB_ARRAY_POINTER + 1, shared_memory_id_, @@ -177,7 +175,7 @@ // NOTE: Real GLES2 does not have this restriction but WebGL and we do. // This can be restriction can be removed at runtime. EXPECT_CALL(*gl_, BindBuffer(_, _)).Times(0); - BindBuffer cmd; + cmds::BindBuffer cmd; cmd.Init(GL_ELEMENT_ARRAY_BUFFER, client_buffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -237,7 +235,7 @@ stride, BufferOffset(offset))); } - VertexAttribPointer cmd; + cmds::VertexAttribPointer cmd; cmd.Init(index, size, type, normalize, stride, offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); if (good) { @@ -286,7 +284,7 @@ SetupDefaultProgram(); AddExpectationsForGenVertexArraysOES(); - GenHelper<GenVertexArraysOESImmediate>(client_vertexarray_id_); + GenHelper<cmds::GenVertexArraysOESImmediate>(client_vertexarray_id_); vertex_array_deleted_manually_ = false; } @@ -305,8 +303,7 @@ void GenVertexArraysOESImmediateValidArgs() { AddExpectationsForGenVertexArraysOES(); - GenVertexArraysOESImmediate* cmd = - GetImmediateAs<GenVertexArraysOESImmediate>(); + auto* cmd = GetImmediateAs<cmds::GenVertexArraysOESImmediate>(); GLuint temp = kNewClientId; cmd->Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(*cmd, sizeof(temp))); @@ -316,8 +313,7 @@ } void GenVertexArraysOESImmediateDuplicateOrNullIds() { - GenVertexArraysOESImmediate* cmd = - GetImmediateAs<GenVertexArraysOESImmediate>(); + auto* cmd = GetImmediateAs<cmds::GenVertexArraysOESImmediate>(); GLuint temp[3] = {kNewClientId, kNewClientId + 1, kNewClientId}; cmd->Init(3, temp); EXPECT_EQ(error::kInvalidArguments, @@ -333,8 +329,7 @@ void GenVertexArraysOESImmediateInvalidArgs() { EXPECT_CALL(*gl_, GenVertexArraysOES(_, _)).Times(0); - GenVertexArraysOESImmediate* cmd = - GetImmediateAs<GenVertexArraysOESImmediate>(); + auto* cmd = GetImmediateAs<cmds::GenVertexArraysOESImmediate>(); cmd->Init(1, &client_vertexarray_id_); EXPECT_EQ(error::kInvalidArguments, ExecuteImmediateCmd(*cmd, sizeof(&client_vertexarray_id_))); @@ -342,8 +337,7 @@ void DeleteVertexArraysOESImmediateValidArgs() { AddExpectationsForDeleteVertexArraysOES(); - DeleteVertexArraysOESImmediate& cmd = - *GetImmediateAs<DeleteVertexArraysOESImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DeleteVertexArraysOESImmediate>(); cmd.Init(1, &client_vertexarray_id_); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_vertexarray_id_))); @@ -353,8 +347,7 @@ } void DeleteVertexArraysOESImmediateInvalidArgs() { - DeleteVertexArraysOESImmediate& cmd = - *GetImmediateAs<DeleteVertexArraysOESImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DeleteVertexArraysOESImmediate>(); GLuint temp = kInvalidClientId; cmd.Init(1, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); @@ -364,8 +357,7 @@ BindVertexArrayOESValidArgs(); AddExpectationsForDeleteBoundVertexArraysOES(); - DeleteVertexArraysOESImmediate& cmd = - *GetImmediateAs<DeleteVertexArraysOESImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DeleteVertexArraysOESImmediate>(); cmd.Init(1, &client_vertexarray_id_); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(client_vertexarray_id_))); @@ -375,14 +367,14 @@ } void IsVertexArrayOESValidArgs() { - IsVertexArrayOES cmd; + cmds::IsVertexArrayOES cmd; cmd.Init(client_vertexarray_id_, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } void IsVertexArrayOESInvalidArgsBadSharedMemoryId() { - IsVertexArrayOES cmd; + cmds::IsVertexArrayOES cmd; cmd.Init( client_vertexarray_id_, kInvalidSharedMemoryId, shared_memory_offset_); EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); @@ -393,14 +385,14 @@ void BindVertexArrayOESValidArgs() { AddExpectationsForBindVertexArrayOES(); - BindVertexArrayOES cmd; + cmds::BindVertexArrayOES cmd; cmd.Init(client_vertexarray_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } void BindVertexArrayOESValidArgsNewId() { - BindVertexArrayOES cmd; + cmds::BindVertexArrayOES cmd; cmd.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -424,7 +416,7 @@ SetupDefaultProgram(); AddExpectationsForGenVertexArraysOES(); - GenHelper<GenVertexArraysOESImmediate>(client_vertexarray_id_); + GenHelper<cmds::GenVertexArraysOESImmediate>(client_vertexarray_id_); vertex_array_deleted_manually_ = false; } @@ -534,7 +526,7 @@ EXPECT_CALL(*gl_, BufferData(target, size, _, GL_STREAM_DRAW)) .Times(1) .RetiresOnSaturation(); - BufferData cmd; + cmds::BufferData cmd; cmd.Init(target, size, 0, 0, GL_STREAM_DRAW); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc index 06faf0d..7d194a44 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc
@@ -15,8 +15,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - namespace { } // namespace anonymous @@ -24,8 +22,8 @@ TEST_P(GLES3DecoderTest, BindBufferBaseValidArgs) { EXPECT_CALL( *gl_, BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kServiceBufferId)); - SpecializedSetup<BindBufferBase, 0>(true); - BindBufferBase cmd; + SpecializedSetup<cmds::BindBufferBase, 0>(true); + cmds::BindBufferBase cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, client_buffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -36,8 +34,8 @@ BindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewServiceId)); EXPECT_CALL(*gl_, GenBuffersARB(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)); - SpecializedSetup<BindBufferBase, 0>(true); - BindBufferBase cmd; + SpecializedSetup<cmds::BindBufferBase, 0>(true); + cmds::BindBufferBase cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -53,8 +51,8 @@ DoBufferData(kTarget, kBufferSize); EXPECT_CALL(*gl_, BindBufferRange(kTarget, 2, kServiceBufferId, kRangeOffset, kRangeSize)); - SpecializedSetup<BindBufferRange, 0>(true); - BindBufferRange cmd; + SpecializedSetup<cmds::BindBufferRange, 0>(true); + cmds::BindBufferRange cmd; cmd.Init(kTarget, 2, client_buffer_id_, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -66,8 +64,8 @@ const GLsizeiptr kRangeSize = 8; DoBindBuffer(kTarget, client_buffer_id_, kServiceBufferId); EXPECT_CALL(*gl_, BindBufferBase(kTarget, 2, kServiceBufferId)); - SpecializedSetup<BindBufferRange, 0>(true); - BindBufferRange cmd; + SpecializedSetup<cmds::BindBufferRange, 0>(true); + cmds::BindBufferRange cmd; cmd.Init(kTarget, 2, client_buffer_id_, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -82,8 +80,8 @@ DoBufferData(kTarget, kBufferSize); EXPECT_CALL(*gl_, BindBufferRange(kTarget, 2, kServiceBufferId, kRangeOffset, kRangeSize - 4)); - SpecializedSetup<BindBufferRange, 0>(true); - BindBufferRange cmd; + SpecializedSetup<cmds::BindBufferRange, 0>(true); + cmds::BindBufferRange cmd; cmd.Init(kTarget, 2, client_buffer_id_, kRangeOffset, kRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -94,8 +92,8 @@ kNewServiceId)); EXPECT_CALL(*gl_, GenBuffersARB(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)); - SpecializedSetup<BindBufferRange, 0>(true); - BindBufferRange cmd; + SpecializedSetup<cmds::BindBufferRange, 0>(true); + cmds::BindBufferRange cmd; cmd.Init(GL_TRANSFORM_FEEDBACK_BUFFER, 2, kNewClientId, 4, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -128,10 +126,9 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -146,7 +143,7 @@ .WillOnce(Return(GL_TRUE)) .RetiresOnSaturation(); - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -168,8 +165,7 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); int8_t* client_data = GetSharedMemoryAs<int8_t*>() + sizeof(uint32_t); DoBindBuffer(kTarget, client_buffer_id_, kServiceBufferId); @@ -198,7 +194,7 @@ .WillOnce(Return(&gpu_data[kOffset])) .RetiresOnSaturation(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -217,7 +213,7 @@ .WillOnce(Return(GL_TRUE)) .RetiresOnSaturation(); - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -253,8 +249,7 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); int8_t* client_data = GetSharedMemoryAs<int8_t*>() + sizeof(uint32_t); DoBindBuffer(kTarget, client_buffer_id_, kServiceBufferId); @@ -283,7 +278,7 @@ .WillOnce(Return(&gpu_data[kMappedOffset])) .RetiresOnSaturation(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kMappedOffset, kMappedSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); @@ -304,7 +299,7 @@ .Times(1) .RetiresOnSaturation(); - FlushMappedBufferRange cmd; + cmds::FlushMappedBufferRange cmd; cmd.Init(kTarget, kFlushRangeOffset, kFlushRangeSize); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -327,7 +322,7 @@ .WillOnce(Return(GL_TRUE)) .RetiresOnSaturation(); - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -354,15 +349,14 @@ const GLbitfield kAccess = GL_MAP_READ_BIT; std::vector<int8_t> data(kSize); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 1; // Any value other than 0. uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t data_shm_id = shared_memory_id_; uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(*result); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); @@ -387,8 +381,7 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -398,7 +391,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -426,8 +419,7 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -437,7 +429,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -463,8 +455,7 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -474,7 +465,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -491,8 +482,7 @@ data[ii] = static_cast<int8_t>(ii % 255); } - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; @@ -502,7 +492,7 @@ int8_t* mem = reinterpret_cast<int8_t*>(&result[1]); memset(mem, 72, kSize); // Init to a random value other than 0. - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -526,15 +516,14 @@ DoBindBuffer(kTarget, client_buffer_id_, kServiceBufferId); DoBufferData(kTarget, kOffset + kSize); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); *result = 0; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t data_shm_id = shared_memory_id_; uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(*result); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, kInvalidSharedMemoryId, data_shm_offset, result_shm_id, result_shm_offset); @@ -558,7 +547,7 @@ DoBindBuffer(kTarget, client_buffer_id_, kServiceBufferId); - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -567,7 +556,7 @@ TEST_P(GLES3DecoderTest, UnmapBufferWriteNoBoundBufferFails) { const GLenum kTarget = GL_ARRAY_BUFFER; - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -597,10 +586,9 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -614,7 +602,7 @@ } { // UnmapBuffer fails. - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -645,10 +633,9 @@ .WillOnce(Return(&data[0])) .RetiresOnSaturation(); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -666,7 +653,7 @@ } { // UnmapBuffer fails. - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -685,11 +672,10 @@ // uint32_t is Result for both MapBufferRange and UnmapBuffer commands. uint32_t data_shm_offset = kSharedMemoryOffset + sizeof(uint32_t); - typedef MapBufferRange::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::MapBufferRange::Result*>(); { - MapBufferRange cmd; + cmds::MapBufferRange cmd; cmd.Init(kTarget, kOffset, kSize, kAccess, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); *result = 0; @@ -699,7 +685,7 @@ } { - UnmapBuffer cmd; + cmds::UnmapBuffer cmd; cmd.Init(kTarget); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc index 7b18a6f..236f92d7 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc
@@ -18,8 +18,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - class GLES2DecoderDrawOOMTest : public GLES2DecoderManualInitTest { protected: void Init(bool has_robustness) { @@ -46,7 +44,7 @@ EXPECT_CALL(*mock_decoder_, MarkContextLost(expected_other_reason)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kFakeLargeCount); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); } @@ -115,7 +113,7 @@ .RetiresOnSaturation(); EXPECT_CALL(*gl_, GetGraphicsResetStatusARB()) .WillOnce(Return(reset_status)); - GetError cmd; + cmds::GetError cmd; cmd.Init(shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); EXPECT_EQ(static_cast<GLuint>(GL_NO_ERROR), *GetSharedMemoryAs<GLenum*>()); @@ -126,7 +124,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_CONTEXT_LOST_KHR)) .RetiresOnSaturation(); - GetError cmd; + cmds::GetError cmd; cmd.Init(shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); } @@ -173,7 +171,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kClientTextureId); DoBindTexture(GL_TEXTURE_2D, kClientTextureId, kServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 5, 6, 0, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset); @@ -212,9 +210,9 @@ InitDecoder(init); const GLsync kGlSync = reinterpret_cast<GLsync>(0xdeadbeef); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -236,7 +234,7 @@ .RetiresOnSaturation(); #endif - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc index e9e84e7..099dda5 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc
@@ -64,8 +64,6 @@ } // namespace anonymous -using namespace cmds; - class GLES2DecoderRestoreStateTest : public GLES2DecoderManualInitTest { public: GLES2DecoderRestoreStateTest() = default; @@ -243,7 +241,7 @@ // Bind a non-default texture to GL_TEXTURE1 unit. EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)); - ActiveTexture cmd; + cmds::ActiveTexture cmd; cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -274,8 +272,8 @@ // Bind a non-default texture to GL_TEXTURE1 unit. EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)); - SpecializedSetup<ActiveTexture, 0>(true); - ActiveTexture cmd; + SpecializedSetup<cmds::ActiveTexture, 0>(true); + cmds::ActiveTexture cmd; cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -343,8 +341,8 @@ // Bind a non-default texture to GL_TEXTURE1 unit. EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)); - SpecializedSetup<ActiveTexture, 0>(true); - ActiveTexture cmd; + SpecializedSetup<cmds::ActiveTexture, 0>(true); + cmds::ActiveTexture cmd; cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -529,7 +527,7 @@ // Without PIXEL_UNPACK_BUFFER bound, PixelStorei with unpack parameters // is cached and not passed down to GL. EXPECT_CALL(*gl_, PixelStorei(_, _)).Times(0); - PixelStorei cmd; + cmds::PixelStorei cmd; cmd.Init(GL_UNPACK_ROW_LENGTH, 8); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -567,7 +565,7 @@ init.gl_version = "3.2"; InitDecoder(init); - Hint cmd; + cmds::Hint cmd; cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_NICEST); EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_NICEST)).Times(0); @@ -583,7 +581,7 @@ init.extensions += " GL_ARB_compatibility"; InitDecoder(init); - Hint cmd; + cmds::Hint cmd; cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_NICEST); EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_NICEST))
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc index 9e18273..375cfa6 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc
@@ -49,8 +49,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - class GLES2DecoderGeometryInstancingTest : public GLES2DecoderWithShaderTest { public: GLES2DecoderGeometryInstancingTest() : GLES2DecoderWithShaderTest() {} @@ -80,7 +78,7 @@ bool depth_mask, GLuint front_stencil_mask, GLuint back_stencil_mask) { - ColorMask color_mask_cmd; + cmds::ColorMask color_mask_cmd; color_mask_cmd.Init((color_bits & 0x1000) != 0, (color_bits & 0x0100) != 0, (color_bits & 0x0010) != 0, @@ -88,17 +86,17 @@ EXPECT_EQ(error::kNoError, ExecuteCmd(color_mask_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - DepthMask depth_mask_cmd; + cmds::DepthMask depth_mask_cmd; depth_mask_cmd.Init(depth_mask); EXPECT_EQ(error::kNoError, ExecuteCmd(depth_mask_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - StencilMaskSeparate front_stencil_mask_cmd; + cmds::StencilMaskSeparate front_stencil_mask_cmd; front_stencil_mask_cmd.Init(GL_FRONT, front_stencil_mask); EXPECT_EQ(error::kNoError, ExecuteCmd(front_stencil_mask_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - StencilMaskSeparate back_stencil_mask_cmd; + cmds::StencilMaskSeparate back_stencil_mask_cmd; back_stencil_mask_cmd.Init(GL_BACK, back_stencil_mask); EXPECT_EQ(error::kNoError, ExecuteCmd(back_stencil_mask_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -117,7 +115,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -126,7 +124,7 @@ // Test that with an RGB backbuffer if we set the color mask to 1,1,1,1 it is // set to 1,1,1,0 at Draw time but is 1,1,1,1 at query time. TEST_P(GLES2DecoderRGBBackbufferTest, RGBBackbufferColorMask) { - ColorMask cmd; + cmds::ColorMask cmd; cmd.Init(true, true, true, true); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -146,7 +144,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -155,12 +153,12 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_COLOR_WRITEMASK, result->GetData())) .Times(0); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_COLOR_WRITEMASK, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ( @@ -177,7 +175,7 @@ // draw time but querying it returns true. TEST_P(GLES2DecoderRGBBackbufferTest, RGBBackbufferDepthMask) { EXPECT_CALL(*gl_, DepthMask(true)).Times(0).RetiresOnSaturation(); - DepthMask cmd; + cmds::DepthMask cmd; cmd.Init(true); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -197,7 +195,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -206,12 +204,12 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_WRITEMASK, result->GetData())) .Times(0); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_DEPTH_WRITEMASK, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ( @@ -226,7 +224,7 @@ TEST_P(GLES2DecoderRGBBackbufferTest, RGBBackbufferStencilMask) { const GLint kMask = 123; EXPECT_CALL(*gl_, StencilMask(kMask)).Times(0).RetiresOnSaturation(); - StencilMask cmd; + cmds::StencilMask cmd; cmd.Init(kMask); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -246,7 +244,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -255,12 +253,12 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_WRITEMASK, result->GetData())) .Times(0); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_WRITEMASK, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ( @@ -272,7 +270,7 @@ // Test that if an FBO is bound we get the correct masks. TEST_P(GLES2DecoderRGBBackbufferTest, RGBBackbufferColorMaskFBO) { - ColorMask cmd; + cmds::ColorMask cmd; cmd.Init(true, true, true, true); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -298,7 +296,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -319,7 +317,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kNewClientId); + GenHelper<cmds::GenTexturesImmediate>(kNewClientId); DoBindTexture(GL_TEXTURE_2D, kNewClientId, kNewServiceId); // Pass some data so the texture will be marked as cleared. DoTexImage2D(GL_TEXTURE_2D, 0, kFormat, kWidth, kHeight, 0, kFormat, @@ -389,7 +387,7 @@ init.bind_generates_resource = true; InitDecoder(init); - Enable cmd; + cmds::Enable cmd; cmd.Init(GL_DEPTH_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -410,7 +408,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -419,13 +417,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_TEST, _)) .Times(0) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_DEPTH_TEST, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_TEST), @@ -440,7 +438,7 @@ init.bind_generates_resource = true; InitDecoder(init); - Enable cmd; + cmds::Enable cmd; cmd.Init(GL_DEPTH_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -461,7 +459,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -470,13 +468,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_TEST, _)) .Times(0) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_DEPTH_TEST, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_TEST), @@ -492,7 +490,7 @@ init.bind_generates_resource = true; InitDecoder(init); - Enable cmd; + cmds::Enable cmd; cmd.Init(GL_STENCIL_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -514,7 +512,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -523,13 +521,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_TEST, _)) .Times(0) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_TEST, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_TEST), @@ -544,7 +542,7 @@ init.bind_generates_resource = true; InitDecoder(init); - Enable cmd; + cmds::Enable cmd; cmd.Init(GL_STENCIL_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -565,7 +563,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays draw_cmd; + cmds::DrawArrays draw_cmd; draw_cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(draw_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -574,13 +572,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_TEST, _)) .Times(0) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_TEST, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_TEST), @@ -685,7 +683,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -696,7 +694,7 @@ const GLsizei kLargeCount = 0x40000000; SetupTexture(); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kLargeCount); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -708,7 +706,7 @@ const GLsizei kLargeCount = 0x7FFFFFFF; SetupTexture(); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kLargeCount); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -722,7 +720,7 @@ AddExpectationsForSimulatedAttrib0WithError( kFakeLargeCount, 0, GL_OUT_OF_MEMORY); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kFakeLargeCount); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -759,7 +757,7 @@ .RetiresOnSaturation(); } SetupExpectationsForApplyingDefaultDirtyState(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -769,7 +767,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -780,7 +778,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -792,7 +790,7 @@ GLint large = std::numeric_limits<GLint>::max(); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, large, large); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -809,7 +807,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -838,7 +836,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -868,7 +866,7 @@ DeleteVertexBuffer(); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -882,7 +880,7 @@ EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(1).RetiresOnSaturation(); EXPECT_CALL(*gl_, DeleteProgram(kServiceProgramId)).Times(1); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -893,7 +891,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_QUADS, 0, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -908,7 +906,7 @@ // Try start > 0 EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 1, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -949,7 +947,7 @@ EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); } @@ -964,7 +962,7 @@ .Times(0) .RetiresOnSaturation(); - VertexAttribDivisorANGLE cmd; + cmds::VertexAttribDivisorANGLE cmd; cmd.Init(0, 1); EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); } @@ -976,7 +974,7 @@ EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1001,7 +999,7 @@ EXPECT_CALL(*gl_, VertexAttribDivisorANGLE(0, 1)) .Times(1) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 3); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1012,7 +1010,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)).Times(0); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1023,7 +1021,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)).Times(0); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, 0, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1045,7 +1043,7 @@ EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(GL_TRIANGLES, 0, kNumVertices, 1)) .Times(1) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1057,7 +1055,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)).Times(0); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_QUADS, 0, 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -1072,7 +1070,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)).Times(0); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, 1, -1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -1094,7 +1092,7 @@ DrawArraysInstancedANGLE(GL_TRIANGLES, 0, kNumVertices, kNumVertices / 2)) .Times(1) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, kNumVertices / 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1118,7 +1116,7 @@ DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1140,7 +1138,7 @@ DrawArraysInstancedANGLE(GL_TRIANGLES, 0, kNumVertices, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1157,7 +1155,7 @@ EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, kNumVertices + 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1188,7 +1186,7 @@ DrawArraysInstancedANGLE(GL_TRIANGLES, 0, kNumVertices / 2, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices / 2, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1207,7 +1205,7 @@ EXPECT_CALL(*gl_, DrawArraysInstancedANGLE(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawArraysInstancedANGLE cmd; + cmds::DrawArraysInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1227,7 +1225,7 @@ EXPECT_CALL(*gl_, DrawArrays(_, _, _)) .Times(0) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1246,7 +1244,7 @@ BufferOffset(kValidIndexRangeStart * 2))) .Times(1) .RetiresOnSaturation(); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1260,7 +1258,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1275,7 +1273,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, 0, GL_UNSIGNED_SHORT, kValidIndexRangeStart * 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1286,7 +1284,7 @@ DoEnableVertexAttribArray(6); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1310,7 +1308,7 @@ BufferOffset(kValidIndexRangeStart * 2))) .Times(1) .RetiresOnSaturation(); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1330,7 +1328,7 @@ DeleteIndexBuffer(); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1348,7 +1346,7 @@ EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(1); EXPECT_CALL(*gl_, DeleteProgram(kServiceProgramId)).Times(1); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1363,7 +1361,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_QUADS, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1385,7 +1383,7 @@ // Try start > 0 EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kNumIndices, GL_UNSIGNED_SHORT, 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1404,7 +1402,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kInvalidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1420,7 +1418,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(0); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kInvalidIndexRangeCount, GL_UNSIGNED_SHORT, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1437,7 +1435,7 @@ EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1454,7 +1452,7 @@ EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1490,7 +1488,7 @@ EXPECT_CALL(*gl_, VertexAttribDivisorANGLE(0, 1)) .Times(1) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1506,7 +1504,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)).Times(0); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1522,7 +1520,7 @@ DoEnableVertexAttribArray(1); EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)).Times(0); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, 0, GL_UNSIGNED_SHORT, kValidIndexRangeStart * 2, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1552,7 +1550,7 @@ .Times(1) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1569,7 +1567,7 @@ DoVertexAttribPointer(1, 2, GL_FLOAT, 0, 0); EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)).Times(0); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_QUADS, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1613,7 +1611,7 @@ kNumVertices / 2)) .Times(1) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1651,7 +1649,7 @@ BufferOffset(kValidIndexRangeStart * 2))) .Times(1) .RetiresOnSaturation(); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1681,7 +1679,7 @@ kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1704,7 +1702,7 @@ EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1740,7 +1738,7 @@ EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1772,7 +1770,7 @@ kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1796,7 +1794,7 @@ EXPECT_CALL(*gl_, DrawElementsInstancedANGLE(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElementsInstancedANGLE cmd; + cmds::DrawElementsInstancedANGLE cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1821,7 +1819,7 @@ EXPECT_CALL(*gl_, DrawElements(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1850,7 +1848,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1888,7 +1886,7 @@ BufferOffset(kValidIndexRangeStart * 2))) .Times(1) .RetiresOnSaturation(); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -1917,7 +1915,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -1960,7 +1958,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1981,7 +1979,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2004,7 +2002,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_UNSUPPORTED)) .RetiresOnSaturation(); EXPECT_CALL(*gl_, DrawArrays(_, _, _)).Times(0).RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError()); @@ -2050,7 +2048,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2114,7 +2112,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2128,7 +2126,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2187,7 +2185,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2204,7 +2202,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture that is cleared. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2241,7 +2239,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2330,7 +2328,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2406,7 +2404,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2417,7 +2415,7 @@ SetupAllNeededVertexBuffers(); EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, _, _)).Times(0); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2425,7 +2423,7 @@ TEST_P(GLES2DecoderTest, ClearInvalidValue) { EXPECT_CALL(*gl_, Clear(_)).Times(0); - Clear cmd; + cmds::Clear cmd; cmd.Init(0xffffffff); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc index 349cacb..9b55c97 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -54,8 +54,6 @@ namespace gpu { namespace gles2 { -using namespace cmds; - class GLES2DecoderTestWithExtensionsOnGLES2 : public GLES2DecoderTest { public: GLES2DecoderTestWithExtensionsOnGLES2() = default; @@ -75,10 +73,10 @@ TEST_P(GLES2DecoderTest, CheckFramebufferStatusWithNoBoundTarget) { EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_)).Times(0); - CheckFramebufferStatus::Result* result = - static_cast<CheckFramebufferStatus::Result*>(shared_memory_address_); + auto* result = static_cast<cmds::CheckFramebufferStatus::Result*>( + shared_memory_address_); *result = 0; - CheckFramebufferStatus cmd; + cmds::CheckFramebufferStatus cmd; cmd.Init(GL_FRAMEBUFFER, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(static_cast<GLenum>(GL_FRAMEBUFFER_COMPLETE), *result); @@ -101,7 +99,7 @@ EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices)) .Times(1) .RetiresOnSaturation(); - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -109,7 +107,7 @@ TEST_P(GLES2DecoderTest, FramebufferRenderbufferWithNoBoundTarget) { EXPECT_CALL(*gl_, FramebufferRenderbufferEXT(_, _, _, _)).Times(0); - FramebufferRenderbuffer cmd; + cmds::FramebufferRenderbuffer cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, @@ -120,7 +118,7 @@ TEST_P(GLES2DecoderTest, FramebufferTexture2DWithNoBoundTarget) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, @@ -132,7 +130,7 @@ TEST_P(GLES3DecoderTest, FramebufferTexture2DWithNoBoundTarget) { EXPECT_CALL(*gl_, FramebufferTexture2DEXT(_, _, _, _, _)).Times(0); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, @@ -153,7 +151,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -171,7 +169,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -197,7 +195,7 @@ GL_TEXTURE_2D, kServiceTextureId, 4)) .Times(1) .RetiresOnSaturation(); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, client_texture_id_, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -214,7 +212,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_RENDERBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -226,7 +224,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_RENDERBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -238,7 +236,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR, GL_TEXTURE_2D, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -249,7 +247,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR, GL_TEXTURE_2D, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -260,7 +258,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_PROXY_TEXTURE_CUBE_MAP, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -272,7 +270,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_PROXY_TEXTURE_CUBE_MAP, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -284,7 +282,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -302,7 +300,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -315,7 +313,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -328,7 +326,7 @@ DoBindTexture(GL_TEXTURE_CUBE_MAP, client_texture_id_, kServiceTextureId); DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTexture2D cmd; + cmds::FramebufferTexture2D cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -342,7 +340,7 @@ .RetiresOnSaturation(); EXPECT_CALL(*gl_, GetFramebufferAttachmentParameterivEXT(_, _, _, _)) .Times(0); - GetFramebufferAttachmentParameteriv cmd; + cmds::GetFramebufferAttachmentParameteriv cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, @@ -366,13 +364,13 @@ kServiceRenderbufferId)) .Times(1) .RetiresOnSaturation(); - GetFramebufferAttachmentParameteriv::Result* result = - static_cast<GetFramebufferAttachmentParameteriv::Result*>( + auto* result = + static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->size = 0; const GLint* result_value = result->GetData(); - FramebufferRenderbuffer fbrb_cmd; - GetFramebufferAttachmentParameteriv cmd; + cmds::FramebufferRenderbuffer fbrb_cmd; + cmds::GetFramebufferAttachmentParameteriv cmd; fbrb_cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, @@ -402,13 +400,13 @@ 0)) .Times(1) .RetiresOnSaturation(); - GetFramebufferAttachmentParameteriv::Result* result = - static_cast<GetFramebufferAttachmentParameteriv::Result*>( + auto* result = + static_cast<cmds::GetFramebufferAttachmentParameteriv::Result*>( shared_memory_address_); result->SetNumResults(0); const GLint* result_value = result->GetData(); - FramebufferTexture2D fbtex_cmd; - GetFramebufferAttachmentParameteriv cmd; + cmds::FramebufferTexture2D fbtex_cmd; + cmds::GetFramebufferAttachmentParameteriv cmd; fbtex_cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, @@ -432,7 +430,7 @@ GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); DoRenderbufferStorage(GL_RENDERBUFFER, GL_RGBA4, GL_RGBA, 1, 1, GL_NO_ERROR); - GetRenderbufferParameteriv cmd; + cmds::GetRenderbufferParameteriv cmd; cmd.Init(GL_RENDERBUFFER, GL_RENDERBUFFER_RED_SIZE, shared_memory_id_, @@ -458,7 +456,7 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); EXPECT_CALL(*gl_, GetRenderbufferParameterivEXT(_, _, _)).Times(0); - GetRenderbufferParameteriv cmd; + cmds::GetRenderbufferParameteriv cmd; cmd.Init(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, shared_memory_id_, @@ -478,7 +476,7 @@ TEST_P(GLES2DecoderTest, RenderbufferStorageWithNoBoundTarget) { EXPECT_CALL(*gl_, RenderbufferStorageEXT(_, _, _, _)).Times(0); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA4, 3, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -611,8 +609,7 @@ ReadPixelsEmulator emu( kWidth, kHeight, kBytesPerPixel, kSrcPixels, kSrcPixels, kPackAlignment); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; @@ -640,7 +637,7 @@ .RetiresOnSaturation(); } } - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(in_read_x, in_read_y, in_read_width, @@ -716,8 +713,7 @@ ReadPixelsEmulator emu( kWidth, kHeight, kBytesPerPixel, kSrcPixels, kSrcPixels, kPackAlignment); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; @@ -730,7 +726,7 @@ EXPECT_CALL(*gl_, ReadPixels(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, _)) .WillOnce(Invoke(&emu, &ReadPixelsEmulator::ReadPixels)); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -757,7 +753,7 @@ const GLsizei kHeight = 3; EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -779,17 +775,16 @@ const GLint kBytesPerPixel = 4; GLint size = kWidth * kHeight * kBytesPerPixel; EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); DoBindBuffer(GL_PIXEL_PACK_BUFFER, client_buffer_id_, kServiceBufferId); DoBufferData(GL_PIXEL_PACK_BUFFER, size); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -820,7 +815,7 @@ .RetiresOnSaturation(); EXPECT_CALL(*gl_, ReadPixels(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, _)); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -856,7 +851,7 @@ MapBufferRange(GL_PIXEL_PACK_BUFFER, 0, size, GL_MAP_READ_BIT)) .WillOnce(Return(mapped_data.data())) .RetiresOnSaturation(); - MapBufferRange map_buffer_range; + cmds::MapBufferRange map_buffer_range; map_buffer_range.Init(GL_PIXEL_PACK_BUFFER, 0, size, GL_MAP_READ_BIT, data_shm_id, data_shm_offset, result_shm_id, result_shm_offset); @@ -864,7 +859,7 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -891,7 +886,7 @@ DoBufferData(GL_PIXEL_PACK_BUFFER, size - 4); EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -949,7 +944,7 @@ } } - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, kFormat, kType, 0, 0, 0, 0, @@ -1001,7 +996,7 @@ .Times(1) .RetiresOnSaturation(); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, kFormat, kType, 0, 0, 0, 0, @@ -1065,7 +1060,7 @@ .Times(1) .RetiresOnSaturation(); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, kFormat, kType, 0, 0, 0, 0, @@ -1088,8 +1083,7 @@ ReadPixelsEmulator emu(kWidth, kHeight, kBytesPerPixel, kSrcPixels, kSrcPixels, kPackAlignment); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; @@ -1102,7 +1096,7 @@ EXPECT_CALL(*gl_, ReadPixels(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, _)) .WillOnce(Invoke(&emu, &ReadPixelsEmulator::ReadPixels)); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -1154,14 +1148,13 @@ } TEST_P(GLES2DecoderTest, ReadPixelsInvalidArgs) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); EXPECT_CALL(*gl_, ReadPixels(_, _, _, _, _, _, _)).Times(0); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, -1, @@ -1266,14 +1259,13 @@ init.bind_generates_resource = true; InitDecoder(init); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); EXPECT_CALL(*gl_, GetError()) // first error check must pass to get to the test @@ -1294,7 +1286,7 @@ BufferData(GL_PIXEL_PACK_BUFFER_ARB, _, nullptr, GL_STREAM_READ)) .Times(1); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, @@ -1376,19 +1368,18 @@ }; TEST_P(GLES2ReadPixelsAsyncTest, ReadPixelsAsync) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); char* pixels = reinterpret_cast<char*>(result + 1); SetupReadPixelsAsyncExpectation(kWidth, kHeight); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); result->success = 0; @@ -1405,19 +1396,18 @@ } TEST_P(GLES2ReadPixelsAsyncTest, ReadPixelsAsyncModifyCommand) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 4; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); char* pixels = reinterpret_cast<char*>(result + 1); SetupReadPixelsAsyncExpectation(kWidth, kHeight); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); result->success = 0; @@ -1434,20 +1424,19 @@ } TEST_P(GLES2ReadPixelsAsyncTest, ReadPixelsAsyncChangePackAlignment) { - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); const GLsizei kWidth = 1; const GLsizei kHeight = 4; uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); char* pixels = reinterpret_cast<char*>(result + 1); SetupReadPixelsAsyncExpectation(kWidth, kHeight); { - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, pixels_shm_id, pixels_shm_offset, result_shm_id, result_shm_offset, true); result->success = 0; @@ -1459,7 +1448,7 @@ // Changing the pack alignment after the ReadPixels is issued but before we // finish the read should have no impact. { - PixelStorei cmd; + cmds::PixelStorei cmd; cmd.Init(GL_PACK_ALIGNMENT, 8); EXPECT_CALL(*gl_, PixelStorei(GL_PACK_ALIGNMENT, 8)).Times(1); @@ -1478,10 +1467,10 @@ GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); - ClearColor color_cmd; - ColorMask color_mask_cmd; - Enable enable_cmd; - FramebufferRenderbuffer cmd; + cmds::ClearColor color_cmd; + cmds::ColorMask color_mask_cmd; + cmds::Enable enable_cmd; + cmds::FramebufferRenderbuffer cmd; color_cmd.Init(0.1f, 0.2f, 0.3f, 0.4f); color_mask_cmd.Init(0, 1, 0, 1); enable_cmd.Init(GL_SCISSOR_TEST); @@ -1518,9 +1507,9 @@ GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); - ClearDepthf depth_cmd; - DepthMask depth_mask_cmd; - FramebufferRenderbuffer cmd; + cmds::ClearDepthf depth_cmd; + cmds::DepthMask depth_mask_cmd; + cmds::FramebufferRenderbuffer cmd; depth_cmd.Init(0.5f); depth_mask_cmd.Init(false); cmd.Init(GL_FRAMEBUFFER, @@ -1552,9 +1541,9 @@ GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); - ClearStencil stencil_cmd; - StencilMaskSeparate stencil_mask_separate_cmd; - FramebufferRenderbuffer cmd; + cmds::ClearStencil stencil_cmd; + cmds::StencilMaskSeparate stencil_mask_separate_cmd; + cmds::FramebufferRenderbuffer cmd; stencil_cmd.Init(123); stencil_mask_separate_cmd.Init(GL_BACK, 0x1234u); cmd.Init(GL_FRAMEBUFFER, @@ -1586,9 +1575,9 @@ kServiceFramebufferId); DoBindRenderbuffer(GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); - ClearDepthf depth_cmd; - ClearStencil stencil_cmd; - FramebufferRenderbuffer cmd; + cmds::ClearDepthf depth_cmd; + cmds::ClearStencil stencil_cmd; + cmds::FramebufferRenderbuffer cmd; depth_cmd.Init(0.5f); stencil_cmd.Init(123); cmd.Init( @@ -1641,10 +1630,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_ALPHA_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_ALPHA_BITS), @@ -1663,10 +1652,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_ALPHA_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_ALPHA_BITS), @@ -1686,13 +1675,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) .WillOnce(SetArgPointee<1>(24)) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), @@ -1711,13 +1700,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_DEPTH_BITS, _)) .WillOnce(SetArgPointee<1>(24)) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_DEPTH_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_DEPTH_BITS), @@ -1737,13 +1726,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), @@ -1762,13 +1751,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) .RetiresOnSaturation(); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(GL_STENCIL_BITS), @@ -1794,10 +1783,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) @@ -1835,10 +1824,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) @@ -1888,7 +1877,7 @@ RenderbufferStorageEXT(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 100, 50)) .Times(1) .RetiresOnSaturation(); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 100, 50); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_CALL(*gl_, @@ -1898,17 +1887,17 @@ kServiceRenderbufferId)) .Times(1) .RetiresOnSaturation(); - FramebufferRenderbuffer fbrb_cmd; + cmds::FramebufferRenderbuffer fbrb_cmd; fbrb_cmd.Init(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(fbrb_cmd)); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) @@ -1958,7 +1947,7 @@ RenderbufferStorageEXT(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 100, 50)) .Times(1) .RetiresOnSaturation(); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, 100, 50); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_CALL(*gl_, @@ -1968,17 +1957,17 @@ kServiceRenderbufferId)) .Times(1) .RetiresOnSaturation(); - FramebufferRenderbuffer fbrb_cmd; + cmds::FramebufferRenderbuffer fbrb_cmd; fbrb_cmd.Init(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(fbrb_cmd)); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); result->size = 0; - GetIntegerv cmd2; + cmds::GetIntegerv cmd2; cmd2.Init(GL_STENCIL_BITS, shared_memory_id_, shared_memory_offset_); EXPECT_CALL(*gl_, GetIntegerv(GL_STENCIL_BITS, _)) .WillOnce(SetArgPointee<1>(8)) @@ -2003,7 +1992,7 @@ TEST_P(GLES2DecoderTest, FramebufferRenderbufferGLError) { DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferRenderbuffer cmd; + cmds::FramebufferRenderbuffer cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, client_renderbuffer_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2055,7 +2044,7 @@ 0)) .Times(1) .RetiresOnSaturation(); - FramebufferTexture2D fbtex_cmd; + cmds::FramebufferTexture2D fbtex_cmd; fbtex_cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, @@ -2076,7 +2065,7 @@ EXPECT_CALL(*gl_, RenderbufferStorageEXT(GL_RENDERBUFFER, GL_RGBA, 100, 50)) .Times(1) .RetiresOnSaturation(); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA4, 100, 50); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -2088,7 +2077,7 @@ EXPECT_CALL(*gl_, RenderbufferStorageEXT(_, _, _, _)) .Times(0) .RetiresOnSaturation(); - RenderbufferStorage cmd; + cmds::RenderbufferStorage cmd; cmd.Init(GL_RENDERBUFFER, GL_RGBA4, TestHelper::kMaxRenderbufferSize + 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -2114,8 +2103,7 @@ framebuffer->MarkAttachmentAsCleared( group().renderbuffer_manager(), nullptr, GL_COLOR_ATTACHMENT0, true); - ClearBufferivImmediate& cmd = - *GetImmediateAs<ClearBufferivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::ClearBufferivImmediate>(); GLint temp[4] = { 0 }; cmd.Init(GL_COLOR, 0, &temp[0]); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER)) @@ -2145,8 +2133,7 @@ framebuffer->MarkAttachmentAsCleared( group().renderbuffer_manager(), nullptr, GL_COLOR_ATTACHMENT0, true); - ClearBufferuivImmediate& cmd = - *GetImmediateAs<ClearBufferuivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::ClearBufferuivImmediate>(); GLuint temp[4] = { 0u }; cmd.Init(GL_COLOR, 0, &temp[0]); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER)) @@ -2177,13 +2164,12 @@ framebuffer->MarkAttachmentAsCleared( group().renderbuffer_manager(), nullptr, GL_DEPTH_ATTACHMENT, true); - Enable cmd_enable; + cmds::Enable cmd_enable; cmd_enable.Init(GL_DEPTH_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd_enable)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - ClearBufferfvImmediate& cmd = - *GetImmediateAs<ClearBufferfvImmediate>(); + auto& cmd = *GetImmediateAs<cmds::ClearBufferfvImmediate>(); GLfloat temp[4] = { 1.0f }; cmd.Init(GL_DEPTH, 0, &temp[0]); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER)) @@ -2216,14 +2202,14 @@ framebuffer->MarkAttachmentAsCleared(group().renderbuffer_manager(), nullptr, GL_STENCIL_ATTACHMENT, true); - Enable cmd_enable; + cmds::Enable cmd_enable; cmd_enable.Init(GL_STENCIL_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd_enable)); cmd_enable.Init(GL_DEPTH_TEST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd_enable)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - ClearBufferfi cmd; + cmds::ClearBufferfi cmd; cmd.Init(GL_DEPTH_STENCIL, 0, 1.0f, 0); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER)) .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) @@ -2254,7 +2240,7 @@ 100, 50)) .Times(1) .RetiresOnSaturation(); - RenderbufferStorageMultisampleCHROMIUM cmd; + cmds::RenderbufferStorageMultisampleCHROMIUM cmd; cmd.Init(GL_RENDERBUFFER, 1, GL_RGBA4, 100, 50); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -2271,7 +2257,7 @@ EXPECT_CALL(*gl_, RenderbufferStorageMultisample(_, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - RenderbufferStorageMultisampleCHROMIUM cmd; + cmds::RenderbufferStorageMultisampleCHROMIUM cmd; cmd.Init(GL_RENDERBUFFER, TestHelper::kMaxSamples + 1, GL_RGBA4, @@ -2332,7 +2318,7 @@ InSequence sequence; // GL_CHROMIUM_framebuffer_multisample uses // RenderbufferStorageMultisampleCHROMIUM. - RenderbufferStorageMultisampleEXT cmd; + cmds::RenderbufferStorageMultisampleEXT cmd; cmd.Init(GL_RENDERBUFFER, TestHelper::kMaxSamples, GL_RGBA4, @@ -2347,7 +2333,7 @@ void TestNotCompatibleWithRenderbufferStorageMultisampleCHROMIUM() { DoBindRenderbuffer( GL_RENDERBUFFER, client_renderbuffer_id_, kServiceRenderbufferId); - RenderbufferStorageMultisampleCHROMIUM cmd; + cmds::RenderbufferStorageMultisampleCHROMIUM cmd; cmd.Init(GL_RENDERBUFFER, TestHelper::kMaxSamples, GL_RGBA4, @@ -2379,7 +2365,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - RenderbufferStorageMultisampleEXT cmd; + cmds::RenderbufferStorageMultisampleEXT cmd; cmd.Init(GL_RENDERBUFFER, TestHelper::kMaxSamples, GL_RGBA4, @@ -2440,12 +2426,11 @@ GLint y = 0; GLsizei width = 2; GLsizei height = 4; - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_OUT_OF_MEMORY)) @@ -2454,7 +2439,7 @@ ReadPixels(x, y, width, height, kFormat, GL_UNSIGNED_BYTE, _)) .Times(1) .RetiresOnSaturation(); - ReadPixels cmd; + cmds::ReadPixels cmd; cmd.Init(x, y, width, @@ -2479,7 +2464,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2522,7 +2507,7 @@ EXPECT_CALL(*gl_, Clear(GL_COLOR_BUFFER_BIT)).Times(1).RetiresOnSaturation(); - Clear cmd; + cmds::Clear cmd; cmd.Init(GL_COLOR_BUFFER_BIT); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2536,7 +2521,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2573,13 +2558,12 @@ EXPECT_CALL(*gl_, ReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, _)) .Times(1) .RetiresOnSaturation(); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); - ReadPixels cmd; + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); + cmds::ReadPixels cmd; cmd.Init(0, 0, 1, @@ -2612,7 +2596,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, internal_format, width, height, 0, format, @@ -2641,7 +2625,7 @@ .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2670,7 +2654,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RGBA16F, width, height, 0, format, type, @@ -2697,7 +2681,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2727,7 +2711,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, width, height, 0, format, type, @@ -2749,7 +2733,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -2771,7 +2755,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RG8, width, height, 0, format, type, @@ -2790,7 +2774,7 @@ target, level, internal_format, 0, 0, width, height, border)) .Times(0); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -2812,7 +2796,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RGBA8, width, height, 0, format, type, @@ -2834,7 +2818,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -2856,7 +2840,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RG8UI, width, height, 0, format, type, @@ -2878,7 +2862,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -2900,7 +2884,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); DoTexImage2D(GL_TEXTURE_2D, level, GL_RGB, width, height, 0, format, type, @@ -2922,7 +2906,7 @@ .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -2941,7 +2925,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render from" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -2981,13 +2965,12 @@ EXPECT_CALL(*gl_, ReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, _)) .Times(1) .RetiresOnSaturation(); - typedef ReadPixels::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::ReadPixels::Result*>(); uint32_t result_shm_id = shared_memory_id_; uint32_t result_shm_offset = kSharedMemoryOffset; uint32_t pixels_shm_id = shared_memory_id_; - uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(Result); - ReadPixels cmd; + uint32_t pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); + cmds::ReadPixels cmd; cmd.Init(0, 0, 1, @@ -3026,7 +3009,7 @@ EXPECT_CALL(*gl_, CopyTexImage2D(_, _, _, _, _, _, _, _)) .Times(0) .RetiresOnSaturation(); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError()); @@ -3102,7 +3085,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); SetupTexture(); @@ -3164,7 +3147,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 1, 1); // Unbind fbo and bind again after CopyTexImage2D tp avoid feedback loops. if (bound_fbo) { @@ -3219,7 +3202,7 @@ TEST_P(GLES2DecoderTest, DrawBuffersEXTImmediateSuccceeds) { const GLsizei count = 1; const GLenum bufs[] = {GL_COLOR_ATTACHMENT0}; - DrawBuffersEXTImmediate& cmd = *GetImmediateAs<DrawBuffersEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DrawBuffersEXTImmediate>(); cmd.Init(count, bufs); DoBindFramebuffer( @@ -3232,7 +3215,7 @@ TEST_P(GLES2DecoderTest, DrawBuffersEXTImmediateFails) { const GLsizei count = 1; const GLenum bufs[] = {GL_COLOR_ATTACHMENT1_EXT}; - DrawBuffersEXTImmediate& cmd = *GetImmediateAs<DrawBuffersEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DrawBuffersEXTImmediate>(); cmd.Init(count, bufs); DoBindFramebuffer( @@ -3244,7 +3227,7 @@ TEST_P(GLES2DecoderTest, DrawBuffersEXTImmediateBackbuffer) { const GLsizei count = 1; const GLenum bufs[] = {GL_BACK}; - DrawBuffersEXTImmediate& cmd = *GetImmediateAs<DrawBuffersEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DrawBuffersEXTImmediate>(); cmd.Init(count, bufs); DoBindFramebuffer( @@ -3261,7 +3244,7 @@ } TEST_P(GLES2DecoderTest, DrawBuffersEXTMainFramebuffer) { - DrawBuffersEXTImmediate& cmd = *GetImmediateAs<DrawBuffersEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DrawBuffersEXTImmediate>(); { const GLenum bufs[] = {GL_BACK}; const GLsizei count = base::size(bufs); @@ -3314,7 +3297,7 @@ EXPECT_EQ(0u, GetAndClearBackbufferClearBitsForTest()); - SwapBuffers& cmd = *GetImmediateAs<SwapBuffers>(); + auto& cmd = *GetImmediateAs<cmds::SwapBuffers>(); cmd.Init(1, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3326,7 +3309,7 @@ EXPECT_EQ(0u, GetAndClearBackbufferClearBitsForTest()); EXPECT_CALL(*gl_, Finish()).Times(AnyNumber()); - ResizeCHROMIUM& resize_cmd = *GetImmediateAs<ResizeCHROMIUM>(); + auto& resize_cmd = *GetImmediateAs<cmds::ResizeCHROMIUM>(); resize_cmd.Init(1, 1, 1.0f, GL_COLOR_SPACE_UNSPECIFIED_CHROMIUM, GL_TRUE); EXPECT_EQ(error::kNoError, ExecuteCmd(resize_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3378,8 +3361,7 @@ EXPECT_CALL(*gl_, DiscardFramebufferEXT(target, count, _)) .Times(1) .RetiresOnSaturation(); - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); @@ -3406,8 +3388,7 @@ EXPECT_CALL(*gl_, DiscardFramebufferEXT(target, count, _)) .Times(1) .RetiresOnSaturation(); - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3452,8 +3433,7 @@ const GLenum target = GL_FRAMEBUFFER; const GLsizei count = 1; const GLenum attachments[] = {GL_COLOR_EXT}; - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); // Should not result into a call into GL. @@ -3482,8 +3462,7 @@ EXPECT_TRUE(framebuffer->IsCleared()); EXPECT_CALL(*gl_, InvalidateFramebuffer(target, count, _)).Times(0); - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); @@ -3537,8 +3516,7 @@ EXPECT_CALL(*gl_, InvalidateFramebuffer(target, count, _)) .Times(1) .RetiresOnSaturation(); - DiscardFramebufferEXTImmediate& cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); @@ -3563,7 +3541,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -3604,7 +3582,7 @@ EXPECT_CALL(*gl_, Clear(GL_COLOR_BUFFER_BIT)).Times(1).RetiresOnSaturation(); - Clear clear_cmd; + cmds::Clear clear_cmd; clear_cmd.Init(GL_COLOR_BUFFER_BIT); EXPECT_EQ(error::kNoError, ExecuteCmd(clear_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3627,8 +3605,7 @@ const GLsizei count = 1; const GLenum attachments[] = {GL_COLOR_ATTACHMENT0}; - DiscardFramebufferEXTImmediate& discard_cmd = - *GetImmediateAs<DiscardFramebufferEXTImmediate>(); + auto& discard_cmd = *GetImmediateAs<cmds::DiscardFramebufferEXTImmediate>(); discard_cmd.Init(target, count, attachments); EXPECT_CALL(*gl_, DiscardFramebufferEXT(target, count, _)) @@ -3656,9 +3633,9 @@ 0, GL_NO_ERROR); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - GetIntegerv cmd; + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); + cmds::GetIntegerv cmd; result->size = 0; EXPECT_CALL(*gl_, GetError()) @@ -3688,7 +3665,7 @@ TEST_P(GLES3DecoderTest, FramebufferTextureLayerNoBoundFramebuffer) { DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); EXPECT_CALL(*gl_, FramebufferTextureLayer(_, _, _, _, _)).Times(0); - FramebufferTextureLayer cmd; + cmds::FramebufferTextureLayer cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, client_texture_id_, 4, 5); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3699,7 +3676,7 @@ GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); EXPECT_CALL(*gl_, FramebufferTextureLayer(_, _, _, _, _)).Times(0); - FramebufferTextureLayer cmd; + cmds::FramebufferTextureLayer cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, client_texture_id_, 4, 5); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3714,7 +3691,7 @@ kServiceTextureId, 4, 5)) .Times(1) .RetiresOnSaturation(); - FramebufferTextureLayer cmd; + cmds::FramebufferTextureLayer cmd; cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, client_texture_id_, 4, 5); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3729,7 +3706,7 @@ kServiceTextureId, 4, 5)) .Times(1) .RetiresOnSaturation(); - FramebufferTextureLayer cmd; + cmds::FramebufferTextureLayer cmd; cmd.Init(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, client_texture_id_, 4, 5); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -3770,8 +3747,7 @@ EXPECT_CALL(*gl_, InvalidateFramebuffer(target, 0, _)) .Times(1) .RetiresOnSaturation(); - InvalidateFramebufferImmediate& cmd = - *GetImmediateAs<InvalidateFramebufferImmediate>(); + auto& cmd = *GetImmediateAs<cmds::InvalidateFramebufferImmediate>(); cmd.Init(target, count, attachments); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(attachments))); @@ -3799,7 +3775,7 @@ TEST_P(GLES3DecoderTest, BlitFramebufferFeedbackLoopDefaultFramebuffer) { // Run BlitFramebufferCHROMIUM targetting the default framebuffer for both // read and draw, should result in a feedback loop. - BlitFramebufferCHROMIUM cmd; + cmds::BlitFramebufferCHROMIUM cmd; cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_COLOR_BUFFER_BIT, GL_LINEAR); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3838,7 +3814,7 @@ EXPECT_CALL(*gl_, ReadBuffer(GL_NONE)) .Times(1) .RetiresOnSaturation(); - ReadBuffer cmd; + cmds::ReadBuffer cmd; cmd.Init(GL_NONE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3855,7 +3831,7 @@ 1.0f, // depth false, // scissor test 0, 0, 128, 64); - BlitFramebufferCHROMIUM cmd; + cmds::BlitFramebufferCHROMIUM cmd; cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_COLOR_BUFFER_BIT, GL_LINEAR); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); // Generate INVALID_OPERATION because of missing read buffer image. @@ -3914,7 +3890,7 @@ EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER)) .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) .RetiresOnSaturation(); - BlitFramebufferCHROMIUM cmd; + cmds::BlitFramebufferCHROMIUM cmd; cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_DEPTH_BUFFER_BIT, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3929,7 +3905,7 @@ DoBindFramebuffer(GL_DRAW_FRAMEBUFFER, color_fbo, kNewServiceId); { EXPECT_CALL(*gl_, BlitFramebuffer(0, 0, 1, 1, 0, 0, 1, 1, _, _)).Times(0); - BlitFramebufferCHROMIUM cmd; + cmds::BlitFramebufferCHROMIUM cmd; cmd.Init(0, 0, 1, 1, 0, 0, 1, 1, GL_DEPTH_BUFFER_BIT, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3964,7 +3940,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); // Setup "render to" texture. DoBindTexture(GL_TEXTURE_2D, kFBOClientTextureId, kFBOServiceTextureId); @@ -4006,7 +3982,7 @@ .Times(1) .RetiresOnSaturation(); - Clear cmd; + cmds::Clear cmd; cmd.Init(GL_COLOR_BUFFER_BIT); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4028,7 +4004,7 @@ .Times(1) .RetiresOnSaturation(); EXPECT_CALL(*gl_, Scissor(101, 202, 3, 4)).Times(1).RetiresOnSaturation(); - Clear cmd; + cmds::Clear cmd; cmd.Init(GL_COLOR_BUFFER_BIT); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError());
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc index 31c4015..6ec6b2fa 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -49,11 +49,9 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_P(GLES2DecoderWithShaderTest, GetProgramInfoCHROMIUMValidArgs) { const uint32_t kBucketId = 123; - GetProgramInfoCHROMIUM cmd; + cmds::GetProgramInfoCHROMIUM cmd; cmd.Init(client_program_id_, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); @@ -64,7 +62,7 @@ const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); EXPECT_TRUE(bucket == nullptr); - GetProgramInfoCHROMIUM cmd; + cmds::GetProgramInfoCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -81,7 +79,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetUniformBlocksCHROMIUMValidArgs) { const uint32_t kBucketId = 123; - GetUniformBlocksCHROMIUM cmd; + cmds::GetUniformBlocksCHROMIUM cmd; cmd.Init(client_program_id_, kBucketId); EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_TRUE)) @@ -103,7 +101,7 @@ const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); EXPECT_TRUE(bucket == nullptr); - GetUniformBlocksCHROMIUM cmd; + cmds::GetUniformBlocksCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -118,7 +116,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetUniformsES3CHROMIUMValidArgs) { const uint32_t kBucketId = 123; - GetUniformsES3CHROMIUM cmd; + cmds::GetUniformsES3CHROMIUM cmd; cmd.Init(client_program_id_, kBucketId); EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_TRUE)) @@ -140,7 +138,7 @@ const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); EXPECT_TRUE(bucket == nullptr); - GetUniformsES3CHROMIUM cmd; + cmds::GetUniformsES3CHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -156,7 +154,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetTransformFeedbackVaryingsCHROMIUMValidArgs) { const uint32_t kBucketId = 123; - GetTransformFeedbackVaryingsCHROMIUM cmd; + cmds::GetTransformFeedbackVaryingsCHROMIUM cmd; cmd.Init(client_program_id_, kBucketId); EXPECT_CALL(*(gl_.get()), GetProgramiv(kServiceProgramId, @@ -189,7 +187,7 @@ const uint32_t kBucketId = 123; CommonDecoder::Bucket* bucket = decoder_->GetBucket(kBucketId); EXPECT_TRUE(bucket == nullptr); - GetTransformFeedbackVaryingsCHROMIUM cmd; + cmds::GetTransformFeedbackVaryingsCHROMIUM cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -204,10 +202,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformivSucceeds) { - GetUniformiv::Result* result = - static_cast<GetUniformiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformiv cmd; + cmds::GetUniformiv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformiv(kServiceProgramId, kUniform2RealLocation, _)) @@ -218,10 +216,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformivArrayElementSucceeds) { - GetUniformiv::Result* result = - static_cast<GetUniformiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformiv cmd; + cmds::GetUniformiv cmd; cmd.Init(client_program_id_, kUniform2ElementFakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, @@ -233,10 +231,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformivBadProgramFails) { - GetUniformiv::Result* result = - static_cast<GetUniformiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformiv cmd; + cmds::GetUniformiv cmd; // non-existant program cmd.Init(kInvalidClientId, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); @@ -259,7 +257,7 @@ .Times(1) .WillOnce(Return(kNewServiceId)) .RetiresOnSaturation(); - CreateProgram cmd2; + cmds::CreateProgram cmd2; cmd2.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); result->size = kInitialResult; @@ -271,10 +269,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformivBadLocationFails) { - GetUniformiv::Result* result = - static_cast<GetUniformiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformiv cmd; + cmds::GetUniformiv cmd; // invalid location cmd.Init(client_program_id_, kInvalidUniformLocation, shared_memory_id_, kSharedMemoryOffset); @@ -285,7 +283,7 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformivBadSharedMemoryFails) { - GetUniformiv cmd; + cmds::GetUniformiv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, kInvalidSharedMemoryId, @@ -298,10 +296,10 @@ } TEST_P(GLES3DecoderWithShaderTest, GetUniformuivSucceeds) { - GetUniformuiv::Result* result = - static_cast<GetUniformuiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformuiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformuiv cmd; + cmds::GetUniformuiv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformuiv(kServiceProgramId, kUniform2RealLocation, _)) @@ -312,10 +310,10 @@ } TEST_P(GLES3DecoderWithShaderTest, GetUniformuivArrayElementSucceeds) { - GetUniformuiv::Result* result = - static_cast<GetUniformuiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformuiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformuiv cmd; + cmds::GetUniformuiv cmd; cmd.Init(client_program_id_, kUniform2ElementFakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, @@ -327,10 +325,10 @@ } TEST_P(GLES3DecoderWithShaderTest, GetUniformuivBadProgramFails) { - GetUniformuiv::Result* result = - static_cast<GetUniformuiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformuiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformuiv cmd; + cmds::GetUniformuiv cmd; // non-existant program cmd.Init(kInvalidClientId, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); @@ -353,7 +351,7 @@ .Times(1) .WillOnce(Return(kNewServiceId)) .RetiresOnSaturation(); - CreateProgram cmd2; + cmds::CreateProgram cmd2; cmd2.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); result->size = kInitialResult; @@ -365,10 +363,10 @@ } TEST_P(GLES3DecoderWithShaderTest, GetUniformuivBadLocationFails) { - GetUniformuiv::Result* result = - static_cast<GetUniformuiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformuiv::Result*>(shared_memory_address_); result->size = 0; - GetUniformuiv cmd; + cmds::GetUniformuiv cmd; // invalid location cmd.Init(client_program_id_, kInvalidUniformLocation, shared_memory_id_, kSharedMemoryOffset); @@ -379,7 +377,7 @@ } TEST_P(GLES3DecoderWithShaderTest, GetUniformuivBadSharedMemoryFails) { - GetUniformuiv cmd; + cmds::GetUniformuiv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, kInvalidSharedMemoryId, @@ -392,10 +390,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformfvSucceeds) { - GetUniformfv::Result* result = - static_cast<GetUniformfv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformfv::Result*>(shared_memory_address_); result->size = 0; - GetUniformfv cmd; + cmds::GetUniformfv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformfv(kServiceProgramId, kUniform2RealLocation, _)) @@ -406,10 +404,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformfvArrayElementSucceeds) { - GetUniformfv::Result* result = - static_cast<GetUniformfv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformfv::Result*>(shared_memory_address_); result->size = 0; - GetUniformfv cmd; + cmds::GetUniformfv cmd; cmd.Init(client_program_id_, kUniform2ElementFakeLocation, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, @@ -421,10 +419,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformfvBadProgramFails) { - GetUniformfv::Result* result = - static_cast<GetUniformfv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformfv::Result*>(shared_memory_address_); result->size = 0; - GetUniformfv cmd; + cmds::GetUniformfv cmd; // non-existant program cmd.Init(kInvalidClientId, kUniform2FakeLocation, shared_memory_id_, kSharedMemoryOffset); @@ -447,7 +445,7 @@ .Times(1) .WillOnce(Return(kNewServiceId)) .RetiresOnSaturation(); - CreateProgram cmd2; + cmds::CreateProgram cmd2; cmd2.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); result->size = kInitialResult; @@ -459,10 +457,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformfvBadLocationFails) { - GetUniformfv::Result* result = - static_cast<GetUniformfv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetUniformfv::Result*>(shared_memory_address_); result->size = 0; - GetUniformfv cmd; + cmds::GetUniformfv cmd; // invalid location cmd.Init(client_program_id_, kInvalidUniformLocation, shared_memory_id_, kSharedMemoryOffset); @@ -473,7 +471,7 @@ } TEST_P(GLES2DecoderWithShaderTest, GetUniformfvBadSharedMemoryFails) { - GetUniformfv cmd; + cmds::GetUniformfv cmd; cmd.Init(client_program_id_, kUniform2FakeLocation, kInvalidSharedMemoryId, @@ -486,9 +484,9 @@ } TEST_P(GLES2DecoderWithShaderTest, GetAttachedShadersSucceeds) { - GetAttachedShaders cmd; - typedef GetAttachedShaders::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetAttachedShaders cmd; + using Result = cmds::GetAttachedShaders::Result; + auto* result = static_cast<Result*>(shared_memory_address_); result->size = 0; EXPECT_CALL(*gl_, GetAttachedShaders(kServiceProgramId, 1, _, _)).WillOnce( DoAll(SetArgPointee<2>(1), SetArgPointee<3>(kServiceShaderId))); @@ -501,9 +499,9 @@ } TEST_P(GLES2DecoderWithShaderTest, GetAttachedShadersResultNotInitFail) { - GetAttachedShaders cmd; - typedef GetAttachedShaders::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetAttachedShaders cmd; + using Result = cmds::GetAttachedShaders::Result; + auto* result = static_cast<Result*>(shared_memory_address_); result->size = 1; EXPECT_CALL(*gl_, GetAttachedShaders(_, _, _, _)).Times(0); cmd.Init(client_program_id_, shared_memory_id_, shared_memory_offset_, @@ -512,9 +510,9 @@ } TEST_P(GLES2DecoderWithShaderTest, GetAttachedShadersBadProgramFails) { - GetAttachedShaders cmd; - typedef GetAttachedShaders::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetAttachedShaders cmd; + using Result = cmds::GetAttachedShaders::Result; + auto* result = static_cast<Result*>(shared_memory_address_); result->size = 0; EXPECT_CALL(*gl_, GetAttachedShaders(_, _, _, _)).Times(0); cmd.Init(kInvalidClientId, shared_memory_id_, shared_memory_offset_, @@ -525,8 +523,8 @@ } TEST_P(GLES2DecoderWithShaderTest, GetAttachedShadersBadSharedMemoryFails) { - GetAttachedShaders cmd; - typedef GetAttachedShaders::Result Result; + cmds::GetAttachedShaders cmd; + using Result = cmds::GetAttachedShaders::Result; cmd.Init(client_program_id_, kInvalidSharedMemoryId, shared_memory_offset_, Result::ComputeSize(1).ValueOrDie()); EXPECT_CALL(*gl_, GetAttachedShaders(_, _, _, _)).Times(0); @@ -544,9 +542,9 @@ init.bind_generates_resource = true; InitDecoder(init); - GetShaderPrecisionFormat cmd; - typedef GetShaderPrecisionFormat::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetShaderPrecisionFormat cmd; + auto* result = static_cast<cmds::GetShaderPrecisionFormat::Result*>( + shared_memory_address_); result->success = 0; const GLint range[2] = {62, 62}; const GLint precision = 16; @@ -567,9 +565,9 @@ } TEST_P(GLES2DecoderWithShaderTest, GetShaderPrecisionFormatResultNotInitFails) { - GetShaderPrecisionFormat cmd; - typedef GetShaderPrecisionFormat::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetShaderPrecisionFormat cmd; + auto* result = static_cast<cmds::GetShaderPrecisionFormat::Result*>( + shared_memory_address_); result->success = 1; // NOTE: GL might not be called. There is no Desktop OpenGL equivalent cmd.Init(GL_VERTEX_SHADER, @@ -580,10 +578,10 @@ } TEST_P(GLES2DecoderWithShaderTest, GetShaderPrecisionFormatBadArgsFails) { - typedef GetShaderPrecisionFormat::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = static_cast<cmds::GetShaderPrecisionFormat::Result*>( + shared_memory_address_); result->success = 0; - GetShaderPrecisionFormat cmd; + cmds::GetShaderPrecisionFormat cmd; cmd.Init( GL_TEXTURE_2D, GL_HIGH_FLOAT, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -599,7 +597,7 @@ TEST_P(GLES2DecoderWithShaderTest, GetShaderPrecisionFormatBadSharedMemoryFails) { - GetShaderPrecisionFormat cmd; + cmds::GetShaderPrecisionFormat cmd; cmd.Init(GL_VERTEX_SHADER, GL_HIGH_FLOAT, kInvalidSharedMemoryId, @@ -615,9 +613,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveUniformSucceeds) { const GLuint kUniformIndex = 1; const uint32_t kBucketId = 123; - GetActiveUniform cmd; - typedef GetActiveUniform::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniform cmd; + auto* result = + static_cast<cmds::GetActiveUniform::Result*>(shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kUniformIndex, @@ -640,9 +638,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveUniformResultNotInitFails) { const GLuint kUniformIndex = 1; const uint32_t kBucketId = 123; - GetActiveUniform cmd; - typedef GetActiveUniform::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniform cmd; + auto* result = + static_cast<cmds::GetActiveUniform::Result*>(shared_memory_address_); result->success = 1; cmd.Init(client_program_id_, kUniformIndex, @@ -655,9 +653,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveUniformBadProgramFails) { const GLuint kUniformIndex = 1; const uint32_t kBucketId = 123; - GetActiveUniform cmd; - typedef GetActiveUniform::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniform cmd; + auto* result = + static_cast<cmds::GetActiveUniform::Result*>(shared_memory_address_); result->success = 0; cmd.Init(kInvalidClientId, kUniformIndex, @@ -682,9 +680,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveUniformBadIndexFails) { const uint32_t kBucketId = 123; - GetActiveUniform cmd; - typedef GetActiveUniform::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniform cmd; + auto* result = + static_cast<cmds::GetActiveUniform::Result*>(shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kBadUniformIndex, @@ -699,7 +697,7 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveUniformBadSharedMemoryFails) { const GLuint kUniformIndex = 1; const uint32_t kBucketId = 123; - GetActiveUniform cmd; + cmds::GetActiveUniform cmd; cmd.Init(client_program_id_, kUniformIndex, kBucketId, @@ -716,9 +714,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockNameSucceeds) { const uint32_t kBucketId = 123; - GetActiveUniformBlockName cmd; - typedef GetActiveUniformBlockName::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockName cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockName::Result*>( + shared_memory_address_); *result = 0; cmd.Init(client_program_id_, 0, @@ -751,9 +749,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockNameUnlinkedProgram) { const uint32_t kBucketId = 123; - GetActiveUniformBlockName cmd; - typedef GetActiveUniformBlockName::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockName cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockName::Result*>( + shared_memory_address_); *result = 0; cmd.Init(client_program_id_, 0, @@ -771,9 +769,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockNameResultNotInitFails) { const uint32_t kBucketId = 123; - GetActiveUniformBlockName cmd; - typedef GetActiveUniformBlockName::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockName cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockName::Result*>( + shared_memory_address_); *result = 1; cmd.Init(client_program_id_, 0, @@ -785,9 +783,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockNameBadProgramFails) { const uint32_t kBucketId = 123; - GetActiveUniformBlockName cmd; - typedef GetActiveUniformBlockName::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockName cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockName::Result*>( + shared_memory_address_); *result = 0; cmd.Init(kInvalidClientId, 0, @@ -802,7 +800,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockNameBadSharedMemoryFails) { const uint32_t kBucketId = 123; - GetActiveUniformBlockName cmd; + cmds::GetActiveUniformBlockName cmd; cmd.Init(client_program_id_, 0, kBucketId, @@ -818,9 +816,9 @@ } TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivSucceeds) { - GetActiveUniformBlockiv cmd; - typedef GetActiveUniformBlockiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockiv cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockiv::Result*>( + shared_memory_address_); GLenum kPname[] { GL_UNIFORM_BLOCK_BINDING, GL_UNIFORM_BLOCK_DATA_SIZE, @@ -864,9 +862,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivSucceedsZeroUniforms) { - GetActiveUniformBlockiv cmd; - typedef GetActiveUniformBlockiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockiv cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockiv::Result*>( + shared_memory_address_); result->SetNumResults(0); cmd.Init(client_program_id_, 0, @@ -895,9 +893,9 @@ } TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivUnlinkedProgram) { - GetActiveUniformBlockiv cmd; - typedef GetActiveUniformBlockiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockiv cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockiv::Result*>( + shared_memory_address_); result->SetNumResults(0); cmd.Init(client_program_id_, 0, @@ -914,9 +912,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivResultNotInitFails) { - GetActiveUniformBlockiv cmd; - typedef GetActiveUniformBlockiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockiv cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockiv::Result*>( + shared_memory_address_); result->SetNumResults(1); // Should be initialized to 0. cmd.Init(client_program_id_, 0, @@ -930,9 +928,9 @@ } TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivBadProgramFails) { - GetActiveUniformBlockiv cmd; - typedef GetActiveUniformBlockiv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveUniformBlockiv cmd; + auto* result = static_cast<cmds::GetActiveUniformBlockiv::Result*>( + shared_memory_address_); result->SetNumResults(0); cmd.Init(kInvalidClientId, 0, @@ -946,7 +944,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformBlockivBadSharedMemoryFails) { - GetActiveUniformBlockiv cmd; + cmds::GetActiveUniformBlockiv cmd; EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_TRUE)) .WillOnce(SetArgPointee<2>(GL_TRUE)) @@ -968,9 +966,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveAttribSucceeds) { const GLuint kAttribIndex = 1; const uint32_t kBucketId = 123; - GetActiveAttrib cmd; - typedef GetActiveAttrib::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveAttrib cmd; + auto* result = + static_cast<cmds::GetActiveAttrib::Result*>(shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kAttribIndex, @@ -992,9 +990,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveAttribResultNotInitFails) { const GLuint kAttribIndex = 1; const uint32_t kBucketId = 123; - GetActiveAttrib cmd; - typedef GetActiveAttrib::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveAttrib cmd; + auto* result = + static_cast<cmds::GetActiveAttrib::Result*>(shared_memory_address_); result->success = 1; cmd.Init(client_program_id_, kAttribIndex, @@ -1007,9 +1005,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveAttribBadProgramFails) { const GLuint kAttribIndex = 1; const uint32_t kBucketId = 123; - GetActiveAttrib cmd; - typedef GetActiveAttrib::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveAttrib cmd; + auto* result = + static_cast<cmds::GetActiveAttrib::Result*>(shared_memory_address_); result->success = 0; cmd.Init(kInvalidClientId, kAttribIndex, @@ -1034,9 +1032,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveAttribBadIndexFails) { const uint32_t kBucketId = 123; - GetActiveAttrib cmd; - typedef GetActiveAttrib::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetActiveAttrib cmd; + auto* result = + static_cast<cmds::GetActiveAttrib::Result*>(shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kBadAttribIndex, @@ -1051,7 +1049,7 @@ TEST_P(GLES2DecoderWithShaderTest, GetActiveAttribBadSharedMemoryFails) { const GLuint kAttribIndex = 1; const uint32_t kBucketId = 123; - GetActiveAttrib cmd; + cmds::GetActiveAttrib cmd; cmd.Init(client_program_id_, kAttribIndex, kBucketId, @@ -1075,9 +1073,9 @@ const char kValidStrEnd = 0; const GLuint kIndices[] = { 1, 2 }; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); - GetUniformIndices::Result* result = - static_cast<GetUniformIndices::Result*>(shared_memory_address_); - GetUniformIndices cmd; + auto* result = + static_cast<cmds::GetUniformIndices::Result*>(shared_memory_address_); + cmds::GetUniformIndices cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformIndices(kServiceProgramId, kCount, _, _)) @@ -1107,9 +1105,9 @@ const size_t kCount = base::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); - GetUniformIndices::Result* result = - static_cast<GetUniformIndices::Result*>(shared_memory_address_); - GetUniformIndices cmd; + auto* result = + static_cast<cmds::GetUniformIndices::Result*>(shared_memory_address_); + cmds::GetUniformIndices cmd; // None-existant program cmd.Init(kInvalidClientId, kBucketId, shared_memory_id_, kSharedMemoryOffset); result->size = 0; @@ -1137,9 +1135,9 @@ const char kValidStrEnd = 0; const GLuint kIndices[] = { 1, 2 }; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); - GetUniformIndices::Result* result = - static_cast<GetUniformIndices::Result*>(shared_memory_address_); - GetUniformIndices cmd; + auto* result = + static_cast<cmds::GetUniformIndices::Result*>(shared_memory_address_); + cmds::GetUniformIndices cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformIndices(kServiceProgramId, kCount, _, _)) @@ -1166,9 +1164,9 @@ const size_t kCount = base::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); - GetUniformIndices::Result* result = - static_cast<GetUniformIndices::Result*>(shared_memory_address_); - GetUniformIndices cmd; + auto* result = + static_cast<cmds::GetUniformIndices::Result*>(shared_memory_address_); + cmds::GetUniformIndices cmd; result->size = 1976; // Any value other than 0. cmd.Init(kInvalidClientId, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); @@ -1182,9 +1180,9 @@ const size_t kCount = base::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); - GetUniformIndices::Result* result = - static_cast<GetUniformIndices::Result*>(shared_memory_address_); - GetUniformIndices cmd; + auto* result = + static_cast<cmds::GetUniformIndices::Result*>(shared_memory_address_); + cmds::GetUniformIndices cmd; cmd.Init(client_program_id_, kBucketId, kInvalidSharedMemoryId, @@ -1203,9 +1201,9 @@ const GLint kResults[] = { 1976, 321 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; cmd.Init(client_program_id_, kBucketId, GL_UNIFORM_TYPE, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, @@ -1230,9 +1228,9 @@ const GLuint kIndices[] = { 1, 2 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; // None-existant program cmd.Init(kInvalidClientId, kBucketId, GL_UNIFORM_TYPE, shared_memory_id_, kSharedMemoryOffset); @@ -1257,9 +1255,9 @@ const GLuint kIndices[] = { 1, 100 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; cmd.Init(client_program_id_, kBucketId, GL_UNIFORM_TYPE, shared_memory_id_, kSharedMemoryOffset); result->size = 0; @@ -1273,9 +1271,9 @@ const GLuint kIndices[] = { 1, 2 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; // GL_UNIFORM_BLOCK_NAME_LENGTH should not be supported. cmd.Init(client_program_id_, kBucketId, GL_UNIFORM_BLOCK_NAME_LENGTH, shared_memory_id_, kSharedMemoryOffset); @@ -1297,9 +1295,9 @@ const GLuint kIndices[] = { 1, 2 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; cmd.Init(client_program_id_, kBucketId, GL_UNIFORM_TYPE, shared_memory_id_, kSharedMemoryOffset); result->size = 1976; // Any value other than 0. @@ -1311,9 +1309,9 @@ const GLuint kIndices[] = { 1, 2 }; const size_t kCount = base::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); - GetActiveUniformsiv::Result* result = - static_cast<GetActiveUniformsiv::Result*>(shared_memory_address_); - GetActiveUniformsiv cmd; + auto* result = + static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); + cmds::GetActiveUniformsiv cmd; result->size = 0; cmd.Init(client_program_id_, kBucketId, @@ -1333,14 +1331,14 @@ const char* kSource[] = {kSource0}; const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); - ShaderSourceBucket bucket_cmd; + cmds::ShaderSourceBucket bucket_cmd; bucket_cmd.Init(client_shader_id_, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(bucket_cmd)); ClearSharedMemory(); const char* kInfo = "hello"; - CompileShader compile_cmd; - GetShaderInfoLog cmd; + cmds::CompileShader compile_cmd; + cmds::GetShaderInfoLog cmd; EXPECT_CALL(*gl_, ShaderSource(kServiceShaderId, 1, _, _)); EXPECT_CALL(*gl_, CompileShader(kServiceShaderId)); EXPECT_CALL(*gl_, GetShaderiv(kServiceShaderId, GL_COMPILE_STATUS, _)) @@ -1366,7 +1364,7 @@ TEST_P(GLES2DecoderWithShaderTest, GetShaderInfoLogInvalidArgs) { const uint32_t kBucketId = 123; - GetShaderInfoLog cmd; + cmds::GetShaderInfoLog cmd; cmd.Init(kInvalidClientId, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -1380,9 +1378,9 @@ const GLsizei kBufferSize = static_cast<GLsizei>(strlen(kName) + 1); const GLsizei kSize = 2; const GLenum kType = GL_FLOAT_VEC2; - GetTransformFeedbackVarying cmd; - typedef GetTransformFeedbackVarying::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetTransformFeedbackVarying cmd; + auto* result = static_cast<cmds::GetTransformFeedbackVarying::Result*>( + shared_memory_address_); result->success = 0; EXPECT_CALL(*gl_, GetProgramiv(kServiceProgramId, GL_LINK_STATUS, _)) .WillOnce(SetArgPointee<2>(GL_TRUE)) @@ -1422,9 +1420,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetTransformFeedbackVaryingNotInitFails) { const GLuint kIndex = 1; const uint32_t kBucketId = 123; - GetTransformFeedbackVarying cmd; - typedef GetTransformFeedbackVarying::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetTransformFeedbackVarying cmd; + auto* result = static_cast<cmds::GetTransformFeedbackVarying::Result*>( + shared_memory_address_); result->success = 1; cmd.Init(client_program_id_, kIndex, @@ -1437,9 +1435,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetTransformFeedbackVaryingBadProgramFails) { const GLuint kIndex = 1; const uint32_t kBucketId = 123; - GetTransformFeedbackVarying cmd; - typedef GetTransformFeedbackVarying::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetTransformFeedbackVarying cmd; + auto* result = static_cast<cmds::GetTransformFeedbackVarying::Result*>( + shared_memory_address_); result->success = 0; cmd.Init(kInvalidClientId, kIndex, @@ -1455,9 +1453,9 @@ const GLuint kIndex = 1; const uint32_t kBucketId = 123; const GLsizei kNumVaryings = 1; - GetTransformFeedbackVarying cmd; - typedef GetTransformFeedbackVarying::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetTransformFeedbackVarying cmd; + auto* result = static_cast<cmds::GetTransformFeedbackVarying::Result*>( + shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kIndex, @@ -1480,9 +1478,9 @@ GetTransformFeedbackVaryingBadSharedMemoryFails) { const GLuint kIndex = 1; const uint32_t kBucketId = 123; - GetTransformFeedbackVarying cmd; - typedef GetTransformFeedbackVarying::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + cmds::GetTransformFeedbackVarying cmd; + auto* result = static_cast<cmds::GetTransformFeedbackVarying::Result*>( + shared_memory_address_); result->success = 0; cmd.Init(client_program_id_, kIndex, @@ -1505,13 +1503,13 @@ const char* kSource[] = {kSource0}; const char kValidStrEnd = 0; SetBucketAsCStrings(kInBucketId, 1, kSource, 1, kValidStrEnd); - ShaderSourceBucket bucket_cmd; + cmds::ShaderSourceBucket bucket_cmd; bucket_cmd.Init(client_shader_id_, kInBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(bucket_cmd)); ClearSharedMemory(); // Compile shader should not actually call any GL calls yet. - CompileShader cmd; + cmds::CompileShader cmd; cmd.Init(client_shader_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1526,10 +1524,10 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - GetShaderiv::Result* result = - static_cast<GetShaderiv::Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetShaderiv::Result*>(shared_memory_address_); result->size = 0; - GetShaderiv status_cmd; + cmds::GetShaderiv status_cmd; status_cmd.Init(client_shader_id_, GL_COMPILE_STATUS, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(status_cmd)); @@ -1537,7 +1535,7 @@ } TEST_P(GLES2DecoderTest, CompileShaderInvalidArgs) { - CompileShader cmd; + cmds::CompileShader cmd; cmd.Init(kInvalidClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -1555,11 +1553,11 @@ const char* kSource[] = { kSource0 }; const char kValidStrEnd = 0; SetBucketAsCStrings(kInBucketId, 1, kSource, 1, kValidStrEnd); - ShaderSourceBucket cmd; + cmds::ShaderSourceBucket cmd; cmd.Init(client_shader_id_, kInBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); ClearSharedMemory(); - GetShaderSource get_cmd; + cmds::GetShaderSource get_cmd; get_cmd.Init(client_shader_id_, kOutBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(get_cmd)); CommonDecoder::Bucket* bucket = decoder_->GetBucket(kOutBucketId); @@ -1576,7 +1574,7 @@ const char* kSource[] = { kSource0 }; const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); - ShaderSourceBucket cmd; + cmds::ShaderSourceBucket cmd; cmd.Init(client_program_id_, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -1589,7 +1587,7 @@ const char* kSource[] = { kSource0 }; const char kValidStrEnd = 0; SetBucketAsCStrings(kInBucketId, 1, kSource, 1, kValidStrEnd); - ShaderSourceBucket cmd; + cmds::ShaderSourceBucket cmd; cmd.Init(client_shader_id_, kInBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -1597,21 +1595,21 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1iValidArgs) { EXPECT_CALL(*gl_, Uniform1i(kUniform1RealLocation, 2)); - Uniform1i cmd; + cmds::Uniform1i cmd; cmd.Init(kUniform1FakeLocation, 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } TEST_P(GLES3DecoderWithShaderTest, Uniform1uiValidArgs) { EXPECT_CALL(*gl_, Uniform1uiv(kUniform4RealLocation, 1, _)); - Uniform1ui cmd; + cmds::Uniform1ui cmd; cmd.Init(kUniform4FakeLocation, 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_P(GLES2DecoderWithShaderTest, Uniform1ivImmediateValidArgs) { - Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1ivImmediate>(); GLint temp[1] = { 0, }; @@ -1623,7 +1621,7 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1ivImmediateInvalidValidArgs) { EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0); - Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1ivImmediate>(); GLint temp[1 * 2] = { 0, }; @@ -1634,7 +1632,7 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1ivZeroCount) { EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0); - Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1ivImmediate>(); GLint temp = 0; cmd.Init(kUniform1FakeLocation, 0, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); @@ -1643,7 +1641,7 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1iSamplerIsLmited) { EXPECT_CALL(*gl_, Uniform1i(_, _)).Times(0); - Uniform1i cmd; + cmds::Uniform1i cmd; cmd.Init(kUniform1FakeLocation, kNumTextureUnits); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -1651,7 +1649,7 @@ TEST_P(GLES2DecoderWithShaderTest, Uniform1ivSamplerIsLimited) { EXPECT_CALL(*gl_, Uniform1iv(_, _, _)).Times(0); - Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1ivImmediate>(); GLint temp[] = {kNumTextureUnits}; cmd.Init(kUniform1FakeLocation, 1, &temp[0]); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); @@ -1659,7 +1657,7 @@ } TEST_P(GLES2DecoderWithShaderTest, Uniform1ivArray) { - Uniform1ivImmediate& cmd = *GetImmediateAs<Uniform1ivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1ivImmediate>(); GLint temp[3] = { 0, 1, 2, }; @@ -1678,8 +1676,7 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform1uivImmediateValidArgs) { - Uniform1uivImmediate& cmd = - *GetImmediateAs<Uniform1uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1uivImmediate>(); GLuint temp[1] = { 0, }; @@ -1692,7 +1689,7 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform1uivImmediateInvalidType) { EXPECT_CALL(*gl_, Uniform1uiv(_, _, _)).Times(0); - Uniform1uivImmediate& cmd = *GetImmediateAs<Uniform1uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1uivImmediate>(); GLuint temp[1 * 2] = { 0, }; @@ -1704,7 +1701,7 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform1uivZeroCount) { EXPECT_CALL(*gl_, Uniform1uiv(_, _, _)).Times(0); - Uniform1uivImmediate& cmd = *GetImmediateAs<Uniform1uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform1uivImmediate>(); GLuint temp = 0; cmd.Init(kUniform4FakeLocation, 0, &temp); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(temp))); @@ -1713,15 +1710,14 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform2uiValidArgs) { EXPECT_CALL(*gl_, Uniform2uiv(kUniform5RealLocation, 1, _)); - Uniform2ui cmd; + cmds::Uniform2ui cmd; cmd.Init(kUniform5FakeLocation, 2, 3); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_P(GLES3DecoderWithShaderTest, Uniform2uivImmediateValidArgs) { - Uniform2uivImmediate& cmd = - *GetImmediateAs<Uniform2uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform2uivImmediate>(); GLuint temp[2 * 1] = { 0, }; @@ -1734,15 +1730,14 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform3uiValidArgs) { EXPECT_CALL(*gl_, Uniform3uiv(kUniform6RealLocation, 1, _)); - Uniform3ui cmd; + cmds::Uniform3ui cmd; cmd.Init(kUniform6FakeLocation, 2, 3, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_P(GLES3DecoderWithShaderTest, Uniform3uivImmediateValidArgs) { - Uniform3uivImmediate& cmd = - *GetImmediateAs<Uniform3uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform3uivImmediate>(); GLuint temp[3 * 1] = { 0, }; @@ -1755,15 +1750,14 @@ TEST_P(GLES3DecoderWithShaderTest, Uniform4uiValidArgs) { EXPECT_CALL(*gl_, Uniform4uiv(kUniform7RealLocation, 1, _)); - Uniform4ui cmd; + cmds::Uniform4ui cmd; cmd.Init(kUniform7FakeLocation, 2, 3, 4, 5); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } TEST_P(GLES3DecoderWithShaderTest, Uniform4uivImmediateValidArgs) { - Uniform4uivImmediate& cmd = - *GetImmediateAs<Uniform4uivImmediate>(); + auto& cmd = *GetImmediateAs<cmds::Uniform4uivImmediate>(); GLuint temp[4 * 1] = { 0, }; @@ -1779,7 +1773,7 @@ const GLint kLocation = 2; const char* kName = "testing"; SetBucketAsCString(kBucketId, kName); - BindAttribLocationBucket cmd; + cmds::BindAttribLocationBucket cmd; cmd.Init(client_program_id_, kLocation, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -1789,7 +1783,7 @@ const GLint kLocation = 2; const char* kName = "testing"; EXPECT_CALL(*gl_, BindAttribLocation(_, _, _)).Times(0); - BindAttribLocationBucket cmd; + cmds::BindAttribLocationBucket cmd; // check bucket does not exist. cmd.Init(client_program_id_, kLocation, kBucketId); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); @@ -1807,11 +1801,10 @@ TEST_P(GLES2DecoderWithShaderTest, GetAttribLocation) { const uint32_t kBucketId = 123; const char* kNonExistentName = "foobar"; - typedef GetAttribLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetAttribLocation::Result*>(); SetBucketAsCString(kBucketId, kAttrib2Name); *result = -1; - GetAttribLocation cmd; + cmds::GetAttribLocation cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1826,10 +1819,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetAttribLocationInvalidArgs) { const uint32_t kBucketId = 123; - typedef GetAttribLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetAttribLocation::Result*>(); *result = -1; - GetAttribLocation cmd; + cmds::GetAttribLocation cmd; // Check no bucket cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); @@ -1855,11 +1847,10 @@ TEST_P(GLES3DecoderWithShaderTest, GetFragDataLocation) { const uint32_t kBucketId = 123; - typedef GetFragDataLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetFragDataLocation::Result*>(); SetBucketAsCString(kBucketId, kOutputVariable1NameESSL3); *result = -1; - GetFragDataLocation cmd; + cmds::GetFragDataLocation cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1868,10 +1859,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetFragDataLocationInvalidArgs) { const uint32_t kBucketId = 123; - typedef GetFragDataLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetFragDataLocation::Result*>(); *result = -1; - GetFragDataLocation cmd; + cmds::GetFragDataLocation cmd; // Check no bucket cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); @@ -1900,11 +1890,10 @@ const uint32_t kBucketId = 123; const GLuint kIndex = 10; const char* kName = "color"; - typedef GetUniformBlockIndex::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetUniformBlockIndex::Result*>(); SetBucketAsCString(kBucketId, kName); *result = GL_INVALID_INDEX; - GetUniformBlockIndex cmd; + cmds::GetUniformBlockIndex cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_CALL(*gl_, GetUniformBlockIndex(kServiceProgramId, StrEq(kName))) @@ -1916,10 +1905,9 @@ TEST_P(GLES3DecoderWithShaderTest, GetUniformBlockIndexInvalidArgs) { const uint32_t kBucketId = 123; - typedef GetUniformBlockIndex::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetUniformBlockIndex::Result*>(); *result = GL_INVALID_INDEX; - GetUniformBlockIndex cmd; + cmds::GetUniformBlockIndex cmd; // Check no bucket cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); @@ -1947,11 +1935,10 @@ TEST_P(GLES2DecoderWithShaderTest, GetUniformLocation) { const uint32_t kBucketId = 123; const char* kNonExistentName = "foobar"; - typedef GetUniformLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetUniformLocation::Result*>(); SetBucketAsCString(kBucketId, kUniform2Name); *result = -1; - GetUniformLocation cmd; + cmds::GetUniformLocation cmd; cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1966,10 +1953,9 @@ TEST_P(GLES2DecoderWithShaderTest, GetUniformLocationInvalidArgs) { const uint32_t kBucketId = 123; - typedef GetUniformLocation::Result Result; - Result* result = GetSharedMemoryAs<Result*>(); + auto* result = GetSharedMemoryAs<cmds::GetUniformLocation::Result*>(); *result = -1; - GetUniformLocation cmd; + cmds::GetUniformLocation cmd; // Check no bucket cmd.Init(client_program_id_, kBucketId, shared_memory_id_, kSharedMemoryOffset); @@ -2002,8 +1988,8 @@ TEST_P(GLES3DecoderWithShaderTest, UniformBlockBindingValidArgs) { EXPECT_CALL(*gl_, UniformBlockBinding(kServiceProgramId, 1, 3)); - SpecializedSetup<UniformBlockBinding, 0>(true); - UniformBlockBinding cmd; + SpecializedSetup<cmds::UniformBlockBinding, 0>(true); + cmds::UniformBlockBinding cmd; cmd.Init(client_program_id_, 1, 3); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2017,7 +2003,7 @@ const char* kBadName2 = "testing[1]"; SetBucketAsCString(kBucketId, kName); - BindUniformLocationCHROMIUMBucket cmd; + cmds::BindUniformLocationCHROMIUMBucket cmd; cmd.Init(client_program_id_, kLocation, kBucketId); @@ -2100,7 +2086,7 @@ EXPECT_CALL(*gl_, UseProgram(kServiceProgramId)) .Times(1) .RetiresOnSaturation(); - UseProgram cmd; + cmds::UseProgram cmd; cmd.Init(client_program_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2109,7 +2095,7 @@ TEST_P(GLES2DecoderWithShaderTest, UseDeletedProgram) { DoDeleteProgram(client_program_id_, kServiceProgramId); { - UseProgram cmd; + cmds::UseProgram cmd; cmd.Init(client_program_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2122,7 +2108,7 @@ EXPECT_CALL(*gl_, DetachShader(kServiceProgramId, kServiceFragmentShaderId)) .Times(1) .RetiresOnSaturation(); - DetachShader cmd; + cmds::DetachShader cmd; cmd.Init(client_program_id_, client_fragment_shader_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc index 03ea64af..76f6ab4 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -65,14 +65,12 @@ namespace gpu { namespace gles2 { -using namespace cmds; - TEST_P(GLES2DecoderTest, GenerateMipmapWrongFormatsFails) { EXPECT_CALL(*gl_, GenerateMipmapEXT(_)).Times(0); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); DoTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, 16, 17, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0); - GenerateMipmap cmd; + cmds::GenerateMipmap cmd; cmd.Init(GL_TEXTURE_2D); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -95,7 +93,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_OUT_OF_MEMORY)) .RetiresOnSaturation(); - GenerateMipmap cmd; + cmds::GenerateMipmap cmd; cmd.Init(GL_TEXTURE_2D); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -116,7 +114,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - GenerateMipmap cmd; + cmds::GenerateMipmap cmd; cmd.Init(GL_TEXTURE_2D); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -130,7 +128,7 @@ { EXPECT_CALL(*gl_, TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 2)); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 2); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -144,7 +142,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - GenerateMipmap cmd; + cmds::GenerateMipmap cmd; cmd.Init(GL_TEXTURE_2D); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -152,8 +150,8 @@ TEST_P(GLES2DecoderTest, ActiveTextureValidArgs) { EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)); - SpecializedSetup<ActiveTexture, 0>(true); - ActiveTexture cmd; + SpecializedSetup<cmds::ActiveTexture, 0>(true); + cmds::ActiveTexture cmd; cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -161,8 +159,8 @@ TEST_P(GLES2DecoderTest, ActiveTextureInvalidArgs) { EXPECT_CALL(*gl_, ActiveTexture(_)).Times(0); - SpecializedSetup<ActiveTexture, 0>(false); - ActiveTexture cmd; + SpecializedSetup<cmds::ActiveTexture, 0>(false); + cmds::ActiveTexture cmd; cmd.Init(GL_TEXTURE0 - 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -189,7 +187,7 @@ shared_memory_address_)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 1, 1, 0, kWidth - 1, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -220,7 +218,7 @@ GL_UNSIGNED_BYTE, 0, 0); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; // Invalid target. cmd.Init(GL_TEXTURE0, 1, 0, 0, kWidth, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, @@ -314,7 +312,7 @@ kHeight, kDepth, GL_RGBA, GL_UNSIGNED_BYTE)) .Times(1) .RetiresOnSaturation(); - TexSubImage3D cmd; + cmds::TexSubImage3D cmd; cmd.Init(GL_TEXTURE_3D, 1, 1, 0, 0, kWidth - 1, kHeight, kDepth, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -338,7 +336,7 @@ DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); DoTexImage3D(GL_TEXTURE_3D, 1, GL_RGBA, kWidth, kHeight, kDepth, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0); - TexSubImage3D cmd; + cmds::TexSubImage3D cmd; // Invalid target. cmd.Init(GL_TEXTURE0, 1, 0, 0, 0, kWidth, kHeight, kDepth, GL_RGBA, @@ -444,7 +442,7 @@ shared_memory_address_)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 1, 1, 0, kWidth - 1, kHeight, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -469,7 +467,7 @@ shared_memory_address_)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 1, 1, 0, kWidth - 1, kHeight, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); @@ -487,7 +485,7 @@ CopyTexSubImage2D(GL_TEXTURE_2D, 1, 0, 0, 0, 0, kWidth, kHeight)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 1, 0, 0, 0, 0, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -507,7 +505,7 @@ GL_UNSIGNED_BYTE, 0, 0); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE0, 1, 0, 0, 0, 0, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -537,7 +535,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); EXPECT_CALL(*gl_, GetError()).WillRepeatedly(Return(GL_NO_ERROR)); for (int ii = 0; ii < 2; ++ii) { - TexImage2D cmd; + cmds::TexImage2D cmd; if (ii == 0) { EXPECT_CALL(*gl_, TexImage2D(GL_TEXTURE_2D, @@ -580,7 +578,7 @@ // Consider this TexSubImage2D command part of the previous TexImage2D // (last GL_TRUE argument). It will be skipped if there are bugs in the // redefinition case. - TexSubImage2D cmd2; + cmds::TexSubImage2D cmd2; cmd2.Init(GL_TEXTURE_2D, 0, 0, 0, kWidth, kHeight - 1, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_TRUE); @@ -620,7 +618,7 @@ _)) .Times(1) .RetiresOnSaturation(); - TexImage2D cmd; + cmds::TexImage2D cmd; cmd.Init(target, level, internal_format, width, height, format, type, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -652,7 +650,7 @@ target, level, internal_format, 0, 0, width, height, border)) .Times(1) .RetiresOnSaturation(); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_OUT_OF_MEMORY, GetGLError()); @@ -689,7 +687,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kNewClientId); + GenHelper<cmds::GenTexturesImmediate>(kNewClientId); TextureManager* manager = group().texture_manager(); @@ -732,7 +730,7 @@ 0, 0, width, height, border); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } else { - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError()); @@ -770,7 +768,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kNewClientId); + GenHelper<cmds::GenTexturesImmediate>(kNewClientId); TextureManager* manager = group().texture_manager(); @@ -819,7 +817,7 @@ 0, 0, width, height, border); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } else { - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, internal_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_FRAMEBUFFER_OPERATION, GetGLError()); @@ -844,7 +842,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); - CompressedTexImage3DBucket cmd; + cmds::CompressedTexImage3DBucket cmd; cmd.Init(kTarget, kLevel, kInternalFormat, @@ -892,7 +890,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); // Bad bucket - CompressedTexImage3DBucket cmd; + cmds::CompressedTexImage3DBucket cmd; cmd.Init(kTarget, kLevel, kInternalFormat, @@ -948,7 +946,7 @@ bucket->SetSize(kImageSize); { - CompressedTexImage3DBucket cmd; + cmds::CompressedTexImage3DBucket cmd; cmd.Init(kTarget, kLevel, kInternalFormat, @@ -960,7 +958,7 @@ } { - CompressedTexSubImage3DBucket cmd; + cmds::CompressedTexSubImage3DBucket cmd; cmd.Init(kTarget, kLevel, 0, 0, 0, @@ -979,7 +977,7 @@ const GLsizei kWidth = 4; const GLsizei kHeight = 4; - CopyTexSubImage3D cmd; + cmds::CopyTexSubImage3D cmd; cmd.Init(kTarget, kLevel, 0, 0, 0, @@ -1001,7 +999,7 @@ const GLsizei kHeight = 2; const GLsizei kDepth = 2; - CopyTexSubImage3D cmd; + cmds::CopyTexSubImage3D cmd; // No texture bound cmd.Init(kTarget, kLevel, kXoffset, kYoffset, kZoffset, @@ -1050,7 +1048,7 @@ kX, kY, kWidth, kHeight)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage3D cmd; + cmds::CopyTexSubImage3D cmd; cmd.Init(kTarget, kLevel, kXoffset, kYoffset, kZoffset, kX, kY, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1130,8 +1128,8 @@ DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTextureLayer tex_layer; - CopyTexSubImage3D cmd; + cmds::FramebufferTextureLayer tex_layer; + cmds::CopyTexSubImage3D cmd; // The source and the target for CopyTexSubImage3D are the same 3d texture. // But level of 3D texture != level of read attachment in fbo. @@ -1185,8 +1183,8 @@ DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTextureLayer tex_layer; - CopyTexSubImage3D cmd; + cmds::FramebufferTextureLayer tex_layer; + cmds::CopyTexSubImage3D cmd; // The source and the target for CopyTexSubImage3D are the same 3d texture. // But zoffset of 3D texture != layer of read attachment in fbo. @@ -1237,8 +1235,8 @@ DoBindFramebuffer( GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); - FramebufferTextureLayer tex_layer; - CopyTexSubImage3D cmd; + cmds::FramebufferTextureLayer tex_layer; + cmds::CopyTexSubImage3D cmd; // The source and the target for CopyTexSubImage3D are the same 3d texture. // And level / zoffset of 3D texture equal to level / layer of read attachment @@ -1309,7 +1307,7 @@ .Times(1) .RetiresOnSaturation(); - CopyTexSubImage3D cmd; + cmds::CopyTexSubImage3D cmd; cmd.Init(kTarget, kLevel, kXoffset, kYoffset, kZoffset, kX, kY, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -1333,7 +1331,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); - CompressedTexImage3DBucket cmd; + cmds::CompressedTexImage3DBucket cmd; cmd.Init(kTarget, kLevel, kInternalFormat, @@ -1361,7 +1359,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); - CompressedTexImage3DBucket tex_cmd; + cmds::CompressedTexImage3DBucket tex_cmd; tex_cmd.Init(kTarget, kLevel, kInternalFormat, @@ -1388,7 +1386,7 @@ const GLint kSubHeight = 4; const GLint kSubDepth = 4; const GLenum kFormat = kInternalFormat; - CompressedTexSubImage3DBucket cmd; + cmds::CompressedTexSubImage3DBucket cmd; // Incorrect image size. cmd.Init(kTarget, @@ -1546,7 +1544,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); - CompressedTexImage3DBucket tex_cmd; + cmds::CompressedTexImage3DBucket tex_cmd; tex_cmd.Init(kTarget, kLevel, kInternalFormat, kWidth, kHeight, kDepth, kBucketId); EXPECT_CALL(*gl_, @@ -1570,7 +1568,7 @@ const GLenum kFormat = kInternalFormat; const GLsizei kSubImageSize = 64; const GLsizei kBadSubImageSize = 65; - CompressedTexSubImage3D cmd; + cmds::CompressedTexSubImage3D cmd; // Invalid args + NULL SHM -> GL error cmd.Init(kTarget, kLevel, kXOffset, kYOffset, kZOffset, kSubWidth, kSubHeight, @@ -1616,7 +1614,7 @@ DoBindTexture(kTarget, client_texture_id_, kServiceTextureId); // Bad bucket - CompressedTexImage2DBucket cmd; + cmds::CompressedTexImage2DBucket cmd; cmd.Init(kTarget, kLevel, kInternalFormat, @@ -1663,7 +1661,7 @@ const uint32_t kBadBucketId = 123; DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CompressedTexImage2DBucket cmd; + cmds::CompressedTexImage2DBucket cmd; cmd.Init(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, @@ -1671,7 +1669,7 @@ 4, kBadBucketId); EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); - CompressedTexSubImage2DBucket cmd2; + cmds::CompressedTexSubImage2DBucket cmd2; cmd2.Init(GL_TEXTURE_2D, 0, 0, @@ -1721,7 +1719,7 @@ for (size_t ii = 0; ii < base::size(test_data); ++ii) { const S3TCTestData& test = test_data[ii]; - CompressedTexImage2DBucket cmd; + cmds::CompressedTexImage2DBucket cmd; // test small width. DoCompressedTexImage2D( GL_TEXTURE_2D, 1, test.format, 2, 4, 0, test.block_size, kBucketId); @@ -1786,7 +1784,7 @@ kBucketId); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - CompressedTexSubImage2DBucket sub_cmd; + cmds::CompressedTexSubImage2DBucket sub_cmd; bucket->SetSize(test.block_size); // Test sub image bad xoffset sub_cmd.Init(GL_TEXTURE_2D, 0, 1, 0, 4, 4, test.format, kBucketId); @@ -1878,7 +1876,7 @@ for (size_t ii = 0; ii < base::size(test_data); ++ii) { const S3TCTestData& test = test_data[ii]; - CompressedTexImage2DBucket cmd; + cmds::CompressedTexImage2DBucket cmd; // test small width. DoCompressedTexImage2D( GL_TEXTURE_2D, 1, test.format, 2, 4, 0, test.block_size, kBucketId); @@ -1943,7 +1941,7 @@ kBucketId); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - CompressedTexSubImage2DBucket sub_cmd; + cmds::CompressedTexSubImage2DBucket sub_cmd; bucket->SetSize(test.block_size); // Test sub image bad xoffset sub_cmd.Init(GL_TEXTURE_2D, 0, 1, 0, 4, 4, test.format, kBucketId); @@ -2022,7 +2020,7 @@ const GLenum kFormat = GL_ETC1_RGB8_OES; const size_t kBlockSize = 8; - CompressedTexImage2DBucket cmd; + cmds::CompressedTexImage2DBucket cmd; // test small width. DoCompressedTexImage2D(GL_TEXTURE_2D, 0, kFormat, 4, 8, 0, 16, kBucketId); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2049,7 +2047,7 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Test CompressedTexSubImage not allowed - CompressedTexSubImage2DBucket sub_cmd; + cmds::CompressedTexSubImage2DBucket sub_cmd; bucket->SetSize(kBlockSize); sub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 4, 4, kFormat, kBucketId); EXPECT_EQ(error::kNoError, ExecuteCmd(sub_cmd)); @@ -2062,14 +2060,14 @@ GLenum type, internal_format; EXPECT_TRUE(texture->GetLevelType(GL_TEXTURE_2D, 0, &type, &internal_format)); EXPECT_EQ(kFormat, internal_format); - TexSubImage2D texsub_cmd; + cmds::TexSubImage2D texsub_cmd; texsub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(texsub_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); // Test CopyTexSubImage not allowed for ETC1 compressed texture - CopyTexSubImage2D copy_cmd; + cmds::CopyTexSubImage2D copy_cmd; copy_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 4, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(copy_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -2083,10 +2081,10 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kNewClientId); + GenHelper<cmds::GenTexturesImmediate>(kNewClientId); const GLenum kBadTarget = GL_RGB; - CopyTextureCHROMIUM cmd; + cmds::CopyTextureCHROMIUM cmd; cmd.Init(client_texture_id_, 0, kBadTarget, kNewClientId, 0, GL_RGBA, GL_UNSIGNED_BYTE, GL_FALSE, GL_FALSE, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2106,7 +2104,7 @@ 0, 0); const GLenum kBadTarget = GL_RGB; - CopySubTextureCHROMIUM cmd; + cmds::CopySubTextureCHROMIUM cmd; cmd.Init(client_texture_id_, 0, kBadTarget, kNewClientId, 0, 1, 1, 2, 2, 3, 3, GL_FALSE, GL_FALSE, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2122,7 +2120,7 @@ EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_EXTERNAL_OES, kNewServiceId)); EXPECT_CALL(*gl_, GenTextures(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)); - BindTexture cmd; + cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_EXTERNAL_OES, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2143,13 +2141,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_TEXTURE_BINDING_EXTERNAL_OES, result->GetData())) .Times(0); result->size = 0; - GetIntegerv cmd; + cmds::GetIntegerv cmd; cmd.Init(GL_TEXTURE_BINDING_EXTERNAL_OES, shared_memory_id_, shared_memory_offset_); @@ -2200,7 +2198,7 @@ *gl_, TexParameteri( GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2234,7 +2232,7 @@ InitDecoder(init); DoBindTexture(GL_TEXTURE_EXTERNAL_OES, client_texture_id_, kServiceTextureId); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); @@ -2274,7 +2272,7 @@ GLenum type = GL_UNSIGNED_BYTE; DoBindTexture(GL_TEXTURE_EXTERNAL_OES, client_texture_id_, kServiceTextureId); ASSERT_TRUE(GetTexture(client_texture_id_) != nullptr); - TexImage2D cmd; + cmds::TexImage2D cmd; cmd.Init(target, level, internal_format, width, height, format, type, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2287,13 +2285,13 @@ InitState init; InitDecoder(init); - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - BindTexture cmd2; + cmds::BindTexture cmd2; cmd2.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); @@ -2305,14 +2303,14 @@ init.bind_generates_resource = true; InitDecoder(init); - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL( *gl_, BindTexture(GL_TEXTURE_2D, TestHelper::kServiceDefaultTexture2dId)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - BindTexture cmd2; + cmds::BindTexture cmd2; cmd2.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, @@ -2327,26 +2325,26 @@ InitDecoder(init); { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexParameterf cmd2; + cmds::TexParameterf cmd2; cmd2.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexParameterf cmd2; + cmds::TexParameterf cmd2; cmd2.Init(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -2358,26 +2356,26 @@ InitDecoder(init); { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexParameteri cmd2; + cmds::TexParameteri cmd2; cmd2.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexParameteri cmd2; + cmds::TexParameteri cmd2; cmd2.Init(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -2389,15 +2387,14 @@ InitDecoder(init); { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); GLfloat data = GL_NEAREST; - TexParameterfvImmediate& cmd2 = - *GetImmediateAs<TexParameterfvImmediate>(); + auto& cmd2 = *GetImmediateAs<cmds::TexParameterfvImmediate>(); cmd2.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &data); @@ -2406,15 +2403,14 @@ } { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); GLfloat data = GL_NEAREST; - TexParameterfvImmediate& cmd2 = - *GetImmediateAs<TexParameterfvImmediate>(); + auto& cmd2 = *GetImmediateAs<cmds::TexParameterfvImmediate>(); cmd2.Init(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, &data); @@ -2428,15 +2424,14 @@ InitDecoder(init); { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); GLfloat data = GL_NEAREST; - TexParameterfvImmediate& cmd2 = - *GetImmediateAs<TexParameterfvImmediate>(); + auto& cmd2 = *GetImmediateAs<cmds::TexParameterfvImmediate>(); cmd2.Init(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, &data); @@ -2445,15 +2440,14 @@ } { - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_CUBE_MAP, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_CUBE_MAP, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); GLfloat data = GL_NEAREST; - TexParameterfvImmediate& cmd2 = - *GetImmediateAs<TexParameterfvImmediate>(); + auto& cmd2 = *GetImmediateAs<cmds::TexParameterfvImmediate>(); cmd2.Init(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, &data); @@ -2466,13 +2460,13 @@ InitState init; InitDecoder(init); - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexImage2D cmd2; + cmds::TexImage2D cmd2; cmd2.Init(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); @@ -2483,13 +2477,13 @@ InitState init; InitDecoder(init); - BindTexture cmd1; + cmds::BindTexture cmd1; cmd1.Init(GL_TEXTURE_2D, 0); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, 0)); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd1)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - TexSubImage2D cmd2; + cmds::TexSubImage2D cmd2; cmd2.Init(GL_TEXTURE_2D, 0, 1, 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd2)); @@ -2504,7 +2498,7 @@ EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_RECTANGLE_ARB, kNewServiceId)); EXPECT_CALL(*gl_, GenTextures(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)); - BindTexture cmd; + cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_RECTANGLE_ARB, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2525,13 +2519,13 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); EXPECT_CALL(*gl_, GetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, result->GetData())) .Times(0); result->size = 0; - GetIntegerv cmd; + cmds::GetIntegerv cmd; cmd.Init(GL_TEXTURE_BINDING_RECTANGLE_ARB, shared_memory_id_, shared_memory_offset_); @@ -2582,7 +2576,7 @@ *gl_, TexParameteri( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -2616,7 +2610,7 @@ DoBindTexture( GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST); @@ -2657,7 +2651,7 @@ GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); ASSERT_TRUE(GetTexture(client_texture_id_) != nullptr); - TexImage2D cmd; + cmds::TexImage2D cmd; cmd.Init(target, level, internal_format, width, height, format, type, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2683,7 +2677,7 @@ GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); ASSERT_TRUE(GetTexture(client_texture_id_) != nullptr); - TexImage2D cmd; + cmds::TexImage2D cmd; cmd.Init(target, level, internal_format, width, height, format, type, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2702,7 +2696,7 @@ GL_UNSIGNED_BYTE, shared_memory_address_)) .Times(2) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 2, 1, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2735,7 +2729,7 @@ shared_memory_address_)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 1, 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2761,7 +2755,7 @@ DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset); // Put in no data. - TexImage2D tex_cmd; + cmds::TexImage2D tex_cmd; tex_cmd.Init( GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0); // It won't actually call TexImage2D, just mark it as uncleared. @@ -2774,7 +2768,7 @@ GL_UNSIGNED_BYTE, shared_memory_address_)) .Times(2) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 2, 1, GL_RGBA, GL_UNSIGNED_BYTE, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2801,7 +2795,7 @@ GL_UNSIGNED_BYTE, 0)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 2, 1, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2838,7 +2832,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2855,7 +2849,7 @@ EXPECT_CALL(*gl_, CopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 2, 1)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 2, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2865,7 +2859,7 @@ EXPECT_CALL(*gl_, CopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 1, 0, 0, 2, 1)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 1, 0, 0, 2, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2887,7 +2881,7 @@ EXPECT_CALL(*gl_, CopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 2, 1)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 2, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2902,7 +2896,7 @@ EXPECT_CALL(*gl_, CopyTexSubImage2D(GL_TEXTURE_2D, 0, 1, 1, 0, 0, 1, 1)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 1, 1, 0, 0, 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -2923,7 +2917,7 @@ kBackBufferWidth, kBackBufferHeight)) .Times(1) .RetiresOnSaturation(); - CopyTexSubImage2D cmd; + cmds::CopyTexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, kBackBufferWidth, kBackBufferHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2953,7 +2947,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - CompressedTexImage2D cmd; + cmds::CompressedTexImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 4, 4, 8, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2965,7 +2959,7 @@ TEST_P(GLES2DecoderTest, TextureUsageAngleExtNotEnabledByDefault) { DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init( GL_TEXTURE_2D, GL_TEXTURE_USAGE_ANGLE, GL_FRAMEBUFFER_ATTACHMENT_ANGLE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -2986,8 +2980,8 @@ Texture* texture = texture_ref->texture(); EXPECT_EQ(kServiceTextureId, texture->service_id()); - ProduceTextureDirectCHROMIUMImmediate& produce_cmd = - *GetImmediateAs<ProduceTextureDirectCHROMIUMImmediate>(); + auto& produce_cmd = + *GetImmediateAs<cmds::ProduceTextureDirectCHROMIUMImmediate>(); produce_cmd.Init(client_texture_id_, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(produce_cmd, sizeof(mailbox.name))); @@ -3020,8 +3014,8 @@ // Consume the texture into a new client ID. GLuint new_texture_id = kNewClientId; - CreateAndConsumeTextureINTERNALImmediate& consume_cmd = - *GetImmediateAs<CreateAndConsumeTextureINTERNALImmediate>(); + auto& consume_cmd = + *GetImmediateAs<cmds::CreateAndConsumeTextureINTERNALImmediate>(); consume_cmd.Init(new_texture_id, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(consume_cmd, sizeof(mailbox.name))); @@ -3063,12 +3057,12 @@ .RetiresOnSaturation(); EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)).Times(1).RetiresOnSaturation(); - ActiveTexture& texture_cmd = *GetImmediateAs<ActiveTexture>(); + auto& texture_cmd = *GetImmediateAs<cmds::ActiveTexture>(); texture_cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(texture_cmd)); - CreateAndConsumeTextureINTERNALImmediate& consume_cmd = - *GetImmediateAs<CreateAndConsumeTextureINTERNALImmediate>(); + auto& consume_cmd = + *GetImmediateAs<cmds::CreateAndConsumeTextureINTERNALImmediate>(); consume_cmd.Init(new_texture_id, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(consume_cmd, sizeof(mailbox.name))); @@ -3097,8 +3091,8 @@ group().texture_manager()->GetTexture(client_texture_id_); ASSERT_TRUE(texture_ref != nullptr); - ProduceTextureDirectCHROMIUMImmediate& produce_cmd = - *GetImmediateAs<ProduceTextureDirectCHROMIUMImmediate>(); + auto& produce_cmd = + *GetImmediateAs<cmds::ProduceTextureDirectCHROMIUMImmediate>(); produce_cmd.Init(client_texture_id_, mailbox.name); EXPECT_EQ( error::kNoError, @@ -3107,8 +3101,8 @@ // Attempt to consume the mailbox with an invalid texture id. GLuint new_texture_id = 0; - CreateAndConsumeTextureINTERNALImmediate& consume_cmd = - *GetImmediateAs<CreateAndConsumeTextureINTERNALImmediate>(); + auto& consume_cmd = + *GetImmediateAs<cmds::CreateAndConsumeTextureINTERNALImmediate>(); consume_cmd.Init(new_texture_id, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(consume_cmd, sizeof(mailbox.name))); @@ -3201,8 +3195,8 @@ gfx::ColorSpace(), 0, &memory_tracker, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3231,8 +3225,8 @@ .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); @@ -3262,8 +3256,8 @@ gfx::ColorSpace(), 0, &memory_tracker, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(client_texture_id_, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); @@ -3285,29 +3279,29 @@ gfx::ColorSpace(), 0, &memory_tracker, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Begin/end read access for the created image. - BeginSharedImageAccessDirectCHROMIUM read_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM read_access_cmd; read_access_cmd.Init(kNewClientId, GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(read_access_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EndSharedImageAccessDirectCHROMIUM read_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM read_end_cmd; read_end_cmd.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(read_end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Begin/end read/write access for the created image. - BeginSharedImageAccessDirectCHROMIUM readwrite_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM readwrite_access_cmd; readwrite_access_cmd.Init(kNewClientId, GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(readwrite_access_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); - EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM readwrite_end_cmd; readwrite_end_cmd.Init(kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(readwrite_end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3319,7 +3313,7 @@ TEST_P(GLES2DecoderTest, BeginSharedImageAccessDirectCHROMIUMInvalidMode) { // Try to begin access with an invalid mode. - BeginSharedImageAccessDirectCHROMIUM bad_mode_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM bad_mode_access_cmd; bad_mode_access_cmd.Init(client_texture_id_, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(bad_mode_access_cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -3327,7 +3321,7 @@ TEST_P(GLES2DecoderTest, BeginSharedImageAccessDirectCHROMIUMNotSharedImage) { // Try to begin access with a texture that is not a shared image. - BeginSharedImageAccessDirectCHROMIUM not_shared_image_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM not_shared_image_access_cmd; not_shared_image_access_cmd.Init( client_texture_id_, GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(not_shared_image_access_cmd)); @@ -3345,8 +3339,8 @@ gfx::ColorSpace(), 0, &memory_tracker, kNewServiceId), &memory_tracker); - CreateAndTexStorage2DSharedImageINTERNALImmediate& cmd = - *GetImmediateAs<CreateAndTexStorage2DSharedImageINTERNALImmediate>(); + auto& cmd = *GetImmediateAs< + cmds::CreateAndTexStorage2DSharedImageINTERNALImmediate>(); cmd.Init(kNewClientId, GL_NONE, mailbox.name); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailbox.name))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3359,7 +3353,7 @@ static_cast<TestSharedImageBacking::TestSharedImageRepresentation*>( texture_ref->shared_image()) ->set_can_access(false); - BeginSharedImageAccessDirectCHROMIUM read_access_cmd; + cmds::BeginSharedImageAccessDirectCHROMIUM read_access_cmd; read_access_cmd.Init(kNewClientId, GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM); EXPECT_EQ(error::kNoError, ExecuteCmd(read_access_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3371,7 +3365,7 @@ TEST_P(GLES2DecoderTest, EndSharedImageAccessDirectCHROMIUMNotSharedImage) { // Try to end access with a texture that is not a shared image. - EndSharedImageAccessDirectCHROMIUM not_shared_image_end_cmd; + cmds::EndSharedImageAccessDirectCHROMIUM not_shared_image_end_cmd; not_shared_image_end_cmd.Init(client_texture_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(not_shared_image_end_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3390,7 +3384,7 @@ DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); // Check trying to upload data fails. - TexImage2D tex_cmd; + cmds::TexImage2D tex_cmd; tex_cmd.Init(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(tex_cmd)); @@ -3421,7 +3415,7 @@ EXPECT_EQ(GL_NO_ERROR, GetGLError()); // Check that trying to update it fails. - TexSubImage2D tex_sub_cmd; + cmds::TexSubImage2D tex_sub_cmd; tex_sub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 1, 1, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); @@ -3429,13 +3423,13 @@ EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); // Check that trying to CopyTexImage2D fails - CopyTexImage2D copy_tex_cmd; + cmds::CopyTexImage2D copy_tex_cmd; copy_tex_cmd.Init(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 0, 0, 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(copy_tex_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); // Check that trying to CopyTexSubImage2D fails - CopyTexSubImage2D copy_sub_cmd; + cmds::CopyTexSubImage2D copy_sub_cmd; copy_sub_cmd.Init(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 1, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(copy_sub_cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3462,7 +3456,7 @@ GL_UNSIGNED_INT, 0, 0); - GenerateMipmap cmd; + cmds::GenerateMipmap cmd; cmd.Init(GL_TEXTURE_2D); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_OPERATION, GetGLError()); @@ -3518,7 +3512,7 @@ GetImageManagerForTest()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_CUBE_MAP, client_texture_id_, kServiceTextureId); - BindTexImage2DCHROMIUM bind_tex_image_2d_cmd; + cmds::BindTexImage2DCHROMIUM bind_tex_image_2d_cmd; bind_tex_image_2d_cmd.Init(GL_TEXTURE_CUBE_MAP, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -3530,7 +3524,7 @@ GetImageManagerForTest()->AddImage(image.get(), 1); DoBindTexture(GL_TEXTURE_CUBE_MAP, client_texture_id_, kServiceTextureId); - BindTexImage2DWithInternalformatCHROMIUM bind_tex_image_2d_cmd; + cmds::BindTexImage2DWithInternalformatCHROMIUM bind_tex_image_2d_cmd; bind_tex_image_2d_cmd.Init(GL_TEXTURE_2D, GL_BACK, 1); // Invalid enum EXPECT_EQ(error::kNoError, ExecuteCmd(bind_tex_image_2d_cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -3593,7 +3587,7 @@ height, format, type, _)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D tex_sub_image_2d_cmd; + cmds::TexSubImage2D tex_sub_image_2d_cmd; tex_sub_image_2d_cmd.Init(target, level, xoffset, yoffset, width, height, format, type, pixels_shm_id, pixels_shm_offset, internal); @@ -3683,7 +3677,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd; + cmds::ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd; release_tex_image_2d_cmd.Init(GL_TEXTURE_2D, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(release_tex_image_2d_cmd)); EXPECT_TRUE( @@ -3768,7 +3762,7 @@ Mock::VerifyAndClearExpectations(gl_.get()); EXPECT_CALL(*gl_, ActiveTexture(GL_TEXTURE1)).Times(1).RetiresOnSaturation(); - ActiveTexture texture_cmd; + cmds::ActiveTexture texture_cmd; texture_cmd.Init(GL_TEXTURE1); EXPECT_EQ(error::kNoError, ExecuteCmd(texture_cmd)); Mock::VerifyAndClearExpectations(gl_.get()); @@ -3804,7 +3798,7 @@ .RetiresOnSaturation(); } - DrawArrays cmd; + cmds::DrawArrays cmd; cmd.Init(GL_TRIANGLES, 0, kNumVertices); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -3813,7 +3807,7 @@ Mock::VerifyAndClearExpectations(gl_.get()); // Re-bind image to texture. - ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd; + cmds::ReleaseTexImage2DCHROMIUM release_tex_image_2d_cmd; release_tex_image_2d_cmd.Init(GL_TEXTURE_2D, kImageId); EXPECT_EQ(error::kNoError, ExecuteCmd(release_tex_image_2d_cmd)); EXPECT_CALL(*image.get(), BindTexImage(GL_TEXTURE_2D)) @@ -3863,7 +3857,7 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - FramebufferTexture2D fbtex_cmd; + cmds::FramebufferTexture2D fbtex_cmd; fbtex_cmd.Init(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, @@ -3906,7 +3900,7 @@ InSequence s; EXPECT_CALL(*gl_, DrawElements(_, _, _, _)).Times(1); - DrawElements cmd; + cmds::DrawElements cmd; cmd.Init(GL_TRIANGLES, kValidIndexRangeCount, GL_UNSIGNED_SHORT, @@ -3995,7 +3989,7 @@ shared_memory_address_)) .Times(1) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, kWidth, kHeight, GL_RGBA, GL_FLOAT, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -4027,7 +4021,7 @@ GL_FLOAT, shared_memory_address_)) .Times(2) .RetiresOnSaturation(); - TexSubImage2D cmd; + cmds::TexSubImage2D cmd; cmd.Init(GL_TEXTURE_2D, 0, 0, 0, kWidth, kHeight - 1, GL_RGBA, GL_FLOAT, shared_memory_id_, kSharedMemoryOffset, GL_FALSE); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -4148,9 +4142,9 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - GetIntegerv cmd; + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); + cmds::GetIntegerv cmd; result->size = 0; EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(0).RetiresOnSaturation(); cmd.Init(GL_NUM_COMPRESSED_TEXTURE_FORMATS, @@ -4252,9 +4246,9 @@ .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetIntegerv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); - GetIntegerv cmd; + auto* result = + static_cast<cmds::GetIntegerv::Result*>(shared_memory_address_); + cmds::GetIntegerv cmd; result->size = 0; EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(0).RetiresOnSaturation(); cmd.Init(GL_NUM_COMPRESSED_TEXTURE_FORMATS, @@ -4283,7 +4277,7 @@ InitDecoder(init); DoBindTexture(GL_TEXTURE_RECTANGLE_ARB, client_texture_id_, kServiceTextureId); - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_RECTANGLE_ARB, 2, GL_RGBA8, 4, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -4297,19 +4291,19 @@ InitDecoder(init); DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); { - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 0, 4); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } { - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 4, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); } { - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_2D, 1, GL_RGBA8, 0, 0); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -4334,7 +4328,7 @@ *gl_, TexStorage2DEXT(GL_TEXTURE_2D, kLevels, format, kWidth, kHeight)) .Times(1) .RetiresOnSaturation(); - TexStorage2DEXT cmd; + cmds::TexStorage2DEXT cmd; cmd.Init(GL_TEXTURE_2D, kLevels, format, kWidth, kHeight); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4400,7 +4394,7 @@ EXPECT_CALL(*gl_, TexStorage3D(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6)) .Times(1) .RetiresOnSaturation(); - TexStorage3D cmd; + cmds::TexStorage3D cmd; cmd.Init(GL_TEXTURE_3D, 2, GL_RGB565, 4, 5, 6); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4525,7 +4519,7 @@ } TEST_P(GLES3DecoderTest, BindSamplerInvalidUnit) { - BindSampler cmd; + cmds::BindSampler cmd; cmd.Init(kNumTextureUnits, client_texture_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -4549,7 +4543,7 @@ EXPECT_CALL(*gl_, GenTextures(_, _)) .WillOnce(SetArgPointee<1>(kFBOServiceTextureId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kFBOClientTextureId); + GenHelper<cmds::GenTexturesImmediate>(kFBOClientTextureId); DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, kServiceFramebufferId); @@ -4600,7 +4594,7 @@ } DoBindTexture(GL_TEXTURE_2D, client_texture_id_, kServiceTextureId); - CopyTexImage2D cmd; + cmds::CopyTexImage2D cmd; cmd.Init(target, level, destination_texture_format, 0, 0, width, height); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); GLenum expectation = should_succeed ? GL_NO_ERROR : GL_INVALID_OPERATION; @@ -4621,7 +4615,7 @@ .Times(1) .RetiresOnSaturation(); } - BindTexture cmd; + cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_2D, client_texture_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4641,7 +4635,7 @@ .Times(1) .RetiresOnSaturation(); } - BindTexture cmd; + cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_2D, kNewClientId); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4650,7 +4644,7 @@ TEST_P(GLES2DecoderTest, BindTextureInvalidArgs) { EXPECT_CALL(*gl_, BindTexture(_, _)).Times(0); - BindTexture cmd; + cmds::BindTexture cmd; cmd.Init(GL_TEXTURE_1D, client_texture_id_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -4668,14 +4662,14 @@ { EXPECT_CALL(*gl_, TexParameteri(kTarget, kSwizzleParam, kSwizzleValue)); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, kSwizzleParam, kSwizzleValue); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); } { - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, kSwizzleParam, kInvalidSwizzleValue); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -4686,10 +4680,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetTexParameteriv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; - GetTexParameteriv cmd; + cmds::GetTexParameteriv cmd; cmd.Init(kTarget, kSwizzleParam, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned(kSwizzleParam), @@ -4705,17 +4699,17 @@ const GLenum kSwizzleValue = GL_BLUE; { - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, kSwizzleParam, kSwizzleValue); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); } { - typedef GetTexParameteriv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; - GetTexParameteriv cmd; + cmds::GetTexParameteriv cmd; cmd.Init(kTarget, kSwizzleParam, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_INVALID_ENUM, GetGLError()); @@ -4836,7 +4830,7 @@ EXPECT_CALL(*gl_, GenTextures(1, _)) .WillOnce(SetArgPointee<1>(kNewServiceId)) .RetiresOnSaturation(); - GenHelper<GenTexturesImmediate>(kNewClientId); + GenHelper<cmds::GenTexturesImmediate>(kNewClientId); DoBindTexture(GL_TEXTURE_2D, kNewClientId, kNewServiceId); DoTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 2, 2, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0); @@ -4853,7 +4847,7 @@ SetupClearTextureExpectations(kNewServiceId, kServiceTextureId, GL_TEXTURE_2D, GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, 2, 2, 0); - CopySubTextureCHROMIUM cmd; + cmds::CopySubTextureCHROMIUM cmd; cmd.Init(kNewClientId /* source_id */, 0 /* source_level */, GL_TEXTURE_2D /* dest_target */, client_texture_id_ /* dest_id */, 0 /* dest_level */, 0 /* xoffset */, 0 /* yoffset */, 0 /* x */, @@ -4870,7 +4864,7 @@ SetupClearTextureExpectations(kServiceTextureId, kServiceTextureId, GL_TEXTURE_2D, GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 1, 2, 1, 0); - CopySubTextureCHROMIUM cmd; + cmds::CopySubTextureCHROMIUM cmd; cmd.Init(kNewClientId /* source_id */, 0 /* source_level */, GL_TEXTURE_2D /* dest_target */, client_texture_id_ /* dest_id */, 0 /* dest_level */, 1 /* xoffset */, 1 /* yoffset */, 0 /* x */, @@ -4910,7 +4904,7 @@ EXPECT_CALL(*gl_, TexParameteri(kTarget, GL_TEXTURE_BASE_LEVEL, kBaseLevel)) .Times(1) .RetiresOnSaturation(); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, GL_TEXTURE_BASE_LEVEL, kBaseLevel); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -4918,7 +4912,7 @@ EXPECT_CALL(*gl_, TexParameteri(kTarget, GL_TEXTURE_MAX_LEVEL, kMaxLevel)) .Times(1) .RetiresOnSaturation(); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, GL_TEXTURE_MAX_LEVEL, kMaxLevel); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -4931,7 +4925,7 @@ kHeight, kDepth)) .Times(1) .RetiresOnSaturation(); - TexStorage3D cmd; + cmds::TexStorage3D cmd; cmd.Init(kTarget, kLevels, kInternalFormat, kWidth, kHeight, kDepth); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -4947,7 +4941,7 @@ *gl_, TexParameteri(kTarget, GL_TEXTURE_BASE_LEVEL, kClampedBaseLevel)) .Times(1) .RetiresOnSaturation(); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, GL_TEXTURE_BASE_LEVEL, kNewBaseLevel); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -4956,7 +4950,7 @@ TexParameteri(kTarget, GL_TEXTURE_MAX_LEVEL, kClampedMaxLevel)) .Times(1) .RetiresOnSaturation(); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(kTarget, GL_TEXTURE_MAX_LEVEL, kNewMaxLevel); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); } @@ -4970,10 +4964,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetTexParameteriv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; - GetTexParameteriv cmd; + cmds::GetTexParameteriv cmd; cmd.Init(kTarget, GL_TEXTURE_BASE_LEVEL, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -4984,10 +4978,10 @@ .WillOnce(Return(GL_NO_ERROR)) .WillOnce(Return(GL_NO_ERROR)) .RetiresOnSaturation(); - typedef GetTexParameteriv::Result Result; - Result* result = static_cast<Result*>(shared_memory_address_); + auto* result = + static_cast<cmds::GetTexParameteriv::Result*>(shared_memory_address_); result->size = 0; - GetTexParameteriv cmd; + cmds::GetTexParameteriv cmd; cmd.Init(kTarget, GL_TEXTURE_MAX_LEVEL, shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); @@ -5008,7 +5002,7 @@ { EXPECT_CALL(*gl_, TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 55)); - TexParameteri cmd; + cmds::TexParameteri cmd; cmd.Init(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 55); EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError());
diff --git a/gpu/command_buffer/service/mailbox_manager_unittest.cc b/gpu/command_buffer/service/mailbox_manager_unittest.cc index 0404b33..79053f1 100644 --- a/gpu/command_buffer/service/mailbox_manager_unittest.cc +++ b/gpu/command_buffer/service/mailbox_manager_unittest.cc
@@ -17,8 +17,6 @@ namespace gpu { namespace gles2 { -using namespace ::testing; - static const SyncToken g_sync_token(gpu::CommandBufferNamespace::GPU_IO, gpu::CommandBufferId::FromUnsafeValue(123), 0); @@ -191,8 +189,8 @@ GLenum wrap_t) { DCHECK(texture_id); const GLuint kCurrentTexture = 0; - EXPECT_CALL(*gl_, GetIntegerv(GL_TEXTURE_BINDING_2D, _)) - .WillOnce(SetArgPointee<1>(kCurrentTexture)) + EXPECT_CALL(*gl_, GetIntegerv(GL_TEXTURE_BINDING_2D, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kCurrentTexture)) .RetiresOnSaturation(); EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_2D, texture_id)) .Times(1) @@ -233,7 +231,7 @@ Texture* texture = DefineTexture(); Mailbox name = Mailbox::Generate(); - InSequence sequence; + testing::InSequence sequence; manager_->ProduceTexture(name, texture); EXPECT_EQ(texture, manager_->ConsumeTexture(name)); @@ -243,7 +241,7 @@ } TEST_F(MailboxManagerSyncTest, ProduceSyncDestroy) { - InSequence sequence; + testing::InSequence sequence; Texture* texture = DefineTexture(); Mailbox name = Mailbox::Generate(); @@ -261,7 +259,7 @@ } TEST_F(MailboxManagerSyncTest, ProduceSyncMultipleMailbox) { - InSequence sequence; + testing::InSequence sequence; Texture* texture = DefineTexture(); Mailbox name = Mailbox::Generate(); @@ -285,7 +283,7 @@ // makes sure a redefinition becomes visible there too. TEST_F(MailboxManagerSyncTest, ProduceConsumeResize) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture = DefineTexture(); Mailbox name = Mailbox::Generate(); @@ -297,8 +295,8 @@ manager_->PushTextureUpdates(g_sync_token); manager2_->PullTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations( kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); Texture* new_texture = Texture::CheckedCast(manager2_->ConsumeTexture(name)); @@ -372,14 +370,14 @@ // respectively to create a real sharing scenario. Otherwise, there would // never be conflicting updates/pushes. { - InSequence sequence; - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId1)); + testing::InSequence sequence; + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId1)); SetupUpdateTexParamExpectations( kNewTextureId1, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); new_texture1 = manager2_->ConsumeTexture(name1); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId2)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId2)); SetupUpdateTexParamExpectations( kNewTextureId2, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); new_texture2 = manager_->ConsumeTexture(name2); @@ -400,7 +398,7 @@ EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), SetParameter(texture2, GL_TEXTURE_MAG_FILTER, GL_NEAREST)); - Mock::VerifyAndClearExpectations(gl_.get()); + testing::Mock::VerifyAndClearExpectations(gl_.get()); // Synchronize in both directions manager_->PushTextureUpdates(g_sync_token); @@ -435,8 +433,8 @@ manager_->PushTextureUpdates(g_sync_token); manager2_->PullTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations( kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); Texture* new_texture = Texture::CheckedCast(manager2_->ConsumeTexture(name)); @@ -482,8 +480,8 @@ manager2_->PullTextureUpdates(g_sync_token); // Should sync to new texture which is not defined. - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations(kNewTextureId, texture->min_filter(), texture->mag_filter(), texture->wrap_s(), texture->wrap_t()); @@ -520,7 +518,7 @@ // only a single texture also within a synchronized manager instance. TEST_F(MailboxManagerSyncTest, SharedThroughMultipleMailboxes) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture = DefineTexture(); Mailbox name1 = Mailbox::Generate(); @@ -530,8 +528,8 @@ // Share manager_->PushTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); manager2_->PullTextureUpdates(g_sync_token); SetupUpdateTexParamExpectations( kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); @@ -559,7 +557,7 @@ // B: consume M should return new_texture TEST_F(MailboxManagerSyncTest, ProduceBothWays) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture1 = DefineTexture(); Texture* texture2 = DefineTexture(); @@ -569,8 +567,8 @@ // Share manager_->PushTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations( kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); TextureBase* new_texture = manager2_->ConsumeTexture(name); @@ -597,7 +595,7 @@ // B: push updates TEST_F(MailboxManagerSyncTest, ProduceTextureNotDefined) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture = CreateTexture(); const GLsizei levels_needed = TextureManager::ComputeMipMapCount( @@ -611,8 +609,8 @@ // Share manager_->PushTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations(kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); TextureBase* new_texture = manager2_->ConsumeTexture(name); @@ -634,7 +632,7 @@ TEST_F(MailboxManagerSyncTest, ProduceTextureDefinedNotLevel0) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture = CreateTexture(); const GLsizei levels_needed = TextureManager::ComputeMipMapCount( @@ -650,8 +648,8 @@ // Share manager_->PushTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations(kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); TextureBase* new_texture = manager2_->ConsumeTexture(name); @@ -673,7 +671,7 @@ TEST_F(MailboxManagerSyncTest, ProduceTextureDefined0Size) { const GLuint kNewTextureId = 1234; - InSequence sequence; + testing::InSequence sequence; Texture* texture = CreateTexture(); const GLsizei levels_needed = TextureManager::ComputeMipMapCount( @@ -689,8 +687,8 @@ // Share manager_->PushTextureUpdates(g_sync_token); - EXPECT_CALL(*gl_, GenTextures(1, _)) - .WillOnce(SetArgPointee<1>(kNewTextureId)); + EXPECT_CALL(*gl_, GenTextures(1, testing::_)) + .WillOnce(testing::SetArgPointee<1>(kNewTextureId)); SetupUpdateTexParamExpectations(kNewTextureId, GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_REPEAT); TextureBase* new_texture = manager2_->ConsumeTexture(name); @@ -711,7 +709,7 @@ } TEST_F(MailboxManagerSyncTest, ProduceTextureNotBound) { - InSequence sequence; + testing::InSequence sequence; Texture* texture = CreateTexture(); Mailbox name = Mailbox::Generate();
diff --git a/gpu/command_buffer/service/raster_decoder_unittest.cc b/gpu/command_buffer/service/raster_decoder_unittest.cc index cf58f06..4d50d17 100644 --- a/gpu/command_buffer/service/raster_decoder_unittest.cc +++ b/gpu/command_buffer/service/raster_decoder_unittest.cc
@@ -32,8 +32,6 @@ using ::testing::Return; using ::testing::SetArgPointee; -using namespace gpu::raster::cmds; - namespace gpu { namespace raster { @@ -61,9 +59,9 @@ const GLsync kGlSync = reinterpret_cast<GLsync>(0xdeadbeef); TEST_P(RasterDecoderTest, BeginEndQueryEXTCommandsCompletedCHROMIUM) { - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -86,7 +84,7 @@ .RetiresOnSaturation(); #endif - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -127,9 +125,9 @@ } TEST_P(RasterDecoderTest, BeginEndQueryEXTCommandsIssuedCHROMIUM) { - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); // Test valid parameters work. begin_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, kNewClientId, shared_memory_id_, @@ -145,7 +143,7 @@ EXPECT_TRUE(query->IsActive()); // Test end succeeds. - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_ISSUED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -154,9 +152,9 @@ } TEST_P(RasterDecoderTest, QueryCounterEXTCommandsIssuedTimestampCHROMIUM) { - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - QueryCounterEXT query_counter_cmd; + cmds::QueryCounterEXT query_counter_cmd; query_counter_cmd.Init(kNewClientId, GL_COMMANDS_ISSUED_TIMESTAMP_CHROMIUM, shared_memory_id_, kSharedMemoryOffset, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(query_counter_cmd)); @@ -188,7 +186,7 @@ { // This will initialize the bottom right corner of destination. SetScopedTextureBinderExpectations(GL_TEXTURE_2D); - auto& cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); cmd.Init(1, 1, 0, 0, 1, 1, mailboxes); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailboxes))); EXPECT_EQ(GL_NO_ERROR, GetGLError()); @@ -198,7 +196,7 @@ { // Dest rect outside of dest bounds - auto& cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); cmd.Init(2, 2, 0, 0, 1, 1, mailboxes); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailboxes))); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -208,7 +206,7 @@ { // Source rect outside of source bounds - auto& cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); cmd.Init(0, 0, 0, 0, 2, 2, mailboxes); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailboxes))); EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); @@ -235,7 +233,7 @@ GL_TEXTURE_2D, GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 0, 2, 2, 0); SetScopedTextureBinderExpectations(GL_TEXTURE_2D); - auto& cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); cmd.Init(0, 0, 0, 0, 2, 1, mailboxes); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailboxes))); } @@ -248,7 +246,7 @@ GL_TEXTURE_2D, GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0, 1, 2, 1, 0); SetScopedTextureBinderExpectations(GL_TEXTURE_2D); - auto& cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); cmd.Init(1, 1, 0, 0, 1, 1, mailboxes); EXPECT_EQ(error::kNoError, ExecuteImmediateCmd(cmd, sizeof(mailboxes))); } @@ -270,7 +268,7 @@ CreateFakeTexture(kNewServiceId, viz::ResourceFormat::RED_8, /*width=*/2, /*height=*/2, /*cleared=*/true); - auto& copy_cmd = *GetImmediateAs<CopySubTextureINTERNALImmediate>(); + auto& copy_cmd = *GetImmediateAs<cmds::CopySubTextureINTERNALImmediate>(); GLbyte mailboxes[sizeof(gpu::Mailbox) * 2]; CopyMailboxes(mailboxes, client_texture_mailbox_, dest_texture_mailbox); copy_cmd.Init(0, 0, 0, 0, 2, 1, mailboxes);
diff --git a/gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc b/gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc index 054a41e1..2f77812 100644 --- a/gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc +++ b/gpu/command_buffer/service/raster_decoder_unittest_context_lost.cc
@@ -18,8 +18,6 @@ namespace gpu { namespace raster { -using namespace cmds; - class RasterDecoderOOMTest : public RasterDecoderManualInitTest { protected: void Init(bool has_robustness) { @@ -119,7 +117,7 @@ .RetiresOnSaturation(); EXPECT_CALL(*gl_, GetGraphicsResetStatusARB()) .WillOnce(Return(reset_status)); - GetError cmd; + cmds::GetError cmd; cmd.Init(shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); EXPECT_EQ(static_cast<GLuint>(GL_NO_ERROR), *GetSharedMemoryAs<GLenum*>()); @@ -130,7 +128,7 @@ EXPECT_CALL(*gl_, GetError()) .WillOnce(Return(GL_CONTEXT_LOST_KHR)) .RetiresOnSaturation(); - GetError cmd; + cmds::GetError cmd; cmd.Init(shared_memory_id_, shared_memory_offset_); EXPECT_EQ(error::kLostContext, ExecuteCmd(cmd)); } @@ -169,9 +167,9 @@ Init(/*has_robustness=*/false); const GLsync kGlSync = reinterpret_cast<GLsync>(0xdeadbeef); - GenHelper<GenQueriesEXTImmediate>(kNewClientId); + GenHelper<cmds::GenQueriesEXTImmediate>(kNewClientId); - BeginQueryEXT begin_cmd; + cmds::BeginQueryEXT begin_cmd; begin_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, kNewClientId, shared_memory_id_, kSharedMemoryOffset); EXPECT_EQ(error::kNoError, ExecuteCmd(begin_cmd)); @@ -193,7 +191,7 @@ .RetiresOnSaturation(); #endif - EndQueryEXT end_cmd; + cmds::EndQueryEXT end_cmd; end_cmd.Init(GL_COMMANDS_COMPLETED_CHROMIUM, 1); EXPECT_EQ(error::kNoError, ExecuteCmd(end_cmd)); EXPECT_EQ(GL_NO_ERROR, GetGLError());
diff --git a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc index dab4b7a..f9d188b 100644 --- a/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc +++ b/gpu/command_buffer/tests/webgpu_mailbox_unittest.cc
@@ -11,8 +11,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/color_space.h" -using namespace testing; - namespace gpu { namespace { @@ -25,7 +23,7 @@ void* userdata)); }; -std::unique_ptr<StrictMock<MockBufferMapReadCallback>> +std::unique_ptr<testing::StrictMock<MockBufferMapReadCallback>> mock_buffer_map_read_callback; void ToMockBufferMapReadCallback(DawnBufferMapAsyncStatus status, const void* ptr, @@ -42,7 +40,7 @@ void(DawnErrorType type, const char* message, void* userdata)); }; -std::unique_ptr<StrictMock<MockUncapturedErrorCallback>> +std::unique_ptr<testing::StrictMock<MockUncapturedErrorCallback>> mock_device_error_callback; void ToMockUncapturedErrorCallback(DawnErrorType type, const char* message, @@ -58,9 +56,9 @@ WebGPUTest::SetUp(); Initialize(WebGPUTest::Options()); mock_buffer_map_read_callback = - std::make_unique<StrictMock<MockBufferMapReadCallback>>(); + std::make_unique<testing::StrictMock<MockBufferMapReadCallback>>(); mock_device_error_callback = - std::make_unique<StrictMock<MockUncapturedErrorCallback>>(); + std::make_unique<testing::StrictMock<MockUncapturedErrorCallback>>(); } void TearDown() override { @@ -182,7 +180,8 @@ uint32_t buffer_contents = 0xFF00FF00; EXPECT_CALL(*mock_buffer_map_read_callback, Call(DAWN_BUFFER_MAP_ASYNC_STATUS_SUCCESS, - Pointee(Eq(buffer_contents)), sizeof(uint32_t), 0)) + testing::Pointee(testing::Eq(buffer_contents)), + sizeof(uint32_t), 0)) .Times(1); WaitForCompletion(device); @@ -225,7 +224,7 @@ // Try using the texture, it should produce a validation error. dawn::TextureView view = texture.CreateView(); EXPECT_CALL(*mock_device_error_callback, - Call(DAWN_ERROR_TYPE_VALIDATION, _, _)) + Call(DAWN_ERROR_TYPE_VALIDATION, testing::_, testing::_)) .Times(1); WaitForCompletion(device); }
diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg index 0e589f1..77e646b 100644 --- a/infra/config/cr-buildbucket.cfg +++ b/infra/config/cr-buildbucket.cfg
@@ -832,6 +832,17 @@ } builder_mixins { + name: "ios-ci-cr" + mixins: "ios" + mixins: "mac" + # ios bots may run both on Mac Minis with cores:4 and VMs with cores:8. + dimensions: "cores:" + recipe { + properties: "xcode_build_version:11a420a" + } +} + +builder_mixins { name: "ios-try" mixins: "ios" mixins: "mac-try" @@ -841,6 +852,15 @@ } builder_mixins { + name: "ios-try-cr" + mixins: "ios" + mixins: "mac-try" + recipe { + properties: "xcode_build_version:11a420a" + } +} + +builder_mixins { name: "ios-webrtc" dimensions: "os:Mac" recipe { name: "webrtc/chromium_ios" } @@ -2171,6 +2191,7 @@ builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-beta-simulator" } builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-sdk-device" } builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-sdk-simulator" } + builders { mixins: "ios-ci-cr" mixins: "fyi-ci" name: "ios-simulator-cr-recipe" } # Win bots. builders { @@ -4676,6 +4697,7 @@ builders { mixins: "ios-try" name: "ios-simulator-eg" } builders { mixins: "ios-try" name: "ios-simulator-xcode-clang" } builders { mixins: "ios-try" name: "ios-slimnav" } + builders { mixins: "ios-try-cr" name: "ios-simulator-cr-recipe" } builders { mixins: "mac-dawn-try" mixins: "goma-rbe-prod"
diff --git a/infra/config/generated/cr-buildbucket.cfg b/infra/config/generated/cr-buildbucket.cfg index 0e589f1..77e646b 100644 --- a/infra/config/generated/cr-buildbucket.cfg +++ b/infra/config/generated/cr-buildbucket.cfg
@@ -832,6 +832,17 @@ } builder_mixins { + name: "ios-ci-cr" + mixins: "ios" + mixins: "mac" + # ios bots may run both on Mac Minis with cores:4 and VMs with cores:8. + dimensions: "cores:" + recipe { + properties: "xcode_build_version:11a420a" + } +} + +builder_mixins { name: "ios-try" mixins: "ios" mixins: "mac-try" @@ -841,6 +852,15 @@ } builder_mixins { + name: "ios-try-cr" + mixins: "ios" + mixins: "mac-try" + recipe { + properties: "xcode_build_version:11a420a" + } +} + +builder_mixins { name: "ios-webrtc" dimensions: "os:Mac" recipe { name: "webrtc/chromium_ios" } @@ -2171,6 +2191,7 @@ builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-beta-simulator" } builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-sdk-device" } builders { mixins: "ios-ci" mixins: "fyi-ci" name: "ios13-sdk-simulator" } + builders { mixins: "ios-ci-cr" mixins: "fyi-ci" name: "ios-simulator-cr-recipe" } # Win bots. builders { @@ -4676,6 +4697,7 @@ builders { mixins: "ios-try" name: "ios-simulator-eg" } builders { mixins: "ios-try" name: "ios-simulator-xcode-clang" } builders { mixins: "ios-try" name: "ios-slimnav" } + builders { mixins: "ios-try-cr" name: "ios-simulator-cr-recipe" } builders { mixins: "mac-dawn-try" mixins: "goma-rbe-prod"
diff --git a/infra/config/generated/luci-milo.cfg b/infra/config/generated/luci-milo.cfg index 47f6edc..503c61e 100644 --- a/infra/config/generated/luci-milo.cfg +++ b/infra/config/generated/luci-milo.cfg
@@ -2319,11 +2319,21 @@ category: "goma|ios" } builders { + name: "buildbucket/luci.chromium.ci/ios-simulator-cr-recipe" + category: "iOS" + short_name: "chr" + } + builders { name: "buildbucket/luci.chromium.ci/ios-webkit-tot" category: "iOS" short_name: "wk" } builders { + name: "buildbucket/luci.chromium.ci/ios12-beta-simulator" + category: "iOS|iOS12" + short_name: "beta" + } + builders { name: "buildbucket/luci.chromium.ci/ios13-sdk-device" category: "iOS|iOS13" short_name: "dev" @@ -4547,6 +4557,9 @@ name: "buildbucket/luci.chromium.try/ios-device-xcode-clang" } builders { + name: "buildbucket/luci.chromium.try/ios-simulator-cr-recipe" + } + builders { name: "buildbucket/luci.chromium.try/ios-simulator-cronet" } builders {
diff --git a/infra/config/generated/luci-scheduler.cfg b/infra/config/generated/luci-scheduler.cfg index 31e3e15..7b4097a1 100644 --- a/infra/config/generated/luci-scheduler.cfg +++ b/infra/config/generated/luci-scheduler.cfg
@@ -357,6 +357,7 @@ triggers: "ios-device-goma-rbe-latest-clobber" triggers: "ios-device-xcode-clang" triggers: "ios-simulator" + triggers: "ios-simulator-cr-recipe" triggers: "ios-simulator-cronet" triggers: "ios-simulator-full-configs" triggers: "ios-simulator-noncq" @@ -1351,6 +1352,16 @@ } job { + id: "ios-simulator-cr-recipe" + acl_sets: "default" + buildbucket: { + server: "cr-buildbucket.appspot.com" + bucket: "luci.chromium.ci" + builder: "ios-simulator-cr-recipe" + } +} + +job { id: "ios-simulator-xcode-clang" acl_sets: "default" buildbucket: {
diff --git a/infra/config/luci-milo.cfg b/infra/config/luci-milo.cfg index 47f6edc..503c61e 100644 --- a/infra/config/luci-milo.cfg +++ b/infra/config/luci-milo.cfg
@@ -2319,11 +2319,21 @@ category: "goma|ios" } builders { + name: "buildbucket/luci.chromium.ci/ios-simulator-cr-recipe" + category: "iOS" + short_name: "chr" + } + builders { name: "buildbucket/luci.chromium.ci/ios-webkit-tot" category: "iOS" short_name: "wk" } builders { + name: "buildbucket/luci.chromium.ci/ios12-beta-simulator" + category: "iOS|iOS12" + short_name: "beta" + } + builders { name: "buildbucket/luci.chromium.ci/ios13-sdk-device" category: "iOS|iOS13" short_name: "dev" @@ -4547,6 +4557,9 @@ name: "buildbucket/luci.chromium.try/ios-device-xcode-clang" } builders { + name: "buildbucket/luci.chromium.try/ios-simulator-cr-recipe" + } + builders { name: "buildbucket/luci.chromium.try/ios-simulator-cronet" } builders {
diff --git a/infra/config/luci-scheduler.cfg b/infra/config/luci-scheduler.cfg index 31e3e15..7b4097a1 100644 --- a/infra/config/luci-scheduler.cfg +++ b/infra/config/luci-scheduler.cfg
@@ -357,6 +357,7 @@ triggers: "ios-device-goma-rbe-latest-clobber" triggers: "ios-device-xcode-clang" triggers: "ios-simulator" + triggers: "ios-simulator-cr-recipe" triggers: "ios-simulator-cronet" triggers: "ios-simulator-full-configs" triggers: "ios-simulator-noncq" @@ -1351,6 +1352,16 @@ } job { + id: "ios-simulator-cr-recipe" + acl_sets: "default" + buildbucket: { + server: "cr-buildbucket.appspot.com" + bucket: "luci.chromium.ci" + builder: "ios-simulator-cr-recipe" + } +} + +job { id: "ios-simulator-xcode-clang" acl_sets: "default" buildbucket: {
diff --git a/ios/build/bots/scripts/run.py b/ios/build/bots/scripts/run.py index 9936172..881f268 100755 --- a/ios/build/bots/scripts/run.py +++ b/ios/build/bots/scripts/run.py
@@ -32,6 +32,8 @@ logging.basicConfig(format='[%(asctime)s:%(levelname)s] %(message)s', level=logging.DEBUG, datefmt='%I:%M:%S') + test_runner.defaults_delete('com.apple.CoreSimulator', + 'FramebufferServerRendererPolicy') args, test_args = parse_args() summary = {} @@ -142,6 +144,8 @@ if tr: with open(os.path.join(args.out_dir, 'full_results.json'), 'w') as f: json.dump(tr.test_results, f) + test_runner.defaults_delete('com.apple.CoreSimulator', + 'FramebufferServerRendererPolicy') def parse_args():
diff --git a/ios/build/bots/scripts/test_runner.py b/ios/build/bots/scripts/test_runner.py index 01dc61f..47938e2d 100644 --- a/ios/build/bots/scripts/test_runner.py +++ b/ios/build/bots/scripts/test_runner.py
@@ -175,13 +175,37 @@ distutils.version.LooseVersion('13.0')) -def terminate_process(proc): +def defaults_write(d, key, value): + """Run 'defaults write d key value' command. + + Args: + d: (str) A dictionary. + key: (str) A key. + value: (str) A value. + """ + LOGGER.info('Run \'defaults write %s %s %s\'' % (d, key, value)) + subprocess.call(['defaults', 'write', d, key, value]) + + +def defaults_delete(d, key): + """Run 'defaults delete d key' command. + + Args: + d: (str) A dictionary. + key: (str) Key to delete. + """ + LOGGER.info('Run \'defaults delete %s %s\'' % (d, key)) + subprocess.call(['defaults', 'delete', d, key]) + + +def terminate_process(proc, proc_name): """Terminates the process. If an error occurs ignore it, just print out a message. Args: proc: A subprocess to terminate. + proc_name: A name of process. """ try: LOGGER.info('Killing hung process %s' % proc.pid) @@ -192,20 +216,21 @@ # Check whether proc.pid process is still alive. if ps.is_running(): LOGGER.info( - 'Process iossim is still alive! Xcodebuild process might block it.') - xcodebuild_processes = [ + 'Process %s is still alive! %s process might block it.', + proc.name, proc_name) + running_processes = [ p for p in psutil.process_iter() # Use as_dict() to avoid API changes across versions of psutil. - if 'xcodebuild' == p.as_dict(attrs=['name'])['name']] - if not xcodebuild_processes: - LOGGER.debug('There are no running xcodebuild processes.') + if proc_name == p.as_dict(attrs=['name'])['name']] + if not running_processes: + LOGGER.debug('There are no running %s processes.', proc_name) break - LOGGER.debug('List of running xcodebuild processes: %s' - % xcodebuild_processes) - # Killing xcodebuild processes - for p in xcodebuild_processes: + LOGGER.debug('List of running %s processes: %s' + % (proc_name, running_processes)) + # Killing running processes with proc_name + for p in running_processes: p.send_signal(signal.SIGKILL) - psutil.wait_procs(xcodebuild_processes) + psutil.wait_procs(running_processes) else: LOGGER.info('Process was killed!') break @@ -213,7 +238,10 @@ LOGGER.info('Error while killing a process: %s' % ex) -def print_process_output(proc, parser, timeout=READLINE_TIMEOUT): +def print_process_output(proc, + proc_name=None, + parser=None, + timeout=READLINE_TIMEOUT): """Logs process messages in console and waits until process is done. Method waits until no output message and if no message for timeout seconds, @@ -221,10 +249,17 @@ Args: proc: A running process. + proc_name: (str) A process name that has to be killed + if no output occurs in specified timeout. Sometimes proc generates + child process that may block its parent and for such cases + proc_name refers to the name of child process. + If proc_name is not specified, proc.name will be used to kill process. Parser: A parser. - timeout: Timeout(in seconds) to subprocess.stdout.readline method. + timeout: A timeout(in seconds) to subprocess.stdout.readline method. """ out = [] + if not proc_name: + proc_name = psutil.Process(proc.pid).name() while True: # subprocess.stdout.readline() might be stuck from time to time # and tests fail because of TIMEOUT. @@ -232,7 +267,7 @@ # that will kill `frozen` running process if no new line is read # and will finish test attempt. # If new line appears in timeout, just cancel timer. - timer = threading.Timer(timeout, terminate_process, [proc]) + timer = threading.Timer(timeout, terminate_process, [proc, proc_name]) timer.start() line = proc.stdout.readline() timer.cancel() @@ -240,7 +275,8 @@ break line = line.rstrip() out.append(line) - parser.ProcessLine(line) + if parser: + parser.ProcessLine(line) LOGGER.info(line) sys.stdout.flush() LOGGER.debug('Finished print_process_output.') @@ -544,6 +580,19 @@ """ return os.environ.copy() + def start_proc(self, cmd): + """Starts a process with cmd command and os.environ. + + Returns: + An instance of process. + """ + return subprocess.Popen( + cmd, + env=self.get_launch_env(), + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + def shutdown_and_restart(self): """Restart a device or relaunch a simulator.""" pass @@ -575,6 +624,7 @@ os.mkdir(os.path.join(self.out_dir, 'DerivedData')) derived_data = os.path.join(self.out_dir, 'DerivedData') for directory in os.listdir(DERIVED_DATA): + LOGGER.info('Copying %s directory', directory) shutil.move(os.path.join(DERIVED_DATA, directory), derived_data) def wipe_derived_data(self): @@ -657,15 +707,10 @@ else: # TODO(crbug.com/812705): Implement test sharding for unit tests. # TODO(crbug.com/812712): Use thread pool for DeviceTestRunner as well. - proc = subprocess.Popen( - cmd, - env=self.get_launch_env(), - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) + proc = self.start_proc(cmd) old_handler = self.set_sigterm_handler( lambda _signum, _frame: self.handle_sigterm(proc)) - print_process_output(proc, parser) + print_process_output(proc, 'xcodebuild', parser) LOGGER.info('Waiting for test process to terminate.') proc.wait() @@ -1005,14 +1050,9 @@ if self.xctest_path: cmd.append(self.xctest_path) - proc = subprocess.Popen( - cmd, - env=self.get_launch_env(), - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) - - out = print_process_output(proc, xctest_utils.XCTestLogParser()) + proc = self.start_proc(cmd) + out = print_process_output(proc, 'xcodebuild', + xctest_utils.XCTestLogParser()) self.deleteSimulator(udid) return (out, udid, proc.returncode) @@ -1283,12 +1323,7 @@ if self.xctest_path: recipe_cmd.append(self.xctest_path) - proc = subprocess.Popen( - recipe_cmd, - env=self.get_launch_env(), - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - ) + proc = self.start_proc(recipe_cmd) old_handler = self.set_sigterm_handler( lambda _signum, _frame: self.handle_sigterm(proc)) @@ -1297,7 +1332,7 @@ else: parser = gtest_utils.GTestLogParser() - print_process_output(proc, parser) + print_process_output(proc, 'xcodebuild', parser) proc.wait() self.set_sigterm_handler(old_handler) @@ -1603,15 +1638,23 @@ def uninstall_apps(self): """Uninstalls all apps found on the device.""" - for app in subprocess.check_output( - ['idevicefs', '--udid', self.udid, 'ls', '@']).splitlines(): - subprocess.check_call( - ['ideviceinstaller', '--udid', self.udid, '--uninstall', app]) + for app in self.get_installed_packages(): + cmd = ['ideviceinstaller', '--udid', self.udid, '--uninstall', app] + print_process_output(self.start_proc(cmd)) def install_app(self): """Installs the app.""" - subprocess.check_call( - ['ideviceinstaller', '--udid', self.udid, '--install', self.app_path]) + cmd = ['ideviceinstaller', '--udid', self.udid, '--install', self.app_path] + print_process_output(self.start_proc(cmd)) + + def get_installed_packages(self): + """Gets a list of installed packages on a device. + + Returns: + A list of installed packages on a device. + """ + cmd = ['idevicefs', '--udid', self.udid, 'ls', '@'] + return print_process_output(self.start_proc(cmd)) def set_up(self): """Performs setup actions which must occur prior to every test launch.""" @@ -1621,14 +1664,15 @@ def extract_test_data(self): """Extracts data emitted by the test.""" - try: - subprocess.check_call([ + cmd = [ 'idevicefs', '--udid', self.udid, 'pull', '@%s/Documents' % self.cfbundleid, os.path.join(self.out_dir, 'Documents'), - ]) + ] + try: + print_process_output(self.start_proc(cmd)) except subprocess.CalledProcessError: raise TestDataExtractionError() @@ -1650,13 +1694,14 @@ """Retrieves crash reports produced by the test.""" logs_dir = os.path.join(self.out_dir, 'Logs') os.mkdir(logs_dir) - try: - subprocess.check_call([ + cmd = [ 'idevicecrashreport', '--extract', '--udid', self.udid, logs_dir, - ]) + ] + try: + print_process_output(self.start_proc(cmd)) except subprocess.CalledProcessError: # TODO(crbug.com/828951): Raise the exception when the bug is fixed. LOGGER.warning('Failed to retrieve crash reports from device.')
diff --git a/mojo/public/tools/bindings/generators/js_templates/fuzzing.tmpl b/mojo/public/tools/bindings/generators/js_templates/fuzzing.tmpl index e8a7460..87814efe 100644 --- a/mojo/public/tools/bindings/generators/js_templates/fuzzing.tmpl +++ b/mojo/public/tools/bindings/generators/js_templates/fuzzing.tmpl
@@ -101,9 +101,9 @@ {{build_call(obj, operation, 'Interface', name, '"' ~ kind.module.namespace ~ '.' ~ kind.name ~ '"', kind.is_nullable|to_js_boolean)}} {%- elif kind|is_pending_remote_kind -%} {{build_call(obj, operation, 'Interface', name, '"' ~ kind.kind.module.namespace ~ '.' ~ kind.kind.name ~ '"', kind.is_nullable|to_js_boolean)}} -{%- elif kind|is_associated_interface_request_kind -%} +{%- elif kind|is_associated_interface_request_kind or kind|is_pending_associated_receiver_kind -%} {{build_call(obj, operation, 'AssociatedInterfaceRequest', name, '"' ~ kind.kind.module.namespace ~ '.' ~ kind.kind.name ~ '"', kind.is_nullable|to_js_boolean)}} -{%- elif kind|is_associated_interface_kind -%} +{%- elif kind|is_associated_interface_kind or kind|is_pending_associated_remote_kind -%} {{build_call(obj, operation, 'AssociatedInterface', name, '"' ~ kind.kind.module.namespace ~ '.' ~ kind.kind.name ~ '"', kind.is_nullable|to_js_boolean)}} {%- endif -%} {%- endmacro -%}
diff --git a/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl b/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl index de19055..142b7f4 100644 --- a/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl +++ b/mojo/public/tools/bindings/generators/js_templates/validation_macros.tmpl
@@ -29,11 +29,13 @@ // validate {{name}} err = messageValidator.validateInterfaceRequest({{offset}}, {{field|validate_nullable_params}}) {{_check_err()}} -{%- elif field.kind|is_associated_interface_kind %} +{%- elif field.kind|is_associated_interface_kind or + field.kind|is_pending_associated_remote_kind %} // validate {{name}} err = messageValidator.validateAssociatedInterface({{offset}}, {{field|validate_nullable_params}}); {{_check_err()}} -{%- elif field.kind|is_associated_interface_request_kind %} +{%- elif field.kind|is_associated_interface_request_kind or + field.kind|is_pending_associated_receiver_kind %} // validate {{name}} err = messageValidator.validateAssociatedInterfaceRequest({{offset}}, {{field|validate_nullable_params}}) {{_check_err()}}
diff --git a/mojo/public/tools/bindings/generators/mojom_js_generator.py b/mojo/public/tools/bindings/generators/mojom_js_generator.py index 25364fe..1fbf4e7 100644 --- a/mojo/public/tools/bindings/generators/mojom_js_generator.py +++ b/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -286,8 +286,11 @@ "is_any_handle_or_interface_kind": mojom.IsAnyHandleOrInterfaceKind, "is_array_kind": mojom.IsArrayKind, "is_associated_interface_kind": mojom.IsAssociatedInterfaceKind, + "is_pending_associated_remote_kind": mojom.IsPendingAssociatedRemoteKind, "is_associated_interface_request_kind": mojom.IsAssociatedInterfaceRequestKind, + "is_pending_associated_receiver_kind": + mojom.IsPendingAssociatedReceiverKind, "is_bool_kind": mojom.IsBoolKind, "is_enum_kind": mojom.IsEnumKind, "is_any_handle_kind": mojom.IsAnyHandleKind, @@ -447,7 +450,9 @@ self._LiteClosureTypeWithNullability(kind.value_kind)) if (mojom.IsAssociatedKind(kind) or mojom.IsInterfaceRequestKind(kind) or - mojom.IsPendingRemoteKind(kind) or mojom.IsPendingReceiverKind(kind)): + mojom.IsPendingRemoteKind(kind) or mojom.IsPendingReceiverKind(kind) or + mojom.IsPendingAssociatedRemoteKind(kind) or + mojom.IsPendingAssociatedReceiverKind(kind)): named_kind = kind.kind else: named_kind = kind @@ -546,7 +551,9 @@ "true" if mojom.IsNullableKind(kind.value_kind) else "false") if (mojom.IsAssociatedKind(kind) or mojom.IsInterfaceRequestKind(kind) or - mojom.IsPendingRemoteKind(kind) or mojom.IsPendingReceiverKind(kind)): + mojom.IsPendingRemoteKind(kind) or mojom.IsPendingReceiverKind(kind) or + mojom.IsPendingAssociatedRemoteKind(kind) or + mojom.IsPendingAssociatedReceiverKind(kind)): named_kind = kind.kind else: named_kind = kind
diff --git a/net/dns/host_resolver_manager.cc b/net/dns/host_resolver_manager.cc index b233cc61..25e2bcf 100644 --- a/net/dns/host_resolver_manager.cc +++ b/net/dns/host_resolver_manager.cc
@@ -1474,6 +1474,7 @@ num_occupied_job_slots_(0), dispatcher_(nullptr), dns_task_error_(OK), + is_secure_dns_task_error_(false), tick_clock_(tick_clock), start_time_(base::TimeTicks()), net_log_( @@ -1631,6 +1632,7 @@ if (has_proc_fallback) { KillDnsTask(); dns_task_error_ = OK; + is_secure_dns_task_error_ = false; RunNextTask(); } else if (!fallback_only) { CompleteRequestsWithError(error); @@ -1863,6 +1865,15 @@ DCHECK(proc_task_); if (dns_task_error_ != OK) { + // If a secure DNS task previously failed and fell back to a ProcTask + // without issuing an insecure DNS task in between, record what happened + // to the fallback ProcTask. + if (is_secure_dns_task_error_) { + base::UmaHistogramSparse( + "Net.DNS.SecureDnsTaskFailure.FallbackProcTask.Error", + std::abs(net_error)); + } + // This ProcTask was a fallback resolution after a failed insecure // DnsTask. if (net_error == OK) { @@ -1981,6 +1992,7 @@ completion_results_.push_back({failure_results, ttl, secure}); dns_task_error_ = failure_results.error(); + is_secure_dns_task_error_ = secure; KillDnsTask(); RunNextTask(); } @@ -1992,6 +2004,14 @@ bool secure) override { DCHECK(dns_task_); + // If a secure DNS task previously failed, record what happened to the + // fallback insecure DNS task. + if (dns_task_error_ != OK && is_secure_dns_task_error_) { + base::UmaHistogramSparse( + "Net.DNS.SecureDnsTaskFailure.FallbackDnsTask.Error", + std::abs(results.error())); + } + base::TimeDelta duration = tick_clock_->NowTicks() - start_time; if (results.error() != OK) { OnDnsTaskFailure(dns_task_->AsWeakPtr(), duration, results, secure); @@ -2346,6 +2366,10 @@ // Result of DnsTask. int dns_task_error_; + // Whether the error in |dns_task_error_| corresponds to an insecure or + // secure DnsTask. + bool is_secure_dns_task_error_; + const base::TickClock* tick_clock_; base::TimeTicks start_time_;
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc index b46df63..e5fb2f8 100644 --- a/net/http/http_cache.cc +++ b/net/http/http_cache.cc
@@ -530,6 +530,7 @@ // double-keyed (and makes it an invalid url so that it doesn't get // confused with a single-keyed entry). Separate the origin and url // with invalid whitespace character |kDoubleKeySeparator|. + DCHECK(request->network_isolation_key.IsFullyPopulated()); isolation_key = base::StrCat({kDoubleKeyPrefix, request->network_isolation_key.ToString(), kDoubleKeySeparator});
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc index ac2ee4b..6fca8117 100644 --- a/net/http/http_network_session.cc +++ b/net/http/http_network_session.cc
@@ -87,7 +87,9 @@ enable_websocket_over_http2(false), enable_quic(false), enable_quic_proxies_for_https_urls(false), - disable_idle_sockets_close_on_memory_pressure(false) { + disable_idle_sockets_close_on_memory_pressure(false), + allow_default_credentials(HttpAuthPreferences::DefaultCredentials:: + DISALLOW_DEFAULT_CREDENTIALS) { enable_early_data = base::FeatureList::IsEnabled(features::kEnableTLS13EarlyData); }
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc index 9b91a1e..0d644da 100644 --- a/net/spdy/spdy_http_stream.cc +++ b/net/spdy/spdy_http_stream.cc
@@ -10,9 +10,6 @@ #include <utility> #include "base/bind.h" -#ifdef TEMP_INSTRUMENTATION_901501 -#include "base/debug/alias.h" -#endif #include "base/location.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" @@ -130,14 +127,6 @@ stream_->DetachDelegate(); DCHECK(!stream_); } -#ifdef TEMP_INSTRUMENTATION_901501 - liveness_ = DEAD; - stack_trace_ = base::debug::StackTrace(); - // Probably not necessary, but just in case compiler tries to optimize out the - // writes to liveness_ and stack_trace_. - base::debug::Alias(&liveness_); - base::debug::Alias(&stack_trace_); -#endif } int SpdyHttpStream::InitializeStream(const HttpRequestInfo* request_info, @@ -455,8 +444,7 @@ void SpdyHttpStream::OnTrailers(const spdy::SpdyHeaderBlock& trailers) {} void SpdyHttpStream::OnClose(int status) { - CHECK(stream_); - CrashIfInvalid(); + DCHECK(stream_); // Cancel any pending reads from the upload data stream. if (request_info_ && request_info_->upload_data_stream) @@ -480,8 +468,6 @@ return; } - CrashIfInvalid(); - if (status == OK) { // We need to complete any pending buffered read now. DoBufferedReadCallback(); @@ -489,8 +475,6 @@ return; } - CrashIfInvalid(); - if (!response_callback_.is_null()) { DoResponseCallback(status); } @@ -607,8 +591,6 @@ } void SpdyHttpStream::DoBufferedReadCallback() { - CrashIfInvalid(); - buffered_read_callback_pending_ = false; // If the transaction is cancelled or errored out, we don't need to complete @@ -630,8 +612,6 @@ if (!user_buffer_.get()) return; - CrashIfInvalid(); - if (!response_body_queue_.IsEmpty()) { int rv = response_body_queue_.Dequeue(user_buffer_->data(), user_buffer_len_); @@ -694,22 +674,4 @@ } } -void SpdyHttpStream::CrashIfInvalid() const { -#ifdef TEMP_INSTRUMENTATION_901501 - Liveness liveness = liveness_; - - if (liveness == ALIVE) - return; - - // Copy relevant variables onto the stack to guarantee they will be available - // in minidumps, and then crash. - base::debug::StackTrace stack_trace = stack_trace_; - - base::debug::Alias(&liveness); - base::debug::Alias(&stack_trace); - - CHECK_EQ(ALIVE, liveness); -#endif -} - } // namespace net
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h index a647849..fc38bea 100644 --- a/net/spdy/spdy_http_stream.h +++ b/net/spdy/spdy_http_stream.h
@@ -10,13 +10,6 @@ #include <list> #include <memory> -#include "build/build_config.h" - -// TODO(zhongyi): Temporary while investigating http://crbug.com/901501. -#ifndef OS_NACL -#define TEMP_INSTRUMENTATION_901501 -#include "base/debug/stack_trace.h" -#endif #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" @@ -103,14 +96,6 @@ NetLogSource source_dependency() const override; private: -#ifdef TEMP_INSTRUMENTATION_901501 - // TODO(zhongyi): Temporary while investigating http://crbug.com/901501. - enum Liveness { - ALIVE = 0xCA11AB13, - DEAD = 0xDEADBEEF, - }; -#endif - // Helper function used to initialize private members and to set delegate on // stream when stream is created. void InitializeStreamHelper(); @@ -151,9 +136,6 @@ void DoBufferedReadCallback(); bool ShouldWaitForMoreBufferedData() const; - // TODO(zhongyi): Temporary while investigating http://crbug.com/901501. - void CrashIfInvalid() const; - const base::WeakPtr<SpdySession> spdy_session_; // The ID of the pushed stream if one is claimed by this request. @@ -227,12 +209,6 @@ bool was_alpn_negotiated_; -#ifdef TEMP_INSTRUMENTATION_901501 - // TODO(zhongyi): Temporary while investigating http://crbug.com/901501. - Liveness liveness_ = ALIVE; - base::debug::StackTrace stack_trace_; -#endif - base::WeakPtrFactory<SpdyHttpStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SpdyHttpStream);
diff --git a/services/network/cors/preflight_controller_unittest.cc b/services/network/cors/preflight_controller_unittest.cc index fe326619..6cd7179 100644 --- a/services/network/cors/preflight_controller_unittest.cc +++ b/services/network/cors/preflight_controller_unittest.cc
@@ -226,8 +226,8 @@ mojom::NetworkServicePtr network_service_ptr; mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); - network_service_ = NetworkService::Create( - std::move(network_service_request), nullptr /* net_log */); + network_service_ = + NetworkService::Create(std::move(network_service_request)); network_service_ptr->CreateNetworkContext( network_context_remote_.BindNewPipeAndPassReceiver(),
diff --git a/services/network/network_service.cc b/services/network/network_service.cc index 7e2bac5..59f2ea1 100644 --- a/services/network/network_service.cc +++ b/services/network/network_service.cc
@@ -25,7 +25,6 @@ #include "components/network_session_configurator/common/network_features.h" #include "components/os_crypt/os_crypt.h" #include "mojo/core/embedder/embedder.h" -#include "mojo/public/cpp/bindings/strong_binding.h" #include "net/base/logging_network_change_observer.h" #include "net/base/network_change_notifier.h" #include "net/base/network_change_notifier_posix.h" @@ -209,29 +208,21 @@ NetworkService::NetworkService( std::unique_ptr<service_manager::BinderRegistry> registry, mojom::NetworkServiceRequest request, - service_manager::mojom::ServiceRequest service_request, bool delay_initialization_until_set_client) : net_log_(GetNetLog()), registry_(std::move(registry)), binding_(this) { DCHECK(!g_network_service); g_network_service = this; - // In testing environments, |service_request| may not be provided. - if (service_request.is_pending()) - service_binding_.Bind(std::move(service_request)); - // |registry_| is nullptr when an in-process NetworkService is // created directly, like in most unit tests. if (registry_) { mojo::core::SetDefaultProcessErrorCallback( base::BindRepeating(&HandleBadMessage)); - - DCHECK(!request.is_pending()); - registry_->AddInterface<mojom::NetworkService>( - base::BindRepeating(&NetworkService::Bind, base::Unretained(this))); - } else if (request.is_pending()) { - Bind(std::move(request)); } + if (request.is_pending()) + Bind(std::move(request)); + if (!delay_initialization_until_set_client) Initialize(mojom::NetworkServiceParams::New()); } @@ -328,21 +319,13 @@ } std::unique_ptr<NetworkService> NetworkService::Create( - mojom::NetworkServiceRequest request, - service_manager::mojom::ServiceRequest service_request) { - return std::make_unique<NetworkService>(nullptr, std::move(request), - std::move(service_request)); + mojom::NetworkServiceRequest request) { + return std::make_unique<NetworkService>(nullptr, std::move(request)); } std::unique_ptr<NetworkService> NetworkService::CreateForTesting() { - return CreateForTesting(nullptr); -} - -std::unique_ptr<NetworkService> NetworkService::CreateForTesting( - service_manager::mojom::ServiceRequest service_request) { return std::make_unique<NetworkService>( - std::make_unique<service_manager::BinderRegistry>(), - nullptr /* request */, std::move(service_request)); + std::make_unique<service_manager::BinderRegistry>()); } void NetworkService::RegisterNetworkContext(NetworkContext* network_context) { @@ -680,6 +663,14 @@ } #endif +void NetworkService::BindTestInterface( + mojo::PendingReceiver<mojom::NetworkServiceTest> receiver) { + if (registry_) { + auto pipe = receiver.PassPipe(); + registry_->TryBindInterface(mojom::NetworkServiceTest::Name_, &pipe); + } +} + std::unique_ptr<net::HttpAuthHandlerFactory> NetworkService::CreateHttpAuthHandlerFactory(NetworkContext* network_context) { if (!http_auth_static_params_) { @@ -709,13 +700,6 @@ MaybeStartUpdateLoadInfoTimer(); } -void NetworkService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) { - registry_->BindInterface(interface_name, std::move(interface_pipe)); -} - void NetworkService::DestroyNetworkContexts() { // Delete NetworkContexts. If there's a primary NetworkContext, it must be // deleted after all other NetworkContexts, to avoid use-after-frees.
diff --git a/services/network/network_service.h b/services/network/network_service.h index acd5000..433d6f27 100644 --- a/services/network/network_service.h +++ b/services/network/network_service.h
@@ -39,9 +39,6 @@ #include "services/network/public/mojom/network_quality_estimator_manager.mojom.h" #include "services/network/public/mojom/network_service.mojom.h" #include "services/service_manager/public/cpp/binder_registry.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/mojom/service.mojom.h" namespace net { class FileNetLogObserver; @@ -61,13 +58,11 @@ class NetworkUsageAccumulator; class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkService - : public service_manager::Service, - public mojom::NetworkService { + : public mojom::NetworkService { public: NetworkService( std::unique_ptr<service_manager::BinderRegistry> registry, mojom::NetworkServiceRequest request = nullptr, - service_manager::mojom::ServiceRequest service_request = nullptr, bool delay_initialization_until_set_client = false); ~NetworkService() override; @@ -89,20 +84,13 @@ // the passed-in NetLog. Does not take ownership of |net_log|. Must be // destroyed before |net_log|. static std::unique_ptr<NetworkService> Create( - mojom::NetworkServiceRequest request, - service_manager::mojom::ServiceRequest service_request = nullptr); + mojom::NetworkServiceRequest request); // Creates a testing instance of NetworkService not bound to an actual // Service pipe. This instance must be driven by direct calls onto the // NetworkService object. static std::unique_ptr<NetworkService> CreateForTesting(); - // Creates a testing instance of NetworkService similar to above, but the - // instance is bound to |request|. Test code may use an appropriate Connector - // to bind interface requests within this service instance. - static std::unique_ptr<NetworkService> CreateForTesting( - service_manager::mojom::ServiceRequest service_request); - // These are called by NetworkContexts as they are being created and // destroyed. // TODO(mmenke): Remove once all NetworkContexts are owned by the @@ -181,6 +169,8 @@ #if defined(OS_ANDROID) void DumpWithoutCrashing(base::Time dump_request_time) override; #endif + void BindTestInterface( + mojo::PendingReceiver<mojom::NetworkServiceTest> receiver) override; // Returns an HttpAuthHandlerFactory for the given NetworkContext. std::unique_ptr<net::HttpAuthHandlerFactory> CreateHttpAuthHandlerFactory( @@ -229,11 +219,6 @@ static NetworkService* GetNetworkServiceForTesting(); private: - // service_manager::Service implementation. - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; - void DestroyNetworkContexts(); // Called by a NetworkContext when its mojo pipe is closed. Deletes the @@ -253,8 +238,6 @@ // Starts timer call UpdateLoadInfo() again, if needed. void AckUpdateLoadInfo(); - service_manager::ServiceBinding service_binding_{this}; - bool initialized_ = false; net::NetLog* net_log_;
diff --git a/services/network/network_service_unittest.cc b/services/network/network_service_unittest.cc index 7e75db4..6975e2a 100644 --- a/services/network/network_service_unittest.cc +++ b/services/network/network_service_unittest.cc
@@ -58,7 +58,6 @@ #include "services/network/test/test_network_context_client.h" #include "services/network/test/test_network_service_client.h" #include "services/network/test/test_url_loader_client.h" -#include "services/service_manager/public/cpp/test/test_connector_factory.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" @@ -70,8 +69,6 @@ namespace { -const char kNetworkServiceName[] = "network"; - const base::FilePath::CharType kServicesTestData[] = FILE_PATH_LITERAL("services/test/data"); @@ -728,10 +725,8 @@ void SetUp() override { test_server_.AddDefaultHandlers(base::FilePath(kServicesTestData)); ASSERT_TRUE(test_server_.Start()); - service_ = NetworkService::CreateForTesting( - test_connector_factory_.RegisterInstance(kNetworkServiceName)); - test_connector_factory_.GetDefaultConnector()->BindInterface( - kNetworkServiceName, &network_service_); + service_ = NetworkService::CreateForTesting(); + service_->Bind(mojo::MakeRequest(&network_service_)); } void CreateNetworkContext() { @@ -779,7 +774,6 @@ protected: base::test::TaskEnvironment task_environment_; - service_manager::TestConnectorFactory test_connector_factory_; std::unique_ptr<NetworkService> service_; net::EmbeddedTestServer test_server_; @@ -1400,10 +1394,8 @@ NetworkServiceNetworkChangeTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::IO), network_change_notifier_(net::NetworkChangeNotifier::CreateMock()), - service_(NetworkService::CreateForTesting( - test_connector_factory_.RegisterInstance(kNetworkServiceName))) { - test_connector_factory_.GetDefaultConnector()->BindInterface( - kNetworkServiceName, &network_service_); + service_(NetworkService::CreateForTesting()) { + service_->Bind(mojo::MakeRequest(&network_service_)); } ~NetworkServiceNetworkChangeTest() override {} @@ -1412,11 +1404,9 @@ private: base::test::TaskEnvironment task_environment_; - service_manager::TestConnectorFactory test_connector_factory_; std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_; - std::unique_ptr<NetworkService> service_; - mojom::NetworkServicePtr network_service_; + std::unique_ptr<NetworkService> service_; DISALLOW_COPY_AND_ASSIGN(NetworkServiceNetworkChangeTest); };
diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn index 5003a80..d363bb9 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn
@@ -242,16 +242,3 @@ ":buildflags", ] } - -source_set("manifest") { - sources = [ - "manifest.cc", - "manifest.h", - ] - - deps = [ - "//base", - "//services/network/public/mojom", - "//services/service_manager/public/cpp", - ] -}
diff --git a/services/network/public/cpp/manifest.cc b/services/network/public/cpp/manifest.cc deleted file mode 100644 index 4e643ef..0000000 --- a/services/network/public/cpp/manifest.cc +++ /dev/null
@@ -1,34 +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. - -#include "services/network/public/cpp/manifest.h" - -#include "services/network/public/mojom/network_service.mojom.h" -#include "services/network/public/mojom/network_service_test.mojom.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -namespace network { - -service_manager::Manifest GetManifest( - service_manager::Manifest::ExecutionMode execution_mode) { - return service_manager::Manifest{ - service_manager::ManifestBuilder() - .WithServiceName("network") - .WithDisplayName("Network Service") - .WithOptions(service_manager::ManifestOptionsBuilder() - .WithExecutionMode(execution_mode) - .WithSandboxType("network") - .WithInstanceSharingPolicy( - service_manager::Manifest:: - InstanceSharingPolicy::kSharedAcrossGroups) - .Build()) - .ExposeCapability("test", service_manager::Manifest::InterfaceList< - mojom::NetworkServiceTest>()) - .ExposeCapability( - "network_service", - service_manager::Manifest::InterfaceList<mojom::NetworkService>()) - .Build()}; -} - -} // namespace network
diff --git a/services/network/public/cpp/manifest.h b/services/network/public/cpp/manifest.h deleted file mode 100644 index f87cf07..0000000 --- a/services/network/public/cpp/manifest.h +++ /dev/null
@@ -1,17 +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. - -#ifndef SERVICES_NETWORK_PUBLIC_CPP_MANIFEST_H_ -#define SERVICES_NETWORK_PUBLIC_CPP_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -namespace network { - -service_manager::Manifest GetManifest( - service_manager::Manifest::ExecutionMode execution_mode); - -} // namespace network - -#endif // SERVICES_NETWORK_PUBLIC_CPP_MANIFEST_H_
diff --git a/services/network/public/cpp/network_connection_tracker_unittest.cc b/services/network/public/cpp/network_connection_tracker_unittest.cc index 101b26d..2d0209f 100644 --- a/services/network/public/cpp/network_connection_tracker_unittest.cc +++ b/services/network/public/cpp/network_connection_tracker_unittest.cc
@@ -183,8 +183,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + NetworkService::Create(std::move(network_service_request)); tracker_ = std::make_unique<NetworkConnectionTracker>(base::BindRepeating( &NetworkConnectionTrackerTest::BindReceiver, base::Unretained(this))); observer_ = std::make_unique<TestNetworkConnectionObserver>(tracker_.get());
diff --git a/services/network/public/cpp/network_quality_tracker_unittest.cc b/services/network/public/cpp/network_quality_tracker_unittest.cc index 0bfd566b..d3fe4887 100644 --- a/services/network/public/cpp/network_quality_tracker_unittest.cc +++ b/services/network/public/cpp/network_quality_tracker_unittest.cc
@@ -172,8 +172,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); tracker_ = std::make_unique<NetworkQualityTracker>( base::BindRepeating(&NetworkQualityTrackerTest::mojom_network_service, base::Unretained(this)));
diff --git a/services/network/public/cpp/simple_url_loader_unittest.cc b/services/network/public/cpp/simple_url_loader_unittest.cc index a6efab95..d63838f 100644 --- a/services/network/public/cpp/simple_url_loader_unittest.cc +++ b/services/network/public/cpp/simple_url_loader_unittest.cc
@@ -576,8 +576,7 @@ network::mojom::NetworkServiceRequest network_service_request = mojo::MakeRequest(&network_service_ptr); network_service_ = - network::NetworkService::Create(std::move(network_service_request), - /*netlog=*/nullptr); + network::NetworkService::Create(std::move(network_service_request)); network::mojom::NetworkContextParamsPtr context_params = network::mojom::NetworkContextParams::New(); network_service_ptr->CreateNetworkContext( @@ -601,6 +600,9 @@ mojom::URLLoaderFactoryParams::New(); params->process_id = mojom::kBrowserProcessId; params->is_corb_enabled = false; + url::Origin origin = url::Origin::Create(test_server_.base_url()); + params->network_isolation_key = net::NetworkIsolationKey(origin, origin); + params->is_trusted = true; network_context_->CreateURLLoaderFactory( mojo::MakeRequest(&url_loader_factory_), std::move(params)); @@ -674,6 +676,11 @@ resource_request->url = url; resource_request->method = method; resource_request->enable_upload_progress = true; + resource_request->trusted_params = + network::ResourceRequest::TrustedParams(); + url::Origin request_origin = url::Origin::Create(url); + resource_request->trusted_params->network_isolation_key = + net::NetworkIsolationKey(request_origin, request_origin); return std::make_unique<SimpleLoaderTestHelper>(std::move(resource_request), GetParam()); }
diff --git a/services/network/public/mojom/network_service.mojom b/services/network/public/mojom/network_service.mojom index aeec7fd..c1ae348 100644 --- a/services/network/public/mojom/network_service.mojom +++ b/services/network/public/mojom/network_service.mojom
@@ -21,6 +21,7 @@ import "services/network/public/mojom/network_interface.mojom"; import "services/network/public/mojom/network_param.mojom"; import "services/network/public/mojom/network_quality_estimator_manager.mojom"; +import "services/network/public/mojom/network_service_test.mojom"; import "services/network/public/mojom/url_loader.mojom"; import "services/network/public/mojom/url_loader_factory.mojom"; import "url/mojom/origin.mojom"; @@ -342,4 +343,8 @@ // hangs. [EnableIf=is_android] DumpWithoutCrashing(mojo_base.mojom.Time dump_request_time); + + // Binds the test service's testing interface. Available only in some test + // environments. + BindTestInterface(pending_receiver<NetworkServiceTest> receiver); };
diff --git a/services/network/public/mojom/websocket.mojom b/services/network/public/mojom/websocket.mojom index db0385d..a187e24b 100644 --- a/services/network/public/mojom/websocket.mojom +++ b/services/network/public/mojom/websocket.mojom
@@ -54,21 +54,19 @@ // Notify the renderer that the browser has started an opening handshake. OnOpeningHandshakeStarted(WebSocketHandshakeRequest request); - // Called when the HTTP response is received. This doesn't mean the connection - // is (or will be) established. This message precedes OnConnectionEstablished. - // |response| may contain cookie-related headers when the client has - // an access to raw cookie information. - OnResponseReceived(WebSocketHandshakeResponse response); - // Called when the connection is established. |selected_protocol| is the // sub-protocol the server selected, or empty if no sub-protocol was selected. // |extensions| is the list of extensions negotiated for the connection. // default threshold value + // |response| may contain cookie-related headers when the client has + // an access to raw cookie information. // |readable| is readable datapipe to receive data from browser. + // TODO(yoichio): Merge |selected_protocol| and |extensions| into |response|. OnConnectionEstablished(pending_remote<WebSocket> socket, pending_receiver<WebSocketClient> client_receiver, string selected_protocol, string extensions, + WebSocketHandshakeResponse response, handle<data_pipe_consumer> readable); };
diff --git a/services/network/url_loader_unittest.cc b/services/network/url_loader_unittest.cc index 4760f1ed..c2cc1f0 100644 --- a/services/network/url_loader_unittest.cc +++ b/services/network/url_loader_unittest.cc
@@ -119,9 +119,12 @@ request.method = std::string(method); request.url = url; request.site_for_cookies = url; // bypass third-party cookie blocking - request.request_initiator = - url::Origin::Create(url); // ensure initiator is set + url::Origin origin = url::Origin::Create(url); + request.request_initiator = origin; // ensure initiator is set request.is_main_frame = true; + request.trusted_params = network::ResourceRequest::TrustedParams(); + request.trusted_params->network_isolation_key = + net::NetworkIsolationKey(origin, origin); return request; } @@ -468,6 +471,9 @@ static mojom::URLLoaderFactoryParams params; params.process_id = mojom::kBrowserProcessId; params.is_corb_enabled = false; + url::Origin origin = url::Origin::Create(url); + params.network_isolation_key = net::NetworkIsolationKey(origin, origin); + params.is_trusted = true; url_loader = std::make_unique<URLLoader>( context(), nullptr /* network_service_client */, network_context_client.get(),
diff --git a/services/network/websocket.cc b/services/network/websocket.cc index 8c010d97..bbfd911 100644 --- a/services/network/websocket.cc +++ b/services/network/websocket.cc
@@ -118,6 +118,8 @@ private: WebSocket* const impl_; + mojom::WebSocketHandshakeResponsePtr response_ = nullptr; + DISALLOW_COPY_AND_ASSIGN(WebSocketEventHandler); }; @@ -182,7 +184,7 @@ impl_->handshake_client_->OnConnectionEstablished( impl_->receiver_.BindNewPipeAndPassRemote(), impl_->client_.BindNewPipeAndPassReceiver(), selected_protocol, - extensions, std::move(readable)); + extensions, std::move(response_), std::move(readable)); impl_->receiver_.set_disconnect_handler(base::BindOnce( &WebSocket::OnConnectionError, base::Unretained(impl_), FROM_HERE)); impl_->handshake_client_.reset(); @@ -310,7 +312,7 @@ headers_text.append("\r\n"); response_to_pass->headers_text = headers_text; - impl_->handshake_client_->OnResponseReceived(std::move(response_to_pass)); + response_ = std::move(response_to_pass); } void WebSocket::WebSocketEventHandler::OnSSLCertificateError(
diff --git a/services/tracing/perfetto/track_event_json_exporter.cc b/services/tracing/perfetto/track_event_json_exporter.cc index 3cbc419f..cdc2143 100644 --- a/services/tracing/perfetto/track_event_json_exporter.cc +++ b/services/tracing/perfetto/track_event_json_exporter.cc
@@ -630,12 +630,14 @@ auto event_builder = AddTraceEvent( "StackCpuSampling", TRACE_DISABLED_BY_DEFAULT("cpu_profiler"), - TRACE_EVENT_PHASE_INSTANT, current_state_->time_us, current_state_->pid, - current_state_->tid); + TRACE_EVENT_PHASE_NESTABLE_ASYNC_INSTANT, current_state_->time_us, + current_state_->pid, current_state_->tid); // Add a dummy thread timestamp to this event to match the format of instant // events. Useful in the UI to view args of a selected group of samples. event_builder.AddThreadTimestamp(1); - event_builder.AddFlags(TRACE_EVENT_SCOPE_THREAD, base::nullopt, ""); + static int g_id_counter = 0; + event_builder.AddFlags(TRACE_EVENT_SCOPE_THREAD | TRACE_EVENT_FLAG_HAS_ID, + ++g_id_counter, ""); auto args_builder = event_builder.BuildArgs(); auto* add_arg = args_builder->MaybeAddArg("frames"); if (add_arg) {
diff --git a/sql/database.cc b/sql/database.cc index 964fd61..7f7bcd2a 100644 --- a/sql/database.cc +++ b/sql/database.cc
@@ -355,17 +355,20 @@ base::Optional<base::ScopedBlockingCall> scoped_blocking_call; InitScopedBlockingCall(&scoped_blocking_call); - // The constructor and set_page_size() ensure that page_size_ is never zero. - const int page_size = page_size_; - DCHECK(page_size); - - // Use local settings if provided, otherwise use documented defaults. The - // actual results could be fetching via PRAGMA calls. - sqlite3_int64 preload_size = page_size * (cache_size_ ? cache_size_ : 2000); - if (preload_size < 1) - return; - - base::PreReadFile(DbPath(), /*is_executable=*/false, preload_size); + // Maximum number of bytes that will be prefetched from the database. + // + // This limit is very aggressive. Here are the trade-offs involved. + // 1) Accessing bytes that weren't preread is very expensive on + // performance-critical databases, so the limit must exceed the expected + // sizes of feature databases. + // 2) On some platforms (Windows 7 and, currently, macOS), base::PreReadFile() + // falls back to a synchronous read, and blocks until the entire file is + // read into memory. So, there's a tangible cost to reading data that would + // get evicted before base::PreReadFile() completes. This cost needs to be + // balanced with the benefit reading the entire database at once, and + // avoiding seeks on spinning disks. + constexpr int kPreReadSize = 128 * 1024 * 1024; // 128 MB + base::PreReadFile(DbPath(), /*is_executable=*/false, kPreReadSize); } // SQLite keeps unused pages associated with a database in a cache. It asks
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index d677c7f..7f012882 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -10548,6 +10548,7 @@ } ] }, + "ios-simulator-cr-recipe": {}, "linux-annotator-rel": { "scripts": [ {
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index e0313fe7..f2ff97b 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -26705,7 +26705,9 @@ "--test-list=../../testing/buildbot/filters/gpu.skiarenderer_vulkan_blink_web_tests.filter", "--additional-expectations=../../third_party/blink/web_tests/FlagExpectations/enable-features=UseSkiaRenderer", "--additional-expectations=../../third_party/blink/web_tests/FlagExpectations/enable-gpu-rasterization", - "--additional-expectations=../../third_party/blink/web_tests/FlagExpectations/use-gl=any" + "--additional-expectations=../../third_party/blink/web_tests/FlagExpectations/use-gl=any", + "--target", + "Release_x64" ], "isolate_name": "blink_web_tests_exparchive", "merge": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 6cce8bf..37da444 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -16121,7 +16121,7 @@ "name": "shard #${SHARD_INDEX} logcats" } ], - "shards": 2 + "shards": 5 }, "test": "mojo_unittests" },
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 610e3c5..e3bbe141 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -842,7 +842,7 @@ 'modifications': { 'android-asan': { 'swarming': { - 'shards': 2, + 'shards': 5, }, }, }, @@ -1423,6 +1423,17 @@ 'Linux MSan Tests', # https://crbug.com/831676 ], }, + 'skia_renderer_gl_blink_web_tests': { + 'modifications': { + # chromium.gpu.fyi + 'Win10 FYI x64 SkiaRenderer GL (NVIDIA)': { + 'args': [ + '--target', + 'Release_x64', + ], + }, + }, + }, 'swiftshader_unittests': { 'remove_from': [ # Save capacity on the hardware where we have only a few machines.
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 37f16c8d..b5b3c86 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -1776,6 +1776,9 @@ 'gtest_tests': 'ios_code_coverage_gtests', } }, + 'ios-simulator-cr-recipe': { + 'test_suites': {} + }, 'linux-annotator-rel': { 'test_suites': { 'scripts': 'test_traffic_annotation_auditor_script',
diff --git a/testing/perf/BUILD.gn b/testing/perf/BUILD.gn index 4d47534e..9ada240 100644 --- a/testing/perf/BUILD.gn +++ b/testing/perf/BUILD.gn
@@ -5,6 +5,8 @@ source_set("perf") { testonly = true sources = [ + "luci_test_result.cc", + "luci_test_result.h", "perf_result_reporter.cc", "perf_result_reporter.h", "perf_test.cc", @@ -12,5 +14,18 @@ ] deps = [ "//base", + "//testing/gtest", + ] +} + +source_set("unit_tests") { + testonly = true + sources = [ + "luci_test_result_unittest.cc", + ] + deps = [ + ":perf", + "//base", + "//testing/gtest", ] }
diff --git a/testing/perf/luci_test_result.cc b/testing/perf/luci_test_result.cc new file mode 100644 index 0000000..e650129d --- /dev/null +++ b/testing/perf/luci_test_result.cc
@@ -0,0 +1,237 @@ +// 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 "testing/perf/luci_test_result.h" + +#include <utility> + +#include "base/files/file_util.h" +#include "base/json/json_writer.h" +#include "base/logging.h" +#include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" +#include "base/values.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace perf_test { + +namespace { + +constexpr char kKeyFilePath[] = "filePath"; +constexpr char kKeyContents[] = "contents"; +constexpr char kKeyContentType[] = "contentType"; +constexpr char kKeyTestResult[] = "testResult"; +constexpr char kKeyTestPath[] = "testPath"; +constexpr char kKeyVariant[] = "variant"; +constexpr char kKeyStatus[] = "status"; +constexpr char kKeyIsExpected[] = "isExpected"; +constexpr char kKeyStartTime[] = "startTime"; +constexpr char kKeyRunDuration[] = "runDuration"; +constexpr char kKeyOutputArtifacts[] = "outputArtifacts"; +constexpr char kKeyTags[] = "tags"; +constexpr char kKeyKey[] = "key"; +constexpr char kKeyValue[] = "value"; + +// Returns iso timeformat string of |time| in UTC. +std::string ToUtcIsoTime(base::Time time) { + base::Time::Exploded utc_exploded; + time.UTCExplode(&utc_exploded); + return base::StringPrintf( + "%d-%02d-%02dT%02d:%02d:%02d.%03dZ", utc_exploded.year, + utc_exploded.month, utc_exploded.day_of_month, utc_exploded.hour, + utc_exploded.minute, utc_exploded.second, utc_exploded.millisecond); +} + +std::string ToString(LuciTestResult::Status status) { + using Status = LuciTestResult::Status; + switch (status) { + case Status::kUnspecified: + return "UNSPECIFIED"; + case Status::kPass: + return "PASS"; + case Status::kFail: + return "FAIL"; + case Status::kCrash: + return "CRASH"; + case Status::kAbort: + return "ABORT"; + case Status::kSkip: + return "SKIP"; + } +} + +base::Value ToValue(const LuciTestResult::Artifact& artifact) { + // One and only one of the two optional fields must have value. + DCHECK(artifact.file_path.has_value() != artifact.contents.has_value()); + + base::Value dict(base::Value::Type::DICTIONARY); + + if (artifact.file_path.has_value()) { + dict.SetStringKey(kKeyFilePath, artifact.file_path->AsUTF8Unsafe()); + } else { + DCHECK(artifact.contents.has_value()); + dict.SetStringKey(kKeyContents, artifact.contents.value()); + } + + dict.SetStringKey(kKeyContentType, artifact.content_type); + return dict; +} + +base::Value ToValue(const LuciTestResult& result) { + base::Value test_report(base::Value::Type::DICTIONARY); + + base::Value* test_result = test_report.SetKey( + kKeyTestResult, base::Value(base::Value::Type::DICTIONARY)); + test_result->SetStringKey(kKeyTestPath, result.test_path()); + + if (!result.extra_variant_pairs().empty()) { + base::Value* variant_dict = test_result->SetKey( + kKeyVariant, base::Value(base::Value::Type::DICTIONARY)); + for (const auto& pair : result.extra_variant_pairs()) + variant_dict->SetStringKey(pair.first, pair.second); + } + + test_result->SetStringKey(kKeyStatus, ToString(result.status())); + test_result->SetBoolKey(kKeyIsExpected, result.is_expected()); + + if (!result.start_time().is_null()) { + test_result->SetStringKey(kKeyStartTime, ToUtcIsoTime(result.start_time())); + } + if (!result.duration().is_zero()) { + test_result->SetStringKey( + kKeyRunDuration, + base::StringPrintf("%.2fs", result.duration().InSecondsF())); + } + + if (!result.output_artifacts().empty()) { + base::Value* artifacts_dict = test_result->SetKey( + kKeyOutputArtifacts, base::Value(base::Value::Type::DICTIONARY)); + for (const auto& pair : result.output_artifacts()) + artifacts_dict->SetKey(pair.first, ToValue(pair.second)); + } + + if (!result.tags().empty()) { + base::Value* tags_list = + test_result->SetKey(kKeyTags, base::Value(base::Value::Type::LIST)); + for (const auto& tag : result.tags()) { + base::Value tag_dict(base::Value::Type::DICTIONARY); + tag_dict.SetStringKey(kKeyKey, tag.key); + tag_dict.SetStringKey(kKeyValue, tag.value); + tags_list->Append(std::move(tag_dict)); + } + } + + return test_report; +} + +std::string ToJson(const LuciTestResult& result) { + std::string json; + CHECK(base::JSONWriter::Write(ToValue(result), &json)); + return json; +} + +} // namespace + +/////////////////////////////////////////////////////////////////////////////// +// LuciTestResult::Artifact + +LuciTestResult::Artifact::Artifact() = default; +LuciTestResult::Artifact::Artifact(const Artifact& other) = default; +LuciTestResult::Artifact::Artifact(const base::FilePath file_path, + const std::string& content_type) + : file_path(file_path), content_type(content_type) {} +LuciTestResult::Artifact::Artifact(const std::string& contents, + const std::string& content_type) + : contents(contents), content_type(content_type) {} +LuciTestResult::Artifact::~Artifact() = default; + +/////////////////////////////////////////////////////////////////////////////// +// LuciTestResult + +LuciTestResult::LuciTestResult() = default; +LuciTestResult::LuciTestResult(const LuciTestResult& other) = default; +LuciTestResult::LuciTestResult(LuciTestResult&& other) = default; +LuciTestResult::~LuciTestResult() = default; + +// static +LuciTestResult LuciTestResult::CreateForGTest() { + LuciTestResult result; + + const testing::TestInfo* const test_info = + testing::UnitTest::GetInstance()->current_test_info(); + + std::string test_case_name = test_info->name(); + std::string param_index; + + // If there is a "/", extract |param_index| after it and strip it from + // |test_case_name|. + auto pos = test_case_name.rfind('/'); + if (pos != std::string::npos) { + param_index = test_case_name.substr(pos + 1); + test_case_name.resize(pos); + } + + result.set_test_path(base::StringPrintf("%s.%s", test_info->test_suite_name(), + test_case_name.c_str())); + + if (test_info->type_param()) + result.AddVariant("param/instantiation", test_info->type_param()); + + if (!param_index.empty()) + result.AddVariant("param/index", param_index); + + result.set_status(test_info->result()->Passed() + ? LuciTestResult::Status::kPass + : LuciTestResult::Status::kFail); + // Assumes that the expectation is test passing. + result.set_is_expected(result.status() == LuciTestResult::Status::kPass); + + // Start timestamp and duration is not set before the test run finishes, + // e.g. when called from PerformanceTest::TearDownOnMainThread. + if (test_info->result()->start_timestamp()) { + result.set_start_time(base::Time::FromTimeT( + static_cast<time_t>(test_info->result()->start_timestamp() / 1000))); + result.set_duration( + base::TimeDelta::FromMilliseconds(test_info->result()->elapsed_time())); + } + + return result; +} + +void LuciTestResult::AddVariant(const std::string& key, + const std::string& value) { + auto result = extra_variant_pairs_.insert({key, value}); + DCHECK(result.second); +} + +void LuciTestResult::AddOutputArtifactFile(const std::string& artifact_name, + const base::FilePath& file_path, + const std::string& content_type) { + Artifact artifact(file_path, content_type); + auto insert_result = output_artifacts_.insert( + std::make_pair(artifact_name, std::move(artifact))); + DCHECK(insert_result.second); +} + +void LuciTestResult::AddOutputArtifactContents( + const std::string& artifact_name, + const std::string& contents, + const std::string& content_type) { + Artifact artifact(contents, content_type); + auto insert_result = output_artifacts_.insert( + std::make_pair(artifact_name, std::move(artifact))); + DCHECK(insert_result.second); +} + +void LuciTestResult::AddTag(const std::string& key, const std::string& value) { + tags_.emplace_back(Tag{key, value}); +} + +void LuciTestResult::WriteToFile(const base::FilePath& result_file) const { + const std::string json = ToJson(*this); + const int json_size = json.size(); + CHECK(WriteFile(result_file, json.data(), json_size) == json_size); +} + +} // namespace perf_test
diff --git a/testing/perf/luci_test_result.h b/testing/perf/luci_test_result.h new file mode 100644 index 0000000..48deb07 --- /dev/null +++ b/testing/perf/luci_test_result.h
@@ -0,0 +1,141 @@ +// 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 TESTING_PERF_LUCI_TEST_RESULT_H_ +#define TESTING_PERF_LUCI_TEST_RESULT_H_ + +#include <string> +#include <vector> + +#include "base/containers/flat_map.h" +#include "base/files/file_path.h" +#include "base/macros.h" +#include "base/optional.h" +#include "base/time/time.h" + +namespace perf_test { + +// Generates TestResultEntry dict in LUCI Test Results format. +// See: go/luci-test-results-design +// //infra/go/src/go.chromium.org/luci/results/proto/v1/test_result.proto +class LuciTestResult { + public: + // Represents a test result status. + enum class Status { + // The test status is unspecified. + kUnspecified, + // The test has passed. + kPass, + // The test has failed. + kFail, + // The test did not complete because it crashed. + kCrash, + // The test did not complete because it was interrupted, e.g. timeout. + kAbort, + // The test or test framework decided not to run the test, or the test was + // not run due to previous tests timing out. + kSkip + }; + + // Represents an artifact. + struct Artifact { + Artifact(); + Artifact(const Artifact& other); + Artifact(const base::FilePath file_path, const std::string& content_type); + Artifact(const std::string& contents, const std::string& content_type); + ~Artifact(); + + // Use only one of the two fields below. + // Absolute path on the same machine running the test. + base::Optional<base::FilePath> file_path; + // The data of the artifact. + base::Optional<std::string> contents; + + std::string content_type; + }; + + // Represents a tag. + struct Tag { + std::string key; + std::string value; + }; + + LuciTestResult(); + LuciTestResult(const LuciTestResult& other); + LuciTestResult(LuciTestResult&& other); + ~LuciTestResult(); + + // Helper to create a LuciTestResult and fill in info for the current gtest. + static LuciTestResult CreateForGTest(); + + // Adds a variant key-value pair to |extra_variant_pairs_|. See VariantDef in + // //infra/go/src/go.chromium.org/luci/resultdb/proto/v1/common.proto + // for more details. + void AddVariant(const std::string& key, const std::string& value); + + // Adds an output artifact. + void AddOutputArtifactFile(const std::string& artifact_name, + const base::FilePath& file_path, + const std::string& content_type); + void AddOutputArtifactContents(const std::string& artifact_name, + const std::string& contents, + const std::string& content_type); + + // Adds a tag. + void AddTag(const std::string& key, const std::string& value); + + // Writes to |result_file|. + void WriteToFile(const base::FilePath& result_file) const; + + // Getters and setters. + const std::string& test_path() const { return test_path_; } + void set_test_path(const std::string& test_path) { test_path_ = test_path; } + + const base::flat_map<std::string, std::string>& extra_variant_pairs() const { + return extra_variant_pairs_; + } + + Status status() const { return status_; } + void set_status(Status status) { status_ = status; } + + bool is_expected() const { return is_expected_; } + void set_is_expected(bool is_expcted) { is_expected_ = is_expcted; } + + base::Time start_time() const { return start_time_; } + void set_start_time(base::Time start_time) { start_time_ = start_time; } + + base::TimeDelta duration() const { return duration_; } + void set_duration(base::TimeDelta duration) { duration_ = duration; } + + const base::flat_map<std::string, Artifact>& output_artifacts() const { + return output_artifacts_; + } + + const std::vector<Tag>& tags() const { return tags_; } + + private: + // For gtest, |test_path_| is <test_suite_name>.<test_case_name>, without + // the param annotations. E.g. "InstantiationName/SuiteName.CaseName/0" + // will have "/0" stripped and be just "InstantiationName/SuiteName.CaseName". + std::string test_path_; + // For gtest, |extra_variant_pairs_| holds info about the type param and + // value param for typed/parameterized tests. + base::flat_map<std::string, std::string> extra_variant_pairs_; + // Status of the test result. + Status status_ = Status::kUnspecified; + // Whether |status| is expected. + bool is_expected_ = false; + // Test start time. + base::Time start_time_; + // Duration of the test. + base::TimeDelta duration_; + // Artifacts of the test run. + base::flat_map<std::string, Artifact> output_artifacts_; + // Tags of the test run. + std::vector<Tag> tags_; +}; + +} // namespace perf_test + +#endif // TESTING_PERF_LUCI_TEST_RESULT_H_
diff --git a/testing/perf/luci_test_result_unittest.cc b/testing/perf/luci_test_result_unittest.cc new file mode 100644 index 0000000..1914a8d0 --- /dev/null +++ b/testing/perf/luci_test_result_unittest.cc
@@ -0,0 +1,228 @@ +// 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 "testing/perf/luci_test_result.h" + +#include "base/files/file_path.h" +#include "base/files/file_util.h" +#include "base/files/scoped_temp_dir.h" +#include "base/json/json_reader.h" +#include "base/optional.h" +#include "base/strings/stringprintf.h" +#include "base/time/time.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace perf_test { + +class LuciTestResultTest : public testing::Test { + public: + LuciTestResultTest() = default; + ~LuciTestResultTest() override = default; + + // testing::Test: + void SetUp() override { + testing::Test::SetUp(); + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); + } + + base::FilePath GetResultFilePath() const { + return temp_dir_.GetPath().AppendASCII("luci_test_results.json"); + } + + // Validates that |result| is written to file that contains an equivalent JSON + // as |expected_json|. + void ValidateResult(const LuciTestResult& result, + const std::string& expected_json) { + const base::FilePath result_file = GetResultFilePath(); + result.WriteToFile(result_file); + + std::string json; + ASSERT_TRUE(ReadFileToString(GetResultFilePath(), &json)); + base::Optional<base::Value> value = base::JSONReader::Read(json); + ASSERT_TRUE(value.has_value()); + + base::Optional<base::Value> expected_value = + base::JSONReader::Read(expected_json); + ASSERT_TRUE(expected_value.has_value()); + + EXPECT_EQ(expected_value, value) << "Expected:\n====\n" + << expected_json << "\nActual:\n====\n" + << json; + } + + private: + base::ScopedTempDir temp_dir_; + + DISALLOW_COPY_AND_ASSIGN(LuciTestResultTest); +}; + +TEST_F(LuciTestResultTest, Basic) { + LuciTestResult result; + result.set_test_path("FakeTestSuite.FakeTest"); + result.set_status(LuciTestResult::Status::kPass); + result.set_is_expected(true); + + result.AddVariant("variantKey", "variantValue"); + result.AddVariant("param/instantiation", "FooType"); + result.AddVariant("param/index", "0"); + + // 2019/9/11 12:30 UTC + base::Time start_time; + ASSERT_TRUE( + base::Time::FromUTCExploded({2019, 9, 3, 11, 12, 30, 0}, &start_time)); + result.set_start_time(start_time); + + result.set_duration(base::TimeDelta::FromMilliseconds(1500)); + + result.AddOutputArtifactContents("plain", "plain data", "text/plain"); + result.AddOutputArtifactContents("new_line", "first\nsecond", "text/plain"); + result.AddOutputArtifactFile( + "file.json", base::FilePath(FILE_PATH_LITERAL("/tmp/file.json")), + "application/json"); + result.AddTag("tbmv2", "umaMetric"); + + const std::string expected_json = + R"({ + "testResult":{ + "outputArtifacts":{ + "file.json":{ + "contentType":"application/json", + "filePath":"/tmp/file.json" + }, + "new_line":{ + "contentType":"text/plain", + "contents":"first\nsecond" + }, + "plain":{ + "contentType":"text/plain", + "contents":"plain data" + } + }, + "isExpected":true, + "runDuration":"1.50s", + "startTime":"2019-09-11T12:30:00.000Z", + "status":"PASS", + "tags":[ + {"key":"tbmv2","value":"umaMetric"} + ], + "variant":{ + "variantKey": "variantValue", + "param/instantiation": "FooType", + "param/index": "0" + }, + "testPath":"FakeTestSuite.FakeTest" + } + })"; + ValidateResult(result, expected_json); +} + +TEST_F(LuciTestResultTest, Status) { + using Status = LuciTestResult::Status; + + LuciTestResult result; + result.set_test_path("FakeTestSuite.Status"); + + const std::string json_template = + R"({ + "testResult":{ + "isExpected":false, + "status":"%s", + "testPath":"FakeTestSuite.Status" + } + })"; + + const struct { + Status status; + const char* status_text; + } kTestCases[] = { + {Status::kUnspecified, "UNSPECIFIED"}, + {Status::kPass, "PASS"}, + {Status::kFail, "FAIL"}, + {Status::kCrash, "CRASH"}, + {Status::kAbort, "ABORT"}, + {Status::kSkip, "SKIP"}, + }; + + for (const auto& test_case : kTestCases) { + result.set_status(test_case.status); + const std::string expected_json = + base::StringPrintf(json_template.c_str(), test_case.status_text); + ValidateResult(result, expected_json); + } +} + +/////////////////////////////////////////////////////////////////////////////// + +class LuciTestResultParameterizedTest + : public LuciTestResultTest, + public testing::WithParamInterface<int> { + public: + LuciTestResultParameterizedTest() = default; + ~LuciTestResultParameterizedTest() override = default; +}; + +TEST_P(LuciTestResultParameterizedTest, Variant) { + LuciTestResult result = LuciTestResult::CreateForGTest(); + + const std::string json_template = + R"({ + "testResult":{ + "isExpected":true, + "status":"PASS", + "testPath": + "ZeroToFiveSequence/LuciTestResultParameterizedTest.Variant", + "variant":{"param/index":"%d"} + } + })"; + const std::string expected_json = + base::StringPrintf(json_template.c_str(), GetParam()); + ValidateResult(result, expected_json); +} +INSTANTIATE_TEST_SUITE_P(ZeroToFiveSequence, + LuciTestResultParameterizedTest, + testing::Range(0, 5)); + +/////////////////////////////////////////////////////////////////////////////// + +template <typename T> +class LuciTestResultTypedTest : public LuciTestResultTest { + public: + LuciTestResultTypedTest() = default; + ~LuciTestResultTypedTest() override = default; +}; + +TYPED_TEST_SUITE_P(LuciTestResultTypedTest); + +TYPED_TEST_P(LuciTestResultTypedTest, Variant) { + LuciTestResult result = LuciTestResult::CreateForGTest(); + + std::string test_suite_name = + testing::UnitTest::GetInstance()->current_test_info()->test_suite_name(); + auto pos = test_suite_name.rfind('/'); + ASSERT_NE(pos, std::string::npos); + std::string type_param_name = test_suite_name.substr(pos + 1); + + const std::string json_template = + R"({ + "testResult":{ + "isExpected":true, + "status":"PASS", + "testPath":"LuciTestResultTypedTest/%s.Variant", + "variant":{"param/instantiation":"%s"} + } + })"; + // Note that chromium has RTTI disabled. As a result, type_param() and + // GetTypeName<> always returns a generic "<type>". + const std::string expected_json = + base::StringPrintf(json_template.c_str(), type_param_name.c_str(), + testing::internal::GetTypeName<TypeParam>().c_str()); + this->ValidateResult(result, expected_json); +} + +REGISTER_TYPED_TEST_SUITE_P(LuciTestResultTypedTest, Variant); + +using SomeTypes = testing::Types<int, double>; +INSTANTIATE_TYPED_TEST_SUITE_P(, LuciTestResultTypedTest, SomeTypes); + +} // namespace perf_test
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 6523bc4..8901de13 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -7195,21 +7195,6 @@ ] } ], - "WinOOPSelectFileDialog": [ - { - "platforms": [ - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "WinOOPSelectFileDialog" - ] - } - ] - } - ], "history-manipulation-intervention": [ { "platforms": [
diff --git a/third_party/blink/renderer/core/exported/web_page_popup_impl.cc b/third_party/blink/renderer/core/exported/web_page_popup_impl.cc index 4af72cc9..8cabbf6 100644 --- a/third_party/blink/renderer/core/exported/web_page_popup_impl.cc +++ b/third_party/blink/renderer/core/exported/web_page_popup_impl.cc
@@ -105,10 +105,6 @@ return rect_in_screen; } - float WindowToViewportScalar(const float scalar_value) const override { - return WindowToViewportScalar(nullptr, scalar_value); - } - float WindowToViewportScalar(LocalFrame*, const float scalar_value) const override { WebFloatRect viewport_rect(0, 0, scalar_value, 0);
diff --git a/third_party/blink/renderer/core/html/image_document_test.cc b/third_party/blink/renderer/core/html/image_document_test.cc index 71b2dfc..414457e 100644 --- a/third_party/blink/renderer/core/html/image_document_test.cc +++ b/third_party/blink/renderer/core/html/image_document_test.cc
@@ -66,9 +66,6 @@ : EmptyChromeClient(), scale_factor_(1.f) {} void SetScalingFactor(float s) { scale_factor_ = s; } - float WindowToViewportScalar(const float s) const override { - return s * scale_factor_; - } float WindowToViewportScalar(LocalFrame*, const float s) const override { return s * scale_factor_; }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_outline_utils.cc b/third_party/blink/renderer/core/layout/ng/ng_outline_utils.cc index 4e3ceb48..2562c73 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_outline_utils.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_outline_utils.cc
@@ -5,12 +5,11 @@ #include "third_party/blink/renderer/core/layout/ng/ng_outline_utils.h" #include "third_party/blink/renderer/core/layout/layout_inline.h" -#include "third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h" +#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/style/computed_style.h" namespace blink { - bool NGOutlineUtils::HasPaintedOutline(const ComputedStyle& style, const Node* node) { if (!style.HasOutline() || style.Visibility() != EVisibility::kVisible) @@ -21,22 +20,24 @@ return true; } -bool NGOutlineUtils::IsInlineOutlineNonpaintingFragment( - const NGPhysicalFragment& physical_fragment) { +bool NGOutlineUtils::ShouldPaintOutline( + const NGPhysicalBoxFragment& physical_fragment) { const LayoutObject* layout_object = physical_fragment.GetLayoutObject(); - if (!layout_object) - return false; + DCHECK(layout_object); if (!layout_object->IsLayoutInline()) - return false; + return true; + + // A |LayoutInline| can be split across multiple objects. The first fragment + // produced should paint the outline for *all* fragments. if (layout_object->IsElementContinuation()) { - // If continuation root did generate a fragment, - // this fragment should not paint. + // If the |LayoutInline|'s continuation-root generated a fragment, we + // shouldn't paint the outline. if (layout_object->ContinuationRoot()->FirstInlineFragment()) - return true; + return false; } - if (!layout_object->FirstInlineFragment()) - return false; - return &layout_object->FirstInlineFragment()->PhysicalFragment() != + + DCHECK(layout_object->FirstInlineFragment()); + return &layout_object->FirstInlineFragment()->PhysicalFragment() == &physical_fragment; }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_outline_utils.h b/third_party/blink/renderer/core/layout/ng/ng_outline_utils.h index 09107f93..39d3852b 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_outline_utils.h +++ b/third_party/blink/renderer/core/layout/ng/ng_outline_utils.h
@@ -12,19 +12,19 @@ class ComputedStyle; class Node; -class NGPhysicalFragment; +class NGPhysicalBoxFragment; class CORE_EXPORT NGOutlineUtils { STATIC_ONLY(NGOutlineUtils); public: - static bool HasPaintedOutline(const ComputedStyle& style, const Node* node); - // First fragment paints the entire outline for LayoutInline. - // Returns true if this is the painting fragment. - static bool IsInlineOutlineNonpaintingFragment( - const NGPhysicalFragment& physical_fragment); + // Returns true if this fragment should paint an outline. + // + // Specifically a |LayoutInline| can be split across multiple flows. The + // first fragment produced should paint the outline for *all* fragments. + static bool ShouldPaintOutline(const NGPhysicalBoxFragment&); }; } // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc index 1424071..df53440 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc
@@ -190,7 +190,7 @@ ink_overflow.Expand(style.BoxDecorationOutsets()); if (NGOutlineUtils::HasPaintedOutline(style, GetLayoutObject()->GetNode()) && - !NGOutlineUtils::IsInlineOutlineNonpaintingFragment(*this)) { + NGOutlineUtils::ShouldPaintOutline(*this)) { Vector<PhysicalRect> outline_rects; // The result rects are in coordinates of this object's border box. AddSelfOutlineRects( @@ -209,7 +209,7 @@ const PhysicalOffset& additional_offset, NGOutlineType outline_type, Vector<PhysicalRect>* outline_rects) const { - if (NGOutlineUtils::IsInlineOutlineNonpaintingFragment(*this)) + if (!NGOutlineUtils::ShouldPaintOutline(*this)) return; const LayoutObject* layout_object = GetLayoutObject();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc index 30d48e9..f418fab 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc
@@ -158,7 +158,7 @@ // for its line box which cover the line boxes of this LayoutInline. So // the LayoutInline needs to add rects for children and continuations // only. - if (!NGOutlineUtils::IsInlineOutlineNonpaintingFragment(*descendant)) { + if (NGOutlineUtils::ShouldPaintOutline(*descendant_box)) { descendant_layout_inline->AddOutlineRectsForChildrenAndContinuations( *outline_rects, additional_offset, outline_type); }
diff --git a/third_party/blink/renderer/core/layout/text_autosizer_test.cc b/third_party/blink/renderer/core/layout/text_autosizer_test.cc index 103457e..fcf01c4c 100644 --- a/third_party/blink/renderer/core/layout/text_autosizer_test.cc +++ b/third_party/blink/renderer/core/layout/text_autosizer_test.cc
@@ -19,9 +19,6 @@ namespace blink { class TextAutosizerClient : public RenderingTestChromeClient { public: - float WindowToViewportScalar(const float value) const override { - return WindowToViewportScalar(nullptr, value); - } float WindowToViewportScalar(LocalFrame*, const float value) const override { return value * device_scale_factor_; }
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h index 5bd38b6..b6af96e 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -176,7 +176,6 @@ const LocalFrameView*) const override { return r; } - float WindowToViewportScalar(const float s) const override { return s; } float WindowToViewportScalar(LocalFrame*, const float s) const override { return s; }
diff --git a/third_party/blink/renderer/core/page/chrome_client.h b/third_party/blink/renderer/core/page/chrome_client.h index c4c72923..4ee8590 100644 --- a/third_party/blink/renderer/core/page/chrome_client.h +++ b/third_party/blink/renderer/core/page/chrome_client.h
@@ -110,9 +110,7 @@ public: virtual ~ChromeClient() = default; - // Converts the scalar value from the window coordinates to the viewport - // scale. TODO(darin): Convert all callers over to the LocalFrame version. - virtual float WindowToViewportScalar(const float) const = 0; + // Converts the scalar value from window coordinates to viewport scale. virtual float WindowToViewportScalar(LocalFrame*, const float value) const = 0;
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.cc b/third_party/blink/renderer/core/page/chrome_client_impl.cc index abd56cf..ce971d8 100644 --- a/third_party/blink/renderer/core/page/chrome_client_impl.cc +++ b/third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -472,14 +472,6 @@ return screen_rect; } -float ChromeClientImpl::WindowToViewportScalar(const float scalar_value) const { - // TODO(darin): Change callers to pass a LocalFrame. - if (!web_view_->MainFrameImpl()) - return scalar_value; - return WindowToViewportScalar(web_view_->MainFrameImpl()->GetFrame(), - scalar_value); -} - float ChromeClientImpl::WindowToViewportScalar(LocalFrame* frame, const float scalar_value) const {
diff --git a/third_party/blink/renderer/core/page/chrome_client_impl.h b/third_party/blink/renderer/core/page/chrome_client_impl.h index ed65582..9c3f524 100644 --- a/third_party/blink/renderer/core/page/chrome_client_impl.h +++ b/third_party/blink/renderer/core/page/chrome_client_impl.h
@@ -124,7 +124,6 @@ base::TimeDelta = base::TimeDelta()) override; IntRect ViewportToScreen(const IntRect&, const LocalFrameView*) const override; - float WindowToViewportScalar(const float) const override; float WindowToViewportScalar(LocalFrame*, const float) const override; WebScreenInfo GetScreenInfo(LocalFrame&) const override; void OverrideVisibleRectForMainFrame(LocalFrame& frame,
diff --git a/third_party/blink/renderer/core/page/spatial_navigation.cc b/third_party/blink/renderer/core/page/spatial_navigation.cc index 4e3d0234..424fc6a8 100644 --- a/third_party/blink/renderer/core/page/spatial_navigation.cc +++ b/third_party/blink/renderer/core/page/spatial_navigation.cc
@@ -254,8 +254,8 @@ int dx = 0; int dy = 0; - int pixels_per_line_step = ScrollableArea::PixelsPerLineStep( - container->GetDocument().GetFrame()->View()->GetChromeClient()); + int pixels_per_line_step = + ScrollableArea::PixelsPerLineStep(container->GetDocument().GetFrame()); switch (direction) { case SpatialNavigationDirection::kLeft: dx = -pixels_per_line_step;
diff --git a/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc b/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc index f20b9da..45dac9f 100644 --- a/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc +++ b/third_party/blink/renderer/core/page/validation_message_overlay_delegate.cc
@@ -48,10 +48,6 @@ main_chrome_client_->ScheduleAnimation(anchor_view_, delay); } - float WindowToViewportScalar(const float scalar_value) const override { - return main_chrome_client_->WindowToViewportScalar(scalar_value); - } - float WindowToViewportScalar(LocalFrame* local_frame, const float scalar_value) const override { return main_chrome_client_->WindowToViewportScalar(local_frame,
diff --git a/third_party/blink/renderer/core/paint/block_painter.cc b/third_party/blink/renderer/core/paint/block_painter.cc index f465b9d..284b3ea 100644 --- a/third_party/blink/renderer/core/paint/block_painter.cc +++ b/third_party/blink/renderer/core/paint/block_painter.cc
@@ -69,9 +69,10 @@ layout_block_.PaintObject(local_paint_info, paint_offset); } else if (original_phase != PaintPhase::kSelfBlockBackgroundOnly && original_phase != PaintPhase::kSelfOutlineOnly && - // For now all scrollers with overlay scrollbars are self-painting - // layers, so we don't need to traverse descendants here. - original_phase != PaintPhase::kOverlayScrollbars) { + // For now all scrollers with overlay overflow controls are + // self-painting layers, so we don't need to traverse descendants + // here. + original_phase != PaintPhase::kOverlayOverflowControls) { ScopedBoxContentsPaintState contents_paint_state(paint_state, layout_block_); layout_block_.PaintObject(contents_paint_state.GetPaintInfo(),
diff --git a/third_party/blink/renderer/core/paint/paint_invalidator.cc b/third_party/blink/renderer/core/paint/paint_invalidator.cc index 58b3b117..a1293f9 100644 --- a/third_party/blink/renderer/core/paint/paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/paint_invalidator.cc
@@ -182,9 +182,10 @@ context.painting_layer->SetNeedsPaintPhaseDescendantOutlines(); if (object.HasBoxDecorationBackground() - // We also paint overflow controls in background phase. - || (object.HasOverflowClip() && - ToLayoutBox(object).GetScrollableArea()->HasOverflowControls())) { + // We also paint non-overlay overflow controls in background phase. + || (object.HasOverflowClip() && ToLayoutBox(object) + .GetScrollableArea() + ->HasNonOverlayOverflowControls())) { context.painting_layer->SetNeedsPaintPhaseDescendantBlockBackgrounds(); } else { // Hit testing rects for touch action paint in the background phase.
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc index 35bfd1ed..15c61a01 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.cc +++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -2945,7 +2945,7 @@ bool PaintLayer::ShouldBeSelfPaintingLayer() const { return GetLayoutObject().LayerTypeRequired() == kNormalPaintLayer || - (scrollable_area_ && scrollable_area_->HasOverlayScrollbars()) || + (scrollable_area_ && scrollable_area_->HasOverlayOverflowControls()) || ScrollsOverflow(); }
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.cc b/third_party/blink/renderer/core/paint/paint_layer_painter.cc index 1397aae..37d0d69 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.cc
@@ -523,11 +523,11 @@ } if (paint_layer_.GetScrollableArea() && - paint_layer_.GetScrollableArea()->HasOverlayScrollbars()) { + paint_layer_.GetScrollableArea()->HasOverlayOverflowControls()) { if (is_painting_overlay_scrollbars || !paint_layer_.NeedsReorderOverlayScrollbars()) { - PaintOverlayScrollbarsForFragments(layer_fragments, context, - local_painting_info, paint_flags); + PaintOverlayOverflowControlsForFragments( + layer_fragments, context, local_painting_info, paint_flags); } } @@ -676,23 +676,24 @@ return result; } -void PaintLayerPainter::PaintOverlayScrollbarsForFragments( +void PaintLayerPainter::PaintOverlayOverflowControlsForFragments( const PaintLayerFragments& layer_fragments, GraphicsContext& context, const PaintLayerPaintingInfo& painting_info, PaintLayerFlags paint_flags) { DCHECK(paint_layer_.GetScrollableArea() && - paint_layer_.GetScrollableArea()->HasOverlayScrollbars()); + paint_layer_.GetScrollableArea()->HasOverlayOverflowControls()); - // We don't need to paint composited scrollbars. + // We don't need to paint composited overflow controls. if (paint_layer_.GetScrollableArea()->HasLayerForHorizontalScrollbar() || - paint_layer_.GetScrollableArea()->HasLayerForVerticalScrollbar()) + paint_layer_.GetScrollableArea()->HasLayerForVerticalScrollbar() || + paint_layer_.GetScrollableArea()->HasLayerForScrollCorner()) return; ForAllFragments( context, layer_fragments, [&](const PaintLayerFragment& fragment) { if (!fragment.background_rect.IsEmpty()) { - PaintFragmentWithPhase(PaintPhase::kOverlayScrollbars, fragment, + PaintFragmentWithPhase(PaintPhase::kOverlayOverflowControls, fragment, context, fragment.background_rect, painting_info, paint_flags); }
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.h b/third_party/blink/renderer/core/paint/paint_layer_painter.h index a6777bc..7eef065 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.h +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.h
@@ -94,10 +94,10 @@ GraphicsContext&, const PaintLayerPaintingInfo&, PaintLayerFlags); - void PaintOverlayScrollbarsForFragments(const PaintLayerFragments&, - GraphicsContext&, - const PaintLayerPaintingInfo&, - PaintLayerFlags); + void PaintOverlayOverflowControlsForFragments(const PaintLayerFragments&, + GraphicsContext&, + const PaintLayerPaintingInfo&, + PaintLayerFlags); void PaintMaskForFragments(const PaintLayerFragments&, GraphicsContext&, const PaintLayerPaintingInfo&,
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc index d5f5003..7f9115a 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
@@ -126,6 +126,7 @@ needs_relayout_(false), had_horizontal_scrollbar_before_relayout_(false), had_vertical_scrollbar_before_relayout_(false), + had_resizer_before_relayout_(false), scroll_origin_changed_(false), scrollbar_manager_(*this), scroll_corner_(nullptr), @@ -891,6 +892,10 @@ UpdateScrollDimensions(); + bool has_resizer = GetLayoutBox()->CanResize(); + bool resizer_will_change = had_resizer_before_relayout_ != has_resizer; + had_resizer_before_relayout_ = has_resizer; + bool had_horizontal_scrollbar = HasHorizontalScrollbar(); bool had_vertical_scrollbar = HasVerticalScrollbar(); @@ -990,6 +995,8 @@ } } } + } else if (!HasScrollbar() && resizer_will_change) { + Layer()->DirtyStackingContextZOrderLists(); } { @@ -1645,6 +1652,15 @@ return HasScrollbar() || GetLayoutBox()->CanResize(); } +bool PaintLayerScrollableArea::HasOverlayOverflowControls() const { + return HasOverlayScrollbars() || + (!HasScrollbar() && GetLayoutBox()->CanResize()); +} + +bool PaintLayerScrollableArea::HasNonOverlayOverflowControls() const { + return HasScrollbar() && !HasOverlayScrollbars(); +} + void PaintLayerScrollableArea::PositionOverflowControls() { if (!HasOverflowControls()) return;
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h index 2ec381c8..cb652b6 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h +++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h
@@ -384,6 +384,10 @@ // specific pseudo styles but there can still be a scroll corner control or // resize control without these custom styled scrollbar parts. bool HasOverflowControls() const; + + bool HasOverlayOverflowControls() const; + bool HasNonOverlayOverflowControls() const; + bool HasOverflow() const { return HasHorizontalOverflow() || HasVerticalOverflow(); } @@ -651,6 +655,7 @@ unsigned needs_relayout_ : 1; unsigned had_horizontal_scrollbar_before_relayout_ : 1; unsigned had_vertical_scrollbar_before_relayout_ : 1; + unsigned had_resizer_before_relayout_ : 1; unsigned scroll_origin_changed_ : 1; // There are 6 possible combinations of writing mode and direction. Scroll
diff --git a/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc b/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc index 0a9abfb..22b7919 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_stacking_node.cc
@@ -216,10 +216,10 @@ return; base::Optional<HighestLayers> subtree_highest_layers; - bool has_overlay_scrollbars = + bool has_overlay_overflow_controls = paint_layer.GetScrollableArea() && - paint_layer.GetScrollableArea()->HasOverlayScrollbars(); - if (has_overlay_scrollbars) + paint_layer.GetScrollableArea()->HasOverlayOverflowControls(); + if (has_overlay_overflow_controls) subtree_highest_layers.emplace(); for (PaintLayer* child = paint_layer.FirstChild(); child; @@ -228,7 +228,7 @@ : highest_layers); } - if (has_overlay_scrollbars) { + if (has_overlay_overflow_controls) { const PaintLayer* layer_to_paint_overlay_scrollbars_after = subtree_highest_layers->highest_in_flow_stacked; if (object.CanContainFixedPositionObjects()) {
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 4e1fc62..6c74e3f0 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_test.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_test.cc
@@ -436,13 +436,64 @@ .LayersPaintingOverlayScrollbarsAfter(layer); } -TEST_P(PaintLayerTest, ReorderOverlayScrollbars_StackedWithInFlowDescendant) { +// We need new enum and class to test the overlay overflow controls reordering, +// but we don't move the tests related to the new class to the bottom, which is +// behind all tests of the PaintLayerTest. Because it will make the git history +// hard to track. +enum OverlayType { kOverlayResizer, kOverlayScrollbars }; + +class ReorderOverlayOverflowControlsTest + : public testing::WithParamInterface<std::tuple<unsigned, OverlayType>>, + private ScopedCompositeAfterPaintForTest, + public RenderingTest { + public: + ReorderOverlayOverflowControlsTest() + : ScopedCompositeAfterPaintForTest(std::get<0>(GetParam()) & + kCompositeAfterPaint), + RenderingTest(MakeGarbageCollected<SingleChildLocalFrameClient>()) {} + ~ReorderOverlayOverflowControlsTest() { + // Must destruct all objects before toggling back feature flags. + WebHeap::CollectAllGarbageForTesting(); + } + + OverlayType GetOverlayType() const { return std::get<1>(GetParam()); } + + void InitOverflowStyle(const char* id) { + GetDocument().getElementById(id)->setAttribute( + html_names::kStyleAttr, GetOverlayType() == kOverlayScrollbars + ? "overflow : auto" + : "overflow: hidden; resize: both"); + UpdateAllLifecyclePhasesForTest(); + } + + void SetUp() override { + EnableCompositing(); + RenderingTest::SetUp(); + } +}; + +INSTANTIATE_TEST_SUITE_P( + All, + ReorderOverlayOverflowControlsTest, + ::testing::Combine(::testing::Values(0, kCompositeAfterPaint), + ::testing::Values(kOverlayScrollbars, kOverlayResizer))); + +TEST_P(ReorderOverlayOverflowControlsTest, StackedWithInFlowDescendant) { SetBodyInnerHTML(R"HTML( - <div id='parent' style='overflow: auto; position: relative; - width: 100px; height: 100px'> + <style> + #parent { + position: relative; + width: 100px; + height: 100px; + } + </style> + <div id='parent'> <div id='child' style='position: relative; height: 200px'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); @@ -453,8 +504,15 @@ GetDocument().getElementById("child")->setAttribute( html_names::kStyleAttr, "position: relative; height: 80px"); UpdateAllLifecyclePhasesForTest(); - EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); - EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); + if (GetOverlayType() == kOverlayScrollbars) { + EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); + EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); + } else { + EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); + EXPECT_FALSE(child->NeedsReorderOverlayScrollbars()); + EXPECT_THAT(LayersPaintingOverlayScrollbarsAfter(child), + Pointee(ElementsAre(parent))); + } GetDocument().getElementById("child")->setAttribute( html_names::kStyleAttr, "position: relative; width: 200px; height: 80px"); @@ -477,14 +535,25 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_StackedWithOutOfFlowDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, StackedWithOutOfFlowDescendant) { SetBodyInnerHTML(R"HTML( - <style>#child { width: 200px; height: 200px; }</style> - <div id='parent' style='overflow: auto; position: relative; height: 100px'> + <style> + #child { + width: 200px; + height: 200px; + } + #parent { + position: relative; + height: 100px; + } + </style> + <div id='parent'> <div id='child' style='position: absolute'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); @@ -506,14 +575,26 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, ReorderOverlayScrollbars_StackedWithZIndexDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, StackedWithZIndexDescendant) { SetBodyInnerHTML(R"HTML( - <style>#child { position: absolute; width: 200px; height: 200px; }</style> - <div id='parent' style='overflow: auto; position: relative; height: 100px'> - <div id='child' style='position: absolute; z-index: 1; - width: 200px; height: 200px'></div> + <style> + #parent { + position: relative; + height: 100px; + } + #child { + position: absolute; + width: 200px; + height: 200px; + } + </style> + <div id='parent'> + <div id='child' style='z-index: 1'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); @@ -535,16 +616,32 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NestedStackedWithInFlowStackedChild) { +TEST_P(ReorderOverlayOverflowControlsTest, + NestedStackedWithInFlowStackedChild) { SetBodyInnerHTML(R"HTML( - <div id='ancestor' - style='overflow: auto; position: relative; height: 100px'> - <div id='parent' style='overflow: auto; height: 200px'> - <div id="child" style='position: relative; height: 300px'></div> + <style> + #ancestor { + position: relative; + height: 100px; + } + #parent { + height: 200px; + } + #child { + position: relative; + height: 300px; + } + </style> + <div id='ancestor'> + <div id='parent'> + <div id="child"></div> </div> </div> )HTML"); + + InitOverflowStyle("ancestor"); + InitOverflowStyle("parent"); + auto* ancestor = GetPaintLayerByElementId("ancestor"); auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); @@ -555,18 +652,36 @@ Pointee(ElementsAre(parent, ancestor))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NestedStackedWithOutOfFlowStackedChild) { +TEST_P(ReorderOverlayOverflowControlsTest, + NestedStackedWithOutOfFlowStackedChild) { SetBodyInnerHTML(R"HTML( - <div id='ancestor' - style='overflow: auto; position: relative; height: 100px'> - <div id='parent' style='overflow: auto; position: absolute; - width: 200px; height: 200px'> - <div id="child" style='position: absolute; width: 300px; height: 300px'> + <style> + #ancestor { + position: relative; + height: 100px; + } + #parent { + position: absolute; + width: 200px; + height: 200px; + } + #child { + position: absolute; + width: 300px; + height: 300px; + } + </style> + <div id='ancestor'> + <div id='parent'> + <div id="child"> </div> </div> </div> )HTML"); + + InitOverflowStyle("ancestor"); + InitOverflowStyle("parent"); + auto* ancestor = GetPaintLayerByElementId("ancestor"); auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); @@ -577,19 +692,39 @@ Pointee(ElementsAre(parent, ancestor))); } -TEST_P(PaintLayerTest, ReorderOverlayScrollbars_MultipleChildren) { +TEST_P(ReorderOverlayOverflowControlsTest, MultipleChildren) { SetBodyInnerHTML(R"HTML( <style> - div { width: 200px; height: 200px; } - #parent { overflow: auto; width: 100px; height: 100px; } + div { + width: 200px; + height: 200px; + } + #parent { + width: 100px; + height: 100px; + } + #low-child { + position: absolute; + z-index: 1; + } + #middle-child { + position: relative; + z-index: 2; + } + #high-child { + position: absolute; + z-index: 3; + } </style> <div id='parent'> - <div id="low-child" style='position: absolute; z-index: 1'></div> - <div id="middle-child" style='position: relative; z-index: 2'></div> - <div id="high-child" style='position: absolute; z-index: 3'></div> + <div id="low-child"></div> + <div id="middle-child"></div> + <div id="high-child"></div> </div> )HTML"); + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* low_child = GetPaintLayerByElementId("low-child"); auto* middle_child = GetPaintLayerByElementId("middle-child"); @@ -602,16 +737,21 @@ Pointee(ElementsAre(parent))); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(high_child)); - GetDocument().getElementById("parent")->setAttribute( - html_names::kStyleAttr, "position: absolute; z-index: 1"); + std::string extra_style = GetOverlayType() == kOverlayScrollbars + ? "overflow: auto;" + : "overflow: hidden; resize: both;"; + std::string new_style = extra_style + "position: absolute; z-index: 1"; + GetDocument().getElementById("parent")->setAttribute(html_names::kStyleAttr, + new_style.c_str()); UpdateAllLifecyclePhasesForTest(); EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(low_child)); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(middle_child)); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(high_child)); + new_style = extra_style + "position: absolute;"; GetDocument().getElementById("parent")->setAttribute(html_names::kStyleAttr, - "position: absolute"); + new_style.c_str()); UpdateAllLifecyclePhasesForTest(); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(low_child)); @@ -620,13 +760,21 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NonStackedWithInFlowDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithInFlowDescendant) { SetBodyInnerHTML(R"HTML( - <div id='parent' style='overflow: auto; width: 100px; height: 100px'> + <style> + #parent { + width: 100px; + height: 100px; + } + </style> + <div id='parent'> <div id='child' style='position: relative; height: 200px'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); @@ -637,8 +785,14 @@ GetDocument().getElementById("child")->setAttribute( html_names::kStyleAttr, "position: relative; height: 80px"); UpdateAllLifecyclePhasesForTest(); - EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); - EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); + if (GetOverlayType() == kOverlayResizer) { + EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); + EXPECT_THAT(LayersPaintingOverlayScrollbarsAfter(child), + Pointee(ElementsAre(parent))); + } else { + EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); + EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); + } GetDocument().getElementById("child")->setAttribute( html_names::kStyleAttr, "position: relative; width: 200px; height: 80px"); @@ -661,15 +815,25 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NonStackedWithZIndexInFlowDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, + NonStackedWithZIndexInFlowDescendant) { SetBodyInnerHTML(R"HTML( - <style>#child { position: relative; height: 200px; }</style> - <div id='parent' style='overflow: auto; height: 100px'> - <div id='child' style='z-index: 1'> - </div> + <style> + #parent { + height: 100px; + } + #child { + position: relative; + height: 200px; + } + </style> + <div id='parent'> + <div id='child' style='z-index: 1'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_TRUE(parent->NeedsReorderOverlayScrollbars()); @@ -691,14 +855,25 @@ Pointee(ElementsAre(parent))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NonStackedWithOutOfFlowDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithOutOfFlowDescendant) { SetBodyInnerHTML(R"HTML( - <div id='parent' style='overflow: auto; height: 100px'> - <div id='child' style='position: absolute; - width: 200px; height: 200px'></div> + <style> + #parent { + height: 100px; + } + #child { + position: absolute; + width: 200px; + height: 200px; + } + </style> + <div id='parent'> + <div id='child'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); @@ -706,29 +881,49 @@ EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NonStackedWithNonStackedDescendant) { +TEST_P(ReorderOverlayOverflowControlsTest, NonStackedWithNonStackedDescendant) { SetBodyInnerHTML(R"HTML( - <div id='parent' style='overflow: auto'> - <div id='child' style='overflow: auto'></div> + <div id='parent'> + <div id='child'></div> </div> )HTML"); + + InitOverflowStyle("parent"); + InitOverflowStyle("child"); + auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); + EXPECT_FALSE(parent->NeedsReorderOverlayScrollbars()); EXPECT_FALSE(child->NeedsReorderOverlayScrollbars()); EXPECT_FALSE(LayersPaintingOverlayScrollbarsAfter(child)); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NestedNonStackedWithInFlowStackedChild) { +TEST_P(ReorderOverlayOverflowControlsTest, + NestedNonStackedWithInFlowStackedChild) { SetBodyInnerHTML(R"HTML( - <div id='ancestor' style='overflow: auto; height: 100px'> - <div id='parent' style='overflow: auto; height: 200px'> - <div id="child" style='position: relative; height: 300px'></div> + <style> + #ancestor { + height: 100px; + } + #parent { + height: 200px; + } + #child { + position: relative; + height: 300px; + } + </style> + <div id='ancestor'> + <div id='parent'> + <div id='child'></div> </div> </div> )HTML"); + + InitOverflowStyle("ancestor"); + InitOverflowStyle("parent"); + auto* ancestor = GetPaintLayerByElementId("ancestor"); auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child"); @@ -739,16 +934,33 @@ Pointee(ElementsAre(parent, ancestor))); } -TEST_P(PaintLayerTest, - ReorderOverlayScrollbars_NestedNonStackedWithOutOfFlowStackedChild) { +TEST_P(ReorderOverlayOverflowControlsTest, + NestedNonStackedWithOutOfFlowStackedChild) { SetBodyInnerHTML(R"HTML( - <div id='ancestor' style='overflow: auto; height: 100px'> - <div id='parent' style='overflow: auto; height: 200px'> - <div id="child" style='position: absolute; width: 300px; height: 300px'> + <style> + #ancestor { + height: 100px; + } + #parent { + height: 200px; + } + #child { + position: absolute; + width: 300px; + height: 300px; + } + </style> + <div id='ancestor'> + <div id='parent'> + <div id='child'> </div> </div> </div> )HTML"); + + InitOverflowStyle("ancestor"); + InitOverflowStyle("parent"); + auto* ancestor = GetPaintLayerByElementId("ancestor"); auto* parent = GetPaintLayerByElementId("parent"); auto* child = GetPaintLayerByElementId("child");
diff --git a/third_party/blink/renderer/core/paint/paint_phase.h b/third_party/blink/renderer/core/paint/paint_phase.h index 658129ff..039da12 100644 --- a/third_party/blink/renderer/core/paint/paint_phase.h +++ b/third_party/blink/renderer/core/paint/paint_phase.h
@@ -92,7 +92,7 @@ kDescendantOutlinesOnly, // The below are auxiliary phases which are used to paint special effects. - kOverlayScrollbars, + kOverlayOverflowControls, kSelection, kTextClip, kMask,
diff --git a/third_party/blink/renderer/core/paint/scrollable_area_painter.cc b/third_party/blink/renderer/core/paint/scrollable_area_painter.cc index 90b4d26d..456b862 100644 --- a/third_party/blink/renderer/core/paint/scrollable_area_painter.cc +++ b/third_party/blink/renderer/core/paint/scrollable_area_painter.cc
@@ -140,10 +140,10 @@ box.StyleRef().Visibility() != EVisibility::kVisible) return; - // Overlay scrollbars are painted in the dedicated paint phase, and normal - // scrollbars are painted in the background paint phase. - if (GetScrollableArea().HasOverlayScrollbars()) { - if (paint_info.phase != PaintPhase::kOverlayScrollbars) + // Overlay overflow controls are painted in the dedicated paint phase, and + // normal overflow controls are painted in the background paint phase. + if (GetScrollableArea().HasOverlayOverflowControls()) { + if (paint_info.phase != PaintPhase::kOverlayOverflowControls) return; } else if (!ShouldPaintSelfBlockBackground(paint_info.phase)) { return;
diff --git a/third_party/blink/renderer/core/scroll/scrollable_area.cc b/third_party/blink/renderer/core/scroll/scrollable_area.cc index cecdf63..ab7bdb4 100644 --- a/third_party/blink/renderer/core/scroll/scrollable_area.cc +++ b/third_party/blink/renderer/core/scroll/scrollable_area.cc
@@ -41,6 +41,7 @@ #include "third_party/blink/renderer/core/layout/layout_box.h" #include "third_party/blink/renderer/core/layout/layout_shift_tracker.h" #include "third_party/blink/renderer/core/page/chrome_client.h" +#include "third_party/blink/renderer/core/page/page.h" #include "third_party/blink/renderer/core/paint/paint_timing_detector.h" #include "third_party/blink/renderer/core/scroll/programmatic_scroll_animator.h" #include "third_party/blink/renderer/core/scroll/scroll_animator_base.h" @@ -52,10 +53,11 @@ namespace blink { -int ScrollableArea::PixelsPerLineStep(ChromeClient* host) { - if (!host) +int ScrollableArea::PixelsPerLineStep(LocalFrame* frame) { + if (!frame) return kPixelsPerLineStep; - return host->WindowToViewportScalar(kPixelsPerLineStep); + return frame->GetPage()->GetChromeClient().WindowToViewportScalar( + frame, kPixelsPerLineStep); } float ScrollableArea::MinFractionToStepWhenPaging() { @@ -747,7 +749,7 @@ } int ScrollableArea::LineStep(ScrollbarOrientation) const { - return PixelsPerLineStep(GetChromeClient()); + return PixelsPerLineStep(GetLayoutBox()->GetFrame()); } int ScrollableArea::PageStep(ScrollbarOrientation orientation) const {
diff --git a/third_party/blink/renderer/core/scroll/scrollable_area.h b/third_party/blink/renderer/core/scroll/scrollable_area.h index 9c3b1744..b3066ee70 100644 --- a/third_party/blink/renderer/core/scroll/scrollable_area.h +++ b/third_party/blink/renderer/core/scroll/scrollable_area.h
@@ -55,6 +55,7 @@ class GraphicsLayer; class LayoutBox; class LayoutObject; +class LocalFrame; class PaintLayer; class ProgrammaticScrollAnimator; class ScrollAnchor; @@ -77,7 +78,7 @@ public: using ScrollCallback = base::OnceClosure; - static int PixelsPerLineStep(ChromeClient*); + static int PixelsPerLineStep(LocalFrame*); static float MinFractionToStepWhenPaging(); int MaxOverlapBetweenPages() const;
diff --git a/third_party/blink/renderer/core/scroll/scrollbar.cc b/third_party/blink/renderer/core/scroll/scrollbar.cc index 7aa526f..d17f3c5 100644 --- a/third_party/blink/renderer/core/scroll/scrollbar.cc +++ b/third_party/blink/renderer/core/scroll/scrollbar.cc
@@ -32,7 +32,7 @@ #include "third_party/blink/public/platform/web_mouse_event.h" #include "third_party/blink/public/platform/web_scrollbar_overlay_color_theme.h" #include "third_party/blink/renderer/core/dom/element.h" -#include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/layout_box.h" #include "third_party/blink/renderer/core/page/chrome_client.h" #include "third_party/blink/renderer/core/scroll/scroll_animator_base.h" #include "third_party/blink/renderer/core/scroll/scrollable_area.h" @@ -81,8 +81,10 @@ // sizing). int thickness = theme_.ScrollbarThickness(control_size); theme_scrollbar_thickness_ = thickness; - if (chrome_client_) - thickness = chrome_client_->WindowToViewportScalar(thickness); + if (chrome_client_) { + thickness = chrome_client_->WindowToViewportScalar( + scrollable_area_->GetLayoutBox()->GetFrame(), thickness); + } frame_rect_ = IntRect(0, 0, thickness, thickness); current_pos_ = ScrollableAreaCurrentPos(); @@ -669,7 +671,8 @@ int thickness = Orientation() == kHorizontalScrollbar ? Height() : Width(); if (!thickness || !chrome_client_) return thickness; - return chrome_client_->WindowToViewportScalar(theme_scrollbar_thickness_); + return chrome_client_->WindowToViewportScalar( + scrollable_area_->GetLayoutBox()->GetFrame(), theme_scrollbar_thickness_); } bool Scrollbar::IsOverlayScrollbar() const {
diff --git a/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h b/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h index f0344ea..67493571 100644 --- a/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h +++ b/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h
@@ -28,7 +28,9 @@ void SetIsPopup(bool is_popup) { is_popup_ = is_popup; } - float WindowToViewportScalar(const float) const override { return 0; } + float WindowToViewportScalar(LocalFrame*, const float) const override { + return 0; + } private: bool is_popup_;
diff --git a/third_party/blink/renderer/devtools/front_end/axe_core_test_runner/AxeCoreTestRunner.js b/third_party/blink/renderer/devtools/front_end/axe_core_test_runner/AxeCoreTestRunner.js index 9f13497..d82e840 100644 --- a/third_party/blink/renderer/devtools/front_end/axe_core_test_runner/AxeCoreTestRunner.js +++ b/third_party/blink/renderer/devtools/front_end/axe_core_test_runner/AxeCoreTestRunner.js
@@ -17,6 +17,15 @@ // Slow rules // https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#section-4-performance // (more performance investigation) https://github.com/dequelabs/axe-core/pull/1503 + 'aria-hidden-focus': { + enabled: false, + }, + 'aria-input-field-name': { + enabled: false, + }, + 'aria-toggle-field-name': { + enabled: false, + }, 'color-contrast': { enabled: false, }, @@ -29,18 +38,57 @@ enabled: false, }, // Low value rules + 'aria-allowed-role': { + enabled: false, + }, + 'aria-dpub-role-fallback': { + enabled: false, + }, 'audio-caption': { enabled: false, }, 'blink': { enabled: false, }, + 'form-field-multiple-labels': { + enabled: false, + }, + 'frame-tested': { + enabled: false, + }, 'html-has-lang': { enabled: false, }, 'html-lang-valid': { enabled: false, }, + 'html-xml-lang-mismatch': { + enabled: false, + }, + 'landmark-banner-is-top-level': { + enabled: false, + }, + 'landmark-complementary-is-top-level': { + enabled: false, + }, + 'landmark-contentinfo-is-top-level': { + enabled: false, + }, + 'landmark-main-is-top-level': { + enabled: false, + }, + 'landmark-no-duplicate-banner': { + enabled: false, + }, + 'landmark-no-duplicate-contentinfo': { + enabled: false, + }, + 'landmark-one-main': { + enabled: false, + }, + 'landmark-unique': { + enabled: false, + }, 'marquee': { enabled: false, }, @@ -56,6 +104,12 @@ 'object-alt': { enabled: false, }, + 'page-has-heading-one': { + enabled: false, + }, + 'scrollable-region-focusable': { + enabled: false, + }, 'video-caption': { enabled: false, }, @@ -76,7 +130,8 @@ // This should be removed after axe-core is updated. // See: https://github.com/dequelabs/axe-core/issues/1457 {id: 'aria-valid-attr', options: ['aria-placeholder']} - ] + ], + runOnly: {type: 'tags', values: {include: ['wcag2a', 'best-practice'], exclude: ['experimental']}} }; AxeCoreTestRunner.processAxeResult = function(violations) {
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 da930a5..0c77ba9 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.cc
@@ -453,11 +453,17 @@ handshake_request_ = std::move(request); } -void WebSocketChannelImpl::OnResponseReceived( - network::mojom::blink::WebSocketHandshakeResponsePtr response) { +void WebSocketChannelImpl::OnConnectionEstablished( + mojo::PendingRemote<network::mojom::blink::WebSocket> websocket, + mojo::PendingReceiver<network::mojom::blink::WebSocketClient> + client_receiver, + const String& protocol, + const String& extensions, + network::mojom::blink::WebSocketHandshakeResponsePtr response, + mojo::ScopedDataPipeConsumerHandle readable) { DCHECK_EQ(GetState(), State::kConnecting); - NETWORK_DVLOG(1) << this << " OnResponseReceived(" - << response->url.GetString() << ")"; + NETWORK_DVLOG(1) << this << " OnConnectionEstablished(" << protocol << ", " + << extensions << ")"; TRACE_EVENT_INSTANT1( "devtools.timeline", "WebSocketReceiveHandshakeResponse", TRACE_EVENT_SCOPE_THREAD, "data", @@ -466,18 +472,7 @@ handshake_request_.get(), response.get()); handshake_request_ = nullptr; -} -void WebSocketChannelImpl::OnConnectionEstablished( - mojo::PendingRemote<network::mojom::blink::WebSocket> websocket, - mojo::PendingReceiver<network::mojom::blink::WebSocketClient> - client_receiver, - const String& protocol, - const String& extensions, - mojo::ScopedDataPipeConsumerHandle readable) { - DCHECK_EQ(GetState(), State::kConnecting); - NETWORK_DVLOG(1) << this << " OnConnectionEstablished(" << protocol << ", " - << extensions << ")"; // From now on, we will detect mojo errors via |client_receiver_|. handshake_client_receiver_.reset(); client_receiver_.Bind(
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 4d5de65..c69b7536 100644 --- a/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h +++ b/third_party/blink/renderer/modules/websockets/websocket_channel_impl.h
@@ -114,14 +114,13 @@ // network::mojom::blink::WebSocketHandshakeClient methods: void OnOpeningHandshakeStarted( network::mojom::blink::WebSocketHandshakeRequestPtr) override; - void OnResponseReceived( - network::mojom::blink::WebSocketHandshakeResponsePtr) override; void OnConnectionEstablished( mojo::PendingRemote<network::mojom::blink::WebSocket> websocket, mojo::PendingReceiver<network::mojom::blink::WebSocketClient> client_receiver, const String& selected_protocol, const String& extensions, + network::mojom::blink::WebSocketHandshakeResponsePtr, mojo::ScopedDataPipeConsumerHandle readable) override; // network::mojom::blink::WebSocketClient methods:
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 d2712fae..7a11e5cb 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
@@ -237,10 +237,14 @@ auto websocket = std::make_unique<TestWebSocket>( websocket_to_pass.InitWithNewPipeAndPassReceiver()); + auto response = network::mojom::blink::WebSocketHandshakeResponse::New(); + response->http_version = network::mojom::blink::HttpVersion::New(); + response->status_text = ""; + response->headers_text = ""; handshake_client->OnConnectionEstablished( std::move(websocket_to_pass), client_remote.InitWithNewPipeAndPassReceiver(), selected_protocol, - extensions, std::move(readable)); + extensions, std::move(response), std::move(readable)); client->Bind(std::move(client_remote)); return websocket; }
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials b/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials index 9753fac..1adb64f 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials +++ b/third_party/blink/web_tests/FlagExpectations/disable-site-isolation-trials
@@ -12,7 +12,6 @@ crbug.com/933880 external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Failure ] crbug.com/933880 http/tests/inspector-protocol/network/interception-take-stream.js [ Failure ] crbug.com/933880 http/tests/inspector-protocol/network/raw-headers-for-protected-document.js [ Failure ] -crbug.com/933880 http/tests/inspector-protocol/network/raw-headers-for-websocket.js [ Failure ] crbug.com/933880 http/tests/inspector-protocol/network/security-info-on-response.js [ Failure ] crbug.com/933880 http/tests/inspector-protocol/network/xhr-interception-auth-fail.js [ Failure ] crbug.com/933880 http/tests/misc/redirect-to-about-blank.html [ Timeout ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 1836362..b8c61b9 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2915,8 +2915,6 @@ crbug.com/626703 external/wpt/web-animations/interfaces/Animation/persist.html [ Timeout ] crbug.com/626703 external/wpt/css/css-writing-modes/text-combine-upright-digits-004-manual.html [ Skip ] crbug.com/626703 external/wpt/html/semantics/scripting-1/the-script-element/json-module/parse-error.tentative.html [ Timeout ] -crbug.com/626703 [ Mac10.13 ] external/wpt/preload/preload-with-type.html [ Failure Timeout ] -crbug.com/626703 [ Retina ] external/wpt/preload/preload-with-type.html [ Timeout ] crbug.com/626703 [ Mac10.13 ] external/wpt/preload/onload-event.html [ Failure Timeout ] crbug.com/626703 [ Retina ] external/wpt/preload/onload-event.html [ Timeout ] crbug.com/626703 external/wpt/html/rendering/widgets/button-layout/anonymous-button-content-box.html [ Failure ] @@ -5788,11 +5786,11 @@ # Sheriff 2019-10-11 crbug.com/1012599 external/wpt/fetch/cross-origin-resource-policy/fetch.https.any.sharedworker.html [ Pass Timeout ] crbug.com/1012599 virtual/outofblink-cors/external/wpt/fetch/cross-origin-resource-policy/fetch.https.any.sharedworker.html [ Pass Timeout ] -crbug.com/1013391 http/tests/devtools/a11y-axe-core/basic-a11y-test.js [ Timeout ] -crbug.com/1013391 http/tests/devtools/a11y-axe-core/performance/landing-page-a11y-test.js [ Timeout ] -crbug.com/1013391 http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js [ Timeout ] -crbug.com/1013391 http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js [ Timeout ] +crbug.com/1013391 http/tests/devtools/a11y-axe-core/settings/shortcuts-a11y-test.js [ Pass Timeout ] crbug.com/1013523 [ Release ] virtual/cross-origin-embedder-policy/external/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ Failure Pass ] crbug.com/1013523 [ Release Linux Mac ] external/wpt/html/cross-origin-embedder-policy/require-corp.https.html [ Failure Pass ] crbug.com/1010472 [ Mac Debug ] virtual/disable-deferred-rendering/fast/canvas/color-space/canvas-drawImage-offscreenCanvas.html [ Failure Pass ] crbug.com/1010472 [ Mac Debug ] virtual/disable-deferred-rendering/fast/canvas/OffscreenCanvas-placeholder-createImageBitmap.html [ Failure Pass ] +crbug.com/1013779 virtual/scalefactor200/fast/hidpi/static/validation-bubble-appearance-hidpi.html [ Failure Pass ] +crbug.com/990900 external/wpt/cookie-store/idlharness.tentative.https.any.serviceworker.html [ Pass Timeout ] +crbug.com/990900 virtual/omt-worker-fetch/external/wpt/fetch/api/idlharness.any.html [ Pass Timeout ]
diff --git a/third_party/blink/web_tests/editing/pasteboard/drag-drop-copy-text.html b/third_party/blink/web_tests/editing/pasteboard/drag-drop-copy-text.html index 6d80b33..3557330 100644 --- a/third_party/blink/web_tests/editing/pasteboard/drag-drop-copy-text.html +++ b/third_party/blink/web_tests/editing/pasteboard/drag-drop-copy-text.html
@@ -17,7 +17,7 @@ // and drop it off to the right eventSender.leapForward(500); eventSender.mouseMoveTo(textarea.offsetLeft + - textarea.offsetWidth - 10, y); + textarea.offsetWidth - 20, y); // Simulate pressing the copy key. This will // transform the drag into a copy, rather
diff --git a/third_party/blink/web_tests/editing/pasteboard/pasting-tabs.html b/third_party/blink/web_tests/editing/pasteboard/pasting-tabs.html index 9f5f442..6ce54925 100644 --- a/third_party/blink/web_tests/editing/pasteboard/pasting-tabs.html +++ b/third_party/blink/web_tests/editing/pasteboard/pasting-tabs.html
@@ -5,7 +5,7 @@ } </script> <p>This tests copying plain text with tabs and pasting it into an editable region using paste and match tyle. The tabs should be preserved.</p> -<textarea id="textarea">Tab-> <-Tab</textarea> +<textarea id="textarea" style="resize: none;">Tab-> <-Tab</textarea> <div id="div" contenteditable="true"></div>
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 59a52c2..deabe88 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
@@ -163840,9 +163840,15 @@ "mediasession/README.md": [ [] ], + "mediasession/helper/artwork-generator.html": [ + [] + ], "mediasession/idlharness.window-expected.txt": [ [] ], + "mediasession/mediametadata-expected.txt": [ + [] + ], "mimesniff/META.yml": [ [] ], @@ -169813,12 +169819,6 @@ "service-workers/service-worker/sandboxed-iframe-navigator-serviceworker.https-expected.txt": [ [] ], - "service-workers/service-worker/unregister-then-register-new-script.https-expected.txt": [ - [] - ], - "service-workers/service-worker/unregister-then-register.https-expected.txt": [ - [] - ], "service-workers/service-worker/update-after-oneday.https-expected.txt": [ [] ], @@ -208633,6 +208633,18 @@ {} ] ], + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001.html": [ + [ + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001.html", + {} + ] + ], + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002.html": [ + [ + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002.html", + {} + ] + ], "css/css-grid/layout-algorithm/grid-intrinsic-size-with-orthogonal-items.html": [ [ "css/css-grid/layout-algorithm/grid-intrinsic-size-with-orthogonal-items.html", @@ -382140,6 +382152,14 @@ "ab55502487328d11ac153440fec4963e6e70709c", "testharness" ], + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-001.html": [ + "a478f9ace23f0488a60e2ea1e4f2da8ff81221cd", + "testharness" + ], + "css/css-grid/layout-algorithm/grid-flex-track-intrinsic-sizes-002.html": [ + "ef5f1ae10932935e990bd83bc8b33e9e88d49fa3", + "testharness" + ], "css/css-grid/layout-algorithm/grid-intrinsic-size-with-orthogonal-items.html": [ "1097956647846dd2493ab5d1c3458660c67868de", "testharness" @@ -403157,7 +403177,7 @@ "testharness" ], "css/css-transforms/parsing/transform-valid.html": [ - "7879bd686a6f32b76947c1ffee6f8aff4c2c4db2", + "8237a9a4a6882dd0ec3495464c8fbfb7f52e65d3", "testharness" ], "css/css-transforms/parsing/translate-parsing-invalid.html": [ @@ -415801,7 +415821,7 @@ "reftest" ], "css/css-writing-modes/normal-flow-overconstrained-vlr-005.xht": [ - "2754e2454765ef9aebbf697807ece3729f2c0226", + "a443db4e83000c70c65a8dc46a8deb9216c1bf28", "reftest" ], "css/css-writing-modes/normal-flow-overconstrained-vrl-002.xht": [ @@ -415809,7 +415829,7 @@ "reftest" ], "css/css-writing-modes/normal-flow-overconstrained-vrl-004.xht": [ - "472405d1efa86950dfc0f0134802dabe76f1c5de", + "d084c2c6a94bd934f96d6cc13f26ded361eb5628", "reftest" ], "css/css-writing-modes/ortho-htb-alongside-vrl-floats-002-ref.xht": [ @@ -461893,7 +461913,7 @@ "support" ], "interfaces/cookie-store.idl": [ - "c3204b2515a2000ca9be0cf6b4f6732e0ddc63a1", + "3e1a90ab63f5fc4afa36db8dda9fa1174236e26b", "support" ], "interfaces/cors-rfc1918.idl": [ @@ -465744,6 +465764,10 @@ "7c7c9f8d57a46ae310b1a63df7c6117f89b56d63", "support" ], + "mediasession/helper/artwork-generator.html": [ + "5a2fbb151d9b4eec6f6dc16fc12d8708e01e25d9", + "support" + ], "mediasession/idlharness.window-expected.txt": [ "d38b97b24c9e413bf11d273b5b44e4accad5ae89", "support" @@ -465752,8 +465776,12 @@ "e4d914544ed5df95b20287f8bd5482fdd7fe1045", "testharness" ], + "mediasession/mediametadata-expected.txt": [ + "5c6f25926b132202d1c68da9845b984a17664bf7", + "support" + ], "mediasession/mediametadata.html": [ - "e545e732ddabb27bdc14aef7a28e025b4cc15ca7", + "11f6a5f9767248b9dbec50a36d39dabb392e48aa", "testharness" ], "mediasession/playbackstate.html": [ @@ -493129,7 +493157,7 @@ "testharness" ], "service-workers/service-worker/clients-matchall-client-types.https-expected.txt": [ - "2b0c2f8d3306460bc7a0131586e7ea90077767be", + "096b59d553426ff3e183adb1401a81fdbc05be4a", "support" ], "service-workers/service-worker/clients-matchall-client-types.https.html": [ @@ -493749,7 +493777,7 @@ "testharness" ], "service-workers/service-worker/ready.https-expected.txt": [ - "d29a2b4e58b5319d7034e7be26cc0f2e4821e9fe", + "10f1cc7abaeb15b09ee5674f594c37204da73492", "support" ], "service-workers/service-worker/ready.https.html": [ @@ -495180,18 +495208,10 @@ "3bf4cff7200e71a7ad157f97f60e0bca45693485", "testharness" ], - "service-workers/service-worker/unregister-then-register-new-script.https-expected.txt": [ - "20a0fa54cfae3d2a7d0ff65e59ac01ec39af3975", - "support" - ], "service-workers/service-worker/unregister-then-register-new-script.https.html": [ "444a5c365776beaf3f1862341344e95b753afcae", "testharness" ], - "service-workers/service-worker/unregister-then-register.https-expected.txt": [ - "30d5ef10791adf1c3f48fd8d04e7c048171d26a0", - "support" - ], "service-workers/service-worker/unregister-then-register.https.html": [ "b61608c8419fd4f362dee5330404e2743a2f05f6", "testharness" @@ -500397,7 +500417,7 @@ "support" ], "tools/ci/website_build.sh": [ - "e99fcb0cc9fb8b7451301a1e2d318daa631baf62", + "d23829f0bcdab7cd4c3b966c8a3fea711737a0d8", "support" ], "tools/conftest.py": [ @@ -505401,7 +505421,7 @@ "support" ], "trusted-types/Node-multiple-arguments.tentative.html": [ - "062c26d653c344b902e48744a0b54f72af816fc6", + "e3e4a2635e9820c762ca0c10ccd54e244e7bb499", "testharness" ], "trusted-types/OWNERS": [ @@ -505413,67 +505433,67 @@ "testharness" ], "trusted-types/TrustedTypePolicy-CSP-no-name.tentative.html": [ - "2dfec26f5a0432e19fdbd139dadd3908b8acac3f", + "18819b20894644094684df6ca48d7e5a5b762d8e", "testharness" ], "trusted-types/TrustedTypePolicy-CSP-wildcard.tentative.html": [ - "22b87965614fd16d280d5a97f9150d07ccca3d3e", + "0e97a4a245a9ef01e1c65f159a9bd300a93b903f", "testharness" ], "trusted-types/TrustedTypePolicy-CSP.tentative.html": [ - "1293493ec1f7780b297d2040274150f0aba32adc", + "0b57c3a908a9a6218d45c4692ee6fd901e49328b", "testharness" ], "trusted-types/TrustedTypePolicy-createXXX.tentative.html": [ - "a078af4b36bf295c1c3bc5814631e79779a3c73e", + "73ed8c72b23d5101f8e9e0f9867b1330aef0dc87", "testharness" ], "trusted-types/TrustedTypePolicy-name.tentative.html": [ - "c121fe4cab50ab52a7159184bfa012e85d555768", + "4b7c30c855980ef2c4e5ab548a9b8def7991de77", "testharness" ], "trusted-types/TrustedTypePolicyFactory-constants.tentative.html": [ - "f164e792345463ac658e925a0187fe9b3f21a127", + "001a6cea4813b0c7f720448d95690c63429405a6", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-createXYZTests.tentative.html": [ - "8cdc837cba83ef6fa609556f4be453cdca1fc0a0", + "05c7301af7172165a6594e56eadc413cc6900977", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-noNamesGiven.tentative.html": [ - "2fc8f0122564190551de99ea1e47085a78fb7816", + "cec1bfb6041e525557c92f4cd7621c64f065654b", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests-wildcard.tentative.html": [ - "7edc64be314a58b81d9d77f69a920faad598d0e0", + "f1b5f27e709bc1eb986f1a1160d0df0b5ec9a99d", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-cspTests.tentative.html": [ - "1293493ec1f7780b297d2040274150f0aba32adc", + "0b57c3a908a9a6218d45c4692ee6fd901e49328b", "testharness" ], "trusted-types/TrustedTypePolicyFactory-createPolicy-nameTests.tentative.html": [ - "6d43e0bafc61f34c17d7d7b751bf69f12d035adf", + "e0aa53756d6a23fd99d0469104ca061bf7831398", "testharness" ], "trusted-types/TrustedTypePolicyFactory-defaultPolicy.tentative.html": [ - "ea00566854d12cbd6d2610aafdac44fd549ffbe7", + "7ac09d8bb96c0ef163590db1552012651648b68b", "testharness" ], "trusted-types/TrustedTypePolicyFactory-getPropertyType.tentative.html": [ - "90fc7d5566d8d74dd70b7ff74a349dc424b4cdf8", + "f9ba8f2782209df2362c902d5666dbbf4bba34f8", "testharness" ], "trusted-types/TrustedTypePolicyFactory-isXXX.tentative.html": [ - "854f69ed1e550bd660b8cf7a18b4a81a666072fd", + "efaac5d90d8f07f79f89aa72e633294a60487018", "testharness" ], "trusted-types/TrustedTypePolicyFactory-metadata.tentative.html": [ - "694e4d2660fce5c3b89e457023ea147c84d67834", + "70f77b1bb552c3e1f9069b8847a2231aa5b19d48", "testharness" ], "trusted-types/Window-TrustedTypes.tentative.html": [ - "5bbb4356c21d249a21c8204aad6c9ba7a353cb4e", + "c61d9207b65f430b08c6801a5ffc04d3d0efedd1", "testharness" ], "trusted-types/Window-open.tentative.html": [ @@ -505481,11 +505501,11 @@ "testharness" ], "trusted-types/WorkerGlobalScope-importScripts.https.html": [ - "6ae52639d1dc0d5b303cb4cdb6fb727481234be9", + "9dbfd7b93c97abda7beff52e2e9afebefe518f29", "testharness" ], "trusted-types/block-Node-multiple-arguments.tentative.html": [ - "f84998d4c54ce0d33b19aa3df1e1658d2ba2e655", + "5552e1313728c9688b7dfa32a9ee2bea38faa151", "testharness" ], "trusted-types/block-eval.tentative.html": [ @@ -505493,19 +505513,19 @@ "testharness" ], "trusted-types/block-string-assignment-to-DOMParser-parseFromString.tentative.html": [ - "4446a58836695355efd0fbf3f9f5a0bd6c60c8a3", + "82e31200e6ba5150672e28a898d70d71486ada8a", "testharness" ], "trusted-types/block-string-assignment-to-DOMWindowTimers-setTimeout-setInterval.tentative.html": [ - "2554ce635607ba06df3d975a0437b0862a30d799", + "468ed7b6975194ffde6b4106b0d78f5b99ca24ee", "testharness" ], "trusted-types/block-string-assignment-to-Document-write.tentative.html": [ - "845df475fa0c8833c63b4db7992cde1a804635f9", + "4defb56c88ed763bf65c3f45e16a7d56234b7970", "testharness" ], "trusted-types/block-string-assignment-to-Element-insertAdjacentHTML.tentative.html": [ - "ae1ace69bf85853d0f1c3db333e4507ac1896073", + "37a73f08c20a297a74bd7025906444a1083cb0c1", "testharness" ], "trusted-types/block-string-assignment-to-Element-outerHTML.tentative-expected.txt": [ @@ -505513,11 +505533,11 @@ "support" ], "trusted-types/block-string-assignment-to-Element-outerHTML.tentative.html": [ - "945e3dd2a79b026ad35f379deece04c19eb89d8c", + "8f314a26bf5d522276864abdc989a403afdfd170", "testharness" ], "trusted-types/block-string-assignment-to-Element-setAttribute.tentative.html": [ - "d77d9dab58681658d04a7b55d1f340da8f684bfa", + "3cae5d29b445ec452d6832c062bf6ce59a54242f", "testharness" ], "trusted-types/block-string-assignment-to-Element-setAttributeNS.tentative.html": [ @@ -505529,27 +505549,27 @@ "support" ], "trusted-types/block-string-assignment-to-HTMLElement-generic.tentative.html": [ - "fe27d45d08a2d8f9a98e44c3d0244230f343954d", + "89d1216d27e2dcf27ad5faa941e224cc495e9363", "testharness" ], "trusted-types/block-string-assignment-to-Location-assign.tentative.html": [ - "4c295ffa284acb21436f06ecbf06ac4073365efe", + "8e89d0d1a6044a354011ed904a621fc519e619ed", "testharness" ], "trusted-types/block-string-assignment-to-Location-href.tentative.html": [ - "86bce7994d6e9e43bddc590519126f4ee266cf06", + "998ee21f3456a8a59692774d057bddba349ee15f", "testharness" ], "trusted-types/block-string-assignment-to-Location-replace.tentative.html": [ - "aa3af64e12b1d2b296e8dedd40b9cef749b1431c", + "e85bb646fc96f2eafbe2c1953633ebcd59212641", "testharness" ], "trusted-types/block-string-assignment-to-Range-createContextualFragment.tentative.html": [ - "4919b7fd4de8dcbe66daa87fdd1285dd96d4580d", + "61553eb71dfcf4a49e580450602aabcc3e515282", "testharness" ], "trusted-types/block-string-assignment-to-Window-open.tentative.html": [ - "c66a16d5c00535c3def556afc5daff3a7614c62c", + "e9c1c79050be5c0d28ea6927e9f8285da11b973d", "testharness" ], "trusted-types/block-text-node-insertion-into-script-element.tentative.html": [ @@ -505557,7 +505577,7 @@ "testharness" ], "trusted-types/default-policy-report-only.tentative.html": [ - "1170655c5f53088e6ff0815c98175af81f5bd1d2", + "1a54fd6232917415338e3fac3f622f929a4432f8", "testharness" ], "trusted-types/default-policy-report-only.tentative.html.headers": [ @@ -505565,7 +505585,7 @@ "support" ], "trusted-types/default-policy.tentative.html": [ - "68e05c1305b0a55b73871cb3ab72f1b534a37c5e", + "672eccfb430b404f8d13e8fb3ec8ea8408d4a70c", "testharness" ], "trusted-types/default-policy.tentative.html.headers": [ @@ -505573,15 +505593,15 @@ "support" ], "trusted-types/eval-with-permissive-csp.tentative.html": [ - "25b4948c039c68c425e22f5e30ae4338327b6ce2", + "074fe79dc93fee6563bcb9ce2db3fa708bf4ad4f", "testharness" ], "trusted-types/idlharness.window.js": [ - "de13697764ed487060de3dd425cd39cba73ff13b", + "4c1ee6e04a36971593eea7e89841d147a4febcd5", "testharness" ], "trusted-types/support/WorkerGlobalScope-importScripts.https.js": [ - "8665c695c92137147193cfed075083e2de15cd90", + "fa63c8bad0fcd9f93d89c8c3bea2d8a0b59d2094", "support" ], "trusted-types/support/WorkerGlobalScope-importScripts.https.js.headers": [ @@ -505589,7 +505609,7 @@ "support" ], "trusted-types/support/helper.sub.js": [ - "36ee24046ed283fc294978ada74168c515d3e17f", + "d63ff54ad60d40045da5bbe864458688c0554dbc", "support" ], "trusted-types/support/worker.js": [ @@ -505597,7 +505617,7 @@ "support" ], "trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html": [ - "dc8653617504f5ed895789cff92c2553dce972e7", + "e15ecfaa86c5b48dcc3aa9903ab7b0ab89af8474", "testharness" ], "trusted-types/trusted-types-eval-reporting-no-unsafe-eval.tentative.https.html.headers": [ @@ -505605,7 +505625,7 @@ "support" ], "trusted-types/trusted-types-eval-reporting-report-only.tentative.https.html": [ - "1fb65459468d96f86e4a467aa8da2f3be489ae31", + "bd8933a48355f46f1973764874e017b263df197c", "testharness" ], "trusted-types/trusted-types-eval-reporting-report-only.tentative.https.html.headers": [ @@ -505613,7 +505633,7 @@ "support" ], "trusted-types/trusted-types-eval-reporting.tentative.https.html": [ - "4ec5db1adce7478cc3e97f942a9de68f1263d31d", + "c751ae1330cd01cfb1c4b21d0a676576656837b2", "testharness" ], "trusted-types/trusted-types-eval-reporting.tentative.https.html.headers": [ @@ -505621,7 +505641,7 @@ "support" ], "trusted-types/trusted-types-report-only.tentative.https.html": [ - "f33183b4906975f03ebb3f3a21adb63839c89adb", + "1a17d529fd158db853af547c55de675bf71f194e", "testharness" ], "trusted-types/trusted-types-report-only.tentative.https.html.headers": [ @@ -505629,7 +505649,7 @@ "support" ], "trusted-types/trusted-types-reporting-check-report.https.html": [ - "111907788d279a722aced631dc19b20afb6f0285", + "fc98f5cbc586e4238dbf1c8dc20b74105693bec4", "testharness" ], "trusted-types/trusted-types-reporting-check-report.https.html.sub.headers": [ @@ -505637,7 +505657,7 @@ "support" ], "trusted-types/trusted-types-reporting.tentative.https.html": [ - "0104ba358058199a77f1af5afb27e3255da8da64", + "6a79fec07b6626c87a22a3b1c4e778a33c975e67", "testharness" ], "trusted-types/trusted-types-reporting.tentative.https.html.headers": [
diff --git a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html index 7879bd6..8237a9a4 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-transforms/parsing/transform-valid.html
@@ -47,12 +47,6 @@ test_valid_value("transform", "skewY(-90deg)"); test_valid_value("transform", "translate(1px, 2%) scale(3, 4) rotate(-90deg)"); - -// Regression test for crbug.com/995038 -test_valid_value("transform", "translateX(2e80px)", "translateX(3.40282e+38px)"); -test_valid_value("transform", "rotate(2e80deg)", "rotate(3.40282e+38deg)"); -test_valid_value("transform", "scaleX(2e80)", "scaleX(3.40282e+38)"); -test_valid_value("transform", "skewX(2e80deg)", "skewX(3.40282e+38deg)"); </script> </body> </html>
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/cookie-store.idl b/third_party/blink/web_tests/external/wpt/interfaces/cookie-store.idl index c3204b2..3e1a90a 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/cookie-store.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/cookie-store.idl
@@ -43,7 +43,7 @@ enum CookieSameSite { "strict", "lax", - "unrestricted" + "none" }; dictionary CookieStoreSetOptions {
diff --git a/third_party/blink/web_tests/external/wpt/mediasession/helper/artwork-generator.html b/third_party/blink/web_tests/external/wpt/mediasession/helper/artwork-generator.html new file mode 100644 index 0000000..5a2fbb1 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mediasession/helper/artwork-generator.html
@@ -0,0 +1,18 @@ +<!DOCTYPE html> +<title>MediaImage</title> +<script> +function createArtworkFromURLs(sources) { + let artwork = []; + for (const source of sources) { + artwork.push({ + src: source + }); + } + + let metadata = new MediaMetadata({ + artwork: artwork + }); + return metadata.artwork; +} + +</script>
diff --git a/third_party/blink/web_tests/external/wpt/mediasession/mediametadata-expected.txt b/third_party/blink/web_tests/external/wpt/mediasession/mediametadata-expected.txt new file mode 100644 index 0000000..5c6f259 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mediasession/mediametadata-expected.txt
@@ -0,0 +1,21 @@ +This is a testharness.js-based test. +PASS Test that mediaSession.metadata is properly set +PASS Test that changes to metadata propagate properly +PASS Test that resetting metadata to null is reflected +PASS Test that MediaMetadata is constructed using a dictionary +PASS Test that MediaMetadata constructor can take no parameter +PASS Test the different values allowed in MediaMetadata init dictionary +PASS Test the default values for MediaMetadata with empty init dictionary +PASS Test the default values for MediaMetadata with no init dictionary +PASS Test that passing unknown values to the dictionary is a no-op +PASS Test that MediaMetadata is read/write +PASS Test that MediaMetadat.artwork can't be modified +PASS Test that MediaMetadata.artwork will not expose unknown properties +PASS Test that MediaMetadata.artwork is Frozen +PASS Test that MediaMetadata.artwork returns parsed urls +PASS Test that MediaMetadata throws when setting an invalid url +PASS Test MediaImage default values +PASS Test that MediaImage.src is required +FAIL Test that the base URL of MediaImage is the base URL of entry setting object assert_equals: expected "http://web-platform.test:8001/foo" but got "http://web-platform.test:8001/mediasession/foo" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/mediasession/mediametadata.html b/third_party/blink/web_tests/external/wpt/mediasession/mediametadata.html index e545e73..11f6a5f 100644 --- a/third_party/blink/web_tests/external/wpt/mediasession/mediametadata.html +++ b/third_party/blink/web_tests/external/wpt/mediasession/mediametadata.html
@@ -4,6 +4,16 @@ <script src="/resources/testharnessreport.js"></script> <script> +function load_iframe(src) { + return new Promise(resolve => { + const iframe = document.createElement('iframe'); + iframe.onload = () => { resolve(iframe); }; + iframe.src = src; + iframe.style.display = 'none'; + document.documentElement.appendChild(iframe); + }); +} + test(function() { var metadata = new MediaMetadata({}); navigator.mediaSession.metadata = metadata; @@ -189,4 +199,21 @@ }); }, "Test that MediaImage.src is required") +promise_test(async t => { + const URLs = [ + 'http://example.com', + '../foo', + './foo/bar', + '/foo/bar', + ]; + const subframe = await load_iframe('helper/artwork-generator.html'); + // createArtworkFromURLs is a function in the subframe. + const artwork = subframe.contentWindow.createArtworkFromURLs(URLs); + + assert_equals(artwork.length, URLs.length); + for (let i = 0 ; i < artwork.length ; ++i) { + assert_equals(artwork[i].src, new URL(URLs[i], document.URL).href); + } +}, 'Test that the base URL of MediaImage is the base URL of entry setting object'); + </script>
diff --git a/third_party/blink/web_tests/external/wpt/tools/ci/website_build.sh b/third_party/blink/web_tests/external/wpt/tools/ci/website_build.sh index e99fcb0..d23829f 100755 --- a/third_party/blink/web_tests/external/wpt/tools/ci/website_build.sh +++ b/third_party/blink/web_tests/external/wpt/tools/ci/website_build.sh
@@ -25,20 +25,6 @@ test $(json_property ${GITHUB_EVENT_PATH} ref) == 'refs/heads/master' } -function modifies_relevant_files { - base_revision=$(json_property ${GITHUB_EVENT_PATH} before) - - git diff --name-only ${base_revision} | \ - grep -E --silent '^(docs|tools)/' -} - -if ! modifies_relevant_files ; then - echo No files related to the website have been modified. Exiting without - echo building. - - exit ${neutral_status} -fi - git config --global user.email "wpt-pr-bot@users.noreply.github.com" git config --global user.name "wpt-pr-bot"
diff --git a/third_party/blink/web_tests/fast/inline/outline-offset.html b/third_party/blink/web_tests/fast/inline/outline-offset.html index 78d48815..67c5673 100644 --- a/third_party/blink/web_tests/fast/inline/outline-offset.html +++ b/third_party/blink/web_tests/fast/inline/outline-offset.html
@@ -19,6 +19,7 @@ height: 32px; margin-right: 200px; width: 175px; + resize: none; } p {
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png new file mode 100644 index 0000000..9f87477 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png new file mode 100644 index 0000000..46c67287 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/textarea/basic-textareas-quirks-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/textarea/basic-textareas-quirks-expected.png index d9d4740..b24fa2ad 100644 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/textarea/basic-textareas-quirks-expected.png +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/fast/forms/textarea/basic-textareas-quirks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-across-line-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.png similarity index 75% rename from third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-across-line-expected.png rename to third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.png index ada2c791..8dee85e 100644 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-across-line-expected.png +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.txt new file mode 100644 index 0000000..ec39e50 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/selection/selection-clear-expected.txt
@@ -0,0 +1,33 @@ +{ + "layers": [ + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "paintInvalidations": [ + { + "object": "LayoutBlockFlow DIV id='firstLine'", + "rect": [8, 8, 100, 200], + "reason": "full" + }, + { + "object": "InlineTextBox 'FAIL: Test did'", + "rect": [8, 48, 97, 119], + "reason": "disappeared" + }, + { + "object": "InlineTextBox 'not run'", + "rect": [8, 48, 97, 119], + "reason": "disappeared" + }, + { + "object": "InlineTextBox '\u00A0'", + "rect": [8, 48, 8, 19], + "reason": "appeared" + } + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/text-match-document-change-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/text-match-document-change-expected.txt new file mode 100644 index 0000000..c624d41 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/paint/invalidation/text-match-document-change-expected.txt
@@ -0,0 +1,33 @@ +{ + "layers": [ + { + "name": "Scrolling Contents Layer", + "bounds": [800, 600], + "contentsOpaque": true, + "backgroundColor": "#FFFFFF", + "paintInvalidations": [ + { + "object": "InlineTextBox 'Find-in-page 'findme', then click here)'", + "rect": [18, 130, 251, 39], + "reason": "disappeared" + }, + { + "object": "InlineTextBox 'To be changed: findme (Manual testing:'", + "rect": [18, 130, 251, 39], + "reason": "disappeared" + }, + { + "object": "InlineTextBox 'After change'", + "rect": [18, 130, 82, 19], + "reason": "appeared" + }, + { + "object": "VerticalScrollbar", + "rect": [295, 102, 15, 400], + "reason": "scroll control" + } + ] + } + ] +} +
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png new file mode 100644 index 0000000..a10c530 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/datetimelocal-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png new file mode 100644 index 0000000..0c50186 --- /dev/null +++ b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/controls-refresh/fast/forms/controls-new-ui/suggestion-picker/time-suggestion-picker-appearance-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png deleted file mode 100644 index 95695bb..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/root-layer-update-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/root-layer-update-expected.png deleted file mode 100644 index cbd6684..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/root-layer-update-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/transfrom-origin-on-zero-size-layer-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/transfrom-origin-on-zero-size-layer-expected.png deleted file mode 100644 index e186ea19..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/geometry/transfrom-origin-on-zero-size-layer-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt deleted file mode 100644 index 7e910706..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt +++ /dev/null
@@ -1,67 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer'", - "bounds": [352, 294] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='content'", - "position": [79, 79], - "bounds": [196, 212], - "contentsOpaque": true, - "backgroundColor": "#DDDDDD" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer' (foreground) Layer", - "bounds": [352, 294] - }, - { - "name": "LayoutBlockFlow DIV class='scroller'", - "position": [32, 32], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [67, 67], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [67, 67], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Overflow Controls Host Layer", - "position": [62, 62], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [280, 67], - "bounds": [7, 160], - "drawsContent": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/compositing-change-inside-reflection-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/compositing-change-inside-reflection-expected.png deleted file mode 100644 index 5cc9aa2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/compositing-change-inside-reflection-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning-expected.png deleted file mode 100644 index ca05e6a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning2-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning2-expected.png deleted file mode 100644 index ede9a99..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/reflection-positioning2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/transform-inside-reflection-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/transform-inside-reflection-expected.png deleted file mode 100644 index a51968c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/reflections/transform-inside-reflection-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.txt deleted file mode 100644 index abd8db5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.txt +++ /dev/null
@@ -1,129 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='outer'", - "position": [8, 8], - "bounds": [404, 404] - }, - { - "name": "Scrolling Layer", - "position": [10, 10], - "bounds": [400, 400], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [10, 10], - "bounds": [400, 704], - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='inner'", - "position": [10, 510], - "bounds": [204, 204], - "transform": 1 - }, - { - "name": "Scrolling Layer", - "position": [12, 512], - "bounds": [200, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Scrolling Contents Layer", - "position": [12, 512], - "bounds": [5000, 9000], - "transform": 1 - }, - { - "name": "Squashing Containment Layer", - "position": [10, 10], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='grey'", - "position": [12, 512], - "bounds": [100, 800], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV id='spacer')", - "position": [12, 2512], - "bounds": [5000, 1000], - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [12, 512], - "bounds": [204, 204], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [14, 707], - "bounds": [193, 7], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Vertical Scrollbar Layer", - "position": [207, 514], - "bounds": [7, 193], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Scroll Corner Layer", - "position": [207, 707], - "bounds": [7, 7], - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [404, 404], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [403, 10], - "bounds": [7, 400], - "drawsContent": false - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -304, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.png deleted file mode 100644 index a56b709..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.txt deleted file mode 100644 index 05556e5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/selection-repaint-with-gaps-expected.txt +++ /dev/null
@@ -1,131 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='overlap'", - "bounds": [300, 500], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='item')", - "position": [15, 35], - "bounds": [100, 210], - "paintInvalidations": [ - { - "object": "InlineTextBox 'ipsum'", - "rect": [0, 80, 40, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'lorem'", - "rect": [0, 80, 40, 39], - "reason": "geometry" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='overlap'", - "bounds": [300, 500], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='item')", - "position": [15, 35], - "bounds": [100, 210], - "paintInvalidations": [ - { - "object": "InlineTextBox 'ipsum'", - "rect": [0, 80, 42, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'lorem'", - "rect": [0, 80, 42, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'ipsum'", - "rect": [0, 160, 40, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'lorem'", - "rect": [0, 160, 40, 39], - "reason": "geometry" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-child-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-child-expected.txt deleted file mode 100644 index de990efa..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-child-expected.txt +++ /dev/null
@@ -1,172 +0,0 @@ -CASE 1, original layer tree -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [-1, -1], - "bounds": [281, 281] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} - -CASE 2, hovering over the outer div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [-1, -1], - "bounds": [281, 281], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 142, 142], - "reason": "background" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} - -CASE 3, hovering over the inner div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [-1, -1], - "bounds": [281, 281], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 142, 142], - "reason": "background" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "rect": [32, 32, 71, 71], - "reason": "background" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt deleted file mode 100644 index d5d4c99..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt +++ /dev/null
@@ -1,172 +0,0 @@ -CASE 1, original layer tree -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [4, 4], - "bounds": [276, 276] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} - -CASE 2, hovering over the outer div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [4, 4], - "bounds": [276, 276], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 132, 132], - "reason": "background" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} - -CASE 3, hovering over the inner div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box middle')", - "position": [4, 4], - "bounds": [276, 276], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 132, 132], - "reason": "background" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "rect": [26, 28, 71, 72], - "reason": "background" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [100, 100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/background/background-misaligned-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/background/background-misaligned-expected.txt deleted file mode 100644 index 8b085536..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/background/background-misaligned-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='target'", - "rect": [238, 241, 40, 40], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-layout-inline-children-replaced-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-layout-inline-children-replaced-expected.txt deleted file mode 100644 index 0f1216a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-layout-inline-children-replaced-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target' class='target'", - "rect": [0, 116, 402, 152], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [151, 117, 100, 100], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-no-inflow-children-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-no-inflow-children-expected.txt deleted file mode 100644 index c298739e..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/block-no-inflow-children-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'La la la la'", - "rect": [0, 0, 62, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'La la la'", - "rect": [0, 0, 47, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/hover-pseudo-borders-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/hover-pseudo-borders-expected.txt deleted file mode 100644 index ee1886f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/hover-pseudo-borders-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) \u003Cpseudo:after\u003E", - "rect": [138, 8, 100, 100], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV class='hitregion'", - "rect": [8, 8, 100, 100], - "reason": "background" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/invalidate-box-shadow-currentColor-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/invalidate-box-shadow-currentColor-expected.txt deleted file mode 100644 index e52439a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/box/invalidate-box-shadow-currentColor-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineFlowBox", - "rect": [8, 8, 29, 24], - "reason": "style change" - }, - { - "object": "InlineTextBox 'Text'", - "rect": [8, 8, 29, 19], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-3509-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-3509-expected.txt deleted file mode 100644 index 9cfe063..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-3509-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='im'", - "rect": [11, 131, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [11, 131, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [11, 131, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-5699-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-5699-expected.txt deleted file mode 100644 index 3cb2aa5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-5699-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Hello'", - "rect": [8, 184, 35, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Hello'", - "rect": [8, 156, 35, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [8, 150, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [8, 136, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-6278-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-6278-expected.txt deleted file mode 100644 index 06a3459..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-6278-expected.txt +++ /dev/null
@@ -1,144 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV", - "rect": [10, 138, 292, 160], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [10, 303, 292, 50], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Curabitur pretium, quam quis semper'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Phasellus vehicula, sem at posuere vehicula,'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'augue nibh molestie nisl, nec ullamcorper'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'fringilla orci nibh sed neque. Quisque eu nulla'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'lacus ante vulputate pede.'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'laoreet ac, laoreet non, suscipit sed, sapien.'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'malesuada, est libero feugiat libero, vel'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'non nisi molestie accumsan. Etiam tellus urna,'", - "rect": [10, 138, 291, 159], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [10, 138, 242, 200], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [10, 343, 242, 50], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD id='col1'", - "rect": [10, 353, 242, 40], - "reason": "incremental" - }, - { - "object": "InlineTextBox 'Curabitur pretium, quam quis semper'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Phasellus vehicula, sem at posuere'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Quisque eu nulla non nisi molestie'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'ac, laoreet non, suscipit sed, sapien.'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'accumsan. Etiam tellus urna, laoreet'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'malesuada, est libero feugiat libero,'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'nec ullamcorper lacus ante vulputate'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'pede.'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'vehicula, augue nibh molestie nisl,'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'vel fringilla orci nibh sed neque.'", - "rect": [10, 138, 235, 199], - "reason": "appeared" - }, - { - "object": "LayoutTableCell TD id='col1'", - "rect": [252, 138, 50, 215], - "reason": "incremental" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-7235-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-7235-expected.txt deleted file mode 100644 index 3e464899..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/bugzilla-7235-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='t'", - "rect": [8, 176, 100, 100], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [8, 156, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [8, 156, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-with-layout-delta-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-with-layout-delta-expected.txt deleted file mode 100644 index ca6e810..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-with-layout-delta-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (relative positioned) DIV", - "rect": [108, 8, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV", - "rect": [108, 8, 100, 100], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 8, 100, 100], - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 8, 100, 100], - "reason": "chunk disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [108, 8, 4, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 8, 4, 19], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/outline-clip-change-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/outline-clip-change-expected.txt deleted file mode 100644 index 658dc13..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/outline-clip-change-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) A id='link' class='updated'", - "rect": [48, 108, 90, 25], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [48, 108, 86, 19], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt deleted file mode 100644 index 865abe4..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/iframe-inside-squashed-layer-expected.txt +++ /dev/null
@@ -1,67 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 1016], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='foo'", - "bounds": [200, 1000], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", - "position": [8, 0], - "bounds": [300, 654], - "paintInvalidations": [ - { - "object": "InlineTextBox 'test1'", - "rect": [8, 508, 29, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'test1'", - "rect": [8, 508, 29, 19], - "reason": "disappeared" - }, - { - "object": "LayoutView #document", - "rect": [285, 500, 15, 150], - "reason": "chunk appeared" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-expected.png deleted file mode 100644 index 2dbfcc49..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-rects-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-rects-expected.png deleted file mode 100644 index 2343e6d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/layer-repaint-rects-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt deleted file mode 100644 index ae328dc1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1418, 1008], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV", - "bounds": [1000, 1000], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV class='mv-tile')", - "position": [8, 8], - "bounds": [1000, 105], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'", - "rect": [0, 55, 100, 50], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'", - "rect": [0, 0, 100, 50], - "reason": "geometry" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-overflow-scrolling-layer-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-overflow-scrolling-layer-expected.txt deleted file mode 100644 index c492349b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-overflow-scrolling-layer-expected.txt +++ /dev/null
@@ -1,95 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV id='container'", - "position": [8, 8], - "bounds": [400, 300] - }, - { - "name": "Scrolling Layer", - "position": [8, 8], - "bounds": [385, 285], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [8, 8], - "bounds": [1000, 1000], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='content'", - "rect": [0, 0, 1000, 1000], - "reason": "background" - } - ], - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [400, 300], - "drawsContent": false - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [8, 293], - "bounds": [385, 15], - "drawsContent": false, - "paintInvalidations": [ - { - "object": "Horizontal Scrollbar Layer", - "rect": [0, 0, 385, 15], - "reason": "full layer" - } - ] - }, - { - "name": "Vertical Scrollbar Layer", - "position": [393, 8], - "bounds": [15, 285], - "drawsContent": false, - "paintInvalidations": [ - { - "object": "Vertical Scrollbar Layer", - "rect": [0, 0, 15, 285], - "reason": "full layer" - } - ] - }, - { - "name": "Scroll Corner Layer", - "position": [393, 293], - "bounds": [15, 15] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-500, -400, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-viewport-scrolling-layer-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-viewport-scrolling-layer-expected.txt deleted file mode 100644 index 5d571984..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-clip-composited-viewport-scrolling-layer-expected.txt +++ /dev/null
@@ -1,42 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [2008, 1516], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='content'", - "rect": [8, 8, 2000, 1500], - "reason": "background" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-900, -700, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-color-change-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-color-change-expected.txt deleted file mode 100644 index 23ed21cc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-color-change-expected.txt +++ /dev/null
@@ -1,144 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - }, - { - "object": "InlineTextBox ' Text'", - "rect": [8, 61, 48, 185], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-match-highlight-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-match-highlight-expected.txt deleted file mode 100644 index f7e5f434..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/text-match-highlight-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Can you findme in this boring text?'", - "rect": [10, 135, 223, 19], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'Findme on a path! Did you findme?'", - "rect": [20, 224, 182, 72], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'Findme in a typewriter!'", - "rect": [10, 191, 138, 12], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'findme'", - "rect": [278, 40, 44, 19], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'findme'", - "rect": [264, 60, 44, 19], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'findme'", - "rect": [220, 60, 44, 19], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'findme'", - "rect": [89, 60, 44, 19], - "reason": "DocumentMarker change" - }, - { - "object": "InlineTextBox 'findme'", - "rect": [51, 80, 44, 19], - "reason": "DocumentMarker change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/updating-scrolling-container-and-content-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/updating-scrolling-container-and-content-expected.txt deleted file mode 100644 index 39c99a79..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/updating-scrolling-container-and-content-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 258, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 238, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 218, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 198, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 178, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 158, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 138, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 118, 77, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 278, 77, 15], - "reason": "style change" - }, - { - "object": "InlineTextBox 'CONTENT'", - "rect": [8, 108, 77, 9], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-4-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-4-expected.txt deleted file mode 100644 index 084dd6b2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-4-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [408, 88, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='to_remove' class='item'", - "rect": [408, 88, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [208, 88, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [408, 88, 4, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [408, 88, 4, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [208, 88, 4, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-expected.txt deleted file mode 100644 index 68e2fac..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/crbug-371640-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [348, 88, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='to_remove' class='item'", - "rect": [348, 88, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [88, 88, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [348, 88, 4, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [348, 88, 4, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [88, 88, 4, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt deleted file mode 100644 index 7a69cfd..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inline-block-2' class='item'", - "rect": [0, 200, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='inline-block-1' class='item'", - "rect": [0, 100, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='inline-block-2' class='item'", - "rect": [0, 100, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/repaint-expected.txt deleted file mode 100644 index fff7961..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/repaint-expected.txt +++ /dev/null
@@ -1,174 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='content'", - "rect": [138, 128, 654, 100], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='content'", - "rect": [148, 128, 644, 100], - "reason": "style change" - }, - { - "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'", - "rect": [138, 128, 636, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'", - "rect": [138, 128, 636, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'", - "rect": [138, 128, 636, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'", - "rect": [138, 128, 636, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'", - "rect": [138, 128, 636, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'", - "rect": [148, 128, 635, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean laoreet dolor id urna eleifend aliquet.'", - "rect": [148, 128, 635, 99], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'", - "rect": [148, 128, 635, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Nulla vel dolor ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis natoque penatibus et'", - "rect": [148, 128, 635, 99], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'", - "rect": [148, 128, 635, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis sapien, in condimentum leo neque sed'", - "rect": [148, 128, 635, 99], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'", - "rect": [148, 128, 635, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'magnis dis parturient montes, nascetur ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'", - "rect": [148, 128, 635, 99], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'", - "rect": [148, 128, 635, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'nulla. Nunc quis porta elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id quam.'", - "rect": [148, 128, 635, 99], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='content'", - "rect": [400, 128, 392, 180], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='left'", - "rect": [8, 228, 392, 80], - "reason": "incremental" - }, - { - "object": "InlineTextBox 'Aenean laoreet dolor id urna eleifend aliquet. Nulla vel dolor'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Sed volutpat, tellus vel varius vestibulum, purus quam mollis'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'elit. Pellentesque erat lectus, ultricies a lobortis id, faucibus id'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'ipsum. Aliquam ut turpis nisl, in vulputate sapien. Cum sociis'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'natoque penatibus et magnis dis parturient montes, nascetur'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quam.'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'ridiculus mus. Sed congue magna vitae dolor feugiat vehicula.'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'sapien, in condimentum leo neque sed nulla. Nunc quis porta'", - "rect": [400, 128, 391, 179], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='left'", - "rect": [148, 128, 252, 180], - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow DIV id='left'", - "rect": [8, 128, 140, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/float-new-in-block-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/float-new-in-block-expected.txt deleted file mode 100644 index 3e68d9d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/float-new-in-block-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (floating) DIV id='target'", - "rect": [8, 8, 100, 100], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/forms/details-marker-color-change-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/forms/details-marker-color-change-expected.txt deleted file mode 100644 index ddc62053..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/forms/details-marker-color-change-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Details'", - "rect": [24, 8, 45, 19], - "reason": "style change" - }, - { - "object": "LayoutDetailsMarker DIV id='details-marker'", - "rect": [8, 12, 11, 11], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/gradients-em-stops-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/gradients-em-stops-repaint-expected.txt deleted file mode 100644 index f107eda..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/gradients-em-stops-repaint-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='box4' class='box'", - "rect": [344, 18, 302, 122], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow DIV id='box3' class='box'", - "rect": [18, 18, 302, 122], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='indicator'", - "rect": [345, 19, 240, 20], - "reason": "style change" - }, - { - "object": "InlineTextBox '\n'", - "rect": [330, 135, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [330, 135, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-color-change-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-color-change-expected.txt deleted file mode 100644 index 709b4aa..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-color-change-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineFlowBox", - "rect": [8, 72, 38, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'PASS'", - "rect": [8, 72, 38, 19], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-reflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-reflow-expected.txt deleted file mode 100644 index 59e553a6..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/inline-reflow-expected.txt +++ /dev/null
@@ -1,159 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'A A A A A AA AA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'A A'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AA AA AA A A A'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AA AA AAA AAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAA AAA AAA AA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAA AAAA AAAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAAAA AAAA AAAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAAAA AAAAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAAAAA AAAAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'AAAAAA AAAAAAA'", - "rect": [0, 0, 300, 200], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'A A A A A'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'A A A A'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AA AA AA A'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AA AA AA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AA AAA AAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAA AAA AA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAA AAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAA AAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAA AAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAA AAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'AAAAAAA'", - "rect": [0, 0, 200, 300], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'A A A A A'", - "rect": [0, 300, 180, 20], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'A A A A A'", - "rect": [0, 300, 180, 20], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.png deleted file mode 100644 index bf130ce5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.txt deleted file mode 100644 index 40df7926..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-1-expected.txt +++ /dev/null
@@ -1,109 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing'", - "rect": [14, 80, 406, 119], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'away,\n'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'but generally, just as she had got its'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'comfortably enough, under her arm, with its legs'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked'", - "rect": [14, 80, 406, 119], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hanging down,\n'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog a blow with its head, it\n'", - "rect": [14, 80, 406, 119], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'her\n'", - "rect": [14, 80, 406, 119], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 406, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'away,\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'but generally, just as she had got its'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'comfortably enough, under her arm, with its legs'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hanging down,\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='pinkFloat'", - "rect": [378, 138, 70, 30], - "reason": "incremental" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.png deleted file mode 100644 index be38c00..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.txt deleted file mode 100644 index afeedc0..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-10-expected.txt +++ /dev/null
@@ -1,309 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Queen'", - "rect": [14, 440, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the'", - "rect": [14, 440, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 374, 48, 64], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.png deleted file mode 100644 index e0cbb015..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.txt deleted file mode 100644 index e833aa7..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-2-expected.txt +++ /dev/null
@@ -1,499 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow P", - "rect": [8, 74, 418, 526], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 521, 407, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 241, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox ' twist itself round and'", - "rect": [14, 181, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 181, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 181, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 181, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 181, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 181, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox ' twist itself round and'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 361, 356, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 361, 356, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 421, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 421, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 421, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 421, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'away,\n'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'but generally, just as she had got its'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'comfortably enough, under her arm, with its legs'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hanging down,\n'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hedgehog a blow with its head, it\n'", - "rect": [14, 80, 354, 120], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her\n'", - "rect": [14, 80, 354, 120], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 354, 120], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 354, 120], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog a blow with its head, it\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 461, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 461, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 461, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 461, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 461, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 401, 304, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 441, 66, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'", - "rect": [372, 404, 48, 81], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'", - "rect": [372, 403, 48, 81], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 364, 48, 65], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'would'", - "rect": [235, 180, 45, 20], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'would'", - "rect": [238, 180, 40, 19], - "reason": "disappeared" - }, - { - "object": "VerticalScrollbar", - "rect": [485, 0, 15, 600], - "reason": "scroll control" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.png deleted file mode 100644 index 778197d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.txt deleted file mode 100644 index 92c4af0..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-3-expected.txt +++ /dev/null
@@ -1,294 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 400, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,'", - "rect": [14, 400, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehogs; and in\n'", - "rect": [14, 400, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting for the'", - "rect": [14, 400, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' was in'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a furious passion, and went\n'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 440, 338, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting\n'", - "rect": [65, 400, 298, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [242, 440, 65, 19], - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'", - "rect": [356, 423, 64, 81], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'", - "rect": [372, 403, 48, 81], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.png deleted file mode 100644 index 27847b3..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.txt deleted file mode 100644 index 8fdb2a6b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-4-expected.txt +++ /dev/null
@@ -1,284 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'her head!\u2019 about once'", - "rect": [14, 460, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'in a minute.\n'", - "rect": [14, 460, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 406, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='greenFloat'", - "rect": [372, 403, 48, 81], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.png deleted file mode 100644 index be9b1bf..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.txt deleted file mode 100644 index c92f3d52..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-5-expected.txt +++ /dev/null
@@ -1,314 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [49, 360, 372, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [49, 360, 372, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 400, 356, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for'", - "rect": [14, 400, 356, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehogs; and in\n'", - "rect": [14, 400, 356, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting for the'", - "rect": [14, 400, 356, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'turns,\n'", - "rect": [14, 400, 356, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' was in a'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'furious passion, and went\n'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019 about once'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'in a minute.\n'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'stamping about, and shouting'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 440, 354, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting\n'", - "rect": [49, 400, 302, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [245, 440, 65, 19], - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.png deleted file mode 100644 index 625de9b2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.txt deleted file mode 100644 index 6f72682..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-6-expected.txt +++ /dev/null
@@ -1,149 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'foo'", - "rect": [27, 363, 22, 20], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.png deleted file mode 100644 index a111f37..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.txt deleted file mode 100644 index 95267ae..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-7-expected.txt +++ /dev/null
@@ -1,74 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [298, 440, 70, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.png deleted file mode 100644 index 58addaa..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.txt deleted file mode 100644 index cf0c137..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-8-expected.txt +++ /dev/null
@@ -1,459 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow P", - "rect": [8, 74, 418, 526], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' twist itself round and'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox ' twist itself round and'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'difficult game'", - "rect": [14, 360, 406, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'indeed.\n'", - "rect": [14, 360, 406, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' was in a furious'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019 about once in a'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'minute.\n'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'passion, and went\n'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'stamping about, and shouting \u2018Off'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 440, 355, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The chief difficulty Alice found at first was in managing'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'away,\n'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'away,\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'but generally, just as she had got its'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'but generally, just as she had got its'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'comfortably enough, under her arm, with its legs'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'comfortably enough, under her arm, with its legs'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'flamingo: she succeeded in getting its body tucked'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hanging down,\n'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hanging down,\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'hedgehog a blow with its head, it\n'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog a blow with its head, it\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'her\n'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'neck nicely straightened\n'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 354, 119], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'out, and was going to give the'", - "rect": [14, 80, 354, 119], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 400, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'and in\n'", - "rect": [14, 400, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,'", - "rect": [14, 400, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting for the hedgehogs;'", - "rect": [14, 400, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting\n'", - "rect": [14, 400, 297, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [184, 440, 68, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'would'", - "rect": [238, 180, 40, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'would'", - "rect": [238, 180, 40, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.png deleted file mode 100644 index 2b4f4b0..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.txt deleted file mode 100644 index e15507f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/line-flow-with-floats-9-expected.txt +++ /dev/null
@@ -1,399 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Alice began to feel very uneasy: to be sure, she had not as\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'become of\n'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'had any dispute with the Queen, but she knew that it might'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'happen any minute, \u2018and then,\u2019 thought she, \u2018what would'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'me? They\u2019re dreadfully fond of beheading people'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'yet'", - "rect": [14, 520, 407, 80], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'and was in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'begin again, it was very'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'ground, Alice soon came to the conclusion that it was a very'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'in the act of crawling away: besides all\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'provoking to find that the hedgehog had\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'she wanted to send the'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'she'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soldiers were always'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'soldiers'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'soon came to the conclusion that it was a very\n'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the ground, Alice'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'there was generally a ridge or furrow in the way wherever\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'this, there was generally'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'this,'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'unrolled itself, and was'", - "rect": [14, 240, 406, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'unrolled itself,'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'wanted to send the hedgehog to, and, as the doubled-up\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'were always getting up and walking off to other parts of\n'", - "rect": [14, 240, 406, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox ' twist itself round and'", - "rect": [14, 180, 406, 79], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'could not help bursting out\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'head down, and was going to\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'laughing: and when she had got its'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'look up in her face, with\n'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 180, 406, 79], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'such a puzzled expression that she'", - "rect": [14, 180, 406, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'difficult'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'game indeed.\n'", - "rect": [65, 360, 356, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Queen'", - "rect": [14, 440, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the'", - "rect": [14, 440, 355, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [14, 420, 355, 39], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'about, and shouting \u2018Off with his head!\u2019 or \u2018Off with'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019 about once in a minute.\n'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'her head!\u2019'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'shouting \u2018Off with his head!\u2019 or \u2018Off with\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping about, and'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'stamping'", - "rect": [14, 460, 354, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'was in a furious passion, and went\n'", - "rect": [14, 460, 354, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'a very short time '", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for the hedgehogs; and in\n'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'for turns,\n'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'quarrelling all the while, and fighting'", - "rect": [65, 420, 304, 39], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'The players all played at once without waiting'", - "rect": [65, 400, 304, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'difficult game indeed.\n'", - "rect": [65, 380, 142, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the Queen'", - "rect": [302, 440, 66, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 383, 48, 65], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='blueFloat'", - "rect": [14, 363, 48, 65], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) SPAN id='yellowFloat'", - "rect": [372, 243, 48, 49], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/lines-with-layout-delta-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/lines-with-layout-delta-expected.txt deleted file mode 100644 index 40e2f8c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/lines-with-layout-delta-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'PASS'", - "rect": [8, 58, 38, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'FAIL'", - "rect": [8, 58, 35, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/list-marker-2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/list-marker-2-expected.txt deleted file mode 100644 index 2f63d9c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/list-marker-2-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutImage IMG id='target'", - "rect": [48, 100, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutListMarker (anonymous)", - "rect": [30, 185, 7, 19], - "reason": "geometry" - }, - { - "object": "LayoutListMarker (anonymous)", - "rect": [30, 135, 7, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/make-children-non-inline-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/make-children-non-inline-expected.txt deleted file mode 100644 index b56469a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/make-children-non-inline-expected.txt +++ /dev/null
@@ -1,119 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'about all the stuff'", - "rect": [8, 264, 110, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'about all the stuff'", - "rect": [8, 164, 110, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'write a book'", - "rect": [8, 144, 79, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'write a book'", - "rect": [8, 144, 79, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'more words.'", - "rect": [8, 104, 79, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'more words.'", - "rect": [8, 104, 79, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'that comes'", - "rect": [8, 284, 67, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'that comes'", - "rect": [8, 184, 67, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'the break.'", - "rect": [8, 324, 62, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'the break.'", - "rect": [8, 224, 62, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'I could'", - "rect": [8, 124, 44, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'I could'", - "rect": [8, 124, 44, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'words,'", - "rect": [8, 84, 43, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'words,'", - "rect": [8, 84, 43, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Word,'", - "rect": [8, 64, 39, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Word,'", - "rect": [8, 64, 39, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'after'", - "rect": [8, 304, 29, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'after'", - "rect": [8, 204, 29, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [8, 164, 10, 100], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/non-text-link-invalidation-optimization-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/non-text-link-invalidation-optimization-expected.txt deleted file mode 100644 index bdea3add..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/non-text-link-invalidation-optimization-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox ' text is invalidated and '", - "rect": [164, 8, 145, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox ' passes if '", - "rect": [75, 8, 61, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'This test '", - "rect": [8, 8, 57, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox ' images.'", - "rect": [353, 8, 52, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox 'only'", - "rect": [136, 8, 28, 19], - "reason": "style change" - }, - { - "object": "InlineTextBox ' no '", - "rect": [319, 8, 24, 19], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt deleted file mode 100644 index b013a4b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ /dev/null
@@ -1,52 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) UL id='submenu'", - "rect": [48, 94, 40, 20], - "reason": "chunk disappeared" - } - ] - }, - { - "name": "LayoutListItem (floating) LI id='watches'", - "position": [30, 44], - "bounds": [7, 19] - }, - { - "name": "LayoutInline (relative positioned) SPAN id='placeholder'", - "position": [48, 44], - "drawsContent": false, - "backfaceVisibility": "hidden" - }, - { - "name": "LayoutListItem (relative positioned) (floating) LI id='menu'", - "position": [30, 44], - "bounds": [7, 19], - "paintInvalidations": [ - { - "object": "LayoutListMarker (anonymous)", - "rect": [0, 0, 7, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-continuations-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-continuations-expected.txt deleted file mode 100644 index 1faf896..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-continuations-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN id='outer'", - "rect": [7, 87, 88, 22], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-enable-continuations-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-enable-continuations-expected.txt deleted file mode 100644 index 5fc57cc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-enable-continuations-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN id='outer'", - "rect": [7, 87, 88, 22], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-child-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-child-move-expected.txt deleted file mode 100644 index 88b172f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-child-move-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV", - "rect": [99, 49, 302, 302], - "reason": "outline" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='child'", - "rect": [300, 50, 20, 300], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='child'", - "rect": [150, 50, 20, 300], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-continuation-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-continuation-move-expected.txt deleted file mode 100644 index 24c2846c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-continuation-move-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN", - "rect": [207, 231, 102, 102], - "reason": "outline" - }, - { - "object": "LayoutInline SPAN", - "rect": [7, 231, 102, 102], - "reason": "outline" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='block'", - "rect": [208, 232, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='block'", - "rect": [8, 232, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-inline-continuation-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-inline-continuation-move-expected.txt deleted file mode 100644 index 219a51f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/focus-ring-on-inline-continuation-move-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN", - "rect": [7, 7, 102, 182], - "reason": "outline" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='block'", - "rect": [8, 88, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='block'", - "rect": [8, 8, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-focus-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-focus-expected.txt deleted file mode 100644 index ba741db..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-focus-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'", - "rect": [0, 36, 418, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'crbug.com/424078: ensure inline elements get their outline painted'", - "rect": [0, 36, 418, 19], - "reason": "disappeared" - }, - { - "object": "LayoutInline A id='link'", - "rect": [585, 0, 215, 233], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Home'", - "rect": [0, 0, 39, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Home'", - "rect": [0, 0, 39, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt deleted file mode 100644 index 350810f8..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN", - "rect": [210, 0, 50, 15], - "reason": "outline" - }, - { - "object": "InlineTextBox 'Test'", - "rect": [215, 0, 40, 10], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-change-invalidation-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-change-invalidation-expected.txt deleted file mode 100644 index a87c2c4..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-change-invalidation-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow A id='link'", - "rect": [43, 83, 754, 30], - "reason": "appeared" - }, - { - "object": "LayoutListMarker (anonymous)", - "rect": [30, 88, 7, 19], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-containing-image-in-non-standard-mode-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-containing-image-in-non-standard-mode-expected.txt deleted file mode 100644 index 74a8f125..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-containing-image-in-non-standard-mode-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN id='target'", - "rect": [6, 6, 204, 58], - "reason": "style change" - }, - { - "object": "LayoutImage IMG", - "rect": [8, 8, 200, 50], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-continuations-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-continuations-expected.txt deleted file mode 100644 index 655ab04..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/outline-continuations-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN id='outer'", - "rect": [16, 108, 90, 63], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'CONTENTS'", - "rect": [18, 150, 86, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'CONTENTS'", - "rect": [18, 150, 86, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'CONTENTS'", - "rect": [18, 110, 86, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'CONTENTS'", - "rect": [18, 110, 86, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-expected.txt deleted file mode 100644 index edc2ece..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-expected.txt +++ /dev/null
@@ -1,574 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 537, 62, 37], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 531, 62, 37], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 498, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 492, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 459, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 453, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 420, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 414, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [61, 249, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [61, 243, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [61, 210, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [61, 204, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 171, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 165, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 132, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 126, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 93, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 87, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 54, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 48, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 15, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [61, 9, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 366, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 360, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 327, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 321, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 288, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [61, 282, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 504, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 498, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 465, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 459, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 426, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 420, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 216, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 210, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 177, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 171, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 138, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 132, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 99, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 93, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 60, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 54, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 21, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 15, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 374, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 368, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 335, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 329, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 296, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [69, 290, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 375, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 369, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 336, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 330, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 297, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [70, 291, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [67, 138, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [67, 132, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [65, 60, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [65, 54, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [65, 21, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [65, 15, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 543, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 537, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 504, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 498, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 465, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 459, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 426, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 420, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 255, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 249, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 216, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 210, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 177, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 171, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 99, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [59, 93, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 543, 32, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [67, 537, 32, 20], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [66, 299, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [66, 293, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [63, 23, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [63, 17, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 545, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 539, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 506, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 500, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 467, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 461, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 428, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 422, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 257, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 251, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 218, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 212, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 179, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 173, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 140, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [59, 134, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [58, 377, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [58, 371, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [58, 338, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [58, 332, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [57, 101, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [57, 95, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [57, 62, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [57, 56, 16, 17], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-right-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-right-expected.txt deleted file mode 100644 index 63c1af7..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/float-overflow-right-expected.txt +++ /dev/null
@@ -1,574 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 537, 62, 37], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 531, 62, 37], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 498, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 492, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 459, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 453, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 420, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 414, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [677, 249, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [677, 243, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [677, 210, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", - "rect": [677, 204, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 171, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 165, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 132, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 126, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 93, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 87, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 54, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 48, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 15, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "rect": [677, 9, 62, 22], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 366, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 360, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 327, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 321, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 288, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutTable TABLE class='outer'", - "rect": [681, 282, 58, 28], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 504, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 498, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 465, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 459, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 426, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 420, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 216, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 210, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 177, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 171, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 138, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 132, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 99, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 93, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 60, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 54, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 21, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [683, 15, 50, 10], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 374, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 368, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 335, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 329, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 296, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [689, 290, 42, 12], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 543, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 537, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 504, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 498, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 465, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 459, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 426, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 420, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 255, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 249, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 216, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 210, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 177, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 171, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 99, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [701, 93, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [695, 60, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [695, 54, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [695, 21, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [695, 15, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [693, 138, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [693, 132, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 375, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 369, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 336, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 330, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 297, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "rect": [690, 291, 40, 10], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [701, 543, 32, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [701, 537, 32, 20], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [727, 101, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [727, 95, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [727, 62, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [727, 56, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [726, 377, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [726, 371, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [726, 338, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [726, 332, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 545, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 539, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 506, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 500, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 467, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 461, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 428, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 422, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 257, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 251, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 218, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 212, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 179, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 173, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 140, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [725, 134, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [721, 23, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [721, 17, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [718, 299, 16, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [718, 293, 16, 17], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-overflow-expected.txt deleted file mode 100644 index cb8bea1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-overflow-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'A\u00A0\u00A0B'", - "rect": [33, 33, 250, 100], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-lr-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-lr-overflow-expected.txt deleted file mode 100644 index 0fd8254f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-lr-overflow-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'A\u00A0\u00A0B'", - "rect": [33, 33, 100, 250], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-rl-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-rl-overflow-expected.txt deleted file mode 100644 index 9a3e928..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/inline-vertical-rl-overflow-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'A\u00A0\u00A0B'", - "rect": [667, 33, 100, 250], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/line-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/line-overflow-expected.txt deleted file mode 100644 index 6405597..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/line-overflow-expected.txt +++ /dev/null
@@ -1,114 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox ' eleifend'", - "rect": [8, 122, 195, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'convallis.'", - "rect": [8, 122, 195, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'lacus, at sagittis eros leo'", - "rect": [8, 122, 195, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'pulvinar velit. Integer'", - "rect": [8, 122, 195, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'sollicitudin nisi ut urna blandit'", - "rect": [8, 122, 195, 99], - "reason": "appeared" - }, - { - "object": "InlineTextBox ' eleifend lacus,'", - "rect": [8, 142, 195, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'at sagittis eros leo pulvinar'", - "rect": [8, 142, 195, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'urna blandit convallis.'", - "rect": [8, 142, 195, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'velit. Integer sollicitudin nisi ut'", - "rect": [8, 142, 195, 79], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Cras faucibus. Nunc'", - "rect": [8, 82, 192, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'adipiscing, enim in scelerisque'", - "rect": [8, 82, 192, 59], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'augue '", - "rect": [8, 82, 192, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'augue'", - "rect": [8, 82, 192, 59], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'convallis,\n'", - "rect": [8, 82, 192, 59], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'convallis,\n'", - "rect": [8, 82, 192, 59], - "reason": "disappeared" - }, - { - "object": "InlineFlowBox", - "rect": [114, 92, 35, 49], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'purus'", - "rect": [114, 122, 35, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'purus'", - "rect": [38, 142, 35, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/negative-text-indent-with-overflow-hidden-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/negative-text-indent-with-overflow-hidden-expected.txt deleted file mode 100644 index 933e54c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/negative-text-indent-with-overflow-hidden-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target' class='changed'", - "rect": [550, 8, 200, 50], - "reason": "background" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt deleted file mode 100644 index 8a5731b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/overflow/opacity-change-on-overflow-float-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 8, 761, 59], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 8, 761, 59], - "reason": "chunk disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV class='green'", - "rect": [8, 84, 100, 100], - "reason": "chunk disappeared" - }, - { - "object": "LayoutBlockFlow (floating) DIV class='red'", - "rect": [8, 84, 100, 100], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 84, 100, 100], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [8, 84, 100, 100], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt deleted file mode 100644 index 876f614..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/paint-invalidation-with-reparent-across-frame-boundaries-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow HTML", - "rect": [18, 18, 22, 19], - "reason": "chunk disappeared" - }, - { - "object": "InlineTextBox 'abc'", - "rect": [8, 187, 22, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt deleted file mode 100644 index 94562dc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1250, 585], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutImage IMG", - "rect": [704, 0, 214, 232], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [454, 0, 214, 232], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [0, 0, 214, 232], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [700, 217, 4, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "rect": [450, 217, 4, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/inline-relative-positioned-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/inline-relative-positioned-expected.txt deleted file mode 100644 index 2a20486..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/inline-relative-positioned-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'a'", - "rect": [8, 88, 100, 100], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'p'", - "rect": [8, 88, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [8, 88, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layout-state-relative-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layout-state-relative-expected.txt deleted file mode 100644 index 7eb3a55..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layout-state-relative-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'PASS'", - "rect": [8, 152, 38, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'FAIL'", - "rect": [8, 152, 35, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt deleted file mode 100644 index 172fb0919..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'x'", - "rect": [8, 220, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "rect": [8, 200, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-document-element-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-document-element-expected.txt deleted file mode 100644 index 1e5afc6a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-document-element-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#008000" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#008000", - "paintInvalidations": [ - { - "object": "Scrolling background of LayoutView #document", - "rect": [0, 0, 800, 600], - "reason": "background" - }, - { - "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'", - "rect": [108, 116, 424, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Tests that the entire viewport is painted with a floated html element.'", - "rect": [8, 16, 424, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt deleted file mode 100644 index 8278548..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV", - "rect": [100, 200, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "rect": [100, 100, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Target'", - "rect": [100, 200, 41, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'Target'", - "rect": [100, 100, 41, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/push-block-with-first-line-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/push-block-with-first-line-expected.txt deleted file mode 100644 index 0ab0888..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/push-block-with-first-line-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "RootInlineBox", - "rect": [8, 68, 784, 20], - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "rect": [8, 8, 784, 20], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'JOCULAR'", - "rect": [8, 68, 140, 20], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'JOCULAR'", - "rect": [8, 8, 140, 20], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/quotes-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/quotes-expected.txt deleted file mode 100644 index b12dca4b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/quotes-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'quote 2'", - "rect": [17, 28, 47, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'quote 2'", - "rect": [16, 28, 47, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u003E'", - "rect": [64, 28, 9, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u003C'", - "rect": [8, 28, 9, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '}'", - "rect": [63, 28, 8, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '{'", - "rect": [8, 28, 8, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-redraw-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-redraw-expected.txt deleted file mode 100644 index 4d14ecc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-redraw-expected.txt +++ /dev/null
@@ -1,84 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'The color of this'", - "rect": [380, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'should be green'", - "rect": [380, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'text in the reflection'", - "rect": [380, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'The color of this'", - "rect": [70, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'should be green'", - "rect": [70, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'text in the reflection'", - "rect": [70, 267, 286, 59], - "reason": "style change" - }, - { - "object": "InlineTextBox 'The color of this'", - "rect": [305, 34, 126, 182], - "reason": "style change" - }, - { - "object": "InlineTextBox 'should be green'", - "rect": [305, 34, 126, 182], - "reason": "style change" - }, - { - "object": "InlineTextBox 'text in the reflection'", - "rect": [305, 34, 126, 182], - "reason": "style change" - }, - { - "object": "InlineTextBox 'The color of this'", - "rect": [305, 377, 126, 156], - "reason": "style change" - }, - { - "object": "InlineTextBox 'should be green'", - "rect": [305, 377, 126, 156], - "reason": "style change" - }, - { - "object": "InlineTextBox 'text in the reflection'", - "rect": [305, 377, 126, 156], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt deleted file mode 100644 index 09b3bab1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [22, 50, 226, 167], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'PASS'", - "rect": [23, 51, 72, 110], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'FAIL'", - "rect": [23, 51, 69, 109], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/remove-inline-after-layout-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/remove-inline-after-layout-expected.txt deleted file mode 100644 index 7c85837..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/remove-inline-after-layout-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'This span should disappear.\n'", - "rect": [112, 193, 178, 19], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [290, 108, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [112, 108, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 108, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "rect": [108, 193, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [108, 193, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png deleted file mode 100644 index b31eb3d8..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt deleted file mode 100644 index cca1667..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-across-writing-mode-boundary-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox '\u7B2C\u4E00\u6BB5\u843D paragraph 1'", - "rect": [548, 191, 23, 36], - "reason": "selection" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt deleted file mode 100644 index a91047a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (relative positioned) DIV", - "rect": [428, 38, 300, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV", - "rect": [28, 38, 300, 20], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'There should only be one copy of this text.'", - "rect": [428, 38, 270, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'There should only be one copy of this text.'", - "rect": [28, 38, 270, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt deleted file mode 100644 index 3083be1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-under-composited-fixed-scrolled-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 2016], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='fixed-container'", - "position": [0, 400], - "bounds": [785, 600], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -400, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/inline-style-change-in-scrolled-view-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/inline-style-change-in-scrolled-view-expected.txt deleted file mode 100644 index a39f225..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/inline-style-change-in-scrolled-view-expected.txt +++ /dev/null
@@ -1,42 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [2000, 2000], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Text Text Text Text Text Text Text Text Text Text Text Text Text'", - "rect": [0, 320, 413, 19], - "reason": "style change" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-200, -200, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/invalidate-after-composited-scroll-of-window-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/invalidate-after-composited-scroll-of-window-expected.txt deleted file mode 100644 index 35cb461..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/invalidate-after-composited-scroll-of-window-expected.txt +++ /dev/null
@@ -1,47 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 4936], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Tests that invalidation of a div after scrolling invalidates just the div and no other area.'", - "rect": [8, 4908, 540, 19], - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [8, 2408, 100, 100], - "reason": "background" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -2350, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset-expected.txt deleted file mode 100644 index 1c0c148c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'before'", - "rect": [100, 120, 40, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'after'", - "rect": [100, 120, 29, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset2-expected.txt deleted file mode 100644 index 369cb30..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset2-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'before'", - "rect": [102, 122, 40, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'after'", - "rect": [102, 122, 29, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset3-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset3-expected.txt deleted file mode 100644 index 71db693..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/layout-state-scrolloffset3-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'before'", - "rect": [100, 120, 34, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'after'", - "rect": [100, 120, 29, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.png deleted file mode 100644 index 28a2876d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.txt deleted file mode 100644 index de2e3d0..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/line-in-scrolled-clipped-block-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox ' FAIL .'", - "rect": [8, 8, 100, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox ' PASS .'", - "rect": [8, 8, 100, 19], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-body-appear-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-body-appear-expected.txt deleted file mode 100644 index 00843996..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-body-appear-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [2008, 2096], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'", - "rect": [124, 52, 383, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Bug 36461 - No vertical scrollbar after the CSS class change'", - "rect": [124, 52, 383, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'", - "rect": [8, 16, 340, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'You should see both vertical and horizontal scrollbars.'", - "rect": [8, 16, 340, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'This is the test for '", - "rect": [8, 52, 116, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'This is the test for '", - "rect": [8, 52, 116, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '.'", - "rect": [507, 52, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '.'", - "rect": [507, 52, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.png deleted file mode 100644 index c490549..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.txt deleted file mode 100644 index 908f08e..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/overflow-scroll-delete-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Passed'", - "rect": [8, 136, 43, 17], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Failed'", - "rect": [8, 136, 39, 17], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.png deleted file mode 100644 index ddf9523..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.txt deleted file mode 100644 index 57e82bed..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'xx'", - "rect": [8, 8, 48, 33], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'y'", - "rect": [8, 8, 48, 33], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.png deleted file mode 100644 index 966209a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.txt deleted file mode 100644 index 850b0d9..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-rtl-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'xx'", - "rect": [0, 8, 40, 33], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'y'", - "rect": [0, 8, 40, 33], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.png deleted file mode 100644 index ab06e15..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt deleted file mode 100644 index 2d8f395..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'xx'", - "rect": [8, 8, 33, 48], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'y'", - "rect": [8, 8, 33, 48], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.png deleted file mode 100644 index e946371..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt deleted file mode 100644 index b47e41da..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-rl-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'xx'", - "rect": [7, 8, 33, 48], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'y'", - "rect": [7, 8, 33, 48], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.png deleted file mode 100644 index 5e142e1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.txt deleted file mode 100644 index b98e7f3..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-with-br-includes-newline-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'b'", - "rect": [8, 24, 32, 17], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "rect": [24, 8, 16, 16], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'a'", - "rect": [8, 8, 16, 16], - "reason": "selection" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/japanese-rl-selection-clear-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/japanese-rl-selection-clear-expected.txt deleted file mode 100644 index 2cee848..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/japanese-rl-selection-clear-expected.txt +++ /dev/null
@@ -1,94 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox '\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3059\u3002\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u305B\u3063\u304B\u304F\u898B\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3064\u3051\u305F\u3059\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u306A\u3089\u30BF\u30A4\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304B\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3070\u3089\u3057\u3044\u8A18\u4E8B\u304C\u3069\u3053\u306B\u3042\u3063\u305F\u304B\u5FD8\u308C\u3066\u3057\u307E'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u3089\u3082\u691C\u7D22\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305B\u3063\u304B\u304F\u898B'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u308C\u3066\u3057\u307E\u3063\u305F\u7D4C\u9A13\u306F\u3042\u308A\u307E\u3059\u304B \u306A\u3089\u30BF\u30A4'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u30C8\u30EB\u3068\u30A2\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u30C9\u30EC\u30B9\u3060\u3051\u3067\u306A\u304F\u3001\u8A2A\u554F\u3057\u305F\u30A6\u30A7\u30D6\u30DA\u30FC\u30B8'", - "rect": [334, 123, 441, 404], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-change-in-iframe-with-relative-parent-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-change-in-iframe-with-relative-parent-expected.txt deleted file mode 100644 index 1021dc8..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-change-in-iframe-with-relative-parent-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Bazz'", - "rect": [18, 238, 40, 10], - "reason": "selection" - }, - { - "object": "InlineTextBox 'Bar'", - "rect": [18, 218, 30, 10], - "reason": "selection" - }, - { - "object": "InlineTextBox 'Foo'", - "rect": [18, 198, 30, 10], - "reason": "selection" - }, - { - "object": "InlineTextBox '\n'", - "rect": [58, 238, 10, 10], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [48, 218, 10, 10], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [48, 198, 10, 10], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [18, 228, 10, 10], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [18, 208, 10, 10], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-clear-after-move-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-clear-after-move-expected.txt deleted file mode 100644 index 7c59e0e..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-clear-after-move-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutImage IMG", - "rect": [100, 300, 50, 50], - "reason": "selection" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png deleted file mode 100644 index e68545a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.txt deleted file mode 100644 index 73e41f2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-partial-invalidation-between-blocks-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Second cell'", - "rect": [11, 35, 73, 19], - "reason": "selection" - }, - { - "object": "InlineTextBox 'First cell'", - "rect": [11, 11, 58, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.png deleted file mode 100644 index 7d9d8c7..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.txt deleted file mode 100644 index e1842b49..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-rl-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Testing both hit testing'", - "rect": [773, 38, 19, 83], - "reason": "selection" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.png deleted file mode 100644 index 54f342d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.txt deleted file mode 100644 index 8bb3ab9..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-within-composited-scroller-expected.txt +++ /dev/null
@@ -1,84 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV id='scroller'", - "position": [8, 8], - "bounds": [200, 200], - "backgroundColor": "#D3D3D3" - }, - { - "name": "Scrolling Layer", - "position": [8, 8], - "bounds": [185, 185], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [8, 8], - "bounds": [200, 1620], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "paintInvalidations": [ - { - "object": "InlineTextBox 'test'", - "rect": [0, 610, 21, 19], - "reason": "selection" - } - ], - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [200, 200], - "drawsContent": false - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [8, 193], - "bounds": [185, 15], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [193, 8], - "bounds": [15, 185], - "drawsContent": false - }, - { - "name": "Scroll Corner Layer", - "position": [193, 193], - "bounds": [15, 15] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -450, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png deleted file mode 100644 index 4723cde..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.txt deleted file mode 100644 index eceac54..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-2-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Should have blue, not gray, highlight'", - "rect": [18, 18, 233, 19], - "reason": "selection" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-expected.txt deleted file mode 100644 index f3061bc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/text-selection-rect-in-overflow-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Should have green background'", - "rect": [8, 8, 197, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/stacked-diacritics-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/stacked-diacritics-expected.txt deleted file mode 100644 index 8167057f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/stacked-diacritics-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox '\u1EA6\u1EA4\u1EAA\u1EA8\u1EB0'", - "rect": [19, 166, 130, 43], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/subtree-root-skipped-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/subtree-root-skipped-expected.txt deleted file mode 100644 index 5f434dd..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/subtree-root-skipped-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'PASS'", - "rect": [10, 11, 35, 16], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'FAIL'", - "rect": [10, 11, 27, 16], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='div'", - "rect": [8, 288, 10, 20], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/absolute-sized-content-with-resources-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/absolute-sized-content-with-resources-expected.txt deleted file mode 100644 index 6911b9f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/absolute-sized-content-with-resources-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 52, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGRect rect", - "rect": [42, 119, 334, 268], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRect rect", - "rect": [42, 119, 334, 268], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRect rect", - "rect": [17, 219, 84, 68], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRect rect", - "rect": [17, 219, 84, 68], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/add-background-property-on-root-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/add-background-property-on-root-expected.txt deleted file mode 100644 index a15d4d8..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/add-background-property-on-root-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 8, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [8, 8, 100, 100], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png deleted file mode 100644 index d90c6e3..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/animated-path-inside-transformed-html-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/hit-test-with-br-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/hit-test-with-br-expected.png deleted file mode 100644 index 913572e..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/hit-test-with-br-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/object-sizing-no-width-height-change-content-box-size-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/object-sizing-no-width-height-change-content-box-size-expected.txt deleted file mode 100644 index 05c6287..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/object-sizing-no-width-height-change-content-box-size-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 8, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutEmbeddedObject object", - "rect": [9, 9, 400, 400], - "reason": "geometry" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [9, 9, 400, 400], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [9, 109, 200, 200], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-expected.txt deleted file mode 100644 index 7b64d4d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGRect rect id='targetRect'", - "rect": [9, 73, 400, 400], - "reason": "geometry" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [109, 73, 300, 400], - "reason": "incremental" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-with-resources-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-with-resources-expected.txt deleted file mode 100644 index 48ce931..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-content-with-resources-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [47, 111, 324, 324], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [8, 154, 102, 238], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-deep-shadow-tree-content-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-deep-shadow-tree-content-expected.txt deleted file mode 100644 index 8f37782..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-deep-shadow-tree-content-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGContainer g id='targetUse'", - "rect": [209, 273, 200, 200], - "reason": "paint property change" - }, - { - "object": "LayoutSVGContainer g id='targetUse'", - "rect": [59, 273, 50, 200], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-image-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-image-expected.txt deleted file mode 100644 index 55d807ff..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-image-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGImage image", - "rect": [9, 73, 400, 400], - "reason": "image" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [109, 73, 300, 400], - "reason": "incremental" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-inner-svg-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-inner-svg-expected.txt deleted file mode 100644 index 8abf99f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-inner-svg-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 52, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGViewportContainer svg", - "rect": [27, 69, 364, 366], - "reason": "paint property change" - }, - { - "object": "LayoutSVGViewportContainer svg", - "rect": [13, 207, 92, 92], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-expected.txt deleted file mode 100644 index c91bd35..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGContainer use", - "rect": [209, 273, 200, 200], - "reason": "paint property change" - }, - { - "object": "LayoutSVGRect rect id='targetRect1'", - "rect": [9, 73, 200, 200], - "reason": "geometry" - }, - { - "object": "LayoutSVGRect rect id='targetRect1'", - "rect": [59, 73, 150, 200], - "reason": "incremental" - }, - { - "object": "LayoutSVGContainer use", - "rect": [59, 273, 50, 200], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-with-symbol-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-with-symbol-expected.txt deleted file mode 100644 index 992ee3c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-shadow-tree-content-with-symbol-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 72, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGViewportContainer svg id='targetSymbol'", - "rect": [9, 73, 400, 400], - "reason": "paint property change" - }, - { - "object": "LayoutSVGViewportContainer svg id='targetSymbol'", - "rect": [9, 223, 100, 100], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-on-symbol-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-on-symbol-expected.txt deleted file mode 100644 index 4289b03..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-on-symbol-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 52, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGViewportContainer svg id='gamesBorder'", - "rect": [45, 87, 328, 330], - "reason": "paint property change" - }, - { - "object": "LayoutSVGViewportContainer svg id='gamesBorder'", - "rect": [18, 211, 82, 83], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-without-attributes-on-symbol-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-without-attributes-on-symbol-expected.txt deleted file mode 100644 index 5a0067e8..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/relative-sized-use-without-attributes-on-symbol-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 52, 402, 402], - "reason": "geometry" - }, - { - "object": "LayoutSVGViewportContainer svg id='gamesBorder'", - "rect": [27, 69, 364, 366], - "reason": "paint property change" - }, - { - "object": "LayoutSVGViewportContainer svg id='gamesBorder'", - "rect": [13, 207, 92, 92], - "reason": "paint property change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/remove-background-property-on-root-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/remove-background-property-on-root-expected.txt deleted file mode 100644 index 0220c96..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/remove-background-property-on-root-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 8, 100, 100], - "reason": "appeared" - }, - { - "object": "LayoutSVGRoot svg", - "rect": [8, 8, 100, 100], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt deleted file mode 100644 index 6e5d0f3..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/scrolling-embedded-svg-file-image-repaint-problem-expected.txt +++ /dev/null
@@ -1,92 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1026, 996], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'pservers-pattern-01-b \u2190'", - "rect": [208, 972, 173, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'pservers-pattern-01-b \u2190'", - "rect": [208, 972, 173, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u2192 script-handle-01-b'", - "rect": [427, 972, 150, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u2192 script-handle-01-b'", - "rect": [427, 972, 150, 19], - "reason": "disappeared" - }, - { - "object": "LayoutInline A", - "rect": [383, 971, 42, 21], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'index'", - "rect": [384, 972, 40, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'index'", - "rect": [384, 972, 40, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [423, 972, 5, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [423, 972, 5, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [380, 972, 5, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [380, 972, 5, 19], - "reason": "disappeared" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -411, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-background-partial-redraw-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-background-partial-redraw-expected.txt deleted file mode 100644 index 501d914..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-background-partial-redraw-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='revealer'", - "rect": [9, 153, 200, 100], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-image-change-content-size-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-image-change-content-size-expected.txt deleted file mode 100644 index b507634..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/svg-image-change-content-size-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow div id='contentBox'", - "rect": [8, 52, 602, 422], - "reason": "geometry" - }, - { - "object": "LayoutImage img", - "rect": [9, 53, 420, 420], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/transform-focus-ring-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/transform-focus-ring-repaint-expected.txt deleted file mode 100644 index e937af2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/svg/transform-focus-ring-repaint-expected.txt +++ /dev/null
@@ -1,50 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='target'", - "position": [7, 57], - "bounds": [402, 542], - "backfaceVisibility": "hidden", - "backgroundColor": "#FFFF00", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='target'", - "rect": [0, 0, 402, 542], - "reason": "full layer" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='target'", - "rect": [0, 0, 200, 200], - "reason": "full layer" - } - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", - "position": [108, 158], - "bounds": [300, 440] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt deleted file mode 100644 index cdd3bb5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/cached-change-cell-sl-border-color-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutTableRow TR", - "rect": [8, 8, 114, 54], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='blockDiv'", - "rect": [90, 30, 20, 20], - "reason": "full" - }, - { - "object": "InlineTextBox 'A'", - "rect": [90, 30, 12, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/composited-table-row-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/composited-table-row-expected.txt deleted file mode 100644 index 7628914..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/composited-table-row-expected.txt +++ /dev/null
@@ -1,35 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutTableRow TR", - "position": [8, 8], - "bounds": [74, 24], - "backgroundColor": "#FF0000", - "paintInvalidations": [ - { - "object": "LayoutTableCell TD id='target'", - "rect": [0, 0, 37, 23], - "reason": "appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-percent-size-cell-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-percent-size-cell-expected.txt deleted file mode 100644 index 926118a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-percent-size-cell-expected.txt +++ /dev/null
@@ -1,59 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutTableRow TR", - "rect": [0, 52, 106, 238], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [0, 292, 106, 236], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [0, 102, 106, 46], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'ROW2'", - "rect": [3, 400, 46, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'ROW1'", - "rect": [3, 161, 46, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'ROW2'", - "rect": [3, 115, 46, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'ROW1'", - "rect": [3, 66, 46, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-vertical-align-cell-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-vertical-align-cell-expected.txt deleted file mode 100644 index 720f995..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-repaint-vertical-align-cell-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'MIDDLE'", - "rect": [3, 280, 63, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'MIDDLE'", - "rect": [3, 90, 63, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-row-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-row-repaint-expected.txt deleted file mode 100644 index 29b20b3..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/resize-table-row-repaint-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'MIDDLE'", - "rect": [3, 192, 63, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'MIDDLE'", - "rect": [3, 142, 63, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/single-line-cells-repeating-thead-break-inside-on-thead-only-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/single-line-cells-repeating-thead-break-inside-on-thead-only-expected.png deleted file mode 100644 index 389f921..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/single-line-cells-repeating-thead-break-inside-on-thead-only-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-collapsed-border-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-collapsed-border-expected.txt deleted file mode 100644 index aaef5160..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-collapsed-border-expected.txt +++ /dev/null
@@ -1,149 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutTableRow TR id='r2'", - "rect": [8, 224, 108, 22], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 338, 99, 30], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 286, 99, 30], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 154, 99, 30], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 102, 99, 30], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 316, 99, 22], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR id='r'", - "rect": [8, 132, 99, 22], - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 62, 95, 30], - "reason": "style change" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 10, 95, 30], - "reason": "style change" - }, - { - "object": "LayoutTableRow TR", - "rect": [8, 40, 95, 22], - "reason": "style change" - }, - { - "object": "InlineTextBox 'ipsum dolor'", - "rect": [23, 317, 76, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'ipsum dolor'", - "rect": [23, 133, 76, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'sit amet'", - "rect": [23, 339, 49, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'sit amet'", - "rect": [23, 339, 49, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'sit amet'", - "rect": [23, 155, 49, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'sit amet'", - "rect": [23, 155, 49, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Lorem'", - "rect": [23, 295, 43, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Lorem'", - "rect": [23, 295, 43, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Lorem'", - "rect": [23, 111, 43, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Lorem'", - "rect": [23, 111, 43, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'dolor'", - "rect": [23, 225, 34, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [17, 225, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [17, 225, 4, 19], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [17, 133, 4, 19], - "reason": "appeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [17, 133, 4, 19], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-shrink-row-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-shrink-row-repaint-expected.txt deleted file mode 100644 index 34fb11d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/table/table-shrink-row-repaint-expected.txt +++ /dev/null
@@ -1,239 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 850], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutTableCell TD id='resizeMe'", - "rect": [8, 112, 769, 210], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 782, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 742, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 722, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 682, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 662, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 622, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 602, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 562, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 542, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 502, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 482, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 442, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 422, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 382, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 362, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 322, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 302, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 242, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 182, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 122, 769, 60], - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "rect": [8, 802, 769, 48], - "reason": "geometry" - }, - { - "object": "InlineTextBox '10'", - "rect": [13, 822, 16, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '13'", - "rect": [13, 802, 16, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '12'", - "rect": [13, 742, 16, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '10'", - "rect": [13, 622, 16, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '11'", - "rect": [13, 682, 15, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '9'", - "rect": [13, 762, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '8'", - "rect": [13, 702, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '7'", - "rect": [13, 642, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '6'", - "rect": [13, 582, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '9'", - "rect": [13, 562, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '5'", - "rect": [13, 522, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '8'", - "rect": [13, 502, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '4'", - "rect": [13, 462, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '7'", - "rect": [13, 442, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '3'", - "rect": [13, 402, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '6'", - "rect": [13, 382, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '2'", - "rect": [13, 342, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '5'", - "rect": [13, 322, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '4'", - "rect": [13, 262, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '3'", - "rect": [13, 202, 8, 19], - "reason": "geometry" - }, - { - "object": "InlineTextBox '2'", - "rect": [13, 142, 8, 19], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/text-append-dirty-lines-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/text-append-dirty-lines-expected.txt deleted file mode 100644 index 6e783648..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/text-append-dirty-lines-expected.txt +++ /dev/null
@@ -1,69 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Curabitur a velit'", - "rect": [8, 44, 756, 139], - "reason": "disappeared" - }, - { - "object": "InlineTextBox 'Curabitur a velit.'", - "rect": [8, 44, 756, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse placerat. Morbi tristique. Mauris eu lacus sed felis'", - "rect": [8, 44, 756, 139], - "reason": "full" - }, - { - "object": "InlineTextBox 'fermentum ut, tortor. Sed rhoncus. Quisque enim metus, luctus tincidunt, vestibulum eu, vestibulum eu, libero. Mauris'", - "rect": [8, 44, 756, 139], - "reason": "full" - }, - { - "object": "InlineTextBox 'feugiat molestie, mi lorem bibendum leo, ac gravida orci nunc nec nulla. Nunc nunc lorem, rhoncus et, rutrum ac,'", - "rect": [8, 44, 756, 139], - "reason": "full" - }, - { - "object": "InlineTextBox 'laoreet feugiat. Phasellus mollis pulvinar mi. Etiam ut neque sed eros egestas laoreet. Vestibulum ullamcorper, nulla non'", - "rect": [8, 44, 756, 139], - "reason": "full" - }, - { - "object": "InlineTextBox 'pellentesque cursus. Proin vitae nulla. Vivamus in ipsum. Etiam mi. Nam malesuada purus in sem. Sed eget elit vel erat'", - "rect": [8, 44, 756, 139], - "reason": "full" - }, - { - "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'", - "rect": [8, 44, 756, 139], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'sagittis aliquam nunc. Nullam pharetra molestie eros. Donec tempus purus ut ligula. Phasellus non nisl. Etiam eu mauris.'", - "rect": [8, 44, 756, 139], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-inline-layered-child-expected.txt deleted file mode 100644 index e0b225c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='box'", - "rect": [135, 361, 159, 195], - "reason": "chunk appeared" - }, - { - "object": "LayoutBlockFlow HTML", - "rect": [300, 302, 80, 177], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-layout-repaint-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-layout-repaint-expected.txt deleted file mode 100644 index da820dbc..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/transform/transform-layout-repaint-expected.txt +++ /dev/null
@@ -1,39 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [40, 50, 208, 118], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'PASS'", - "rect": [52, 51, 43, 32], - "reason": "appeared" - }, - { - "object": "InlineTextBox 'FAIL'", - "rect": [52, 51, 40, 31], - "reason": "disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length1-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length1-expected.txt deleted file mode 100644 index 6abdff2..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length1-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [20, 0, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [120, 130, 20, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [120, 100, 20, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 130, 20, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 100, 20, 20], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length2-expected.txt deleted file mode 100644 index e3a65389..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align-length2-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [300, 0, 200, 200], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 0, 200, 200], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [200, 80, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [200, 50, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align1-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align1-expected.txt deleted file mode 100644 index cc6ab6f..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align1-expected.txt +++ /dev/null
@@ -1,49 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [20, 0, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [120, 33, 20, 21], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 33, 20, 21], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [120, 80, 20, 20], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 80, 20, 20], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align2-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align2-expected.txt deleted file mode 100644 index 4d81829..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-align2-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [300, 0, 200, 200], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='other'", - "rect": [0, 0, 200, 200], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [200, 146, 100, 101], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='target'", - "rect": [200, 100, 100, 100], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-rl-as-paint-container-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-rl-as-paint-container-expected.txt deleted file mode 100644 index 95dd103..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/vertical-rl-as-paint-container-expected.txt +++ /dev/null
@@ -1,50 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV id='target'", - "position": [8, 8], - "bounds": [600, 400], - "backfaceVisibility": "hidden", - "paintInvalidations": [ - { - "object": "InlineTextBox 'Lorem ipsum dolor'", - "rect": [520, 0, 80, 340], - "reason": "style change" - }, - { - "object": "InlineTextBox 'adipiscing elit.'", - "rect": [520, 0, 80, 340], - "reason": "style change" - }, - { - "object": "InlineTextBox 'consectetur'", - "rect": [520, 0, 80, 340], - "reason": "style change" - }, - { - "object": "InlineTextBox 'sit amet,'", - "rect": [520, 0, 80, 340], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-centered-inline-under-fixed-pos-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-centered-inline-under-fixed-pos-expected.txt deleted file mode 100644 index e0b8a22..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-centered-inline-under-fixed-pos-expected.txt +++ /dev/null
@@ -1,168 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [600, 250], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [600, 250], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [600, 250], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='container'", - "rect": [0, 0, 600, 250], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='parent'", - "rect": [0, 0, 6, 250], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='child'", - "rect": [0, 125, 6, 30], - "reason": "geometry" - } - ] - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [400, 250], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [400, 250], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [400, 250], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='container'", - "rect": [0, 0, 400, 250], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='parent'", - "rect": [0, 0, 6, 250], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='child'", - "rect": [0, 125, 6, 30], - "reason": "geometry" - } - ] - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [400, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [400, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [400, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='container'", - "rect": [0, 0, 400, 600], - "reason": "geometry" - }, - { - "object": "Scrolling background of LayoutView #document", - "rect": [0, 250, 400, 350], - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow DIV class='parent'", - "rect": [0, 0, 6, 600], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='child'", - "rect": [0, 300, 6, 30], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='child'", - "rect": [0, 125, 6, 30], - "reason": "geometry" - } - ] - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='container'", - "rect": [0, 0, 800, 600], - "reason": "geometry" - }, - { - "object": "Scrolling background of LayoutView #document", - "rect": [400, 0, 400, 600], - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow DIV class='parent'", - "rect": [0, 0, 6, 600], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='child'", - "rect": [0, 300, 6, 30], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt deleted file mode 100644 index ae0bee51..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ /dev/null
@@ -1,189 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [600, 250], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [600, 235], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [939, 235], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "rect": [0, 0, 939, 235], - "reason": "full layer" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-339, 0, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [400, 250], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [400, 235], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [939, 235], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "rect": [0, 0, 939, 235], - "reason": "full layer" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-539, 0, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [400, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [400, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [400, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "rect": [0, 0, 400, 600], - "reason": "full layer" - } - ] - } - ] -} -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "Scrolling background of LayoutView #document", - "rect": [400, 0, 400, 600], - "reason": "incremental" - }, - { - "object": "InlineTextBox 'AAAA BBBB CCCC'", - "rect": [439, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'DDDD EEEE FFFF'", - "rect": [439, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", - "rect": [439, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'KKKK LLLL MMMM'", - "rect": [439, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'NNNN'", - "rect": [439, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'AAAA BBBB CCCC'", - "rect": [39, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'DDDD EEEE FFFF'", - "rect": [39, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'GGGG HHHH IIII JJJJ'", - "rect": [39, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'KKKK LLLL MMMM'", - "rect": [39, 8, 352, 562], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'NNNN'", - "rect": [39, 8, 352, 562], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png deleted file mode 100644 index e4463b1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-ltr-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png deleted file mode 100644 index 1eb942d..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-ltr-text-in-rtl-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png deleted file mode 100644 index 940baec6..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-ltr-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png deleted file mode 100644 index abceddd5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-mixed-text-in-rtl-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png deleted file mode 100644 index bf7e327..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-ltr-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png deleted file mode 100644 index 5dd4841b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/ellipsis-rtl-text-in-rtl-flow-with-markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-composited-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-composited-expected.png deleted file mode 100644 index 96611816..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-composited-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-expected.png deleted file mode 100644 index 96611816..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline-spelling-markers-hidpi-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline_spelling_markers-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline_spelling_markers-expected.png deleted file mode 100644 index ba6a3ea..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/inline_spelling_markers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/markers-zoomed-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/markers-zoomed-expected.png deleted file mode 100644 index 08d4686..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/markers-zoomed-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-lr-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-lr-expected.png deleted file mode 100644 index 0d25d8dd..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-lr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-rl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-rl-expected.png deleted file mode 100644 index f82ef3b..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/markers/vertical-rl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/image-writing-modes-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/image-writing-modes-expected.png deleted file mode 100644 index d95cabf..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/image-writing-modes-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-expected.png deleted file mode 100644 index a625e5c..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-rtl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-rtl-expected.png deleted file mode 100644 index 1badda5..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-inline-block-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-expected.png deleted file mode 100644 index 5e142e1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-line-beginning-end-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-line-beginning-end-expected.png deleted file mode 100644 index f0d68bd..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-across-blocks-line-beginning-end-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-br-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-br-expected.png deleted file mode 100644 index 5e142e1..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-br-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-clipped-by-overflow-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-clipped-by-overflow-expected.png deleted file mode 100644 index 2317cde..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-clipped-by-overflow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-expected.png deleted file mode 100644 index ddf9523..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png deleted file mode 100644 index 52860ee..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png deleted file mode 100644 index 468043a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-double-linebreak-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-expected.png deleted file mode 100644 index 966209a..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-expected.png deleted file mode 100644 index 1732d68..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-span-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-lr-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-lr-expected.png deleted file mode 100644 index ab06e15..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-lr-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-rl-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-rl-expected.png deleted file mode 100644 index e946371..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/selection/text-selection-newline-vertical-rl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/text/selection-no-clip-text-expected.png b/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/text/selection-no-clip-text-expected.png deleted file mode 100644 index d90c4648..0000000 --- a/third_party/blink/web_tests/flag-specific/disable-blink-features=LayoutNG/virtual/disable-blink-gen-property-trees/paint/text/selection-no-clip-text-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/flag-specific/enable-blink-features=CompositeAfterPaint/fast/forms/textarea/basic-textareas-quirks-expected.png b/third_party/blink/web_tests/flag-specific/enable-blink-features=CompositeAfterPaint/fast/forms/textarea/basic-textareas-quirks-expected.png index 5d659e7..4179bbfa 100644 --- a/third_party/blink/web_tests/flag-specific/enable-blink-features=CompositeAfterPaint/fast/forms/textarea/basic-textareas-quirks-expected.png +++ b/third_party/blink/web_tests/flag-specific/enable-blink-features=CompositeAfterPaint/fast/forms/textarea/basic-textareas-quirks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test-expected.txt b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test-expected.txt index af66fb6..41fdf3b 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test-expected.txt
@@ -1,23 +1,4 @@ Tests accessibility in the console using the axe-core linter. -aXe violations: [ - { - "ruleDescription": "Ensures every ARIA input field has an accessible name", - "helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-input-field-name?application=axeAPI", - "ruleId": "aria-input-field-name", - "impact": "serious", - "failedNodes": [ - { - "target": [ - [ - ".console-main-toolbar", - ".toolbar-input-prompt" - ] - ], - "html": "<div class=\"toolbar-input-prompt text-prompt\" role=\"textbox\" contenteditable=\"plaintext-only\" data-placeholder=\"Filter\" aria-placeholder=\"Filter\"></div>", - "failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute or the title attribute is empty" - } - ] - } -] +aXe violations: []
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test.js b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test.js index ab76399..38ebeeb 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test.js +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/console-a11y-test.js
@@ -10,7 +10,6 @@ await UI.viewManager.showView('console'); const widget = await UI.viewManager.view('console').widget(); - //TODO(crbug.com/1004940): expected.txt file has 'aria-input-field-name' exceptions await AxeCoreTestRunner.runValidation(widget.element); TestRunner.completeTest(); })();
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt index 8e34d0c6..f7b1929 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test-expected.txt
@@ -1,20 +1,4 @@ Tests accessibility in heap profiler using the axe-core linter. -aXe violations: [ - { - "ruleDescription": "Ensures role attribute has an appropriate value for the element", - "helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-allowed-role?application=axeAPI", - "ruleId": "aria-allowed-role", - "impact": "minor", - "failedNodes": [ - { - "target": [ - "form" - ], - "html": "<form role=\"radiogroup\" aria-label=\"Select profiling type\">", - "failureSummary": "Fix any of the following:\n ARIA role radiogroup is not allowed for given element" - } - ] - } -] +aXe violations: []
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js index 1a5116d..33175c6 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/memory/heap-profiler-a11y-test.js
@@ -37,7 +37,6 @@ await UI.viewManager.showView('heap_profiler'); const widget = await UI.viewManager.view('heap_profiler').widget(); - //TODO(crbug.com/1004940): expected.txt file has 'aria-allowed-role' exceptions await AxeCoreTestRunner.runValidation(widget.element); TestRunner.completeTest(); })();
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test-expected.txt b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test-expected.txt index 609c327..8864297 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test-expected.txt +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test-expected.txt
@@ -6,49 +6,11 @@ Running: testBottomUpView Tests accessibility in performance BottomUp view using the axe-core linter -aXe violations: [ - { - "ruleDescription": "Ensures every ARIA input field has an accessible name", - "helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-input-field-name?application=axeAPI", - "ruleId": "aria-input-field-name", - "impact": "serious", - "failedNodes": [ - { - "target": [ - [ - ".widget.vbox[slot=\"insertion-point-main\"] > .toolbar", - ".toolbar-input-prompt" - ] - ], - "html": "<div class=\"toolbar-input-prompt text-prompt\" role=\"textbox\" contenteditable=\"plaintext-only\" data-placeholder=\"Filter\" aria-placeholder=\"Filter bottom-up\"></div>", - "failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute or the title attribute is empty" - } - ] - } -] +aXe violations: [] Running: testCallTreeView Tests accessibility in performance CallTree view using the axe-core linter -aXe violations: [ - { - "ruleDescription": "Ensures every ARIA input field has an accessible name", - "helpUrl": "https://dequeuniversity.com/rules/axe/3.3/aria-input-field-name?application=axeAPI", - "ruleId": "aria-input-field-name", - "impact": "serious", - "failedNodes": [ - { - "target": [ - [ - ".widget.vbox[slot=\"insertion-point-main\"] > .toolbar", - "div[aria-placeholder=\"Filter\\ call\\ tree\"]" - ] - ], - "html": "<div class=\"toolbar-input-prompt text-prompt\" role=\"textbox\" contenteditable=\"plaintext-only\" data-placeholder=\"Filter\" aria-placeholder=\"Filter call tree\"></div>", - "failureSummary": "Fix any of the following:\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute or the title attribute is empty" - } - ] - } -] +aXe violations: []
diff --git a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js index 659b8bec..c266c9c 100644 --- a/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js +++ b/third_party/blink/web_tests/http/tests/devtools/a11y-axe-core/performance/performance-pane-a11y-test.js
@@ -66,7 +66,6 @@ model.timelineModel().minimumRecordTime(), model.timelineModel().maximumRecordTime())); - //TODO(crbug.com/1004940): expected.txt file has 'aria-input-field-name' exceptions await AxeCoreTestRunner.runValidation(detailsTab.element); }
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket-expected.txt deleted file mode 100644 index de3af54d..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket-expected.txt +++ /dev/null
@@ -1,8 +0,0 @@ -Tests that cross-domain WebSocket cookies are not reported. - -new WebSocket('ws://127.0.0.1:8000/inspector-protocol/network/resources/cookie.pl') -Set-Cookie: name=value - -new WebSocket('ws://devtools.oopif.test:8000/inspector-protocol/network/resources/cookie.pl') -Set-Cookie: undefined -
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket.js b/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket.js deleted file mode 100644 index 3924d477..0000000 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/network/raw-headers-for-websocket.js +++ /dev/null
@@ -1,25 +0,0 @@ -(async function(testRunner) { - var {page, session, dp} = await testRunner.startURL( - 'resources/cookie.pl', - `Tests that cross-domain WebSocket cookies are not reported.`); - - await dp.Network.enable(); - - await testURL('ws://127.0.0.1:8000/inspector-protocol/network/resources/cookie.pl'); - await testURL('ws://devtools.oopif.test:8000/inspector-protocol/network/resources/cookie.pl'); - testRunner.completeTest(); - - async function testURL(url) { - session.evaluate(` - // The WebSocket handshake will fail but it doesn't matter. - window.ws = new WebSocket('${url}');`); - const response = await dp.Network.onceWebSocketHandshakeResponseReceived(); - dump(url, response); - } - - function dump(url, response) { - response = response.params.response; - testRunner.log(`\nnew WebSocket('${url}')`); - testRunner.log(`Set-Cookie: ${response.headers['Set-Cookie']}`); - } -})
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response-expected.txt new file mode 100644 index 0000000..8d06595 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response-expected.txt
@@ -0,0 +1,7 @@ +Tests DidReceiveWebSocketHandshakeResponse probe. + +new WebSocket('ws://localhost:8880/binary-frames') +Set-Cookie: undefined +Connection: Upgrade +Upgrade: websocket +
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response.js b/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response.js new file mode 100644 index 0000000..fb00e58 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/websocket/handshake-response.js
@@ -0,0 +1,24 @@ +(async function(testRunner) { + var {page, session, dp} = await testRunner.startURL( + 'resources/cookie.pl', + `Tests DidReceiveWebSocketHandshakeResponse probe.`); + + await dp.Network.enable(); + + await testURL('ws://localhost:8880/binary-frames'); + testRunner.completeTest(); + + async function testURL(url) { + session.evaluate(`window.ws = new WebSocket('${url}');`); + const value = await dp.Network.onceWebSocketHandshakeResponseReceived(); + const headers = value.params.response.headers; + testRunner.log(`\nnew WebSocket('${url}')`); + dumpHeader(headers, 'Set-Cookie'); + dumpHeader(headers, 'Connection'); + dumpHeader(headers, 'Upgrade'); + } + + function dumpHeader(headers, property) { + testRunner.log(`${property}: ${headers[property]}`); + } +})
diff --git a/third_party/blink/web_tests/platform/linux/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/linux/editing/pasteboard/pasting-tabs-expected.png index 71cc69e..4634311 100644 --- a/third_party/blink/web_tests/platform/linux/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/linux/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/fast/forms/textarea/basic-textareas-quirks-expected.png b/third_party/blink/web_tests/platform/linux/fast/forms/textarea/basic-textareas-quirks-expected.png index 329d213a..23c32af 100644 --- a/third_party/blink/web_tests/platform/linux/fast/forms/textarea/basic-textareas-quirks-expected.png +++ b/third_party/blink/web_tests/platform/linux/fast/forms/textarea/basic-textareas-quirks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/editing/pasteboard/pasting-tabs-expected.png index a7f6064..ab2ccc4 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.10/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.10/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/basic-textareas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/basic-textareas-expected.png index 5405c9a..38cc79f 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/basic-textareas-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/basic-textareas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png index 5bc346b..69862c1 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png index c6a99e7..761befd 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.10/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/editing/pasteboard/pasting-tabs-expected.png index b0eb6bb4..1bff5ca7 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.11/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.11/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/basic-textareas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/basic-textareas-expected.png index 3333e36..e3a20bc 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/basic-textareas-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/basic-textareas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png index 24caf7d..55500849 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png index 6fd39bf..48e913e0 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.11/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/editing/pasteboard/pasting-tabs-expected.png index e4968fc..ece5008 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/fast/forms/textarea/basic-textareas-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/fast/forms/textarea/basic-textareas-expected.png index 2b86e3b..53a1275 100644 --- a/third_party/blink/web_tests/platform/mac-mac10.12/fast/forms/textarea/basic-textareas-expected.png +++ b/third_party/blink/web_tests/platform/mac-mac10.12/fast/forms/textarea/basic-textareas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/external/wpt/preload/preload-with-type-expected.txt b/third_party/blink/web_tests/platform/mac-retina/external/wpt/preload/preload-with-type-expected.txt deleted file mode 100644 index f606526..0000000 --- a/third_party/blink/web_tests/platform/mac-retina/external/wpt/preload/preload-with-type-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Makes sure that preloaded resources with a type attribute trigger the onload event assert_true: video triggered load event expected true got false -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-001-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-001-expected.png index 951be86..d51f4e0 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-001-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-001-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-002-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-002-expected.png index 951be86..d51f4e0 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-002-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-002-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-003-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-003-expected.png index 1cf2cc1..06e3d2f 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-003-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-003-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-004-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-004-expected.png index 5c5dc931..c48c0d1 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-004-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-004-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-005-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-005-expected.png index c759ddc..48afbf4 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-005-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-005-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-007-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-007-expected.png index c0130963..84b3968 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-007-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-007-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-012-expected.png b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-012-expected.png index 951be86..d51f4e0 100644 --- a/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-012-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/caret/caret-color-012-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/inserting/4960120-1-expected.png b/third_party/blink/web_tests/platform/mac/editing/inserting/4960120-1-expected.png index f48d313..afcce5cc 100644 --- a/third_party/blink/web_tests/platform/mac/editing/inserting/4960120-1-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/inserting/4960120-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/mac/editing/pasteboard/pasting-tabs-expected.png index 39b3474..65cd6c9 100644 --- a/third_party/blink/web_tests/platform/mac/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/mac/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/svg/animations/slider-switch-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/svg/animations/slider-switch-expected.txt deleted file mode 100644 index 9317f59c..0000000 --- a/third_party/blink/web_tests/platform/mac/external/wpt/svg/animations/slider-switch-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Check correct event bases for onclick assert_equals: expected "block" but got "none" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/basic-textareas-expected.png b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/basic-textareas-expected.png index 0d10c23..9f131a6 100644 --- a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/basic-textareas-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/basic-textareas-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png index a3ac00c..af20c6e12 100644 --- a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-1-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png index 56dd5dd..6b884d3 100644 --- a/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/forms/textarea/textarea-placeholder-visibility-2-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/editing/pasteboard/pasting-tabs-expected.png b/third_party/blink/web_tests/platform/win/editing/pasteboard/pasting-tabs-expected.png index d4066ee..ff7c359 100644 --- a/third_party/blink/web_tests/platform/win/editing/pasteboard/pasting-tabs-expected.png +++ b/third_party/blink/web_tests/platform/win/editing/pasteboard/pasting-tabs-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/forms/textarea/basic-textareas-quirks-expected.png b/third_party/blink/web_tests/platform/win/fast/forms/textarea/basic-textareas-quirks-expected.png index dd89c47..25793b0 100644 --- a/third_party/blink/web_tests/platform/win/fast/forms/textarea/basic-textareas-quirks-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/forms/textarea/basic-textareas-quirks-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/wpt_internal/css/css-transforms/parsing/transform-valid.html b/third_party/blink/web_tests/wpt_internal/css/css-transforms/parsing/transform-valid.html new file mode 100644 index 0000000..9f9a79d --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/css/css-transforms/parsing/transform-valid.html
@@ -0,0 +1,20 @@ +<!DOCTYPE html> +<meta charset="utf-8"> + +<title>CSS Transform Module Level 2: parsing transform with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-transforms-2/#transform-property"> +<meta name="assert" content="transform supports the full grammar 'none | <transform-list>'."> + +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<script> +// Regression test for crbug.com/995038 +// Maximum values in CSS are UA-specified, and so cannot be upstreamed to WPT. +// See https://drafts.csswg.org/css-values-4/#numeric-ranges +test_valid_value("transform", "translateX(2e80px)", "translateX(3.40282e+38px)"); +test_valid_value("transform", "rotate(2e80deg)", "rotate(3.40282e+38deg)"); +test_valid_value("transform", "scaleX(2e80)", "scaleX(3.40282e+38)"); +test_valid_value("transform", "skewX(2e80deg)", "skewX(3.40282e+38deg)"); +</script>
diff --git a/third_party/r8/README.chromium b/third_party/r8/README.chromium index f198a41..0c507a9 100644 --- a/third_party/r8/README.chromium +++ b/third_party/r8/README.chromium
@@ -1,7 +1,7 @@ Name: R8 URL: https://r8.googlesource.com/r8 -Revision: d11d42306845f15f383c1867f0f26c6f36e3adc4 -Version: 1.6.28-dev +Revision: e6ec004a7864f4a9e0f1e8e4b4690851e764ef29 +Version: 1.7.11-dev License: BSD 3-Clause License File: NOT_SHIPPED Security Critical: no
diff --git a/third_party/r8/local_modifications.diff b/third_party/r8/local_modifications.diff index 4aff2cb..33e8a18 100644 --- a/third_party/r8/local_modifications.diff +++ b/third_party/r8/local_modifications.diff
@@ -1,11 +1,11 @@ diff --git a/src/main/java/com/android/tools/r8/utils/InternalOptions.java b/src/main/java/com/android/tools/r8/utils/InternalOptions.java -index c9407a85f..800d6e760 100644 +index 89aeb2da4..8ff4f835e 100644 --- a/src/main/java/com/android/tools/r8/utils/InternalOptions.java +++ b/src/main/java/com/android/tools/r8/utils/InternalOptions.java -@@ -186,8 +186,8 @@ public class InternalOptions { - // Optimization-related flags. These should conform to -dontoptimize and disableAllOptimizations. +@@ -189,8 +189,8 @@ public class InternalOptions { public boolean enableDynamicTypeOptimization = true; - public boolean enableFieldBitAccessAnalysis = false; + public boolean enableFieldBitAccessAnalysis = + System.getProperty("com.android.tools.r8.fieldBitAccessAnalysis") != null; - public boolean enableHorizontalClassMerging = true; - public boolean enableVerticalClassMerging = true; + public boolean enableHorizontalClassMerging = false; @@ -13,7 +13,7 @@ public boolean enableArgumentRemoval = true; public boolean enableUnusedArgumentRemoval = true; public boolean enableUnusedInterfaceRemoval = true; -@@ -902,7 +902,7 @@ public class InternalOptions { +@@ -910,7 +910,7 @@ public class InternalOptions { public static final String CLASS_NAME = "com.android.tools.r8.GeneratedOutlineSupport"; public static final String METHOD_PREFIX = "outline";
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 9a236d8e..0cef34bf 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -8060,6 +8060,12 @@ </enum> +<enum name="ChromeOSUsbEventTiming"> + <int value="0" label="kLoggedOut"/> + <int value="1" label="kLoggedIn"/> + <int value="2" label="kLocked"/> +</enum> + <enum name="ChromeOSUserImageId"> <summary> Indices of the default images as defined in
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 84399ac..10fc2315 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -20894,6 +20894,14 @@ </summary> </histogram> +<histogram base="true" name="ChromeOS.USB.DeviceAttached" + enum="ChromeOSUsbEventTiming" expires_after="2020-10-01"> + <owner>allenwebb@chromium.org</owner> + <owner>jorgelo@chromium.org</owner> + <owner>mnissler@chromium.org</owner> + <summary>Timing and number of USB devices attached.</summary> +</histogram> + <histogram name="ChromiumAndroidLinker.BrowserLoadTime" units="ms" expires_after="M99"> <owner>rsesek@chromium.org</owner> @@ -76506,6 +76514,27 @@ </summary> </histogram> +<histogram name="Net.DNS.SecureDnsTaskFailure.FallbackDnsTask.Error" + enum="NetErrorCodes" expires_after="M81"> + <owner>dalyk@google.com</owner> + <owner>doh-core@google.com</owner> + <summary> + Counts of specific error codes returned by insecure DnsTasks after a secure + DnsTask failed. + </summary> +</histogram> + +<histogram name="Net.DNS.SecureDnsTaskFailure.FallbackProcTask.Error" + enum="NetErrorCodes" expires_after="M81"> + <owner>dalyk@google.com</owner> + <owner>doh-core@google.com</owner> + <summary> + Counts of specific error codes returned by a ProcTask after a secure DnsTask + failed. Only records instances where there was no intermediary insecure + DnsTask. + </summary> +</histogram> + <histogram name="Net.DNS.TotalTime" units="ms"> <owner>pauljensen@chromium.org</owner> <owner>mef@chromium.org</owner> @@ -166021,6 +166050,39 @@ <affected-histogram name="ChromeOS.MachineIdRegen.AgeSeconds"/> </histogram_suffixes> +<histogram_suffixes name="ChromeOS.USBDeviceClass" separator="."> + <suffix name="App" + label="A device with only the application specific interface class."/> + <suffix name="Audio" label="An audio device."/> + <suffix name="AV" label="An audio/video device."/> + <suffix name="Card" label="A smart card reader."/> + <suffix name="Comm" label="A communication device."/> + <suffix name="Health" label="A personal healthcare device."/> + <suffix name="HID" label="A human-interface device."/> + <suffix name="Hub" label="A USB hub."/> + <suffix name="Image" label="A still image capture device."/> + <suffix name="Misc" label="A device with only the misc. interface class."/> + <suffix name="Other" label="All devices not covered by the other groups."/> + <suffix name="Phys" label="A physical device."/> + <suffix name="Print" label="A printer."/> + <suffix name="Sec" label="A security device (e.g. fingerprint reader)."/> + <suffix name="Storage" label="A storage device."/> + <suffix name="Vendor" + label="A device with only the vendor specific interface class."/> + <suffix name="Video" label="A video device."/> + <suffix name="Wireless" label="A wireless controller device."/> + <affected-histogram name="ChromeOS.USB.DeviceAttached.Recognized"/> + <affected-histogram name="ChromeOS.USB.DeviceAttached.Unrecognized"/> +</histogram_suffixes> + +<histogram_suffixes name="ChromeOS.USBDeviceRecognized" separator="."> + <suffix base="true" name="Recognized" + label="A device that was already added to the list of trusted devices."/> + <suffix base="true" name="Unrecognized" + label="A device that was not in the list of trusted devices yet."/> + <affected-histogram name="ChromeOS.USB.DeviceAttached"/> +</histogram_suffixes> + <histogram_suffixes name="Clients.StaleWhileRevalidateExperiment" separator="." ordering="prefix"> <suffix name="Clients.StaleWhileRevalidateExperiment"
diff --git a/tools/perf/core/stacktrace_unittest.py b/tools/perf/core/stacktrace_unittest.py index f739303..2e07ae6 100644 --- a/tools/perf/core/stacktrace_unittest.py +++ b/tools/perf/core/stacktrace_unittest.py
@@ -23,8 +23,8 @@ self.assertTrue(c.exception.is_valid_dump) # Stack traces aren't working on Android yet. - # Disabled on mac, flaky: https://crbug.com/820282. - @decorators.Enabled('linux') + # Disabled on Linux and Mac, flaky: https://crbug.com/820282. + @decorators.Disabled('all') def testCrashSymbols(self): with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c: self._tab.Navigate('chrome://crash', timeout=5) @@ -33,9 +33,8 @@ # Some platforms do not support full stack traces, this test requires only # minimal symbols to be available. # Disabled on win due to crbug.com/706328. - # Disabled on mac, flaky: https://crbug.com/820282. - @decorators.Enabled('linux') - @decorators.Disabled('mac', 'win') + # Disabled on Linux and Mac, flaky: https://crbug.com/820282. + @decorators.Disabled('all') def testCrashMinimalSymbols(self): with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c: self._tab.Navigate('chrome://crash', timeout=5)
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc index 0fe9705..a7ebe71 100644 --- a/ui/views/bubble/bubble_frame_view.cc +++ b/ui/views/bubble/bubble_frame_view.cc
@@ -487,13 +487,12 @@ } void BubbleFrameView::SetFootnoteView(std::unique_ptr<View> view) { - if (!view) { - delete footnote_container_; - footnote_container_ = nullptr; + // Remove the old footnote container. + delete footnote_container_; + footnote_container_ = nullptr; + if (!view) return; - } - DCHECK(!footnote_container_); int radius = bubble_border_ ? bubble_border_->corner_radius() : 0; footnote_container_ = AddChildView(std::make_unique<FootnoteContainerView>( footnote_margins_, std::move(view), radius));
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js index ae9a1ed..a025337 100644 --- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js +++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
@@ -138,6 +138,7 @@ clearSearch_: function(e) { this.setValue(''); this.focus_(); + this.spinnerActive = false; }, /**
diff --git a/weblayer/common/content_client_impl.cc b/weblayer/common/content_client_impl.cc index b88cd22..b3419f14 100644 --- a/weblayer/common/content_client_impl.cc +++ b/weblayer/common/content_client_impl.cc
@@ -16,6 +16,16 @@ ContentClientImpl::~ContentClientImpl() {} +base::string16 ContentClientImpl::GetLocalizedString(int message_id) { + return l10n_util::GetStringUTF16(message_id); +} + +base::string16 ContentClientImpl::GetLocalizedString( + int message_id, + const base::string16& replacement) { + return l10n_util::GetStringFUTF16(message_id, replacement); +} + base::StringPiece ContentClientImpl::GetDataResource( int resource_id, ui::ScaleFactor scale_factor) {
diff --git a/weblayer/common/content_client_impl.h b/weblayer/common/content_client_impl.h index 07c7fa5..5bd96e1 100644 --- a/weblayer/common/content_client_impl.h +++ b/weblayer/common/content_client_impl.h
@@ -14,6 +14,9 @@ ContentClientImpl(); ~ContentClientImpl() override; + base::string16 GetLocalizedString(int message_id) override; + base::string16 GetLocalizedString(int message_id, + const base::string16& replacement) override; base::StringPiece GetDataResource(int resource_id, ui::ScaleFactor scale_factor) override; base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;