diff --git a/AUTHORS b/AUTHORS
index d9d479c2..10379ac5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -746,6 +746,7 @@
 Sanghyun Park <sh919.park@samsung.com>
 Sanghyup Lee <sh53.lee@samsung.com>
 Sangjoon Je <htamop@gmail.com>
+Sangwoo Ko <sangwoo.ko@navercorp.com>
 Sangwoo Ko <sangwoo108@gmail.com>
 Sanjoy Pal <ncj674@motorola.com>
 Sanjoy Pal <sanjoy.pal@samsung.com>
diff --git a/DEPS b/DEPS
index bb63e78..81f205d 100644
--- a/DEPS
+++ b/DEPS
@@ -105,11 +105,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': 'd945698c5dfa8e78c05da0a3e1730da9d95d33db',
+  'skia_revision': '92d10833de63e85e933629bb27c5ab274479cd95',
   # 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': 'fdd620c6fe49b2bdadc9ef513c1f52187f72647a',
+  'v8_revision': 'be4324e992f9750839062a195c08b365f73ab176',
   # 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.
@@ -165,7 +165,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling catapult
   # and whatever else without interference from each other.
-  'catapult_revision': '3f7d74f7cd026ad3611e089c377b03304277d566',
+  'catapult_revision': '56216d7832a46730d5d9d6bba7fa5742d9601390',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -595,7 +595,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '40a16ffeefe6193827248e96d3402b2cf0c4e5ce',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '15082f69653d10a9173e18fe883effd6187bfb1a',
       'condition': 'checkout_linux',
   },
 
@@ -620,7 +620,7 @@
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '5b1fa949bba4c75c88aead94948d89c6cb161e0c',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'f98905e8f03cd79d132cdd72bf4af1bb5fa3ca0b',
 
   'src/third_party/devtools-node-modules':
     Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'),
@@ -1106,7 +1106,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '6d2f3f4cb8bac1f7c4a945c73d07a33df74f22f9',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '264079a57aec9d865840b26c672bab538c9d11dc',
+    Var('webrtc_git') + '/src.git' + '@' + '0a74e09b39c192dddaa9bd1f1015a897c2c5eea8',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1137,7 +1137,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@7b52a768375781cc7a742ae24d2d2379fc040f69',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@30f82e022cc45f924314bbfa23e3ed3e67e1dd8b',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index da1245d..79a86bd 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -1850,6 +1850,7 @@
     "system/message_center/arc/arc_notification_view_unittest.cc",
     "system/message_center/ash_popup_alignment_delegate_unittest.cc",
     "system/message_center/inactive_user_notification_blocker_unittest.cc",
+    "system/message_center/new_unified_message_center_view_unittest.cc",
     "system/message_center/notification_tray_unittest.cc",
     "system/message_center/session_state_notification_blocker_unittest.cc",
     "system/message_center/unified_message_list_view_unittest.cc",
diff --git a/ash/ime/ime_controller.cc b/ash/ime/ime_controller.cc
index 9d4427fd..e52ab9b 100644
--- a/ash/ime/ime_controller.cc
+++ b/ash/ime/ime_controller.cc
@@ -129,6 +129,7 @@
 }
 
 void ImeController::ShowImeMenuOnShelf(bool show) {
+  is_menu_active_ = show;
   Shell::Get()->system_tray_notifier()->NotifyRefreshIMEMenu(show);
 }
 
diff --git a/ash/ime/ime_controller.h b/ash/ime/ime_controller.h
index c03068e..e71b660 100644
--- a/ash/ime/ime_controller.h
+++ b/ash/ime/ime_controller.h
@@ -57,6 +57,7 @@
   bool is_voice_enabled() const { return is_voice_enabled_; }
 
   bool managed_by_policy() const { return managed_by_policy_; }
+  bool is_menu_active() const { return is_menu_active_; }
 
   const std::vector<mojom::ImeMenuItem>& current_ime_menu_items() const {
     return current_ime_menu_items_;
@@ -167,6 +168,10 @@
   // True if voice input should be available from the IME menu.
   bool is_voice_enabled_ = false;
 
+  // True if the IME menu is active. IME related items in system tray should be
+  // removed if |is_menu_active_| is true.
+  bool is_menu_active_ = false;
+
   base::ObserverList<Observer>::Unchecked observers_;
 
   std::unique_ptr<ModeIndicatorObserver> mode_indicator_observer_;
diff --git a/ash/system/ime/ime_feature_pod_controller.cc b/ash/system/ime/ime_feature_pod_controller.cc
index 4b601ab..24441a1 100644
--- a/ash/system/ime/ime_feature_pod_controller.cc
+++ b/ash/system/ime/ime_feature_pod_controller.cc
@@ -22,7 +22,8 @@
   DCHECK(Shell::Get());
   ImeController* ime_controller = Shell::Get()->ime_controller();
   size_t ime_count = ime_controller->available_imes().size();
-  return ime_count > 1;
+  return !ime_controller->is_menu_active() &&
+         (ime_count > 1 || ime_controller->managed_by_policy());
 }
 
 base::string16 GetLabelString() {
@@ -85,7 +86,7 @@
   Update();
 }
 
-void IMEFeaturePodController::OnIMEMenuActivationChanged(bool is_activated) {
+void IMEFeaturePodController::OnIMEMenuActivationChanged(bool is_active) {
   Update();
 }
 
diff --git a/ash/system/ime/ime_feature_pod_controller.h b/ash/system/ime/ime_feature_pod_controller.h
index 4d2a6430..0591c7a 100644
--- a/ash/system/ime/ime_feature_pod_controller.h
+++ b/ash/system/ime/ime_feature_pod_controller.h
@@ -31,7 +31,7 @@
 
   // IMEObserver:
   void OnIMERefresh() override;
-  void OnIMEMenuActivationChanged(bool is_activated) override;
+  void OnIMEMenuActivationChanged(bool is_active) override;
 
   // Unowned.
   UnifiedSystemTrayController* const tray_controller_;
diff --git a/ash/system/ime/ime_feature_pod_controller_unittest.cc b/ash/system/ime/ime_feature_pod_controller_unittest.cc
index a8049ff..2618896 100644
--- a/ash/system/ime/ime_feature_pod_controller_unittest.cc
+++ b/ash/system/ime/ime_feature_pod_controller_unittest.cc
@@ -101,4 +101,29 @@
   EXPECT_TRUE(button()->visible());
 }
 
+TEST_F(IMEFeaturePodControllerTest, ButtonVisibilityImeMenuActive) {
+  SetUpButton();
+  Shell::Get()->ime_controller()->ShowImeMenuOnShelf(true);
+
+  SetActiveIMECount(0);
+  EXPECT_FALSE(button()->visible());
+  SetActiveIMECount(1);
+  EXPECT_FALSE(button()->visible());
+  SetActiveIMECount(2);
+  EXPECT_FALSE(button()->visible());
+}
+
+TEST_F(IMEFeaturePodControllerTest, ButtonVisibilityPolicy) {
+  SetUpButton();
+
+  Shell::Get()->ime_controller()->SetImesManagedByPolicy(true);
+
+  SetActiveIMECount(0);
+  EXPECT_TRUE(button()->visible());
+  SetActiveIMECount(1);
+  EXPECT_TRUE(button()->visible());
+  SetActiveIMECount(2);
+  EXPECT_TRUE(button()->visible());
+}
+
 }  // namespace ash
diff --git a/ash/system/message_center/new_unified_message_center_view.cc b/ash/system/message_center/new_unified_message_center_view.cc
index 7f0e1890..4251304 100644
--- a/ash/system/message_center/new_unified_message_center_view.cc
+++ b/ash/system/message_center/new_unified_message_center_view.cc
@@ -5,9 +5,19 @@
 #include "ash/system/message_center/new_unified_message_center_view.h"
 
 #include "ash/message_center/message_center_scroll_bar.h"
+#include "ash/session/session_controller.h"
+#include "ash/shell.h"
+#include "ash/strings/grit/ash_strings.h"
 #include "ash/system/message_center/unified_message_list_view.h"
+#include "ash/system/tray/tray_constants.h"
+#include "ash/system/unified/sign_out_button.h"
+#include "ash/system/unified/unified_system_tray_controller.h"
+#include "base/metrics/user_metrics.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/message_center/message_center.h"
 #include "ui/message_center/views/message_view.h"
 #include "ui/views/controls/scroll_view.h"
+#include "ui/views/layout/box_layout.h"
 #include "ui/views/layout/fill_layout.h"
 #include "ui/views/widget/widget.h"
 
@@ -18,15 +28,15 @@
       message_list_view_(new UnifiedMessageListView(this)) {
   message_list_view_->Init();
 
-  SetLayoutManager(std::make_unique<views::FillLayout>());
-
   // Need to set the transparent background explicitly, since ScrollView has
   // set the default opaque background color.
-  scroller_->SetContents(message_list_view_);
+  scroller_->SetContents(CreateScrollerContents());
   scroller_->SetBackgroundColor(SK_ColorTRANSPARENT);
   scroller_->SetVerticalScrollBar(new MessageCenterScrollBar(this));
   scroller_->set_draw_overflow_indicator(false);
   AddChildView(scroller_);
+
+  UpdateVisibility();
 }
 
 NewUnifiedMessageCenterView::~NewUnifiedMessageCenterView() = default;
@@ -36,7 +46,7 @@
 }
 
 void NewUnifiedMessageCenterView::ListPreferredSizeChanged() {
-  SetVisible(message_list_view_->child_count() > 0);
+  UpdateVisibility();
   PreferredSizeChanged();
 
   if (GetWidget())
@@ -48,6 +58,63 @@
   message_view->set_scroller(scroller_);
 }
 
+void NewUnifiedMessageCenterView::Layout() {
+  // We have to manually layout because we want to override
+  // CalculatePreferredSize().
+  scroller_->SetBoundsRect(GetContentsBounds());
+}
+
+gfx::Size NewUnifiedMessageCenterView::CalculatePreferredSize() const {
+  gfx::Size preferred_size = scroller_->GetPreferredSize();
+  // Hide Clear All button at the buttom from initial viewport.
+  preferred_size.set_height(preferred_size.height() -
+                            3 * kUnifiedNotificationCenterSpacing);
+  return preferred_size;
+}
+
 void NewUnifiedMessageCenterView::OnMessageCenterScrolled() {}
 
+void NewUnifiedMessageCenterView::ButtonPressed(views::Button* sender,
+                                                const ui::Event& event) {
+  base::RecordAction(
+      base::UserMetricsAction("StatusArea_Notifications_ClearAll"));
+
+  message_center::MessageCenter::Get()->RemoveAllNotifications(
+      true /* by_user */,
+      message_center::MessageCenter::RemoveType::NON_PINNED);
+}
+
+void NewUnifiedMessageCenterView::UpdateVisibility() {
+  SessionController* session_controller = Shell::Get()->session_controller();
+  SetVisible(message_list_view_->child_count() > 0 &&
+             session_controller->ShouldShowNotificationTray() &&
+             !session_controller->IsScreenLocked());
+}
+
+views::View* NewUnifiedMessageCenterView::CreateScrollerContents() {
+  views::View* scroller_contents = new views::View;
+  auto* contents_layout = scroller_contents->SetLayoutManager(
+      std::make_unique<views::BoxLayout>(views::BoxLayout::kVertical));
+  contents_layout->set_cross_axis_alignment(
+      views::BoxLayout::CROSS_AXIS_ALIGNMENT_STRETCH);
+  scroller_contents->AddChildView(message_list_view_);
+
+  views::View* button_container = new views::View;
+  auto* button_layout =
+      button_container->SetLayoutManager(std::make_unique<views::BoxLayout>(
+          views::BoxLayout::kHorizontal,
+          gfx::Insets(kUnifiedNotificationCenterSpacing), 0));
+  button_layout->set_main_axis_alignment(
+      views::BoxLayout::MAIN_AXIS_ALIGNMENT_END);
+
+  auto* clear_all_button = new RoundedLabelButton(
+      this,
+      l10n_util::GetStringUTF16(IDS_ASH_MESSAGE_CENTER_CLEAR_ALL_BUTTON_LABEL));
+  clear_all_button->SetTooltipText(l10n_util::GetStringUTF16(
+      IDS_ASH_MESSAGE_CENTER_CLEAR_ALL_BUTTON_TOOLTIP));
+  button_container->AddChildView(clear_all_button);
+  scroller_contents->AddChildView(button_container);
+  return scroller_contents;
+}
+
 }  // namespace ash
diff --git a/ash/system/message_center/new_unified_message_center_view.h b/ash/system/message_center/new_unified_message_center_view.h
index 284b6343..58065c51 100644
--- a/ash/system/message_center/new_unified_message_center_view.h
+++ b/ash/system/message_center/new_unified_message_center_view.h
@@ -24,7 +24,8 @@
 // TODO(tetsui): Rename to UnifiedMessageCenterView after old code is removed.
 class ASH_EXPORT NewUnifiedMessageCenterView
     : public views::View,
-      public MessageCenterScrollBar::Observer {
+      public MessageCenterScrollBar::Observer,
+      public views::ButtonListener {
  public:
   NewUnifiedMessageCenterView();
   ~NewUnifiedMessageCenterView() override;
@@ -39,10 +40,22 @@
   // UnifiedMessageListView.
   void ConfigureMessageView(message_center::MessageView* message_view);
 
+  // views::View:
+  void Layout() override;
+  gfx::Size CalculatePreferredSize() const override;
+
   // MessageCenterScrollBar::Observer:
   void OnMessageCenterScrolled() override;
 
+  // views::ButtonListener:
+  void ButtonPressed(views::Button* sender, const ui::Event& event) override;
+
  private:
+  friend class NewUnifiedMessageCenterViewTest;
+
+  void UpdateVisibility();
+  views::View* CreateScrollerContents();
+
   views::ScrollView* const scroller_;
   UnifiedMessageListView* const message_list_view_;
 
diff --git a/ash/system/message_center/new_unified_message_center_view_unittest.cc b/ash/system/message_center/new_unified_message_center_view_unittest.cc
new file mode 100644
index 0000000..d37b1ea
--- /dev/null
+++ b/ash/system/message_center/new_unified_message_center_view_unittest.cc
@@ -0,0 +1,146 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/message_center/new_unified_message_center_view.h"
+
+#include "ash/system/tray/tray_constants.h"
+#include "ash/system/unified/unified_system_tray_controller.h"
+#include "ash/test/ash_test_base.h"
+#include "base/macros.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#include "ui/message_center/message_center.h"
+#include "ui/message_center/views/message_view.h"
+#include "ui/views/controls/scroll_view.h"
+
+using message_center::MessageCenter;
+using message_center::MessageView;
+using message_center::Notification;
+
+namespace ash {
+
+namespace {
+
+class DummyEvent : public ui::Event {
+ public:
+  DummyEvent() : Event(ui::ET_UNKNOWN, base::TimeTicks(), 0) {}
+  ~DummyEvent() override = default;
+};
+
+}  // namespace
+
+class NewUnifiedMessageCenterViewTest : public AshTestBase,
+                                        public views::ViewObserver {
+ public:
+  NewUnifiedMessageCenterViewTest() = default;
+  ~NewUnifiedMessageCenterViewTest() override = default;
+
+  // AshTestBase:
+  void TearDown() override {
+    message_center_view_.reset();
+    AshTestBase::TearDown();
+  }
+
+  // views::ViewObserver:
+  void OnViewPreferredSizeChanged(views::View* view) override {
+    view->SetBoundsRect(gfx::Rect(view->GetPreferredSize()));
+    view->Layout();
+    ++size_changed_count_;
+  }
+
+ protected:
+  std::string AddNotification() {
+    std::string id = base::IntToString(id_++);
+    MessageCenter::Get()->AddNotification(std::make_unique<Notification>(
+        message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
+        base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
+        gfx::Image(), base::string16() /* display_source */, GURL(),
+        message_center::NotifierId(), message_center::RichNotificationData(),
+        new message_center::NotificationDelegate()));
+    return id;
+  }
+
+  void CreateMessageCenterView() {
+    message_center_view_ = std::make_unique<NewUnifiedMessageCenterView>();
+    message_center_view_->AddObserver(this);
+    message_center_view_->SetMaxHeight(500);
+    OnViewPreferredSizeChanged(message_center_view_.get());
+    size_changed_count_ = 0;
+  }
+
+  UnifiedMessageListView* GetMessageListView() {
+    return message_center_view()->message_list_view_;
+  }
+
+  views::ScrollView* GetScroller() { return message_center_view()->scroller_; }
+
+  views::View* GetScrollerContents() {
+    return message_center_view()->scroller_->contents();
+  }
+
+  NewUnifiedMessageCenterView* message_center_view() {
+    return message_center_view_.get();
+  }
+
+  int size_changed_count() const { return size_changed_count_; }
+
+ private:
+  int id_ = 0;
+  int size_changed_count_ = 0;
+
+  std::unique_ptr<NewUnifiedMessageCenterView> message_center_view_;
+
+  DISALLOW_COPY_AND_ASSIGN(NewUnifiedMessageCenterViewTest);
+};
+
+TEST_F(NewUnifiedMessageCenterViewTest, AddAndRemoveNotification) {
+  CreateMessageCenterView();
+  EXPECT_FALSE(message_center_view()->visible());
+
+  auto id0 = AddNotification();
+  EXPECT_TRUE(message_center_view()->visible());
+
+  MessageCenter::Get()->RemoveNotification(id0, true /* by_user */);
+  EXPECT_FALSE(message_center_view()->visible());
+}
+
+TEST_F(NewUnifiedMessageCenterViewTest, NotVisibleWhenLocked) {
+  AddNotification();
+  AddNotification();
+
+  BlockUserSession(BLOCKED_BY_LOCK_SCREEN);
+  CreateMessageCenterView();
+
+  EXPECT_FALSE(message_center_view()->visible());
+}
+
+TEST_F(NewUnifiedMessageCenterViewTest, ClearAllPressed) {
+  AddNotification();
+  AddNotification();
+  CreateMessageCenterView();
+  EXPECT_TRUE(message_center_view()->visible());
+
+  // ScrollView fills MessageCenterView.
+  EXPECT_EQ(message_center_view()->bounds(), GetScroller()->bounds());
+  EXPECT_EQ(GetMessageListView()->GetPreferredSize().width(),
+            message_center_view()->GetPreferredSize().width());
+
+  // MessageCenterView returns smaller height to hide Clear All button.
+  EXPECT_EQ(kUnifiedNotificationCenterSpacing,
+            message_center_view()->GetPreferredSize().height() -
+                GetMessageListView()->GetPreferredSize().height());
+
+  // ScrollView has larger height than MessageListView because it has Clear All
+  // button.
+  EXPECT_EQ(4 * kUnifiedNotificationCenterSpacing,
+            GetScrollerContents()->GetPreferredSize().height() -
+                GetMessageListView()->GetPreferredSize().height());
+
+  // When Clear All button is pressed, all notifications are removed and the
+  // view becomes invisible.
+  message_center_view()->ButtonPressed(nullptr, DummyEvent());
+  EXPECT_FALSE(message_center_view()->visible());
+}
+
+}  // namespace ash
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index 1e1cf35..6ffe62a 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -409,8 +409,14 @@
 }
 
 void TrayBackgroundView::OnVirtualKeyboardVisibilityChanged() {
-  if (show_with_virtual_keyboard_)
+  if (show_with_virtual_keyboard_) {
+    // The view always shows up when virtual keyboard is visible if
+    // |show_with_virtual_keyboard| is true.
+    views::View::SetVisible(
+        Shell::Get()->system_tray_model()->virtual_keyboard()->visible() ||
+        visible_preferred_);
     return;
+  }
 
   // If virtual keyboard is hidden and current preferred visibility is true,
   // set the visibility to true. We call base class' SetVisible because we don't
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index 8827124..65946de 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -202,7 +202,7 @@
   // virtual keyboard is hidden.
   bool visible_preferred_;
 
-  // If true, ignores virtual keyboard visibility changes.
+  // If true, the view always shows up when virtual keyboard is visible.
   bool show_with_virtual_keyboard_;
 
   // Handles touch drag gestures on the tray area and its associated bubble.
diff --git a/ash/system/unified/unified_system_tray_view.cc b/ash/system/unified/unified_system_tray_view.cc
index c25f867..48fe736 100644
--- a/ash/system/unified/unified_system_tray_view.cc
+++ b/ash/system/unified/unified_system_tray_view.cc
@@ -245,14 +245,14 @@
   SessionController* session_controller = Shell::Get()->session_controller();
 
   views::View* message_center_view;
-  if (features::IsNewMessageListViewEnabled())
+  if (features::IsNewMessageListViewEnabled()) {
     message_center_view = new_message_center_view_;
-  else
+  } else {
     message_center_view = message_center_view_;
-
-  message_center_view->SetVisible(
-      session_controller->ShouldShowNotificationTray() &&
-      !session_controller->IsScreenLocked());
+    message_center_view->SetVisible(
+        session_controller->ShouldShowNotificationTray() &&
+        !session_controller->IsScreenLocked());
+  }
   AddChildView(message_center_view);
   layout->SetFlexForView(message_center_view, 1);
 
diff --git a/ash/wm/splitview/split_view_controller_unittest.cc b/ash/wm/splitview/split_view_controller_unittest.cc
index 51970b4..e6f3615 100644
--- a/ash/wm/splitview/split_view_controller_unittest.cc
+++ b/ash/wm/splitview/split_view_controller_unittest.cc
@@ -2894,6 +2894,120 @@
   EXPECT_TRUE(window1_layer > window2_layer);
 }
 
+// When tab dragging a window, the dragged window might need to merge back into
+// the source window when the drag ends. Tests the related functionalities.
+TEST_F(SplitViewTabDraggingTest, MergeBackToSourceWindow) {
+  UpdateDisplay("600x600");
+  const gfx::Rect bounds(0, 0, 400, 400);
+  std::unique_ptr<aura::Window> dragged_window(
+      CreateWindowWithType(bounds, AppType::BROWSER));
+  std::unique_ptr<aura::Window> source_window(
+      CreateWindowWithType(bounds, AppType::BROWSER));
+
+  // 1. If splitview is not active and the dragged window is not the source
+  // window.
+  // a. Drag the window to less than half of the display height, and not in the
+  // snap preview area.
+  std::unique_ptr<WindowResizer> resizer =
+      StartDrag(dragged_window.get(), source_window.get());
+  ASSERT_TRUE(resizer.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(300, 200));
+  CompleteDrag(std::move(resizer));
+  EXPECT_TRUE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  source_window->ClearProperty(ash::kIsDeferredTabDraggingTargetWindowKey);
+
+  // b. Drag the window to more than half of the display height and not in the
+  // snap preview area.
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  ASSERT_TRUE(resizer.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(300, 500));
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+
+  // c. Drag the window to the snap preview area.
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  ASSERT_TRUE(resizer.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(0, 200));
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  EndSplitView();
+
+  // d. The dragged window is already added into overview before drag ends:
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  ASSERT_TRUE(resizer.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(300, 200));
+  dragged_window->SetProperty(ash::kIsShowingInOverviewKey, true);
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  dragged_window->ClearProperty(ash::kIsShowingInOverviewKey);
+
+  // 2. If splitview is active and the dragged window is not the source window.
+  // a. Drag the window to less than half of the display height, in the same
+  // split of the source window, and not in the snap preview area.
+  split_view_controller()->SnapWindow(source_window.get(),
+                                      SplitViewController::LEFT);
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(0, 200));
+  CompleteDrag(std::move(resizer));
+  EXPECT_TRUE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  EndSplitView();
+  source_window->ClearProperty(ash::kIsDeferredTabDraggingTargetWindowKey);
+
+  // b. Drag the window to less than half of the display height, in the
+  // different split of the source window, and not in the snap preview area.
+  split_view_controller()->SnapWindow(source_window.get(),
+                                      SplitViewController::LEFT);
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(500, 200));
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  EndSplitView();
+
+  // c. Drag the window to move a small distance, but is still in the different
+  // split of the source window, and not in the snap preview area.
+  split_view_controller()->SnapWindow(source_window.get(),
+                                      SplitViewController::LEFT);
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(500, 20));
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  EndSplitView();
+
+  // d. The dragged window was added to overview before the drag ends.
+  split_view_controller()->SnapWindow(source_window.get(),
+                                      SplitViewController::LEFT);
+  resizer = StartDrag(dragged_window.get(), source_window.get());
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  DragWindowTo(resizer.get(), gfx::Point(0, 200));
+  dragged_window->SetProperty(ash::kIsShowingInOverviewKey, true);
+  CompleteDrag(std::move(resizer));
+  EXPECT_FALSE(
+      source_window->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey));
+  dragged_window->ClearProperty(ash::kIsShowingInOverviewKey);
+}
+
 class TestWindowDelegateWithWidget : public views::WidgetDelegate {
  public:
   TestWindowDelegateWithWidget(bool can_activate)
diff --git a/ash/wm/tablet_mode/tablet_mode_app_window_drag_controller.cc b/ash/wm/tablet_mode/tablet_mode_app_window_drag_controller.cc
index 7940413..6a05e8f 100644
--- a/ash/wm/tablet_mode/tablet_mode_app_window_drag_controller.cc
+++ b/ash/wm/tablet_mode/tablet_mode_app_window_drag_controller.cc
@@ -35,17 +35,17 @@
 
  private:
   // TabletModeWindowDragDelegate:
-  void PrepareForDraggedWindow(const gfx::Point& location_in_screen) override {
+  void PrepareWindowDrag(const gfx::Point& location_in_screen) override {
     wm::GetWindowState(dragged_window_)
         ->CreateDragDetails(location_in_screen, HTCLIENT,
                             ::wm::WINDOW_MOVE_SOURCE_TOUCH);
   }
-  void UpdateForDraggedWindow(const gfx::Point& location_in_screen) override {}
-  void EndingForDraggedWindow(
-      wm::WmToplevelWindowEventHandler::DragResult result,
-      const gfx::Point& location_in_screen) override {
+  void UpdateWindowDrag(const gfx::Point& location_in_screen) override {}
+  void EndingWindowDrag(wm::WmToplevelWindowEventHandler::DragResult result,
+                        const gfx::Point& location_in_screen) override {
     wm::GetWindowState(dragged_window_)->DeleteDragDetails();
   }
+  void EndedWindowDrag(const gfx::Point& location_in_screen) override {}
 
   DISALLOW_COPY_AND_ASSIGN(TabletModeAppWindowDragDelegate);
 };
diff --git a/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.cc b/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.cc
index f2ded825..ea88aaae 100644
--- a/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.cc
+++ b/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.cc
@@ -17,6 +17,7 @@
 #include "ash/wm/splitview/split_view_constants.h"
 #include "ash/wm/tablet_mode/tablet_mode_browser_window_drag_controller.h"
 #include "ash/wm/tablet_mode/tablet_mode_window_state.h"
+#include "ash/wm/window_util.h"
 #include "ui/aura/window.h"
 #include "ui/compositor/layer_animation_observer.h"
 #include "ui/compositor/scoped_layer_animation_settings.h"
@@ -34,14 +35,6 @@
 // threshold.
 constexpr float kSourceWindowScale = 0.85;
 
-// Returns the window selector if overview mode is active, otherwise returns
-// nullptr.
-WindowSelector* GetWindowSelector() {
-  return Shell::Get()->window_selector_controller()->IsSelecting()
-             ? Shell::Get()->window_selector_controller()->window_selector()
-             : nullptr;
-}
-
 // The class to observe the source window's bounds change animation. It's used
 // to prevent the dragged window to merge back into the source window during
 // dragging. Only when the source window restores to its maximized window size,
@@ -247,7 +240,7 @@
 TabletModeBrowserWindowDragDelegate::~TabletModeBrowserWindowDragDelegate() =
     default;
 
-void TabletModeBrowserWindowDragDelegate::PrepareForDraggedWindow(
+void TabletModeBrowserWindowDragDelegate::PrepareWindowDrag(
     const gfx::Point& location_in_screen) {
   DCHECK(dragged_window_);
 
@@ -255,7 +248,7 @@
   window_state->OnDragStarted(window_state->drag_details()->window_component);
 }
 
-void TabletModeBrowserWindowDragDelegate::UpdateForDraggedWindow(
+void TabletModeBrowserWindowDragDelegate::UpdateWindowDrag(
     const gfx::Point& location_in_screen) {
   DCHECK(dragged_window_);
 
@@ -263,7 +256,7 @@
   UpdateSourceWindow(location_in_screen);
 }
 
-void TabletModeBrowserWindowDragDelegate::EndingForDraggedWindow(
+void TabletModeBrowserWindowDragDelegate::EndingWindowDrag(
     wm::WmToplevelWindowEventHandler::DragResult result,
     const gfx::Point& location_in_screen) {
   if (result == wm::WmToplevelWindowEventHandler::DragResult::SUCCESS)
@@ -282,6 +275,11 @@
   windows_hider_.reset();
 }
 
+void TabletModeBrowserWindowDragDelegate::EndedWindowDrag(
+    const gfx::Point& location_in_screen) {
+  MergeBackToSourceWindowIfApplicable(location_in_screen);
+}
+
 bool TabletModeBrowserWindowDragDelegate::ShouldOpenOverviewWhenDragStarts() {
   DCHECK(dragged_window_);
   aura::Window* source_window =
@@ -299,8 +297,7 @@
   if (!source_window || source_window == dragged_window_ ||
       source_window == split_view_controller_->left_window() ||
       source_window == split_view_controller_->right_window() ||
-      (GetWindowSelector() &&
-       GetWindowSelector()->IsWindowInOverview(source_window))) {
+      source_window->GetProperty(ash::kIsShowingInOverviewKey)) {
     return;
   }
 
@@ -347,4 +344,55 @@
   }
 }
 
+void TabletModeBrowserWindowDragDelegate::MergeBackToSourceWindowIfApplicable(
+    const gfx::Point& location_in_screen) {
+  // No need to merge back if we're not in tab dragging process.
+  if (!wm::IsDraggingTabs(dragged_window_))
+    return;
+
+  aura::Window* source_window =
+      dragged_window_->GetProperty(ash::kTabDraggingSourceWindowKey);
+  // Do not merge back if there is no source window or the source window or
+  // the dragged window is currently in overview.
+  if (!source_window ||
+      source_window->GetProperty(ash::kIsShowingInOverviewKey) ||
+      dragged_window_->GetProperty(ash::kIsShowingInOverviewKey)) {
+    return;
+  }
+
+  // Do not merge back if the window has dragged farther than half of the screen
+  // height.
+  const gfx::Rect work_area_bounds =
+      display::Screen::GetScreen()
+          ->GetDisplayNearestWindow(dragged_window_)
+          .work_area();
+  if (location_in_screen.y() >= work_area_bounds.CenterPoint().y())
+    return;
+
+  SplitViewController::SnapPosition desired_snap_position =
+      GetSnapPosition(location_in_screen);
+  // If splitscreen is not active, do not merge back if the dragged window is
+  // in the drag-to-snap preview area.
+  if (!split_view_controller_->IsSplitViewModeActive() &&
+      desired_snap_position != SplitViewController::NONE) {
+    return;
+  }
+
+  // If source window is currently showing in splitscreen, do not merge back if
+  // the dragged window has been dragged to the other side of the split.
+  if (split_view_controller_->IsSplitViewModeActive() &&
+      wm::GetWindowState(source_window)->IsSnapped()) {
+    if ((source_window == split_view_controller_->left_window() &&
+         desired_snap_position == SplitViewController::RIGHT) ||
+        (source_window == split_view_controller_->right_window() &&
+         desired_snap_position == SplitViewController::LEFT)) {
+      return;
+    }
+  }
+
+  // Arriving here we know the dragged window should merge back into its source
+  // window.
+  source_window->SetProperty(ash::kIsDeferredTabDraggingTargetWindowKey, true);
+}
+
 }  // namespace ash
diff --git a/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.h b/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.h
index ace3091..a7fa8224 100644
--- a/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.h
+++ b/ash/wm/tablet_mode/tablet_mode_browser_window_drag_delegate.h
@@ -24,11 +24,11 @@
   class WindowsHider;
 
   // TabletModeWindowDragDelegate:
-  void PrepareForDraggedWindow(const gfx::Point& location_in_screen) override;
-  void UpdateForDraggedWindow(const gfx::Point& location_in_screen) override;
-  void EndingForDraggedWindow(
-      wm::WmToplevelWindowEventHandler::DragResult result,
-      const gfx::Point& location_in_screen) override;
+  void PrepareWindowDrag(const gfx::Point& location_in_screen) override;
+  void UpdateWindowDrag(const gfx::Point& location_in_screen) override;
+  void EndingWindowDrag(wm::WmToplevelWindowEventHandler::DragResult result,
+                        const gfx::Point& location_in_screen) override;
+  void EndedWindowDrag(const gfx::Point& location_in_screen) override;
   bool ShouldOpenOverviewWhenDragStarts() override;
 
   // Scales down the source window if the dragged window is dragged past the
@@ -37,6 +37,14 @@
   // current drag location for the dragged window.
   void UpdateSourceWindow(const gfx::Point& location_in_screen);
 
+  // After drag ends, the dragged window might need to merge back into the
+  // source window if 1) the dragged window or the source window is not added to
+  // overview and 2) the dragged window has dragged farther than half of the
+  // screen height and 3) the dragged window is not in snap preview area and 4)
+  // the dragged window is not dragged to the other side of the split screen.
+  void MergeBackToSourceWindowIfApplicable(
+      const gfx::Point& location_in_screen);
+
   // It's used to hide all visible windows if the source window needs to be
   // scaled up/down during dragging a tab out of the source window. It also
   // hides the home launcher if home launcher is enabled, blurs and darkens the
diff --git a/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.cc b/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.cc
index e21fa511f..f168d093 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.cc
+++ b/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.cc
@@ -78,7 +78,7 @@
   dragged_window_ = dragged_window;
   initial_location_in_screen_ = location_in_screen;
 
-  PrepareForDraggedWindow(location_in_screen);
+  PrepareWindowDrag(location_in_screen);
 
   // Update the shelf's visibility to keep shelf visible during drag.
   RootWindowController::ForWindow(dragged_window_)
@@ -151,7 +151,7 @@
   }
 
   // For child classes to do their special handling if any.
-  UpdateForDraggedWindow(location_in_screen);
+  UpdateWindowDrag(location_in_screen);
 
   // Update drag indicators and preview window if necessary.
   IndicatorState indicator_state = GetIndicatorState(location_in_screen);
@@ -185,7 +185,7 @@
 void TabletModeWindowDragDelegate::EndWindowDrag(
     wm::WmToplevelWindowEventHandler::DragResult result,
     const gfx::Point& location_in_screen) {
-  EndingForDraggedWindow(result, location_in_screen);
+  EndingWindowDrag(result, location_in_screen);
 
   dragged_window_->SetProperty(kBackdropWindowMode, original_backdrop_mode_);
   SplitViewController::SnapPosition snap_position = SplitViewController::NONE;
@@ -210,6 +210,8 @@
   // Reset the dragged window's window shadow elevation.
   ::wm::SetShadowElevation(dragged_window_, original_shadow_elevation_);
 
+  // For child class to do its special handling if any.
+  EndedWindowDrag(location_in_screen);
   dragged_window_ = nullptr;
   did_move_ = false;
 }
@@ -262,26 +264,14 @@
 
 SplitViewController::SnapPosition TabletModeWindowDragDelegate::GetSnapPosition(
     const gfx::Point& location_in_screen) const {
-  gfx::Rect work_area_bounds = display::Screen::GetScreen()
-                                   ->GetDisplayNearestWindow(dragged_window_)
-                                   .work_area();
-
-  // The user has to drag pass the indicator vertical threshold to snap the
-  // window.
-  if (!did_move_ && location_in_screen.y() <
-                        GetIndicatorsVerticalThreshold(work_area_bounds)) {
-    return SplitViewController::NONE;
-  }
-
-  const bool is_landscape =
-      split_view_controller_->IsCurrentScreenOrientationLandscape();
-  const bool is_primary =
-      split_view_controller_->IsCurrentScreenOrientationPrimary();
-
   // If split view mode is active during dragging, the dragged window will be
   // either snapped left or right (if it's not merged into overview window),
   // depending on the relative position of |location_in_screen| and the current
   // divider position.
+  const bool is_landscape =
+      split_view_controller_->IsCurrentScreenOrientationLandscape();
+  const bool is_primary =
+      split_view_controller_->IsCurrentScreenOrientationPrimary();
   if (split_view_controller_->IsSplitViewModeActive()) {
     const int position =
         is_landscape ? location_in_screen.x() : location_in_screen.y();
@@ -294,8 +284,18 @@
     }
   }
 
-  // Otherwise, check to see if the current event location |location_in_screen|
-  // is within the drag indicators bounds.
+  // Otherwise, the user has to drag pass the indicator vertical threshold to
+  // snap the window.
+  gfx::Rect work_area_bounds = display::Screen::GetScreen()
+                                   ->GetDisplayNearestWindow(dragged_window_)
+                                   .work_area();
+  if (!did_move_ && location_in_screen.y() <
+                        GetIndicatorsVerticalThreshold(work_area_bounds)) {
+    return SplitViewController::NONE;
+  }
+
+  // Check to see if the current event location |location_in_screen|is within
+  // the drag indicators bounds.
   if (is_landscape) {
     const int screen_edge_inset =
         work_area_bounds.width() * kHighlightScreenPrimaryAxisRatio +
diff --git a/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.h b/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.h
index 36a6ec4..44e27b8f4 100644
--- a/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.h
+++ b/ash/wm/tablet_mode/tablet_mode_window_drag_delegate.h
@@ -64,14 +64,14 @@
   }
 
  protected:
-  // These three methods are used by its child class to do its special handling
+  // These four methods are used by its child class to do its special handling
   // before/during/after dragging.
-  virtual void PrepareForDraggedWindow(
-      const gfx::Point& location_in_screen) = 0;
-  virtual void UpdateForDraggedWindow(const gfx::Point& location_in_screen) = 0;
-  virtual void EndingForDraggedWindow(
+  virtual void PrepareWindowDrag(const gfx::Point& location_in_screen) = 0;
+  virtual void UpdateWindowDrag(const gfx::Point& location_in_screen) = 0;
+  virtual void EndingWindowDrag(
       wm::WmToplevelWindowEventHandler::DragResult result,
       const gfx::Point& location_in_screen) = 0;
+  virtual void EndedWindowDrag(const gfx::Point& location_in_screen) = 0;
 
   // Returns true if we should open overview behind the dragged window when drag
   // starts.
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index c65a7d8..2c04eb98 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -13,6 +13,7 @@
 import("//build/config/sanitizers/sanitizers.gni")
 import("//build/config/ui.gni")
 import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
 import("//build/toolchain/toolchain.gni")
 import("//build_overrides/build.gni")
 
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 5019dff..fc1451b 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -318,8 +318,7 @@
   if (!layer_tree_host_)
     return;
 
-  // TODO(pdr): This should not be needed when using layer lists.
-  if (scrollable()) {
+  if (scrollable() && !layer_tree_host_->IsUsingLayerLists()) {
     auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree;
     if (auto* scroll_node = scroll_tree.Node(scroll_tree_index_))
       scroll_node->overscroll_behavior = behavior;
@@ -338,8 +337,7 @@
   if (!layer_tree_host_)
     return;
 
-  // TODO(pdr): This should not be needed when using layer lists.
-  if (scrollable()) {
+  if (scrollable() && !layer_tree_host_->IsUsingLayerLists()) {
     auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree;
     if (auto* scroll_node = scroll_tree.Node(scroll_tree_index_))
       scroll_node->snap_container_data = inputs_.snap_container_data;
@@ -579,18 +577,21 @@
   bool force_rebuild = opacity == 1.f || inputs_.opacity == 1.f;
   inputs_.opacity = opacity;
   SetSubtreePropertyChanged();
-  // TODO(pdr): This should not be needed when using layer lists.
-  if (layer_tree_host_ && !force_rebuild) {
-    PropertyTrees* property_trees = layer_tree_host_->property_trees();
-    if (EffectNode* node =
-            property_trees->effect_tree.Node(effect_tree_index())) {
-      node->opacity = opacity;
-      node->effect_changed = true;
-      property_trees->effect_tree.set_needs_update(true);
+
+  if (layer_tree_host_ && !layer_tree_host_->IsUsingLayerLists()) {
+    if (!force_rebuild) {
+      PropertyTrees* property_trees = layer_tree_host_->property_trees();
+      if (EffectNode* node =
+              property_trees->effect_tree.Node(effect_tree_index())) {
+        node->opacity = opacity;
+        node->effect_changed = true;
+        property_trees->effect_tree.set_needs_update(true);
+      }
+    } else {
+      SetPropertyTreesNeedRebuild();
     }
   }
-  if (force_rebuild)
-    SetPropertyTreesNeedRebuild();
+
   SetNeedsCommit();
 }
 
@@ -692,17 +693,19 @@
     return;
 
   SetSubtreePropertyChanged();
-  if (has_transform_node_) {
-    // TODO(pdr): This should not be needed when using layer lists.
-    TransformNode* transform_node =
-        layer_tree_host_->property_trees()->transform_tree.Node(
-            transform_tree_index_);
-    transform_node->update_post_local_transform(position, transform_origin());
-    transform_node->needs_local_transform_update = true;
-    transform_node->transform_changed = true;
-    layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
-  } else {
-    SetPropertyTreesNeedRebuild();
+
+  if (!layer_tree_host_->IsUsingLayerLists()) {
+    if (has_transform_node_) {
+      TransformNode* transform_node =
+          layer_tree_host_->property_trees()->transform_tree.Node(
+              transform_tree_index_);
+      transform_node->update_post_local_transform(position, transform_origin());
+      transform_node->needs_local_transform_update = true;
+      transform_node->transform_changed = true;
+      layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
+    } else {
+      SetPropertyTreesNeedRebuild();
+    }
   }
 
   SetNeedsCommit();
@@ -733,9 +736,8 @@
     return;
 
   SetSubtreePropertyChanged();
-  if (layer_tree_host_) {
+  if (layer_tree_host_ && !layer_tree_host_->IsUsingLayerLists()) {
     if (has_transform_node_) {
-      // TODO(pdr): This should not be needed when using layer lists.
       TransformNode* transform_node =
           layer_tree_host_->property_trees()->transform_tree.Node(
               transform_tree_index_);
@@ -770,19 +772,21 @@
     return;
 
   SetSubtreePropertyChanged();
-  if (has_transform_node_) {
-    // TODO(pdr): This should not be needed when using layer lists.
-    TransformNode* transform_node =
-        layer_tree_host_->property_trees()->transform_tree.Node(
-            transform_tree_index_);
-    DCHECK_EQ(transform_tree_index(), transform_node->id);
-    transform_node->update_pre_local_transform(transform_origin);
-    transform_node->update_post_local_transform(position(), transform_origin);
-    transform_node->needs_local_transform_update = true;
-    transform_node->transform_changed = true;
-    layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
-  } else {
-    SetPropertyTreesNeedRebuild();
+
+  if (!layer_tree_host_->IsUsingLayerLists()) {
+    if (has_transform_node_) {
+      TransformNode* transform_node =
+          layer_tree_host_->property_trees()->transform_tree.Node(
+              transform_tree_index_);
+      DCHECK_EQ(transform_tree_index(), transform_node->id);
+      transform_node->update_pre_local_transform(transform_origin);
+      transform_node->update_post_local_transform(position(), transform_origin);
+      transform_node->needs_local_transform_update = true;
+      transform_node->transform_changed = true;
+      layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
+    } else {
+      SetPropertyTreesNeedRebuild();
+    }
   }
 
   SetNeedsCommit();
@@ -928,8 +932,7 @@
   if (!layer_tree_host_)
     return;
 
-  // TODO(pdr): This should not be needed when using layer lists.
-  if (scrollable()) {
+  if (scrollable() && !layer_tree_host_->IsUsingLayerLists()) {
     auto& scroll_tree = layer_tree_host_->property_trees()->scroll_tree;
     if (auto* scroll_node = scroll_tree.Node(scroll_tree_index_)) {
       scroll_node->user_scrollable_horizontal = horizontal;
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 88b1b63..ef8c52d 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -1664,7 +1664,8 @@
     // Call OnPurgeMemory() to ensure that the same SharedBitmapId doesn't get
     // registered again on the next draw.
     if (step_ == 1)
-      static_cast<base::MemoryCoordinatorClient*>(host_impl)->OnPurgeMemory();
+      base::MemoryPressureListener::SimulatePressureNotification(
+          base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   }
 
   void DisplayReceivedCompositorFrameOnThread(
diff --git a/cc/raster/staging_buffer_pool.cc b/cc/raster/staging_buffer_pool.cc
index 5621b9908..a24fe9a 100644
--- a/cc/raster/staging_buffer_pool.cc
+++ b/cc/raster/staging_buffer_pool.cc
@@ -6,7 +6,6 @@
 
 #include <memory>
 
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/memory_dump_manager.h"
@@ -136,7 +135,6 @@
   base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
       this, "cc::StagingBufferPool", base::ThreadTaskRunnerHandle::Get());
 
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
   memory_pressure_listener_.reset(new base::MemoryPressureListener(
       base::BindRepeating(&StagingBufferPool::OnMemoryPressure,
                           weak_ptr_factory_.GetWeakPtr())));
@@ -146,7 +144,6 @@
 }
 
 StagingBufferPool::~StagingBufferPool() {
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
   base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
       this);
 }
@@ -422,12 +419,6 @@
   }
 }
 
-void StagingBufferPool::OnPurgeMemory() {
-  base::AutoLock lock(lock_);
-  // Release all buffers, regardless of how recently they were used.
-  ReleaseBuffersNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
-}
-
 void StagingBufferPool::OnMemoryPressure(
     base::MemoryPressureListener::MemoryPressureLevel level) {
   base::AutoLock lock(lock_);
@@ -436,6 +427,7 @@
     case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
       break;
     case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
+      // Release all buffers, regardless of how recently they were used.
       ReleaseBuffersNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
       break;
   }
diff --git a/cc/raster/staging_buffer_pool.h b/cc/raster/staging_buffer_pool.h
index 3b3b222..687b006 100644
--- a/cc/raster/staging_buffer_pool.h
+++ b/cc/raster/staging_buffer_pool.h
@@ -12,7 +12,6 @@
 
 #include "base/containers/circular_deque.h"
 #include "base/macros.h"
-#include "base/memory/memory_coordinator_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/memory/weak_ptr.h"
 #include "base/sequenced_task_runner.h"
@@ -76,8 +75,7 @@
 };
 
 class CC_EXPORT StagingBufferPool
-    : public base::trace_event::MemoryDumpProvider,
-      public base::MemoryCoordinatorClient {
+    : public base::trace_event::MemoryDumpProvider {
  public:
   ~StagingBufferPool() final;
 
@@ -114,11 +112,6 @@
   void StagingStateAsValueInto(
       base::trace_event::TracedValue* staging_state) const;
 
-  // Overriden from base::MemoryCoordinatorClient.
-  void OnPurgeMemory() override;
-
-  // TODO(gyuyoung): OnMemoryPressure is deprecated. So this should be removed
-  // when the memory coordinator is enabled by default.
   void OnMemoryPressure(
       base::MemoryPressureListener::MemoryPressureLevel level);
 
diff --git a/cc/raster/staging_buffer_pool_unittest.cc b/cc/raster/staging_buffer_pool_unittest.cc
index 7c7c79a..5fc5dac 100644
--- a/cc/raster/staging_buffer_pool_unittest.cc
+++ b/cc/raster/staging_buffer_pool_unittest.cc
@@ -4,8 +4,6 @@
 
 #include "cc/raster/staging_buffer_pool.h"
 
-#include "base/memory/memory_coordinator_client.h"
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/run_loop.h"
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
@@ -37,9 +35,10 @@
   flush_message_loop();
 
   // Now, destroy the pool, and trigger a notification from the
-  // MemoryCoordinatorClientRegistry.
+  // MemoryPressureListener.
   pool = nullptr;
-  base::MemoryCoordinatorClientRegistry::GetInstance()->PurgeMemory();
+  base::MemoryPressureListener::SimulatePressureNotification(
+      base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   // Allow the callbacks in the observers to run.
   flush_message_loop();
   // No crash.
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 2d47472..05d6fd9 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -12,7 +12,6 @@
 
 #include "base/atomic_sequence_num.h"
 #include "base/format_macros.h"
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/memory/shared_memory_handle.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/stringprintf.h"
@@ -99,8 +98,6 @@
       weak_ptr_factory_(this) {
   base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
       this, "cc::ResourcePool", task_runner_.get());
-  // Register this component with base::MemoryCoordinatorClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
   memory_pressure_listener_.reset(
       new base::MemoryPressureListener(base::BindRepeating(
           &ResourcePool::OnMemoryPressure, weak_ptr_factory_.GetWeakPtr())));
@@ -109,8 +106,6 @@
 ResourcePool::~ResourcePool() {
   base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
       this);
-  // Unregister this component with memory_coordinator::ClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
 
   DCHECK_EQ(0u, in_use_resources_.size());
 
@@ -569,17 +564,6 @@
   return true;
 }
 
-void ResourcePool::OnPurgeMemory() {
-  // Release all resources, regardless of how recently they were used.
-  EvictResourcesNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
-}
-
-void ResourcePool::OnMemoryStateChange(base::MemoryState state) {
-  // While in a SUSPENDED state, we don't put resources back into the pool
-  // when they become available. Instead we free them immediately.
-  evict_busy_resources_when_unused_ = state == base::MemoryState::SUSPENDED;
-}
-
 void ResourcePool::OnMemoryPressure(
     base::MemoryPressureListener::MemoryPressureLevel level) {
   switch (level) {
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index 5a66a4c9..b7928fc 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -13,7 +13,6 @@
 
 #include "base/containers/circular_deque.h"
 #include "base/macros.h"
-#include "base/memory/memory_coordinator_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
@@ -45,8 +44,7 @@
 
 namespace cc {
 
-class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider,
-                               public base::MemoryCoordinatorClient {
+class CC_EXPORT ResourcePool : public base::trace_event::MemoryDumpProvider {
   class PoolResource;
 
  public:
@@ -244,12 +242,6 @@
   bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
                     base::trace_event::ProcessMemoryDump* pmd) override;
 
-  // Overriden from base::MemoryCoordinatorClient.
-  void OnPurgeMemory() override;
-  void OnMemoryStateChange(base::MemoryState state) override;
-
-  // TODO(gyuyoung): OnMemoryPressure is deprecated. So this should be removed
-  // when the memory coordinator is enabled by default.
   void OnMemoryPressure(
       base::MemoryPressureListener::MemoryPressureLevel level);
 
diff --git a/cc/resources/resource_pool_unittest.cc b/cc/resources/resource_pool_unittest.cc
index 8251332..ef0ba34c 100644
--- a/cc/resources/resource_pool_unittest.cc
+++ b/cc/resources/resource_pool_unittest.cc
@@ -469,11 +469,10 @@
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
 
   // Purging and suspending should not impact an in-use resource.
-  resource_pool_->OnPurgeMemory();
-  resource_pool_->OnMemoryStateChange(base::MemoryState::SUSPENDED);
+  resource_pool_->OnMemoryPressure(
+      base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
-  resource_pool_->OnMemoryStateChange(base::MemoryState::NORMAL);
 
   // Export the resource to the display compositor, so it will be busy once
   // released.
@@ -482,77 +481,25 @@
                                           &transfers, context_provider_.get());
 
   // Release the resource making it busy.
-  resource_pool_->OnMemoryStateChange(base::MemoryState::NORMAL);
   resource_pool_->ReleaseResource(std::move(resource));
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(1u, resource_pool_->GetBusyResourceCountForTesting());
 
   // Purging and suspending should not impact a busy resource either.
-  resource_pool_->OnPurgeMemory();
-  resource_pool_->OnMemoryStateChange(base::MemoryState::SUSPENDED);
+  resource_pool_->OnMemoryPressure(
+      base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(1u, resource_pool_->GetBusyResourceCountForTesting());
 
   // The resource moves from busy to available.
-  resource_pool_->OnMemoryStateChange(base::MemoryState::NORMAL);
   resource_provider_->ReceiveReturnsFromParent(
       viz::TransferableResource::ReturnResources(transfers));
   EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
 
   // Purging and suspending should drop unused resources.
-  resource_pool_->OnPurgeMemory();
-  resource_pool_->OnMemoryStateChange(base::MemoryState::SUSPENDED);
-  EXPECT_EQ(0u, resource_pool_->GetTotalResourceCountForTesting());
-  EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
-}
-
-TEST_F(ResourcePoolTest, MemoryStateSuspended) {
-  // Limits high enough to not be hit by this test.
-  size_t bytes_limit = 10 * 1024 * 1024;
-  size_t count_limit = 100;
-  resource_pool_->SetResourceUsageLimits(bytes_limit, count_limit);
-
-  gfx::Size size(100, 100);
-  viz::ResourceFormat format = viz::RGBA_8888;
-  gfx::ColorSpace color_space = gfx::ColorSpace::CreateSRGB();
-  ResourcePool::InUsePoolResource resource =
-      resource_pool_->AcquireResource(size, format, color_space);
-  SetBackingOnResource(resource);
-  resource_pool_->PrepareForExport(resource);
-
-  EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
-  EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
-
-  // Purging and suspending should not impact an in-use resource.
-  resource_pool_->OnPurgeMemory();
-  resource_pool_->OnMemoryStateChange(base::MemoryState::SUSPENDED);
-  EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
-  EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
-  resource_pool_->OnMemoryStateChange(base::MemoryState::NORMAL);
-
-  // Export the resource to the display compositor, so it will be busy once
-  // released.
-  std::vector<viz::TransferableResource> transfers;
-  resource_provider_->PrepareSendToParent({resource.resource_id_for_export()},
-                                          &transfers, context_provider_.get());
-
-  // Release the resource making it busy.
-  resource_pool_->OnMemoryStateChange(base::MemoryState::NORMAL);
-  resource_pool_->ReleaseResource(std::move(resource));
-  EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
-  EXPECT_EQ(1u, resource_pool_->GetBusyResourceCountForTesting());
-
-  // Purging and suspending should not impact a busy resource either.
-  resource_pool_->OnPurgeMemory();
-  resource_pool_->OnMemoryStateChange(base::MemoryState::SUSPENDED);
-  EXPECT_EQ(1u, resource_pool_->GetTotalResourceCountForTesting());
-  EXPECT_EQ(1u, resource_pool_->GetBusyResourceCountForTesting());
-
-  // The resource moves from busy to available, but since we are SUSPENDED
-  // it is not kept.
-  resource_provider_->ReceiveReturnsFromParent(
-      viz::TransferableResource::ReturnResources(transfers));
+  resource_pool_->OnMemoryPressure(
+      base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   EXPECT_EQ(0u, resource_pool_->GetTotalResourceCountForTesting());
   EXPECT_EQ(0u, resource_pool_->GetBusyResourceCountForTesting());
 }
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc
index c76d06b8..7155080 100644
--- a/cc/tiles/gpu_image_decode_cache.cc
+++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -10,7 +10,6 @@
 #include "base/debug/alias.h"
 #include "base/hash.h"
 #include "base/memory/discardable_memory_allocator.h"
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/numerics/safe_math.h"
 #include "base/strings/stringprintf.h"
@@ -41,7 +40,6 @@
 // the system. This limit can be breached by in-use cache items, which cannot
 // be deleted.
 static const int kNormalMaxItemsInCacheForGpu = 2000;
-static const int kThrottledMaxItemsInCacheForGpu = 100;
 static const int kSuspendedMaxItemsInCacheForGpu = 0;
 
 // The maximum number of images that we can lock simultaneously in our working
@@ -685,8 +683,6 @@
     base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
         this, "cc::GpuImageDecodeCache", base::ThreadTaskRunnerHandle::Get());
   }
-  // Register this component with base::MemoryCoordinatorClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
   memory_pressure_listener_.reset(
       new base::MemoryPressureListener(base::BindRepeating(
           &GpuImageDecodeCache::OnMemoryPressure, base::Unretained(this))));
@@ -703,8 +699,6 @@
   // It is safe to unregister, even if we didn't register in the constructor.
   base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
       this);
-  // Unregister this component with memory_coordinator::ClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
 
   // TODO(vmpstr): If we don't have a client name, it may cause problems in
   // unittests, since most tests don't set the name but some do. The UMA system
@@ -1416,13 +1410,8 @@
   size_t items_limit;
   if (aggressively_freeing_resources_) {
     items_limit = kSuspendedMaxItemsInCacheForGpu;
-  } else if (memory_state_ == base::MemoryState::NORMAL) {
-    items_limit = kNormalMaxItemsInCacheForGpu;
-  } else if (memory_state_ == base::MemoryState::THROTTLED) {
-    items_limit = kThrottledMaxItemsInCacheForGpu;
   } else {
-    DCHECK_EQ(base::MemoryState::SUSPENDED, memory_state_);
-    items_limit = kSuspendedMaxItemsInCacheForGpu;
+    items_limit = kNormalMaxItemsInCacheForGpu;
   }
 
   return persistent_cache_.size() > items_limit;
@@ -1949,26 +1938,16 @@
   return image_data->decode.ImageForTesting();
 }
 
-void GpuImageDecodeCache::OnMemoryStateChange(base::MemoryState state) {
-  memory_state_ = state;
-}
-
-void GpuImageDecodeCache::OnPurgeMemory() {
-  base::AutoLock lock(lock_);
-  // Temporary changes |memory_state_| to free up cache as much as possible.
-  base::AutoReset<base::MemoryState> reset(&memory_state_,
-                                           base::MemoryState::SUSPENDED);
-  EnsureCapacity(0);
-}
-
 void GpuImageDecodeCache::OnMemoryPressure(
     base::MemoryPressureListener::MemoryPressureLevel level) {
+  base::AutoLock lock(lock_);
   switch (level) {
     case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
     case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
       break;
     case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
-      OnPurgeMemory();
+      base::AutoReset<bool> reset(&aggressively_freeing_resources_, true);
+      EnsureCapacity(0);
       break;
   }
 }
diff --git a/cc/tiles/gpu_image_decode_cache.h b/cc/tiles/gpu_image_decode_cache.h
index 634f826b..dd21622 100644
--- a/cc/tiles/gpu_image_decode_cache.h
+++ b/cc/tiles/gpu_image_decode_cache.h
@@ -11,7 +11,6 @@
 
 #include "base/containers/mru_cache.h"
 #include "base/memory/discardable_memory.h"
-#include "base/memory/memory_coordinator_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/synchronization/lock.h"
 #include "base/trace_event/memory_dump_provider.h"
@@ -98,8 +97,7 @@
 //
 class CC_EXPORT GpuImageDecodeCache
     : public ImageDecodeCache,
-      public base::trace_event::MemoryDumpProvider,
-      public base::MemoryCoordinatorClient {
+      public base::trace_event::MemoryDumpProvider {
  public:
   enum class DecodeTaskType { kPartOfUploadTask, kStandAloneDecodeTask };
 
@@ -137,10 +135,6 @@
   bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
                     base::trace_event::ProcessMemoryDump* pmd) override;
 
-  // base::MemoryCoordinatorClient overrides.
-  void OnMemoryStateChange(base::MemoryState state) override;
-  void OnPurgeMemory() override;
-
   // TODO(gyuyoung): OnMemoryPressure is deprecated. So this should be removed
   // when the memory coordinator is enabled by default.
   void OnMemoryPressure(
@@ -511,7 +505,6 @@
   size_t max_working_set_items_ = 0;
   size_t working_set_bytes_ = 0;
   size_t working_set_items_ = 0;
-  base::MemoryState memory_state_ = base::MemoryState::NORMAL;
   bool aggressively_freeing_resources_ = false;
 
   // We can't modify GPU backed SkImages without holding the context lock, so
diff --git a/cc/tiles/gpu_image_decode_cache_unittest.cc b/cc/tiles/gpu_image_decode_cache_unittest.cc
index a9ccb48..dbd3bbc 100644
--- a/cc/tiles/gpu_image_decode_cache_unittest.cc
+++ b/cc/tiles/gpu_image_decode_cache_unittest.cc
@@ -1590,66 +1590,6 @@
   cache->DrawWithImageFinished(draw_image_mips, decoded_draw_image);
 }
 
-TEST_P(GpuImageDecodeCacheTest, MemoryStateSuspended) {
-  auto cache = CreateCache();
-
-  // First Insert an image into our cache.
-  PaintImage image = CreatePaintImageInternal(gfx::Size(1, 1));
-  bool is_decomposable = true;
-  SkMatrix matrix = CreateMatrix(SkSize::Make(1.0f, 1.0f), is_decomposable);
-  DrawImage draw_image(image, SkIRect::MakeWH(image.width(), image.height()),
-                       kLow_SkFilterQuality, matrix,
-                       PaintImage::kDefaultFrameIndex, DefaultColorSpace());
-  ImageDecodeCache::TaskResult result =
-      cache->GetTaskForImageAndRef(draw_image, ImageDecodeCache::TracingInfo());
-  EXPECT_TRUE(result.need_unref);
-  EXPECT_TRUE(result.task);
-
-  TestTileTaskRunner::ProcessTask(result.task->dependencies()[0].get());
-  TestTileTaskRunner::ProcessTask(result.task.get());
-  cache->UnrefImage(draw_image);
-
-  // The image should be cached.
-  EXPECT_EQ(cache->GetNumCacheEntriesForTesting(), 1u);
-
-  // Set us to the SUSPENDED state with purging.
-  cache->OnPurgeMemory();
-  cache->OnMemoryStateChange(base::MemoryState::SUSPENDED);
-
-  // Nothing should be cached.
-  EXPECT_EQ(cache->GetWorkingSetBytesForTesting(), 0u);
-  EXPECT_EQ(cache->GetNumCacheEntriesForTesting(), 0u);
-
-  // Attempts to get a task for the image will still succeed, as SUSPENDED
-  // doesn't impact working set size.
-  result =
-      cache->GetTaskForImageAndRef(draw_image, ImageDecodeCache::TracingInfo());
-  EXPECT_TRUE(result.need_unref);
-  EXPECT_TRUE(result.task);
-
-  TestTileTaskRunner::ProcessTask(result.task->dependencies()[0].get());
-  TestTileTaskRunner::ProcessTask(result.task.get());
-  cache->UnrefImage(draw_image);
-
-  // Nothing should be cached.
-  EXPECT_EQ(cache->GetWorkingSetBytesForTesting(), 0u);
-  EXPECT_EQ(cache->GetNumCacheEntriesForTesting(), 0u);
-
-  // Restore us to visible and NORMAL memory state.
-  cache->OnMemoryStateChange(base::MemoryState::NORMAL);
-  cache->SetShouldAggressivelyFreeResources(false);
-
-  // We should now be able to create a task again (space available).
-  result =
-      cache->GetTaskForImageAndRef(draw_image, ImageDecodeCache::TracingInfo());
-  EXPECT_TRUE(result.need_unref);
-  EXPECT_TRUE(result.task);
-
-  TestTileTaskRunner::ProcessTask(result.task->dependencies()[0].get());
-  TestTileTaskRunner::ProcessTask(result.task.get());
-  cache->UnrefImage(draw_image);
-}
-
 TEST_P(GpuImageDecodeCacheTest, OutOfRasterDecodeTask) {
   auto cache = CreateCache();
 
@@ -2058,46 +1998,6 @@
   EXPECT_EQ(0u, cache->GetInUseCacheEntriesForTesting());
 }
 
-TEST_P(GpuImageDecodeCacheTest, EvictDueToCachedItemsLimit) {
-  auto cache = CreateCache();
-  bool is_decomposable = true;
-  SkFilterQuality quality = kHigh_SkFilterQuality;
-
-  // Set the THROTTLED state, which limits our cache to 100 entries.
-  cache->OnMemoryStateChange(base::MemoryState::THROTTLED);
-
-  // Create and unlock 200 images. We should end up with 100 cached.
-  for (int i = 0; i < 200; ++i) {
-    PaintImage image = CreatePaintImageInternal(gfx::Size(10, 10));
-    DrawImage draw_image(
-        image, SkIRect::MakeWH(image.width(), image.height()), quality,
-        CreateMatrix(SkSize::Make(1.0f, 1.0f), is_decomposable),
-        PaintImage::kDefaultFrameIndex, DefaultColorSpace());
-
-    ImageDecodeCache::TaskResult result = cache->GetTaskForImageAndRef(
-        draw_image, ImageDecodeCache::TracingInfo());
-    EXPECT_TRUE(result.need_unref);
-    if (result.task) {
-      TestTileTaskRunner::ProcessTask(result.task->dependencies()[0].get());
-      TestTileTaskRunner::ProcessTask(result.task.get());
-    }
-
-    // Must hold context lock before calling GetDecodedImageForDraw /
-    // DrawWithImageFinished.
-    viz::ContextProvider::ScopedContextLock context_lock(context_provider());
-    DecodedDrawImage decoded_draw_image =
-        EnsureImageBacked(cache->GetDecodedImageForDraw(draw_image));
-    EXPECT_TRUE(decoded_draw_image.image());
-    EXPECT_TRUE(decoded_draw_image.image()->isTextureBacked());
-    EXPECT_FALSE(cache->DiscardableIsLockedForTesting(draw_image));
-
-    cache->DrawWithImageFinished(draw_image, decoded_draw_image);
-    cache->UnrefImage(draw_image);
-  }
-
-  EXPECT_EQ(cache->GetNumCacheEntriesForTesting(), 100u);
-}
-
 TEST_P(GpuImageDecodeCacheTest, AlreadyBudgetedImagesAreNotAtRaster) {
   auto cache = CreateCache();
   bool is_decomposable = true;
@@ -2462,7 +2362,8 @@
 
   // We have a single tracked entry, that gets cleared once we purge the cache.
   EXPECT_EQ(cache->paint_image_entries_count_for_testing(), 1u);
-  cache->OnPurgeMemory();
+  cache->OnMemoryPressure(
+      base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
   EXPECT_EQ(cache->paint_image_entries_count_for_testing(), 0u);
 }
 
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index bea10f0..d75e6e2 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -8,9 +8,9 @@
 
 #include "base/format_macros.h"
 #include "base/macros.h"
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/strings/stringprintf.h"
+#include "base/threading/thread_task_runner_handle.h"
 #include "base/trace_event/memory_dump_manager.h"
 #include "cc/base/devtools_instrumentation.h"
 #include "cc/base/histograms.h"
@@ -30,8 +30,6 @@
 // Depending on the memory state of the system, we limit the amount of items
 // differently.
 const size_t kNormalMaxItemsInCacheForSoftware = 1000;
-const size_t kThrottledMaxItemsInCacheForSoftware = 100;
-const size_t kSuspendedMaxItemsInCacheForSoftware = 0;
 
 class AutoRemoveKeyFromTaskMap {
  public:
@@ -155,8 +153,6 @@
         this, "cc::SoftwareImageDecodeCache",
         base::ThreadTaskRunnerHandle::Get());
   }
-  // Register this component with base::MemoryCoordinatorClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
   memory_pressure_listener_.reset(new base::MemoryPressureListener(
       base::BindRepeating(&SoftwareImageDecodeCache::OnMemoryPressure,
                           base::Unretained(this))));
@@ -166,9 +162,6 @@
   // It is safe to unregister, even if we didn't register in the constructor.
   base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
       this);
-  // Unregister this component with memory_coordinator::ClientRegistry.
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
-
   // TODO(vmpstr): If we don't have a client name, it may cause problems in
   // unittests, since most tests don't set the name but some do. The UMA system
   // expects the name to be always the same. This assertion is violated in the
@@ -684,31 +677,6 @@
   return true;
 }
 
-void SoftwareImageDecodeCache::OnMemoryStateChange(base::MemoryState state) {
-  {
-    base::AutoLock hold(lock_);
-    switch (state) {
-      case base::MemoryState::NORMAL:
-        max_items_in_cache_ = kNormalMaxItemsInCacheForSoftware;
-        break;
-      case base::MemoryState::THROTTLED:
-        max_items_in_cache_ = kThrottledMaxItemsInCacheForSoftware;
-        break;
-      case base::MemoryState::SUSPENDED:
-        max_items_in_cache_ = kSuspendedMaxItemsInCacheForSoftware;
-        break;
-      case base::MemoryState::UNKNOWN:
-        NOTREACHED();
-        return;
-    }
-  }
-}
-
-void SoftwareImageDecodeCache::OnPurgeMemory() {
-  base::AutoLock lock(lock_);
-  ReduceCacheUsageUntilWithinLimit(0);
-}
-
 void SoftwareImageDecodeCache::OnMemoryPressure(
     base::MemoryPressureListener::MemoryPressureLevel level) {
   base::AutoLock lock(lock_);
diff --git a/cc/tiles/software_image_decode_cache.h b/cc/tiles/software_image_decode_cache.h
index 84e6c69..30040d1 100644
--- a/cc/tiles/software_image_decode_cache.h
+++ b/cc/tiles/software_image_decode_cache.h
@@ -11,7 +11,6 @@
 #include <unordered_map>
 
 #include "base/containers/mru_cache.h"
-#include "base/memory/memory_coordinator_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/memory/ref_counted.h"
 #include "base/numerics/safe_math.h"
@@ -25,8 +24,7 @@
 
 class CC_EXPORT SoftwareImageDecodeCache
     : public ImageDecodeCache,
-      public base::trace_event::MemoryDumpProvider,
-      public base::MemoryCoordinatorClient {
+      public base::trace_event::MemoryDumpProvider {
  public:
   using Utils = SoftwareImageDecodeCacheUtils;
   using CacheKey = Utils::CacheKey;
@@ -114,12 +112,6 @@
   // reduced within the given limit.
   void ReduceCacheUsageUntilWithinLimit(size_t limit);
 
-  // Overriden from base::MemoryCoordinatorClient.
-  void OnMemoryStateChange(base::MemoryState state) override;
-  void OnPurgeMemory() override;
-
-  // TODO(gyuyoung): OnMemoryPressure is deprecated. So this should be removed
-  // when the memory coordinator is enabled by default.
   void OnMemoryPressure(
       base::MemoryPressureListener::MemoryPressureLevel level);
 
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 9952d74..2970979 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -20,7 +20,6 @@
 #include "base/containers/adapters.h"
 #include "base/containers/flat_map.h"
 #include "base/json/json_writer.h"
-#include "base/memory/memory_coordinator_client_registry.h"
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram.h"
 #include "base/numerics/safe_conversions.h"
@@ -353,7 +352,6 @@
       this, settings.top_controls_show_threshold,
       settings.top_controls_hide_threshold);
 
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Register(this);
   memory_pressure_listener_.reset(
       new base::MemoryPressureListener(base::BindRepeating(
           &LayerTreeHostImpl::OnMemoryPressure, base::Unretained(this))));
@@ -393,8 +391,6 @@
   pending_tree_ = nullptr;
   active_tree_ = nullptr;
 
-  base::MemoryCoordinatorClientRegistry::GetInstance()->Unregister(this);
-
   // All resources should already be removed, so lose anything still exported.
   resource_provider_.ShutdownAndReleaseAllResources();
 
@@ -2935,7 +2931,15 @@
   tile_manager_.DidActivateSyncTree();
 }
 
-void LayerTreeHostImpl::OnPurgeMemory() {
+void LayerTreeHostImpl::OnMemoryPressure(
+    base::MemoryPressureListener::MemoryPressureLevel level) {
+  // Only work for low-end devices for now.
+  if (!base::SysInfo::IsLowEndDevice())
+    return;
+
+  if (level != base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL)
+    return;
+
   ReleaseTileResources();
   active_tree_->OnPurgeMemory();
   if (pending_tree_)
@@ -2949,26 +2953,10 @@
     image_decode_cache_->SetShouldAggressivelyFreeResources(false);
   }
   if (resource_pool_)
-    resource_pool_->OnPurgeMemory();
+    resource_pool_->OnMemoryPressure(level);
   tile_manager_.decoded_image_tracker().UnlockAllImages();
 }
 
-void LayerTreeHostImpl::OnMemoryPressure(
-    base::MemoryPressureListener::MemoryPressureLevel level) {
-  // Only work for low-end devices for now.
-  if (!base::SysInfo::IsLowEndDevice())
-    return;
-
-  switch (level) {
-    case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
-    case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE:
-      break;
-    case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL:
-      OnPurgeMemory();
-      break;
-  }
-}
-
 void LayerTreeHostImpl::SetVisible(bool visible) {
   DCHECK(task_runner_provider_->IsImplThread());
 
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index c384550..a215f1c 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -18,7 +18,6 @@
 #include "base/containers/circular_deque.h"
 #include "base/containers/flat_map.h"
 #include "base/macros.h"
-#include "base/memory/memory_coordinator_client.h"
 #include "base/memory/memory_pressure_listener.h"
 #include "base/sequenced_task_runner.h"
 #include "base/time/time.h"
@@ -171,8 +170,7 @@
       public ScrollbarAnimationControllerClient,
       public VideoFrameControllerClient,
       public MutatorHostClient,
-      public base::SupportsWeakPtr<LayerTreeHostImpl>,
-      public base::MemoryCoordinatorClient {
+      public base::SupportsWeakPtr<LayerTreeHostImpl> {
  public:
   // This structure is used to build all the state required for producing a
   // single CompositorFrame. The |render_passes| list becomes the set of
@@ -882,11 +880,6 @@
   // active tree.
   void ActivateStateForImages();
 
-  // Overriden from base::MemoryCoordinatorClient.
-  void OnPurgeMemory() override;
-
-  // TODO(gyuyoung): OnMemoryPressure is deprecated. So this should be removed
-  // when the memory coordinator is enabled by default.
   void OnMemoryPressure(
       base::MemoryPressureListener::MemoryPressureLevel level);
 
diff --git a/chrome/VERSION b/chrome/VERSION
index 943845a..239db0f 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=71
 MINOR=0
-BUILD=3571
+BUILD=3572
 PATCH=0
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
index 37e3130..98daf1f 100644
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -794,6 +794,16 @@
             android:exported="false">
         </service>
 
+        <!-- Components for Trusted Web Activities -->
+        <receiver android:name="org.chromium.chrome.browser.browserservices.ClearDataBroadcastReceiver"
+            android:exported="true">
+            <intent-filter>
+                <data android:scheme="package" />
+                <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" />
+                <action android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
+            </intent-filter>
+        </receiver>
+
         <!-- Service for decoding images in a sandboxed process. -->
         <service
             android:description="@string/decoder_description"
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 56176f9..cd4950073 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/SwipeRefreshHandler.java
@@ -5,6 +5,7 @@
 package org.chromium.chrome.browser;
 
 import android.content.Context;
+import android.support.annotation.Nullable;
 import android.view.ViewGroup;
 import android.view.ViewGroup.LayoutParams;
 
@@ -14,8 +15,10 @@
 import org.chromium.chrome.browser.feature_engagement.TrackerFactory;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tab.TabWebContentsUserData;
 import org.chromium.components.feature_engagement.EventConstants;
 import org.chromium.components.feature_engagement.Tracker;
+import org.chromium.content_public.browser.WebContents;
 import org.chromium.third_party.android.swiperefresh.SwipeRefreshLayout;
 import org.chromium.ui.OverscrollRefreshHandler;
 
@@ -23,7 +26,10 @@
  * An overscroll handler implemented in terms a modified version of the Android
  * compat library's SwipeRefreshLayout effect.
  */
-public class SwipeRefreshHandler implements OverscrollRefreshHandler {
+public class SwipeRefreshHandler
+        extends TabWebContentsUserData implements OverscrollRefreshHandler {
+    private static final Class<SwipeRefreshHandler> USER_DATA_KEY = SwipeRefreshHandler.class;
+
     // Synthetic delay between the {@link #didStopRefreshing()} signal and the
     // call to stop the refresh animation.
     private static final int STOP_REFRESH_ANIMATION_DELAY_MS = 500;
@@ -54,16 +60,30 @@
     // Accessibility utterance used to indicate refresh activation.
     private String mAccessibilityRefreshString;
 
+    public static SwipeRefreshHandler from(Tab tab) {
+        SwipeRefreshHandler handler = get(tab);
+        if (handler == null) {
+            handler =
+                    tab.getUserDataHost().setUserData(USER_DATA_KEY, new SwipeRefreshHandler(tab));
+        }
+        return handler;
+    }
+
+    @Nullable
+    public static SwipeRefreshHandler get(Tab tab) {
+        return tab.getUserDataHost().getUserData(USER_DATA_KEY);
+    }
+
     /**
      * Simple constructor to use when creating an OverscrollRefresh instance from code.
      *
-     * @param context The associated context.
      * @param tab The Tab where the swipe occurs.
      */
-    public SwipeRefreshHandler(final Context context, Tab tab) {
+    private SwipeRefreshHandler(Tab tab) {
+        super(tab);
         mTab = tab;
-        mContainerView = mTab.getContentView();
 
+        final Context context = tab.getThemedApplicationContext();
         mSwipeRefreshLayout = new SwipeRefreshLayout(context);
         mSwipeRefreshLayout.setLayoutParams(
                 new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
@@ -72,7 +92,6 @@
         mSwipeRefreshLayout.setSize(SwipeRefreshLayout.DEFAULT);
         mSwipeRefreshLayout.setEnabled(false);
 
-        setEnabled(true);
         mSwipeRefreshLayout.setOnRefreshListener(() -> {
             cancelStopRefreshingRunnable();
             mSwipeRefreshLayout.postDelayed(
@@ -93,16 +112,27 @@
             };
             mSwipeRefreshLayout.post(mDetachLayoutRunnable);
         });
-        mTab.getWebContents().setOverscrollRefreshHandler(this);
     }
 
-    /**
-     * Destroys and cleans up itself.
-     */
-    public void destroy() {
-        setEnabled(false);
+    @Override
+    public void initWebContents(WebContents webContents) {
+        webContents.setOverscrollRefreshHandler(this);
+        mContainerView = mTab.getContentView();
+        setEnabled(true);
+    }
+
+    @Override
+    public void cleanupWebContents(WebContents webContents) {
+        detachSwipeRefreshLayoutIfNecessary();
         cancelStopRefreshingRunnable();
+        mContainerView = null;
+        setEnabled(false);
+    }
+
+    @Override
+    public void destroyInternal() {
         mSwipeRefreshLayout.setOnRefreshListener(null);
+        mSwipeRefreshLayout.setOnResetListener(null);
     }
 
     /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClearDataBroadcastReceiver.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClearDataBroadcastReceiver.java
new file mode 100644
index 0000000..c992311a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClearDataBroadcastReceiver.java
@@ -0,0 +1,68 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.browserservices;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+
+import org.chromium.base.Log;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * A {@link android.content.BroadcastReceiver} that detects when a Trusted Web Activity client app
+ * has been uninstalled or has had its data cleared. When this happens we clear Chrome's data
+ * corresponding to that app.
+ *
+ * Trusted Web Activities are registered to an origin (eg https://www.example.com), however because
+ * cookies can be scoped more loosely, at TLD+1 level (eg *.example.com) [1], we need to clear data
+ * at that level. This unfortunately can lead to too much data getting cleared - for example if the
+ * https://peconn.github.io TWA is cleared, you'll loose cookies for https://beverloo.github.io too.
+ *
+ * We find this acceptable for two reasons:
+ * - The alternative is *not* clearing some related data - eg a TWA linked to
+ *   https://peconn.github.io sets a cookie with Domain=github.io. The TWA is uninstalled and
+ *   reinstalled and it can access the cookie it stored before.
+ * - We ask the user before clearing the data and while doing so display the scope of data we're
+ *   going to wipe.
+ *
+ * [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Scope_of_cookies
+ */
+public class ClearDataBroadcastReceiver extends BroadcastReceiver {
+    private static final String TAG = "ClearDataBroadRec";
+    private static final Set<String> BROADCASTS = new HashSet<>(Arrays.asList(
+            Intent.ACTION_PACKAGE_DATA_CLEARED,
+            Intent.ACTION_PACKAGE_FULLY_REMOVED
+    ));
+
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        if (intent == null) return;
+        // Since we only care about ACTION_PACKAGE_DATA_CLEARED and and ACTION_PACKAGE_FULLY_REMOVED
+        // which are protected Intents, we can assume that anything that gets past here will be a
+        // legitimate Intent sent by the system.
+        if (!BROADCASTS.contains(intent.getAction())) return;
+
+        int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
+        if (uid == -1) return;
+
+        // TODO(peconn): Add UMA to record time taken.
+        ClientAppDataRegister register = new ClientAppDataRegister();
+
+        if (!register.chromeHoldsDataForPackage(uid)) return;
+
+        String appName = register.getAppNameForRegisteredUid(uid);
+        Set<String> origins = register.getOriginsForRegisteredUid(uid);
+
+        for (String origin : origins) {
+            String action = Intent.ACTION_PACKAGE_FULLY_REMOVED.equals(intent.getAction())
+                    ? "been uninstalled" : "had its data cleared";
+            Log.d(TAG, "%s has just %s, it was linked to %s.", appName, action, origin);
+        }
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorder.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorder.java
new file mode 100644
index 0000000..2aaf41d
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorder.java
@@ -0,0 +1,75 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.browserservices;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.text.TextUtils;
+
+import org.chromium.base.Log;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Takes care of recording that Chrome contains data for the client app in the
+ * {@link ClientAppDataRegister}. It performs two main duties:
+ * - Holds a cache to deduplicate requests (for performance not correctness).
+ * - Transforming the package name into a uid and app label.
+ *
+ * Lifecycle: There should be a 1-1 relationship between this class and
+ * {@link TrustedWebActivityUi}. Having more instances won't effect correctness, but will limit the
+ * performance benefits of the cache.
+ * Thread safety: All methods on this class should be called from the same thread.
+ */
+public class ClientAppDataRecorder {
+    private static final String TAG = "TWAClientAppData";
+    private final PackageManager mPackageManager;
+
+    /** Underlying data register. */
+    private final ClientAppDataRegister mClientAppDataRegister;
+
+    /**
+     * Cache so we don't send the same request multiple times. {@link #register} is called on each
+     * navigation and each call to {@link ClientAppDataRegister#registerPackageForOrigin} modifies
+     * SharedPreferences, so we need to cut down on the number of calls.
+     */
+    private final Set<String> mCache = new HashSet<>();
+
+    public ClientAppDataRecorder(PackageManager packageManager,
+            ClientAppDataRegister clientAppDataRegister) {
+        mPackageManager = packageManager;
+        mClientAppDataRegister = clientAppDataRegister;
+    }
+
+    /**
+     * Calls {@link ClientAppDataRegister#registerPackageForOrigin}, looking up the uid and
+     * app name for the |packageName| and deduplicating multiple requests with the same parameters.
+     */
+    /* package */ void register(String packageName, Origin origin) {
+        if (mCache.contains(combine(packageName, origin))) return;
+        mCache.add(combine(packageName, origin));
+;
+        try {
+            ApplicationInfo ai = mPackageManager.getApplicationInfo(packageName, 0);
+            String appLabel = mPackageManager.getApplicationLabel(ai).toString();
+
+            if (TextUtils.isEmpty(appLabel) || ai.uid == -1) {
+                Log.e(TAG, "Invalid details for client package %s: %d, %d",
+                        packageName, ai.uid, appLabel);
+                return;
+            }
+
+            Log.d(TAG, "Registering %d (%s) for %s", ai.uid, appLabel, origin);
+            mClientAppDataRegister.registerPackageForOrigin(ai.uid, appLabel, origin);
+        } catch (PackageManager.NameNotFoundException e) {
+            Log.e(TAG, "Couldn't find name for client package %s", packageName);
+        }
+    }
+
+    private String combine(String packageName, Origin origin) {
+        return packageName + ":" + origin.toString();
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegister.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegister.java
new file mode 100644
index 0000000..db6ed0a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegister.java
@@ -0,0 +1,109 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.browserservices;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import android.support.annotation.Nullable;
+
+import org.chromium.base.ContextUtils;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Records whether Chrome has data relevant to a Trusted Web Activity Client.
+ *
+ * Lifecycle: Most of the data used by this class modifies the underlying {@link SharedPreferences}
+ * (which are global and preserved across Chrome restarts).
+ * Thread safety: This object should only be accessed on a single thread at any time.
+ */
+public class ClientAppDataRegister {
+    private static final String PREFS_FILE = "trusted_web_activity_client_apps";
+    private static final String UIDS_KEY = "trusted_web_activity_uids";
+
+    /* Preferences unique to this class. */
+    private final SharedPreferences mPreferences;
+
+    /** Creates a ClientAppDataRegister. */
+    public ClientAppDataRegister() {
+        mPreferences = ContextUtils.getApplicationContext()
+                .getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE);
+    }
+
+    /**
+     * Saves to Preferences that the app with |uid| has the application name |appName| and when it
+     * is removed or cleared, we should consider doing the same with Chrome data relevant to
+     * |origin|.
+     */
+    /* package */ void registerPackageForOrigin(int uid, String appName, Origin origin) {
+        // Store the UID in the main Chrome Preferences.
+        Set<String> uids = getUids();
+        uids.add(String.valueOf(uid));
+        setUids(uids);
+
+        // Store the package name for the UID.
+        mPreferences.edit().putString(createAppNameKey(uid), appName).apply();
+
+        // Store the origin for the UID.
+        String key = createOriginsKey(uid);
+        Set<String> origins = new HashSet<>(mPreferences.getStringSet(key, Collections.emptySet()));
+        origins.add(origin.toString());
+        mPreferences.edit().putStringSet(key, origins).apply();
+    }
+
+    private void setUids(Set<String> uids) {
+        mPreferences.edit().putStringSet(UIDS_KEY, uids).apply();
+    }
+
+    private Set<String> getUids() {
+        return new HashSet<>(mPreferences.getStringSet(UIDS_KEY, Collections.emptySet()));
+    }
+
+    /* package */ void removePackage(int uid) {
+        Set<String> uids = getUids();
+        uids.remove(String.valueOf(uid));
+        setUids(uids);
+
+        mPreferences.edit().putString(createAppNameKey(uid), null).apply();
+        mPreferences.edit().putStringSet(createOriginsKey(uid), null).apply();
+    }
+
+    /* package */ boolean chromeHoldsDataForPackage(int uid) {
+        return getUids().contains(String.valueOf(uid));
+    }
+
+    /**
+     * Gets the package name that was previously registered for the uid.
+     */
+    /* package */ @Nullable String getAppNameForRegisteredUid(int uid) {
+        return mPreferences.getString(createAppNameKey(uid), null);
+    }
+
+    /**
+     * Gets all the origins that have been registered for the uid.
+     * Do not modify the set returned by this method.
+     */
+    /* package */ Set<String> getOriginsForRegisteredUid(int uid) {
+        return mPreferences.getStringSet(createOriginsKey(uid), Collections.emptySet());
+    }
+
+    /**
+     * Creates the Preferences key to access the app name.
+     * If you modify this you'll have to migrate old data.
+     */
+    private static String createAppNameKey(int uid) {
+        return uid + ".appName";
+    }
+
+    /**
+     * Creates the Preferences key to access the set of origins for an app.
+     * If you modify this you'll have to migrate old data.
+     */
+    private static String createOriginsKey(int uid) {
+        return uid + ".origins";
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
index 0952ef4..b4d1ce66 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityUi.java
@@ -30,6 +30,7 @@
     private final TrustedWebActivityDisclosure mDisclosure;
     private final TrustedWebActivityOpenTimeRecorder mOpenTimeRecorder =
             new TrustedWebActivityOpenTimeRecorder();
+    private final ClientAppDataRecorder mClientAppDataRecorder;
 
     private boolean mInTrustedWebActivity = true;
 
@@ -88,16 +89,20 @@
 
             // This doesn't perform a network request or attempt new verification - it checks to
             // see if a verification already exists for the given inputs.
-            setTrustedWebActivityMode(
-                    OriginVerifier.isValidOrigin(packageName, new Origin(url), RELATIONSHIP), tab);
+            Origin origin = new Origin(url);
+            boolean verified =
+                    OriginVerifier.isValidOrigin(packageName, origin, RELATIONSHIP);
+            if (verified) registerClientAppData(packageName, origin);
+            setTrustedWebActivityMode(verified, tab);
         }
     };
 
 
     /** Creates a TrustedWebActivityUi, providing a delegate from the embedder. */
     public TrustedWebActivityUi(TrustedWebActivityUiDelegate delegate,
-            TrustedWebActivityDisclosure disclosure) {
+            TrustedWebActivityDisclosure disclosure, ClientAppDataRecorder clientAppDataRecorder) {
         mDelegate = delegate;
+        mClientAppDataRecorder = clientAppDataRecorder;
         mDisclosure = disclosure;
     }
 
@@ -146,6 +151,7 @@
             if (!origin.equals(new Origin(tab.getUrl()))) return;
 
             BrowserServicesMetrics.recordTwaOpened();
+            if (verified) registerClientAppData(packageName, origin);
             setTrustedWebActivityMode(verified, tab);
         }, packageName, RELATIONSHIP).start(origin);
     }
@@ -173,6 +179,7 @@
         if (enabled) {
             mDisclosure.showSnackbarIfNeeded(mDelegate.getSnackbarManager(),
                     mDelegate.getClientPackageName());
+
         } else {
             // Force showing the controls for a bit when leaving Trusted Web Activity mode.
             mDelegate.getBrowserStateBrowserControlsVisibilityDelegate().showControlsTransient();
@@ -183,4 +190,26 @@
         tab.updateFullscreenEnabledState();
     }
 
+    /**
+     * Register that we have Chrome data relevant to the Client app.
+     *
+     * We do this here, when the Trusted Web Activity UI is shown instead of in OriginVerifier when
+     * verification completes because when an origin is being verified, we don't know whether it is
+     * for the purposes of Trusted Web Activities or for Post Message (where this behaviour is not
+     * required).
+     *
+     * Additionally we do it on every page navigation because an app can be verified for more than
+     * one Origin, eg:
+     * 1) App verifies with https://www.myfirsttwa.com/.
+     * 2) App verifies with https://www.mysecondtwa.com/.
+     * 3) App launches a TWA to https://www.myfirsttwa.com/.
+     * 4) App navigates to https://www.mysecondtwa.com/.
+     *
+     * At step 2, we don't know why the app is verifying with that origin (it could be for TWAs or
+     * for PostMessage). Only at step 4 do we know that Chrome should associate the browsing data
+     * for that origin with that app.
+     */
+    private void registerClientAppData(String packageName, Origin origin) {
+        mClientAppDataRecorder.register(packageName, origin);
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 6e62ac0..f17e260d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -65,6 +65,8 @@
 import org.chromium.chrome.browser.autofill_assistant.AutofillAssistantUiController;
 import org.chromium.chrome.browser.browserservices.BrowserSessionContentHandler;
 import org.chromium.chrome.browser.browserservices.BrowserSessionContentUtils;
+import org.chromium.chrome.browser.browserservices.ClientAppDataRecorder;
+import org.chromium.chrome.browser.browserservices.ClientAppDataRegister;
 import org.chromium.chrome.browser.browserservices.TrustedWebActivityUi;
 import org.chromium.chrome.browser.compositor.layouts.LayoutManager;
 import org.chromium.chrome.browser.contextual_suggestions.ContextualSuggestionsModule;
@@ -326,7 +328,8 @@
                     public SnackbarManager getSnackbarManager() {
                         return CustomTabActivity.this.getSnackbarManager();
                     }
-                }, getComponent().getTrustedWebActivityDisclosure());
+                }, getComponent().getTrustedWebActivityDisclosure(),
+                new ClientAppDataRecorder(getPackageManager(), new ClientAppDataRegister()));
     }
 
     /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderFactory.java
index 8ac5d66..ca7be5a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationBuilderFactory.java
@@ -19,7 +19,9 @@
      * Creates either a Notification.Builder or NotificationCompat.Builder under the hood, wrapped
      * in our own common interface, and ensures the notification channel has been initialized.
      *
-     * @param preferCompat true if a NotificationCompat.Builder is preferred.
+     * @param preferCompat true if a NotificationCompat.Builder is preferred. You should pick true
+     *                     unless you know NotificationCompat.Builder doesn't support a feature you
+     *                     require.
      * @param channelId The ID of the channel the notification should be posted to. This channel
      *                  will be created if it did not already exist. Must be a known channel within
      *                  {@link ChannelsInitializer#ensureInitialized(String)}.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index e12e939..d3b119b9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -201,9 +201,6 @@
     /** The current native page (e.g. chrome-native://newtab), or {@code null} if there is none. */
     private NativePage mNativePage;
 
-    /** Controls overscroll pull-to-refresh behavior for this tab. */
-    private SwipeRefreshHandler mSwipeRefreshHandler;
-
     /** {@link WebContents} showing the current page, or {@code null} if the tab is frozen. */
     private WebContents mWebContents;
 
@@ -1781,7 +1778,7 @@
                     new TabContextMenuPopulator(
                             mDelegateFactory.createContextMenuPopulator(this), this));
 
-            TabGestureStateListener.create(this, this::getFullscreenManager);
+            TabGestureStateListener.from(this, this::getFullscreenManager);
 
             // The InfoBarContainer needs to be created after the ContentView has been natively
             // initialized.
@@ -1789,7 +1786,7 @@
             // valid infobar container, no need to recreate one.
             InfoBarContainer.from(this);
 
-            mSwipeRefreshHandler = new SwipeRefreshHandler(mThemedApplicationContext, this);
+            SwipeRefreshHandler.from(this);
 
             updateThemeColorIfNeeded(false);
             notifyContentChanged();
@@ -2278,11 +2275,6 @@
 
         mContentView.setOnHierarchyChangeListener(null);
         mContentView.setOnSystemUiVisibilityChangeListener(null);
-
-        if (mSwipeRefreshHandler != null) {
-            mSwipeRefreshHandler.destroy();
-            mSwipeRefreshHandler = null;
-        }
         mContentView.removeOnAttachStateChangeListener(mAttachStateChangeListener);
         mContentView = null;
         updateInteractableState();
@@ -3077,27 +3069,6 @@
     }
 
     /**
-     * Reset swipe-to-refresh handler.
-     */
-    void resetSwipeRefreshHandler() {
-        // When the dialog is visible, keeping the refresh animation active
-        // in the background is distracting and unnecessary (and likely to
-        // jank when the dialog is shown).
-        if (mSwipeRefreshHandler != null) {
-            mSwipeRefreshHandler.reset();
-        }
-    }
-
-    /**
-     * Stop swipe-to-refresh animation.
-     */
-    void stopSwipeRefreshHandler() {
-        if (mSwipeRefreshHandler != null) {
-            mSwipeRefreshHandler.didStopRefreshing();
-        }
-    }
-
-    /**
      * Set whether closing this Tab should return the user to the app that spawned Chrome.
      */
     public void setIsAllowedToReturnToExternalApp(boolean state) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabGestureStateListener.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabGestureStateListener.java
index 063a123f..f6485c6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabGestureStateListener.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabGestureStateListener.java
@@ -26,9 +26,13 @@
      * Creates TabGestureStateListener and lets the WebContentsUserData of the Tab manage it.
      * @param tab Tab instance that the active WebContents instance gets loaded in.
      */
-    public static void create(Tab tab, Supplier<FullscreenManager> fullscreen) {
-        tab.getUserDataHost().setUserData(
-                USER_DATA_KEY, new TabGestureStateListener(tab, fullscreen));
+    public static TabGestureStateListener from(Tab tab, Supplier<FullscreenManager> fullscreen) {
+        TabGestureStateListener listener = tab.getUserDataHost().getUserData(USER_DATA_KEY);
+        if (listener == null) {
+            tab.getUserDataHost().setUserData(
+                    USER_DATA_KEY, new TabGestureStateListener(tab, fullscreen));
+        }
+        return listener;
     }
 
     private TabGestureStateListener(Tab tab, Supplier<FullscreenManager> fullscreenManager) {
@@ -79,9 +83,4 @@
         if (manager != null) manager.removeListener(mGestureListener);
         mGestureListener = null;
     }
-
-    @Override
-    public void destroy() {
-        cleanupWebContents(getWebContents());
-    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
index e524a43..dfe6c2a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
@@ -29,6 +29,7 @@
 import org.chromium.chrome.browser.ChromeActivity;
 import org.chromium.chrome.browser.FullscreenActivity;
 import org.chromium.chrome.browser.RepostFormWarningDialog;
+import org.chromium.chrome.browser.SwipeRefreshHandler;
 import org.chromium.chrome.browser.document.DocumentUtils;
 import org.chromium.chrome.browser.document.DocumentWebContentsDelegate;
 import org.chromium.chrome.browser.findinpage.FindMatchRectsDetails;
@@ -207,7 +208,12 @@
 
     @Override
     public void showRepostFormWarningDialog() {
-        mTab.resetSwipeRefreshHandler();
+        // When the dialog is visible, keeping the refresh animation active
+        // in the background is distracting and unnecessary (and likely to
+        // jank when the dialog is shown).
+        SwipeRefreshHandler handler = SwipeRefreshHandler.get(mTab);
+        if (handler != null) handler.reset();
+
         if (mTab.getActivity() == null) return;
         RepostFormWarningDialog warningDialog = new RepostFormWarningDialog(mTab);
         warningDialog.show(mTab.getActivity().getFragmentManager(), null);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
index 6bef224..76ea3a5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsObserver.java
@@ -14,6 +14,7 @@
 import org.chromium.base.ObserverList.RewindableIterator;
 import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.chrome.browser.AppHooks;
+import org.chromium.chrome.browser.SwipeRefreshHandler;
 import org.chromium.chrome.browser.display_cutout.DisplayCutoutController;
 import org.chromium.chrome.browser.fullscreen.FullscreenManager;
 import org.chromium.chrome.browser.infobar.InfoBarContainer;
@@ -227,7 +228,9 @@
         }
 
         if (isInMainFrame) {
-            mTab.stopSwipeRefreshHandler();
+            // Stop swipe-to-refresh animation.
+            SwipeRefreshHandler handler = SwipeRefreshHandler.get(mTab);
+            if (handler != null) handler.didStopRefreshing();
         }
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsUserData.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsUserData.java
index adddb39..44cbd37 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsUserData.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsUserData.java
@@ -31,11 +31,18 @@
         });
     }
 
-    protected WebContents getWebContents() {
-        return mWebContents;
+    @Override
+    public final void destroy() {
+        cleanupWebContents(mWebContents);
+        destroyInternal();
     }
 
     /**
+     * Performs additional tasks upon destruction.
+     */
+    protected void destroyInternal() {}
+
+    /**
      * Called when {@link WebContents} becomes active (swapped in) for a {@link Tab}.
      * @param webContents WebContents object that just became active.
      */
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 5eff3f3..8359743 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -160,6 +160,9 @@
   "java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentHandler.java",
   "java/src/org/chromium/chrome/browser/browserservices/BrowserSessionContentUtils.java",
   "java/src/org/chromium/chrome/browser/browserservices/BrowserSessionDataProvider.java",
+  "java/src/org/chromium/chrome/browser/browserservices/ClearDataBroadcastReceiver.java",
+  "java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorder.java",
+  "java/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegister.java",
   "java/src/org/chromium/chrome/browser/browserservices/Origin.java",
   "java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java",
   "java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java",
@@ -2197,6 +2200,8 @@
   "junit/src/org/chromium/chrome/browser/autofill/keyboard_accessory/PasswordAccessorySheetControllerTest.java",
   "junit/src/org/chromium/chrome/browser/background_task_scheduler/NativeBackgroundTaskTest.java",
   "junit/src/org/chromium/chrome/browser/browseractions/BrowserActionsIntentTest.java",
+  "junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorderTest.java",
+  "junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegisterTest.java",
   "junit/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityDisclosureTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/animation/CompositorAnimatorTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java",
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorderTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorderTest.java
new file mode 100644
index 0000000..655d31c
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRecorderTest.java
@@ -0,0 +1,98 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.browserservices;
+
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+
+import org.chromium.base.test.BaseRobolectricTestRunner;
+import org.chromium.base.test.util.Feature;
+
+/**
+ * Tests for {@link ClientAppDataRecorder}.
+ */
+@RunWith(BaseRobolectricTestRunner.class)
+@Config(manifest = Config.NONE)
+public class ClientAppDataRecorderTest {
+    private static final int APP_UID = 123;
+    private static final String APP_NAME = "Example App";
+    private static final String APP_PACKAGE = "com.example.app";
+    private static final String MISSING_PACKAGE = "com.missing.app";
+    private static final Origin ORIGIN = new Origin("https://www.example.com/");
+    private static final Origin OTHER_ORIGIN = new Origin("https://www.example.com/");
+
+    @Mock public ClientAppDataRegister mRegister;
+    @Mock public PackageManager mPackageManager;
+
+    private ClientAppDataRecorder mRecorder;
+
+    @Before
+    public void setUp() throws PackageManager.NameNotFoundException {
+        MockitoAnnotations.initMocks(this);
+
+        ApplicationInfo appInfo = new ApplicationInfo();
+        appInfo.uid = APP_UID;
+
+        // Even though we're not actually calling getApplicationInfo here, the code needs to deal
+        // with a checked exception.
+        doReturn(appInfo).when(mPackageManager).getApplicationInfo(eq(APP_PACKAGE), anyInt());
+        doReturn(APP_NAME).when(mPackageManager).getApplicationLabel(appInfo);
+
+        doThrow(new PackageManager.NameNotFoundException())
+                .when(mPackageManager)
+                .getApplicationInfo(eq(MISSING_PACKAGE), anyInt());
+
+        mRecorder = new ClientAppDataRecorder(mPackageManager, mRegister);
+    }
+
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testRegister() {
+        mRecorder.register(APP_PACKAGE, ORIGIN);
+        verify(mRegister).registerPackageForOrigin(APP_UID, APP_NAME, ORIGIN);
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testDeduplicate() {
+        mRecorder.register(APP_PACKAGE, ORIGIN);
+        mRecorder.register(APP_PACKAGE, ORIGIN);
+        verify(mRegister).registerPackageForOrigin(APP_UID, APP_NAME, ORIGIN);
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testDifferentOrigins() {
+        mRecorder.register(APP_PACKAGE, ORIGIN);
+        mRecorder.register(APP_PACKAGE, OTHER_ORIGIN);
+        verify(mRegister).registerPackageForOrigin(APP_UID, APP_NAME, ORIGIN);
+        verify(mRegister).registerPackageForOrigin(APP_UID, APP_NAME, OTHER_ORIGIN);
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testMisingPackage() {
+        mRecorder.register(MISSING_PACKAGE, ORIGIN);
+        // Implicitly checking we don't throw.
+        verify(mRegister, times(0)).registerPackageForOrigin(anyInt(), anyString(), any());
+    }
+}
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegisterTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegisterTest.java
new file mode 100644
index 0000000..9bb7e087
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/browserservices/ClientAppDataRegisterTest.java
@@ -0,0 +1,77 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.browserservices;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.robolectric.annotation.Config;
+
+import org.chromium.base.test.BaseRobolectricTestRunner;
+import org.chromium.base.test.util.Feature;
+
+import java.util.Set;
+
+/**
+ * Tests for {@link ClientAppDataRegister}.
+ */
+@RunWith(BaseRobolectricTestRunner.class)
+@Config(manifest = Config.NONE)
+public class ClientAppDataRegisterTest {
+    private static final int UID = 23;
+    private static final String APP_NAME = "Example App";
+    private static final Origin ORIGIN = new Origin("https://www.example.com/");
+    private static final Origin OTHER_ORIGIN = new Origin("https://other.example.com/");
+
+    private ClientAppDataRegister mRegister;
+
+    @Before
+    public void setUp() {
+        mRegister = new ClientAppDataRegister();
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testRegistration() {
+        mRegister.registerPackageForOrigin(UID, APP_NAME, ORIGIN);
+
+        Assert.assertTrue(mRegister.chromeHoldsDataForPackage(UID));
+        Assert.assertEquals(APP_NAME, mRegister.getAppNameForRegisteredUid(UID));
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testDeregistration() {
+        mRegister.registerPackageForOrigin(UID, APP_NAME, ORIGIN);
+        mRegister.removePackage(UID);
+
+        Assert.assertFalse(mRegister.chromeHoldsDataForPackage(UID));
+        Assert.assertNull(mRegister.getAppNameForRegisteredUid(UID));
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testGetOrigins() {
+        mRegister.registerPackageForOrigin(UID, APP_NAME, ORIGIN);
+        mRegister.registerPackageForOrigin(UID, APP_NAME, OTHER_ORIGIN);
+
+        Set<String> origins = mRegister.getOriginsForRegisteredUid(UID);
+        Assert.assertEquals(2, origins.size());
+        Assert.assertTrue(origins.contains(ORIGIN.toString()));
+        Assert.assertTrue(origins.contains(OTHER_ORIGIN.toString()));
+    }
+
+    @Test
+    @Feature("TrustedWebActivities")
+    public void testClearOrigins() {
+        mRegister.registerPackageForOrigin(UID, APP_NAME, ORIGIN);
+        mRegister.registerPackageForOrigin(UID, APP_NAME, OTHER_ORIGIN);
+        mRegister.removePackage(UID);
+
+        Set<String> origins = mRegister.getOriginsForRegisteredUid(UID);
+        Assert.assertTrue(origins.isEmpty());
+    }
+}
diff --git a/chrome/android/profiles/newest.txt b/chrome/android/profiles/newest.txt
index 176a9ddc..f8f9048 100644
--- a/chrome/android/profiles/newest.txt
+++ b/chrome/android/profiles/newest.txt
@@ -1 +1 @@
-chromeos-chrome-amd64-71.0.3570.0_rc-r1.afdo.bz2
\ No newline at end of file
+chromeos-chrome-amd64-71.0.3571.0_rc-r1.afdo.bz2
\ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 7bd59e3..d64969a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2389,6 +2389,9 @@
      SINGLE_VALUE_TYPE(switches::kTrySupportedChannelLayouts)},
 #endif  // OS_WIN
 #if defined(OS_MACOSX)
+    {"mac-v2-sandbox", flag_descriptions::kMacV2SandboxName,
+     flag_descriptions::kMacV2SandboxDescription, kOsMac,
+     FEATURE_VALUE_TYPE(features::kMacV2Sandbox)},
     {"mac-views-task-manager", flag_descriptions::kMacViewsTaskManagerName,
      flag_descriptions::kMacViewsTaskManagerDescription, kOsMac,
      FEATURE_VALUE_TYPE(features::kViewsTaskManager)},
@@ -3104,6 +3107,13 @@
      kOsAll,
      FEATURE_VALUE_TYPE(
          autofill::features::kAutofillUpstreamUpdatePromptExplanation)},
+    {"enable-autofill-local-card-migration-show-feedback",
+     flag_descriptions::kEnableAutofillLocalCardMigrationShowFeedbackName,
+     flag_descriptions::
+         kEnableAutofillLocalCardMigrationShowFeedbackDescription,
+     kOsDesktop,
+     FEATURE_VALUE_TYPE(
+         autofill::features::kAutofillLocalCardMigrationShowFeedback)},
     {"enable-autofill-native-dropdown-views",
      flag_descriptions::kEnableAutofillNativeDropdownViewsName,
      flag_descriptions::kEnableAutofillNativeDropdownViewsDescription,
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index 1158d05..4ea887a 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -65,8 +65,8 @@
 // ManageSpaceActivity.java.
 const int kMaxImportantSites = 10;
 
-const char* kHttpPortSuffix = ":80";
-const char* kHttpsPortSuffix = ":443";
+const char kHttpPortSuffix[] = ":80";
+const char kHttpsPortSuffix[] = ":443";
 
 Profile* GetActiveUserProfile(bool is_incognito) {
   Profile* profile = ProfileManager::GetActiveUserProfile();
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a71e301..aa5f263 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -4881,3 +4881,10 @@
   return security_interstitials::OriginPolicyUI::GetErrorPage(error_reason,
                                                               origin, url);
 }
+
+bool ChromeContentBrowserClient::CanIgnoreCertificateErrorIfNeeded() {
+  // We require --user-data-dir flag too so that no dangerous changes are made
+  // in the user's regular profile.
+  return base::CommandLine::ForCurrentProcess()->HasSwitch(
+      switches::kUserDataDir);
+}
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
index 7e41e4c..dc2d8caf 100644
--- a/chrome/browser/chrome_content_browser_client.h
+++ b/chrome/browser/chrome_content_browser_client.h
@@ -505,6 +505,7 @@
       content::OriginPolicyErrorReason error_reason,
       const url::Origin& origin,
       const GURL& url) override;
+  bool CanIgnoreCertificateErrorIfNeeded() override;
 
  protected:
   static bool HandleWebUI(GURL* url, content::BrowserContext* browser_context);
diff --git a/chrome/browser/chromeos/crostini/crostini_manager.cc b/chrome/browser/chromeos/crostini/crostini_manager.cc
index 0ffdd83..f8c702b 100644
--- a/chrome/browser/chromeos/crostini/crostini_manager.cc
+++ b/chrome/browser/chromeos/crostini/crostini_manager.cc
@@ -17,6 +17,7 @@
 #include "base/time/default_clock.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/crostini/crostini_manager_factory.h"
+#include "chrome/browser/chromeos/crostini/crostini_pref_names.h"
 #include "chrome/browser/chromeos/crostini/crostini_remover.h"
 #include "chrome/browser/chromeos/crostini/crostini_reporting_util.h"
 #include "chrome/browser/chromeos/crostini/crostini_share_path.h"
@@ -1190,17 +1191,23 @@
     base::Optional<vm_tools::concierge::ListVmDisksResponse> reply) {
   if (!reply.has_value()) {
     LOG(ERROR) << "Failed to get list of VM disks. Empty response.";
-    std::move(callback).Run(ConciergeClientResult::LIST_VM_DISKS_FAILED, 0);
+    std::move(callback).Run(
+        ConciergeClientResult::LIST_VM_DISKS_FAILED,
+        profile_->GetPrefs()->GetInt64(prefs::kCrostiniLastDiskSize));
     return;
   }
   vm_tools::concierge::ListVmDisksResponse response = std::move(reply).value();
 
   if (!response.success()) {
     LOG(ERROR) << "Failed to list VM disks: " << response.failure_reason();
-    std::move(callback).Run(ConciergeClientResult::LIST_VM_DISKS_FAILED, 0);
+    std::move(callback).Run(
+        ConciergeClientResult::LIST_VM_DISKS_FAILED,
+        profile_->GetPrefs()->GetInt64(prefs::kCrostiniLastDiskSize));
     return;
   }
 
+  profile_->GetPrefs()->SetInt64(prefs::kCrostiniLastDiskSize,
+                                 response.total_size());
   std::move(callback).Run(ConciergeClientResult::SUCCESS,
                           response.total_size());
 }
diff --git a/chrome/browser/chromeos/crostini/crostini_pref_names.cc b/chrome/browser/chromeos/crostini/crostini_pref_names.cc
index 6c06a378..f7540a6 100644
--- a/chrome/browser/chromeos/crostini/crostini_pref_names.cc
+++ b/chrome/browser/chromeos/crostini/crostini_pref_names.cc
@@ -28,6 +28,8 @@
 // stored as Java time (ms since epoch).
 const char kCrostiniLastLaunchTimeWindowStart[] =
     "crostini.last_launch.time_window_start";
+// The value of the last sample of the disk space used by Crostini.
+const char kCrostiniLastDiskSize[] = "crostini.last_disk_size";
 
 void RegisterProfilePrefs(PrefRegistrySimple* registry) {
   registry->RegisterBooleanPref(kCrostiniEnabled, false);
@@ -38,6 +40,7 @@
                                 false);
   registry->RegisterStringPref(kCrostiniLastLaunchVersion, std::string());
   registry->RegisterInt64Pref(kCrostiniLastLaunchTimeWindowStart, 0u);
+  registry->RegisterInt64Pref(kCrostiniLastDiskSize, 0u);
   registry->RegisterBooleanPref(kUserCrostiniAllowedByPolicy, true);
 }
 
diff --git a/chrome/browser/chromeos/crostini/crostini_pref_names.h b/chrome/browser/chromeos/crostini/crostini_pref_names.h
index b454b7c..f5a9e0d9 100644
--- a/chrome/browser/chromeos/crostini/crostini_pref_names.h
+++ b/chrome/browser/chromeos/crostini/crostini_pref_names.h
@@ -19,6 +19,7 @@
 extern const char kReportCrostiniUsageEnabled[];
 extern const char kCrostiniLastLaunchVersion[];
 extern const char kCrostiniLastLaunchTimeWindowStart[];
+extern const char kCrostiniLastDiskSize[];
 
 void RegisterProfilePrefs(PrefRegistrySimple* registry);
 
diff --git a/chrome/browser/chromeos/crostini/crostini_remover.cc b/chrome/browser/chromeos/crostini/crostini_remover.cc
index 40c59147..5a31c305 100644
--- a/chrome/browser/chromeos/crostini/crostini_remover.cc
+++ b/chrome/browser/chromeos/crostini/crostini_remover.cc
@@ -98,6 +98,7 @@
   if (cros_component_manager) {
     if (cros_component_manager->Unload("cros-termina")) {
       profile_->GetPrefs()->SetBoolean(prefs::kCrostiniEnabled, false);
+      profile_->GetPrefs()->ClearPref(prefs::kCrostiniLastDiskSize);
     }
   }
   std::move(callback_).Run(ConciergeClientResult::SUCCESS);
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
index dffbd60..b5ea82f2 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
@@ -1242,6 +1242,8 @@
     auto query = drivefs::mojom::QueryParameters::New();
     if (!params->search_params.query.empty()) {
       query->title = params->search_params.query;
+      query->query_source =
+          drivefs::mojom::QueryParameters::QuerySource::kLocalOnly;
     }
     query->page_size = params->search_params.max_results;
     bool filter_dirs = false;
diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc b/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc
index 0c60f6a..bf5eb2ea 100644
--- a/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc
+++ b/chrome/browser/chromeos/extensions/users_private/users_private_apitest.cc
@@ -4,6 +4,7 @@
 
 #include <vector>
 
+#include "base/bind.h"
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
@@ -146,7 +147,8 @@
       s_test_delegate_ = new TestDelegate(profile());
 
     UsersPrivateDelegateFactory::GetInstance()->SetTestingFactory(
-        profile(), &UsersPrivateApiTest::GetUsersPrivateDelegate);
+        profile(),
+        base::BindRepeating(&UsersPrivateApiTest::GetUsersPrivateDelegate));
     content::RunAllPendingInMessageLoop();
   }
 
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index 381ad05..974fdbc 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -386,6 +386,8 @@
     ::testing::Values(TestCase("openQuickView"),
                       TestCase("openQuickView").InGuestMode(),
                       TestCase("openQuickView").TabletMode(),
+                      TestCase("openQuickViewImage"),
+                      TestCase("openQuickViewVideo"),
                       TestCase("openQuickViewScrollText"),
                       TestCase("openQuickViewScrollHtml"),
                       TestCase("openQuickViewBackgroundColorText"),
@@ -638,7 +640,8 @@
         TestCase("showPasteIntoCurrentFolder"),
         TestCase("showSelectAllInCurrentFolder"),
         TestCase("showToggleHiddenAndroidFoldersGearMenuItemsInMyFiles"),
-        TestCase("enableToggleHiddenAndroidFoldersShowsHiddenFiles")));
+        TestCase("enableToggleHiddenAndroidFoldersShowsHiddenFiles"),
+        TestCase("hideCurrentDirectoryByTogglingHiddenAndroidFolders")));
 
 WRAPPED_INSTANTIATE_TEST_CASE_P(
     Crostini, /* crostini.js */
diff --git a/chrome/browser/chromeos/file_manager/file_manager_jstest.cc b/chrome/browser/chromeos/file_manager/file_manager_jstest.cc
index 246f79e..3c5a6ae5 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_jstest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_jstest.cc
@@ -46,8 +46,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, ImporterCommonTest) {
-  RunTest(base::FilePath(
-      FILE_PATH_LITERAL("common/js/importer_common_unittest.html")));
+  RunGeneratedTest("/common/js/importer_common_unittest.html");
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, ImportHistoryTest) {
@@ -76,8 +75,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, LRUCacheTest) {
-  RunTest(base::FilePath(
-      FILE_PATH_LITERAL("common/js/lru_cache_unittest.html")));
+  RunGeneratedTest("/common/js/lru_cache_unittest.html");
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, MediaImportHandlerTest) {
@@ -101,8 +99,7 @@
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, AsyncUtilTest) {
-  RunTest(base::FilePath(
-      FILE_PATH_LITERAL("common/js/async_util_unittest.html")));
+  RunGeneratedTest("/common/js/async_util_unittest.html");
 }
 
 // TODO(sashab): Re-enable when https://crbug.com/842880 is fixed.
@@ -210,12 +207,11 @@
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, FilesAppEntryTypes) {
-  RunTest(base::FilePath(
-      FILE_PATH_LITERAL("common/js/files_app_entry_types_unittest.html")));
+  RunGeneratedTest("/common/js/files_app_entry_types_unittest.html");
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, UtilTest) {
-  RunTest(base::FilePath(FILE_PATH_LITERAL("common/js/util_unittest.html")));
+  RunGeneratedTest("/common/js/util_unittest.html");
 }
 
 IN_PROC_BROWSER_TEST_F(FileManagerJsTest, Crostini) {
diff --git a/chrome/browser/chromeos/file_manager/path_util_unittest.cc b/chrome/browser/chromeos/file_manager/path_util_unittest.cc
index 306ffa4..18be92a 100644
--- a/chrome/browser/chromeos/file_manager/path_util_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/path_util_unittest.cc
@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/files/file_path.h"
 #include "base/memory/ptr_util.h"
 #include "base/sys_info.h"
@@ -214,7 +215,8 @@
     arc_service_manager_ = std::make_unique<arc::ArcServiceManager>();
     arc_service_manager_->set_browser_context(primary_profile);
     arc::ArcFileSystemOperationRunner::GetFactory()->SetTestingFactoryAndUse(
-        primary_profile, &CreateFileSystemOperationRunnerForTesting);
+        primary_profile,
+        base::BindRepeating(&CreateFileSystemOperationRunnerForTesting));
     arc_service_manager_->arc_bridge_service()->file_system()->SetInstance(
         &fake_file_system_);
     arc::WaitForInstanceReady(
diff --git a/chrome/browser/chromeos/login/signin/token_handle_util.cc b/chrome/browser/chromeos/login/signin/token_handle_util.cc
index 9c2fdae..5cc92a4e 100644
--- a/chrome/browser/chromeos/login/signin/token_handle_util.cc
+++ b/chrome/browser/chromeos/login/signin/token_handle_util.cc
@@ -20,9 +20,9 @@
 
 const char kHandleStatusValid[] = "valid";
 const char kHandleStatusInvalid[] = "invalid";
-const char* kDefaultHandleStatus = kHandleStatusValid;
+const char* const kDefaultHandleStatus = kHandleStatusValid;
 
-static const int kMaxRetries = 3;
+constexpr int kMaxRetries = 3;
 
 }  // namespace
 
diff --git a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
index 094b168..18fab36 100644
--- a/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
+++ b/chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -8,6 +8,7 @@
 #include <string>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
@@ -212,7 +213,8 @@
       TestingBrowserProcess::GetGlobal()->local_state());
 
   invalidation::DeprecatedProfileInvalidationProviderFactory::GetInstance()
-      ->RegisterTestingFactory(BuildProfileInvalidationProvider);
+      ->RegisterTestingFactory(
+          base::BindRepeating(&BuildProfileInvalidationProvider));
 
   provider_ = std::make_unique<AffiliatedInvalidationServiceProviderImpl>();
 }
@@ -224,7 +226,8 @@
   test_shared_loader_factory_->Detach();
 
   invalidation::DeprecatedProfileInvalidationProviderFactory::GetInstance()
-      ->RegisterTestingFactory(nullptr);
+      ->RegisterTestingFactory(
+          BrowserContextKeyedServiceFactory::TestingFactory());
   chromeos::DeviceOAuth2TokenServiceFactory::Shutdown();
   chromeos::DBusThreadManager::Shutdown();
   chromeos::SystemSaltGetter::Shutdown();
diff --git a/chrome/browser/chromeos/policy/heartbeat_scheduler.cc b/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
index 4378701..e20dfa01 100644
--- a/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
+++ b/chrome/browser/chromeos/policy/heartbeat_scheduler.cc
@@ -4,7 +4,7 @@
 
 #include "chrome/browser/chromeos/policy/heartbeat_scheduler.h"
 
-#include <string>
+#include <vector>
 
 #include "base/bind.h"
 #include "base/bind_helpers.h"
@@ -18,36 +18,39 @@
 #include "components/gcm_driver/gcm_driver.h"
 
 namespace {
-const int kMinHeartbeatIntervalMs = 30 * 1000;  // 30 seconds
-const int kMaxHeartbeatIntervalMs = 24 * 60 * 60 * 1000;  // 24 hours
+
+constexpr base::TimeDelta kMinHeartbeatInterval =
+    base::TimeDelta::FromSeconds(30);
+constexpr base::TimeDelta kMaxHeartbeatInterval = base::TimeDelta::FromDays(1);
 
 // Our sender ID we send up with all of our GCM messages.
-const char* kHeartbeatGCMAppID = "com.google.chromeos.monitoring";
+const char kHeartbeatGCMAppID[] = "com.google.chromeos.monitoring";
 
 // The default destination we send our GCM messages to.
-const char* kHeartbeatGCMDestinationID = "1013309121859";
-const char* kHeartbeatGCMSenderSuffix = "@google.com";
+const char kHeartbeatGCMDestinationID[] = "1013309121859";
+const char kHeartbeatGCMSenderSuffix[] = "@google.com";
 
 // Destination of upstream notification sign up message.
-const char* kUpstreamNotificationSignUpDestinationID =
+const char kUpstreamNotificationSignUpDestinationID[] =
     "https://gcm.googleapis.com/gcm/gcm.event_tracker";
 
 // A bit mask, listening events of upstream notification.
-const char* kUpstreamNotificationSignUpListeningEvents =
+const char kUpstreamNotificationSignUpListeningEvents[] =
     "7";  // START | DISCONNECTED | HEARTBEAT
 
-const char* kGcmMessageTypeKey = "type";
-const char* kHeartbeatTimestampKey = "timestamp";
-const char* kHeartbeatDomainNameKey = "domain_name";
-const char* kHeartbeatDeviceIDKey = "device_id";
-const char* kHeartbeatTypeValue = "hb";
-const char* kUpstreamNotificationNotifyKey = "notify";
-const char* kUpstreamNotificationRegIdKey = "registration_id";
+const char kGcmMessageTypeKey[] = "type";
+const char kHeartbeatTimestampKey[] = "timestamp";
+const char kHeartbeatDomainNameKey[] = "domain_name";
+const char kHeartbeatDeviceIDKey[] = "device_id";
+const char kHeartbeatTypeValue[] = "hb";
+const char kUpstreamNotificationNotifyKey[] = "notify";
+const char kUpstreamNotificationRegIdKey[] = "registration_id";
 
 // If we get an error registering with GCM, try again in two minutes.
-const int64_t kRegistrationRetryDelayMs = 2 * 60 * 1000;
+constexpr base::TimeDelta kRegistrationRetryDelay =
+    base::TimeDelta::FromMinutes(2);
 
-const char* kHeartbeatSchedulerScope =
+const char kHeartbeatSchedulerScope[] =
     "policy.heartbeat_scheduler.upstream_notification";
 
 // Returns the destination ID for GCM heartbeats.
@@ -65,8 +68,9 @@
 
 namespace policy {
 
-const int64_t HeartbeatScheduler::kDefaultHeartbeatIntervalMs =
-    2 * 60 * 1000;  // 2 minutes
+// static
+const base::TimeDelta HeartbeatScheduler::kDefaultHeartbeatInterval =
+    base::TimeDelta::FromMinutes(2);
 
 // Helper class used to manage GCM registration (handles retrying after
 // errors, etc).
@@ -154,7 +158,7 @@
           FROM_HERE,
           base::BindOnce(&HeartbeatRegistrationHelper::AttemptRegistration,
                          weak_factory_.GetWeakPtr()),
-          base::TimeDelta::FromMilliseconds(kRegistrationRetryDelayMs));
+          kRegistrationRetryDelay);
       break;
 
     case gcm::GCMClient::INVALID_PARAMETER:
@@ -184,8 +188,7 @@
       enrollment_domain_(enrollment_domain),
       device_id_(device_id),
       heartbeat_enabled_(false),
-      heartbeat_interval_(
-          base::TimeDelta::FromMilliseconds(kDefaultHeartbeatIntervalMs)),
+      heartbeat_interval_(kDefaultHeartbeatInterval),
       cloud_policy_client_(cloud_policy_client),
       gcm_driver_(driver),
       weak_factory_(this) {
@@ -271,17 +274,13 @@
 
 base::TimeDelta HeartbeatScheduler::EnsureValidHeartbeatInterval(
     const base::TimeDelta& interval) {
-  const base::TimeDelta min = base::TimeDelta::FromMilliseconds(
-      kMinHeartbeatIntervalMs);
-  const base::TimeDelta max = base::TimeDelta::FromMilliseconds(
-      kMaxHeartbeatIntervalMs);
-  if (interval < min) {
+  if (interval < kMinHeartbeatInterval) {
     DLOG(WARNING) << "Invalid heartbeat interval: " << interval;
-    return min;
+    return kMinHeartbeatInterval;
   }
-  if (interval > max) {
+  if (interval > kMaxHeartbeatInterval) {
     DLOG(WARNING) << "Invalid heartbeat interval: " << interval;
-    return max;
+    return kMaxHeartbeatInterval;
   }
   return interval;
 }
diff --git a/chrome/browser/chromeos/policy/heartbeat_scheduler.h b/chrome/browser/chromeos/policy/heartbeat_scheduler.h
index 3271325..1fbe62cef 100644
--- a/chrome/browser/chromeos/policy/heartbeat_scheduler.h
+++ b/chrome/browser/chromeos/policy/heartbeat_scheduler.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <memory>
 #include <string>
 
 #include "base/cancelable_callback.h"
@@ -38,7 +39,7 @@
                            gcm::GCMConnectionObserver {
  public:
   // Default interval for how often we send up a heartbeat.
-  static const int64_t kDefaultHeartbeatIntervalMs;
+  static const base::TimeDelta kDefaultHeartbeatInterval;
 
   // Constructor. |cloud_policy_client| will be used to send registered GCM id
   // to DM server, and can be null. |driver| can be null for tests.
diff --git a/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc b/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
index d867fde..e82d1b0 100644
--- a/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
+++ b/chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc
@@ -6,6 +6,8 @@
 
 #include <stdint.h>
 
+#include <vector>
+
 #include "base/macros.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/test/test_simple_task_runner.h"
@@ -329,10 +331,8 @@
 
   // Should have a new heartbeat task posted.
   ASSERT_EQ(1U, task_runner_->NumPendingTasks());
-  CheckPendingTaskDelay(
-      scheduler_.last_heartbeat(),
-      base::TimeDelta::FromMilliseconds(
-          policy::HeartbeatScheduler::kDefaultHeartbeatIntervalMs));
+  CheckPendingTaskDelay(scheduler_.last_heartbeat(),
+                        policy::HeartbeatScheduler::kDefaultHeartbeatInterval);
   testing::Mock::VerifyAndClearExpectations(&gcm_driver_);
 
   IgnoreUpstreamNotificationMsg();
@@ -358,8 +358,8 @@
 
   // Heartbeats should have a time-to-live equivalent to the heartbeat frequency
   // so we don't have more than one heartbeat queued at a time.
-  EXPECT_EQ(policy::HeartbeatScheduler::kDefaultHeartbeatIntervalMs/1000,
-            message.time_to_live);
+  EXPECT_EQ(policy::HeartbeatScheduler::kDefaultHeartbeatInterval,
+            base::TimeDelta::FromSeconds(message.time_to_live));
 
   // Check the values in the message payload.
   EXPECT_EQ("hb", message.data["type"]);
diff --git a/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc b/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc
index 0a4c30b..b7078ec 100644
--- a/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc
+++ b/chrome/browser/chromeos/printing/zeroconf_printer_detector.cc
@@ -20,13 +20,13 @@
 
 namespace chromeos {
 // Supported service names for printers.
-const char* ZeroconfPrinterDetector::kIppServiceName = "_ipp._tcp.local";
-const char* ZeroconfPrinterDetector::kIppsServiceName = "_ipps._tcp.local";
+const char ZeroconfPrinterDetector::kIppServiceName[] = "_ipp._tcp.local";
+const char ZeroconfPrinterDetector::kIppsServiceName[] = "_ipps._tcp.local";
 
 // IppEverywhere printers are also required to advertise these services.
-const char* ZeroconfPrinterDetector::kIppEverywhereServiceName =
+const char ZeroconfPrinterDetector::kIppEverywhereServiceName[] =
     "_ipp._tcp.local,_print";
-const char* ZeroconfPrinterDetector::kIppsEverywhereServiceName =
+const char ZeroconfPrinterDetector::kIppsEverywhereServiceName[] =
     "_ipps._tcp.local,_print";
 
 namespace {
diff --git a/chrome/browser/chromeos/printing/zeroconf_printer_detector.h b/chrome/browser/chromeos/printing/zeroconf_printer_detector.h
index 4053dab..6c0dccba 100644
--- a/chrome/browser/chromeos/printing/zeroconf_printer_detector.h
+++ b/chrome/browser/chromeos/printing/zeroconf_printer_detector.h
@@ -1,6 +1,7 @@
 // Copyright 2017 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
+
 #ifndef CHROME_BROWSER_CHROMEOS_PRINTING_ZEROCONF_PRINTER_DETECTOR_H_
 #define CHROME_BROWSER_CHROMEOS_PRINTING_ZEROCONF_PRINTER_DETECTOR_H_
 
@@ -20,10 +21,10 @@
       public local_discovery::ServiceDiscoveryDeviceLister::Delegate {
  public:
   // Service types used by the detector.
-  static const char* kIppServiceName;
-  static const char* kIppsServiceName;
-  static const char* kIppEverywhereServiceName;
-  static const char* kIppsEverywhereServiceName;
+  static const char kIppServiceName[];
+  static const char kIppsServiceName[];
+  static const char kIppEverywhereServiceName[];
+  static const char kIppsEverywhereServiceName[];
 
   ~ZeroconfPrinterDetector() override = default;
 
diff --git a/chrome/browser/download/download_dir_util.cc b/chrome/browser/download/download_dir_util.cc
index d41bc209..cc93ec8 100644
--- a/chrome/browser/download/download_dir_util.cc
+++ b/chrome/browser/download/download_dir_util.cc
@@ -14,7 +14,7 @@
 
 namespace {
 #if defined(OS_CHROMEOS)
-const char* kDriveNamePolicyVariableName = "${google_drive}";
+const char kDriveNamePolicyVariableName[] = "${google_drive}";
 
 // Drive root folder relative to its mount point.
 const base::FilePath::CharType* kRootRelativeToDriveMount =
diff --git a/chrome/browser/engagement/important_sites_util_unittest.cc b/chrome/browser/engagement/important_sites_util_unittest.cc
index fc961117..6817fe25b 100644
--- a/chrome/browser/engagement/important_sites_util_unittest.cc
+++ b/chrome/browser/engagement/important_sites_util_unittest.cc
@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
@@ -73,7 +74,7 @@
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
     g_temp_history_dir = temp_dir_.GetPath();
     HistoryServiceFactory::GetInstance()->SetTestingFactory(
-        profile(), &BuildTestHistoryService);
+        profile(), base::BindRepeating(&BuildTestHistoryService));
   }
 
   void AddContentSetting(ContentSettingsType type,
diff --git a/chrome/browser/engagement/site_engagement_service_unittest.cc b/chrome/browser/engagement/site_engagement_service_unittest.cc
index 83d1c87..f25baff 100644
--- a/chrome/browser/engagement/site_engagement_service_unittest.cc
+++ b/chrome/browser/engagement/site_engagement_service_unittest.cc
@@ -7,6 +7,7 @@
 #include <algorithm>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
@@ -165,7 +166,7 @@
     ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
     g_temp_history_dir = temp_dir_.GetPath();
     HistoryServiceFactory::GetInstance()->SetTestingFactory(
-        profile(), &BuildTestHistoryService);
+        profile(), base::BindRepeating(&BuildTestHistoryService));
     SiteEngagementScore::SetParamValuesForTesting();
     service_ = base::WrapUnique(new SiteEngagementService(profile(), &clock_));
   }
diff --git a/chrome/browser/extensions/api/chrome_extensions_api_client.cc b/chrome/browser/extensions/api/chrome_extensions_api_client.cc
index aeae67fe..3825045 100644
--- a/chrome/browser/extensions/api/chrome_extensions_api_client.cc
+++ b/chrome/browser/extensions/api/chrome_extensions_api_client.cc
@@ -182,6 +182,21 @@
     if (!extension)
       return;
 
+    // If the extension doesn't request access to the tab, return. The user
+    // invoking the extension on a site grants access to the tab's origin if
+    // and only if the extension requested it; without requesting the tab,
+    // clicking on the extension won't grant access to the resource.
+    // https://crbug.com/891586.
+    // TODO(https://157736): We can remove this if extensions require host
+    // permissions to the initiator, since then we'll never get into this type
+    // of circumstance (the request would be blocked, rather than withheld).
+    if (!extension->permissions_data()
+             ->withheld_permissions()
+             .explicit_hosts()
+             .MatchesURL(rfh->GetLastCommittedURL())) {
+      return;
+    }
+
     runner->OnWebRequestBlocked(extension);
   };
 
diff --git a/chrome/browser/extensions/api/device_permissions_manager_unittest.cc b/chrome/browser/extensions/api/device_permissions_manager_unittest.cc
index bb87fbc..f4a894a 100644
--- a/chrome/browser/extensions/api/device_permissions_manager_unittest.cc
+++ b/chrome/browser/extensions/api/device_permissions_manager_unittest.cc
@@ -6,6 +6,7 @@
 
 #include <memory>
 
+#include "base/bind.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/values_test_util.h"
@@ -66,7 +67,7 @@
                                 "}"));
 
     HidDeviceManager::GetFactoryInstance()->SetTestingFactory(
-        env_->profile(), &CreateHidDeviceManager);
+        env_->profile(), base::BindRepeating(&CreateHidDeviceManager));
     device0_ =
         new MockUsbDevice(0, 0, "Test Manufacturer", "Test Product", "ABCDE");
     device1_ = new MockUsbDevice(0, 0, "Test Manufacturer", "Test Product", "");
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index af2fc33..bb82024 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "chrome/browser/extensions/api/downloads/downloads_api.h"
 
+#include "base/bind.h"
 #include "base/macros.h"
 #include "chrome/browser/download/download_core_service_factory.h"
 #include "chrome/browser/download/download_core_service_impl.h"
@@ -85,7 +86,8 @@
     TestDownloadCoreService* download_core_service =
         static_cast<TestDownloadCoreService*>(
             DownloadCoreServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-                profile(), &TestingDownloadCoreServiceFactory));
+                profile(),
+                base::BindRepeating(&TestingDownloadCoreServiceFactory)));
     ASSERT_TRUE(download_core_service);
     download_core_service->set_download_history(std::move(download_history));
   }
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
index f4aedc8..c5f26972 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
@@ -197,6 +197,11 @@
   return extensions::EventRouter::Get(profile_)->HasEventListener(event_name);
 }
 
+bool ImeObserver::ExtensionHasListener(const std::string& event_name) const {
+  return extensions::EventRouter::Get(profile_)->ExtensionHasEventListener(
+      extension_id_, event_name);
+}
+
 std::string ImeObserver::ConvertInputContextType(
     ui::IMEEngineHandlerInterface::InputContext input_context) {
   std::string input_context_type = "text";
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.h b/chrome/browser/extensions/api/input_ime/input_ime_api.h
index ca9b952..78e9fce74 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.h
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.h
@@ -81,8 +81,12 @@
   bool ShouldForwardKeyEvent() const;
 
   // Returns true if there are any listeners on the given event.
+  // TODO(https://crbug.com/835699): Merge this with |ExtensionHasListener|.
   bool HasListener(const std::string& event_name) const;
 
+  // Returns true if the extension has any listeners on the given event.
+  bool ExtensionHasListener(const std::string& event_name) const;
+
   // Functions used to convert InputContext struct to string
   std::string ConvertInputContextType(
       IMEEngineHandlerInterface::InputContext input_context);
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
index d2de9d2..30b419b 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc
@@ -208,7 +208,7 @@
     // There is both a public and private OnFocus event. The private OnFocus
     // event is only for ChromeOS and contains additional information about pen
     // inputs. We ensure that we only trigger one OnFocus event.
-    if (HasListener(input_method_private::OnFocus::kEventName) &&
+    if (ExtensionHasListener(input_method_private::OnFocus::kEventName) &&
         base::FeatureList::IsEnabled(features::kEnableStylusVirtualKeyboard)) {
       input_method_private::InputContext input_context;
       input_context.context_id = context.id;
diff --git a/chrome/browser/extensions/api/management/management_api_unittest.cc b/chrome/browser/extensions/api/management/management_api_unittest.cc
index 44ca34b..55a022c 100644
--- a/chrome/browser/extensions/api/management/management_api_unittest.cc
+++ b/chrome/browser/extensions/api/management/management_api_unittest.cc
@@ -1,10 +1,11 @@
-/// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 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 <memory>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "chrome/browser/extensions/extension_function_test_utils.h"
@@ -88,11 +89,11 @@
 void ManagementApiUnitTest::SetUp() {
   ExtensionServiceTestBase::SetUp();
   InitializeEmptyExtensionService();
-  ManagementAPI::GetFactoryInstance()->SetTestingFactory(profile(),
-                                                         &BuildManagementApi);
+  ManagementAPI::GetFactoryInstance()->SetTestingFactory(
+      profile(), base::BindRepeating(&BuildManagementApi));
 
-  EventRouterFactory::GetInstance()->SetTestingFactory(profile(),
-                                                       &BuildEventRouter);
+  EventRouterFactory::GetInstance()->SetTestingFactory(
+      profile(), base::BindRepeating(&BuildEventRouter));
 
   browser_window_.reset(new TestBrowserWindow());
   Browser::CreateParams params(profile(), true);
diff --git a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
index 76caa25..b3eff44 100644
--- a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
+++ b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate_unittest.cc
@@ -6,6 +6,7 @@
 #include <set>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/callback.h"
 #include "base/files/file_path.h"
 #include "base/location.h"
@@ -194,7 +195,8 @@
         std::make_unique<ChromeRuntimeAPIDelegate>(browser_context());
     service()->updater()->SetExtensionCacheForTesting(nullptr);
     EventRouterFactory::GetInstance()->SetTestingFactory(
-        browser_context(), &TestEventRouterFactoryFunction);
+        browser_context(),
+        base::BindRepeating(&TestEventRouterFactoryFunction));
 
     // Setup the ExtensionService so that extension updates won't complete
     // installation until the extension is idle.
diff --git a/chrome/browser/extensions/api/sessions/sessions_apitest.cc b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
index a6dcf156..a523a80c 100644
--- a/chrome/browser/extensions/api/sessions/sessions_apitest.cc
+++ b/chrome/browser/extensions/api/sessions/sessions_apitest.cc
@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
@@ -227,7 +228,8 @@
   browser_sync::ProfileSyncServiceMock* service =
       static_cast<browser_sync::ProfileSyncServiceMock*>(
           ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              profile, &ExtensionSessionsTest::BuildProfileSyncService));
+              profile, base::BindRepeating(
+                           &ExtensionSessionsTest::BuildProfileSyncService)));
 
   syncer::ModelTypeSet preferred_types(syncer::SESSIONS, syncer::PROXY_TABS);
   GoogleServiceAuthError no_error(GoogleServiceAuthError::NONE);
diff --git a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
index 0ed8808..d22960c 100644
--- a/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
+++ b/chrome/browser/extensions/api/signed_in_devices/signed_in_devices_manager_unittest.cc
@@ -27,8 +27,8 @@
   std::unique_ptr<TestingProfile> profile(new TestingProfile());
   SigninManagerFactory::GetForProfile(profile.get())->
       SetAuthenticatedAccountInfo("gaia_id", "foo");
-  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(profile.get(),
-                                                              nullptr);
+  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(
+      profile.get(), BrowserContextKeyedServiceFactory::TestingFactory());
   SignedInDevicesManager manager(profile.get());
 
   EventListenerInfo info(api::signed_in_devices::OnDeviceInfoChange::kEventName,
diff --git a/chrome/browser/extensions/api/socket/socket_api_unittest.cc b/chrome/browser/extensions/api/socket/socket_api_unittest.cc
index 11ac53e..59475e98 100644
--- a/chrome/browser/extensions/api/socket/socket_api_unittest.cc
+++ b/chrome/browser/extensions/api/socket/socket_api_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <memory>
 
+#include "base/bind.h"
 #include "base/threading/sequenced_task_runner_handle.h"
 #include "base/values.h"
 #include "chrome/browser/browser_process_impl.h"
@@ -30,7 +31,8 @@
     ExtensionApiUnittest::SetUp();
 
     ApiResourceManager<Socket>::GetFactoryInstance()->SetTestingFactoryAndUse(
-        browser()->profile(), ApiResourceManagerTestFactory);
+        browser()->profile(),
+        base::BindRepeating(&ApiResourceManagerTestFactory));
   }
 };
 
diff --git a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
index aa9e1e65..40210ce 100644
--- a/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
+++ b/chrome/browser/extensions/api/sockets_tcp_server/sockets_tcp_server_api_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <memory>
 
+#include "base/bind.h"
 #include "base/threading/sequenced_task_runner_handle.h"
 #include "base/values.h"
 #include "chrome/browser/browser_process_impl.h"
@@ -38,12 +39,14 @@
     ExtensionApiUnittest::SetUp();
 
     ApiResourceManager<ResumableTCPSocket>::GetFactoryInstance()
-        ->SetTestingFactoryAndUse(browser()->profile(),
-                                  ApiResourceManagerTestFactory);
+        ->SetTestingFactoryAndUse(
+            browser()->profile(),
+            base::BindRepeating(&ApiResourceManagerTestFactory));
 
     ApiResourceManager<ResumableTCPServerSocket>::GetFactoryInstance()
-        ->SetTestingFactoryAndUse(browser()->profile(),
-                                  ApiResourceManagerTestServerFactory);
+        ->SetTestingFactoryAndUse(
+            browser()->profile(),
+            base::BindRepeating(&ApiResourceManagerTestServerFactory));
   }
 };
 
diff --git a/chrome/browser/extensions/api/web_request/web_request_apitest.cc b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
index 7011943..14e1c743 100644
--- a/chrome/browser/extensions/api/web_request/web_request_apitest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_apitest.cc
@@ -1054,6 +1054,75 @@
       HasSeenWebRequestInBackgroundPage(extension, profile(), kCrossSiteHost));
 }
 
+// Tests behavior when an extension has withheld access to a request's URL, but
+// not the initiator's (tab's) URL. Regression test for
+// https://crbug.com/891586.
+IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest,
+                       WithheldHostPermissionsForCrossOriginWithoutInitiator) {
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(
+      extensions_features::kRuntimeHostPermissions);
+
+  content::SetupCrossSiteRedirector(embedded_test_server());
+  ASSERT_TRUE(embedded_test_server()->Start());
+
+  // TODO(devlin): This is essentially copied from the webrequest_activetab
+  // API test extension, but has different permissions. Maybe it's worth having
+  // all tests use a common pattern?
+  TestExtensionDir test_dir;
+  test_dir.WriteManifest(
+      R"({
+           "name": "Web Request Withheld Hosts",
+           "manifest_version": 2,
+           "version": "0.1",
+           "background": { "scripts": ["background.js"] },
+           "permissions": ["*://b.com:*/*", "webRequest"]
+         })");
+  test_dir.WriteFile(FILE_PATH_LITERAL("background.js"),
+                     R"(window.webRequestCount = 0;
+         window.requestedHostnames = [];
+
+         chrome.webRequest.onBeforeRequest.addListener(function(details) {
+           ++window.webRequestCount;
+           window.requestedHostnames.push((new URL(details.url)).hostname);
+         }, {urls:['<all_urls>']});
+         chrome.test.sendMessage('ready');)");
+
+  // Load an extension that registers a listener for webRequest events, and
+  // wait until it's initialized.
+  ExtensionTestMessageListener listener("ready", false);
+  const Extension* extension = LoadExtension(test_dir.UnpackedPath());
+  ASSERT_TRUE(extension) << message_;
+  ScriptingPermissionsModifier(profile(), base::WrapRefCounted(extension))
+      .SetWithholdHostPermissions(true);
+  EXPECT_TRUE(listener.WaitUntilSatisfied());
+
+  // Navigate to example.com, which has a cross-site script to b.com.
+  ui_test_utils::NavigateToURL(
+      browser(), embedded_test_server()->GetURL(
+                     "example.com", "/extensions/cross_site_script.html"));
+
+  content::WebContents* web_contents =
+      browser()->tab_strip_model()->GetActiveWebContents();
+
+  ExtensionActionRunner* runner =
+      ExtensionActionRunner::GetForWebContents(web_contents);
+  ASSERT_TRUE(runner);
+
+  // Even though the extension has access to b.com, it shouldn't show that it
+  // wants to run, because example.com is not a requested host.
+  EXPECT_EQ(BLOCKED_ACTION_NONE, runner->GetBlockedActions(extension));
+  EXPECT_FALSE(
+      HasSeenWebRequestInBackgroundPage(extension, profile(), "b.com"));
+
+  // Navigating to b.com (so that the script is hosted on the same origin as
+  // the WebContents) should show the extension wants to run.
+  ui_test_utils::NavigateToURL(
+      browser(), embedded_test_server()->GetURL(
+                     "b.com", "/extensions/cross_site_script.html"));
+  EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension));
+}
+
 // Verify that requests to clientsX.google.com are protected properly.
 // First test requests from a standard renderer and then a request from the
 // browser process.
diff --git a/chrome/browser/extensions/extension_service_sync_unittest.cc b/chrome/browser/extensions/extension_service_sync_unittest.cc
index 08fc33b..afdade4 100644
--- a/chrome/browser/extensions/extension_service_sync_unittest.cc
+++ b/chrome/browser/extensions/extension_service_sync_unittest.cc
@@ -1947,9 +1947,10 @@
 };
 
 TEST_F(ExtensionServiceTestSupervised, InstallOnlyAllowedByCustodian) {
-  InitServices(true /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(false);
 
+  InitServices(true /* profile_is_supervised */);
+
   extensions::util::SetWasInstalledByCustodian(good2048, profile(), true);
 
   base::FilePath path1 = data_dir().AppendASCII("good.crx");
@@ -1969,9 +1970,10 @@
 
 TEST_F(ExtensionServiceTestSupervised,
        DelegatedAndPreinstalledExtensionIsSUFirst) {
-  InitServices(false /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(false);
 
+  InitServices(false /* profile_is_supervised */);
+
   // Install an extension.
   base::FilePath path = data_dir().AppendASCII("good.crx");
   const Extension* extension = InstallCRX(path, INSTALL_NEW);
@@ -2008,9 +2010,10 @@
 
 TEST_F(ExtensionServiceTestSupervised,
        DelegatedAndPreinstalledExtensionSyncFirst) {
-  InitServices(false /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(false);
 
+  InitServices(false /* profile_is_supervised */);
+
   // Install an extension.
   base::FilePath path = data_dir().AppendASCII("good.crx");
   const Extension* extension = InstallCRX(path, INSTALL_NEW);
@@ -2040,9 +2043,10 @@
 
 TEST_F(ExtensionServiceTestSupervised,
        InstallAllowedByCustodianAndSupervisedUser) {
-  InitServices(true /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(true);
 
+  InitServices(true /* profile_is_supervised */);
+
   extensions::util::SetWasInstalledByCustodian(good2048, profile(), true);
 
   base::FilePath path1 = data_dir().AppendASCII("good.crx");
@@ -2066,9 +2070,10 @@
 
 TEST_F(ExtensionServiceTestSupervised,
        PreinstalledExtensionWithSUInitiatedInstalls) {
-  InitServices(false /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(true);
 
+  InitServices(false /* profile_is_supervised */);
+
   // Install an extension.
   base::FilePath path = data_dir().AppendASCII("good.crx");
   const Extension* extension = InstallCRX(path, INSTALL_NEW);
@@ -2097,9 +2102,10 @@
 
 TEST_F(ExtensionServiceTestSupervised,
        PreinstalledExtensionWithoutSUInitiatedInstalls) {
-  InitServices(false /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(false);
 
+  InitServices(false /* profile_is_supervised */);
+
   // Install an extension.
   base::FilePath path = data_dir().AppendASCII("good.crx");
   const Extension* extension = InstallCRX(path, INSTALL_NEW);
@@ -2131,9 +2137,10 @@
 TEST_F(ExtensionServiceTestSupervised, ExtensionApprovalBeforeInstallation) {
   // This tests the case when the sync entity flagging the extension as approved
   // arrives before the extension itself is installed.
-  InitServices(true /* profile_is_supervised */);
   InitSupervisedUserInitiatedExtensionInstallFeature(true);
 
+  InitServices(true /* profile_is_supervised */);
+
   MockPermissionRequestCreator* creator = new MockPermissionRequestCreator;
   supervised_user_service()->AddPermissionRequestCreator(
       base::WrapUnique(creator));
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 27dc10f4..e77c118 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -400,6 +400,13 @@
     "If enabled, changes the server save card prompt's explanation to mention "
     "the saving of the billing address.";
 
+const char kEnableAutofillLocalCardMigrationShowFeedbackName[] =
+    "Show the upload results dialog after local card migration";
+const char kEnableAutofillLocalCardMigrationShowFeedbackDescription[] =
+    "If enabled, the local card migration offer dialog will remain pending "
+    "after the user clicks the save button. Once migration is finished, "
+    "the dialog will be updated with the results of each card.";
+
 const char kEnableAutofillNativeDropdownViewsName[] =
     "Display Autofill Dropdown Using Views";
 const char kEnableAutofillNativeDropdownViewsDescription[] =
@@ -2956,6 +2963,11 @@
 const char kMacTouchBarName[] = "Hardware Touch Bar";
 const char kMacTouchBarDescription[] = "Control the use of the Touch Bar.";
 
+const char kMacV2SandboxName[] = "Mac V2 Sandbox";
+const char kMacV2SandboxDescription[] =
+    "Eliminates the unsandboxed warmup phase and sandboxes processes for their "
+    "entire life cycle.";
+
 const char kMacViewsNativeAppWindowsName[] = "Toolkit-Views App Windows.";
 const char kMacViewsNativeAppWindowsDescription[] =
     "Controls whether to use Toolkit-Views based Chrome App windows.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index e69c61d..83b9668b 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -271,6 +271,9 @@
 extern const char
     kEnableAutofillCreditCardUploadUpdatePromptExplanationDescription[];
 
+extern const char kEnableAutofillLocalCardMigrationShowFeedbackName[];
+extern const char kEnableAutofillLocalCardMigrationShowFeedbackDescription[];
+
 extern const char kEnableAutofillToolkitViewsCreditCardDialogsMac[];
 extern const char kEnableAutofillToolkitViewsCreditCardDialogsMacDescription[];
 
@@ -1786,6 +1789,9 @@
 extern const char kMacTouchBarName[];
 extern const char kMacTouchBarDescription[];
 
+extern const char kMacV2SandboxName[];
+extern const char kMacV2SandboxDescription[];
+
 extern const char kMacViewsNativeAppWindowsName[];
 extern const char kMacViewsNativeAppWindowsDescription[];
 
diff --git a/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.cc b/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.cc
index b4bbb1cd..ff4f5f9 100644
--- a/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.cc
+++ b/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.cc
@@ -82,8 +82,7 @@
     DeprecatedProfileInvalidationProviderFactory()
     : BrowserContextKeyedServiceFactory(
           "InvalidationService",
-          BrowserContextDependencyManager::GetInstance()),
-      testing_factory_(NULL) {
+          BrowserContextDependencyManager::GetInstance()) {
 #if !defined(OS_ANDROID)
   DependsOn(IdentityManagerFactory::GetInstance());
   DependsOn(gcm::GCMProfileServiceFactory::GetInstance());
@@ -94,15 +93,15 @@
     ~DeprecatedProfileInvalidationProviderFactory() {}
 
 void DeprecatedProfileInvalidationProviderFactory::RegisterTestingFactory(
-    TestingFactoryFunction testing_factory) {
-  testing_factory_ = testing_factory;
+    TestingFactory testing_factory) {
+  testing_factory_ = std::move(testing_factory);
 }
 
 KeyedService*
 DeprecatedProfileInvalidationProviderFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
   if (testing_factory_)
-    return testing_factory_(context).release();
+    return testing_factory_.Run(context).release();
 
 #if defined(OS_ANDROID)
   // Android does not need an IdentityProvider, because it gets the account
diff --git a/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.h b/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.h
index a042922..7ad9f82a 100644
--- a/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.h
+++ b/chrome/browser/invalidation/deprecated_profile_invalidation_provider_factory.h
@@ -40,7 +40,7 @@
 
   // Switches service creation to go through |testing_factory| for all browser
   // contexts.
-  void RegisterTestingFactory(TestingFactoryFunction testing_factory);
+  void RegisterTestingFactory(TestingFactory testing_factory);
 
  private:
   friend class DeprecatedProfileInvalidationProviderFactoryTestBase;
@@ -57,7 +57,7 @@
   void RegisterProfilePrefs(
       user_prefs::PrefRegistrySyncable* registry) override;
 
-  TestingFactoryFunction testing_factory_;
+  TestingFactory testing_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(DeprecatedProfileInvalidationProviderFactory);
 };
diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.cc b/chrome/browser/invalidation/profile_invalidation_provider_factory.cc
index 0f582ca27..10e7d00 100644
--- a/chrome/browser/invalidation/profile_invalidation_provider_factory.cc
+++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.cc
@@ -80,8 +80,7 @@
 ProfileInvalidationProviderFactory::ProfileInvalidationProviderFactory()
     : BrowserContextKeyedServiceFactory(
           "InvalidationService",
-          BrowserContextDependencyManager::GetInstance()),
-      testing_factory_(NULL) {
+          BrowserContextDependencyManager::GetInstance()) {
 #if !defined(OS_ANDROID)
   DependsOn(IdentityManagerFactory::GetInstance());
   DependsOn(gcm::GCMProfileServiceFactory::GetInstance());
@@ -92,14 +91,14 @@
     default;
 
 void ProfileInvalidationProviderFactory::RegisterTestingFactory(
-    TestingFactoryFunction testing_factory) {
-  testing_factory_ = testing_factory;
+    TestingFactory testing_factory) {
+  testing_factory_ = std::move(testing_factory);
 }
 
 KeyedService* ProfileInvalidationProviderFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
   if (testing_factory_)
-    return testing_factory_(context).release();
+    return testing_factory_.Run(context).release();
 
 #if defined(OS_ANDROID)
   // Android does not need an IdentityProvider, because it gets the account
diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.h b/chrome/browser/invalidation/profile_invalidation_provider_factory.h
index b792ef18..1ddc1f3d 100644
--- a/chrome/browser/invalidation/profile_invalidation_provider_factory.h
+++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.h
@@ -36,7 +36,7 @@
 
   // Switches service creation to go through |testing_factory| for all browser
   // contexts.
-  void RegisterTestingFactory(TestingFactoryFunction testing_factory);
+  void RegisterTestingFactory(TestingFactory testing_factory);
 
  private:
   friend class ProfileInvalidationProviderFactoryTestBase;
@@ -51,7 +51,7 @@
   KeyedService* BuildServiceInstanceFor(
       content::BrowserContext* context) const override;
 
-  TestingFactoryFunction testing_factory_;
+  TestingFactory testing_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProviderFactory);
 };
diff --git a/chrome/browser/loader/chrome_navigation_data.h b/chrome/browser/loader/chrome_navigation_data.h
index 29fe6b6e..e488348 100644
--- a/chrome/browser/loader/chrome_navigation_data.h
+++ b/chrome/browser/loader/chrome_navigation_data.h
@@ -10,7 +10,7 @@
 #include "base/macros.h"
 #include "base/supports_user_data.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/browser/navigation_data.h"
 #include "content/public/common/previews_state.h"
 
diff --git a/chrome/browser/loader/chrome_navigation_data_unittest.cc b/chrome/browser/loader/chrome_navigation_data_unittest.cc
index 75f2147..24ec414e 100644
--- a/chrome/browser/loader/chrome_navigation_data_unittest.cc
+++ b/chrome/browser/loader/chrome_navigation_data_unittest.cc
@@ -8,7 +8,7 @@
 
 #include "base/memory/ptr_util.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/browser/navigation_data.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index 8c94cdf..8cc10b9f 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -56,9 +56,9 @@
 #include "components/policy/content/policy_blacklist_navigation_throttle.h"
 #include "components/previews/content/previews_content_util.h"
 #include "components/previews/content/previews_decider_impl.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_decider.h"
 #include "components/previews/core/previews_experiments.h"
-#include "components/previews/core/previews_user_data.h"
 #include "components/safe_browsing/features.h"
 #include "components/variations/net/variations_http_headers.h"
 #include "content/public/browser/browser_task_traits.h"
diff --git a/chrome/browser/media/webrtc/webrtc_log_uploader.cc b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
index db0d241..3bf8c7a 100644
--- a/chrome/browser/media/webrtc/webrtc_log_uploader.cc
+++ b/chrome/browser/media/webrtc/webrtc_log_uploader.cc
@@ -370,7 +370,7 @@
 
   // Add the rtp dumps if they exist.
   base::FilePath rtp_dumps[2] = {incoming_rtp_dump, outgoing_rtp_dump};
-  static const char* kRtpDumpNames[2] = {"rtpdump_recv", "rtpdump_send"};
+  static const char* const kRtpDumpNames[2] = {"rtpdump_recv", "rtpdump_send"};
 
   for (size_t i = 0; i < 2; ++i) {
     if (!rtp_dumps[i].empty() && base::PathExists(rtp_dumps[i])) {
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider.cc b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
index 3406e43..b764b796 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -47,8 +47,8 @@
 
 // NOTE: You must set variation param values for both features (one of them may
 // be disabled in future).
-const char* kMaxSuggestionsCountParamName = "downloads_max_count";
-const char* kMaxDownloadAgeHoursParamName = "downloads_max_age_hours";
+const char kMaxSuggestionsCountParamName[] = "downloads_max_count";
+const char kMaxDownloadAgeHoursParamName[] = "downloads_max_age_hours";
 
 const base::Feature& GetEnabledDownloadsFeature() {
   bool assets_enabled =
diff --git a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
index 32ff6ab..74973e4 100644
--- a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
+++ b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
@@ -37,7 +37,7 @@
 #include "components/offline_pages/core/offline_page_metadata_store.h"
 #include "components/offline_pages/core/request_header/offline_page_navigation_ui_data.h"
 #include "components/offline_pages/core/stub_system_download_manager.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/resource_request_info.h"
diff --git a/chrome/browser/offline_pages/offline_page_request_job.cc b/chrome/browser/offline_pages/offline_page_request_job.cc
index b1bf1bc2..2804274 100644
--- a/chrome/browser/offline_pages/offline_page_request_job.cc
+++ b/chrome/browser/offline_pages/offline_page_request_job.cc
@@ -10,7 +10,7 @@
 #include "base/time/time.h"
 #include "chrome/browser/offline_pages/offline_page_utils.h"
 #include "chrome/browser/renderer_host/chrome_navigation_ui_data.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/browser/resource_request_info.h"
 #include "content/public/common/resource_type.h"
 #include "net/url_request/url_request.h"
diff --git a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
index 43b7991..9cfbbeb1 100644
--- a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
@@ -23,7 +23,7 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/navigation_data.h"
 #include "content/public/browser/navigation_handle.h"
diff --git a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc
index 8360a68..f4a0ad8 100644
--- a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer_unittest.cc
@@ -31,7 +31,7 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_data.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h"
 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "content/public/test/web_contents_tester.h"
 #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
 #include "services/resource_coordinator/public/mojom/memory_instrumentation/memory_instrumentation.mojom.h"
diff --git a/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer.cc
index f380c02..bbcbee5 100644
--- a/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer.cc
@@ -16,8 +16,8 @@
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
 #include "components/previews/content/previews_content_util.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_experiments.h"
-#include "components/previews/core/previews_user_data.h"
 #include "content/public/browser/navigation_handle.h"
 #include "content/public/browser/web_contents.h"
 
diff --git a/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer_unittest.cc
index 98a55014..645227ce 100644
--- a/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/noscript_preview_page_load_metrics_observer_unittest.cc
@@ -20,8 +20,8 @@
 #include "chrome/browser/page_load_metrics/page_load_tracker.h"
 #include "chrome/common/page_load_metrics/page_load_timing.h"
 #include "chrome/common/page_load_metrics/test/page_load_metrics_test_util.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_features.h"
-#include "components/previews/core/previews_user_data.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/previews_state.h"
 #include "content/public/test/navigation_simulator.h"
diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
index 150ce243..736abf9 100644
--- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
+++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
@@ -4,6 +4,7 @@
 
 #include <memory>
 
+#include "base/bind.h"
 #include "base/callback.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
@@ -202,7 +203,8 @@
     command_line->AppendSwitchASCII(switches::kDeviceManagementUrl, url);
 
     invalidation::DeprecatedProfileInvalidationProviderFactory::GetInstance()
-        ->RegisterTestingFactory(BuildFakeProfileInvalidationProvider);
+        ->RegisterTestingFactory(
+            base::BindRepeating(&BuildFakeProfileInvalidationProvider));
   }
 
   void SetUpOnMainThread() override {
diff --git a/chrome/browser/previews/previews_ui_tab_helper.h b/chrome/browser/previews/previews_ui_tab_helper.h
index c9844a6..d641d12 100644
--- a/chrome/browser/previews/previews_ui_tab_helper.h
+++ b/chrome/browser/previews/previews_ui_tab_helper.h
@@ -11,8 +11,8 @@
 #include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_experiments.h"
-#include "components/previews/core/previews_user_data.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
 
diff --git a/chrome/browser/previews/previews_ui_tab_helper_unittest.cc b/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
index cc2ef9dff..a38b0ac 100644
--- a/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
+++ b/chrome/browser/previews/previews_ui_tab_helper_unittest.cc
@@ -31,8 +31,8 @@
 #include "components/offline_pages/core/offline_page_item.h"
 #include "components/offline_pages/core/request_header/offline_page_header.h"
 #include "components/prefs/pref_registry_simple.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_features.h"
-#include "components/previews/core/previews_user_data.h"
 #include "components/proxy_config/proxy_config_pref_names.h"
 #include "content/public/browser/navigation_handle.h"
 #include "content/public/common/previews_state.h"
diff --git a/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc b/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc
index 07a63182..ffe5163 100644
--- a/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc
+++ b/chrome/browser/previews/resource_loading_hints/resource_loading_hints_web_contents_observer.cc
@@ -13,8 +13,8 @@
 #include "chrome/browser/profiles/profile.h"
 #include "components/previews/content/previews_content_util.h"
 #include "components/previews/content/previews_ui_service.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_experiments.h"
-#include "components/previews/core/previews_user_data.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/navigation_handle.h"
 #include "content/public/browser/render_frame_host.h"
diff --git a/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc b/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
index 2fdb88b..5aa58fd 100644
--- a/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
+++ b/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
@@ -40,7 +40,8 @@
 
 using LoadingState = TabLoadTracker::LoadingState;
 
-const char* kSessionTypeName[] = {"SessionRestore", "BackgroundTabOpening"};
+const char* const kSessionTypeName[] = {"SessionRestore",
+                                        "BackgroundTabOpening"};
 
 constexpr int kSamplingOdds = 10;
 
diff --git a/chrome/browser/resources/md_history/history_list.html b/chrome/browser/resources/md_history/history_list.html
index bbc97f7..93fff794 100644
--- a/chrome/browser/resources/md_history/history_list.html
+++ b/chrome/browser/resources/md_history/history_list.html
@@ -60,7 +60,7 @@
 
     <cr-lazy-render id="dialog">
       <template>
-        <cr-dialog>
+        <cr-dialog consume-keydown-event>
           <div slot="title">$i18n{removeSelected}</div>
           <div slot="body">$i18n{deleteWarning}</div>
           <div slot="button-container">
diff --git a/chrome/browser/search/instant_service.cc b/chrome/browser/search/instant_service.cc
index 3367067..fe276cb 100644
--- a/chrome/browser/search/instant_service.cc
+++ b/chrome/browser/search/instant_service.cc
@@ -52,10 +52,11 @@
 
 namespace {
 
-const char* kNtpCustomBackgroundURL = "background_url";
-const char* kNtpCustomBackgroundAttributionLine1 = "attribution_line_1";
-const char* kNtpCustomBackgroundAttributionLine2 = "attribution_line_2";
-const char* kNtpCustomBackgroundAttributionActionURL = "attribution_action_url";
+const char kNtpCustomBackgroundURL[] = "background_url";
+const char kNtpCustomBackgroundAttributionLine1[] = "attribution_line_1";
+const char kNtpCustomBackgroundAttributionLine2[] = "attribution_line_2";
+const char kNtpCustomBackgroundAttributionActionURL[] =
+    "attribution_action_url";
 
 base::DictionaryValue GetBackgroundInfoAsDict(
     const GURL& background_url,
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
index c557238..cc3e9ac 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
@@ -10,6 +10,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/bind.h"
 #include "base/files/file_util.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
@@ -73,7 +74,7 @@
   void SetUp() override {
     // Use SetTestingFactoryAndUse to force creation and initialization.
     SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-        &profile_, &BuildSpellcheckService);
+        &profile_, base::BindRepeating(&BuildSpellcheckService));
   }
 
   // A wrapper around SpellcheckCustomDictionary::LoadDictionaryFile private
@@ -199,10 +200,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -436,10 +436,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -502,7 +501,7 @@
   SpellcheckCustomDictionary* custom_dictionary2 =
       static_cast<SpellcheckService*>(
           SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService))
+              &profile2, base::BindRepeating(&BuildSpellcheckService)))
           ->GetCustomDictionary();
 
   std::unique_ptr<SpellcheckCustomDictionary::Change> change(
@@ -551,10 +550,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -596,10 +594,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -650,10 +647,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -703,10 +699,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -751,10 +746,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -804,10 +798,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -847,10 +840,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -897,10 +889,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -1012,10 +1003,9 @@
   SpellcheckCustomDictionary* custom_dictionary =
       spellcheck_service->GetCustomDictionary();
   TestingProfile profile2;
-  SpellcheckService* spellcheck_service2 =
-      static_cast<SpellcheckService*>(
-          SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &profile2, &BuildSpellcheckService));
+  SpellcheckService* spellcheck_service2 = static_cast<SpellcheckService*>(
+      SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+          &profile2, base::BindRepeating(&BuildSpellcheckService)));
   SpellcheckCustomDictionary* custom_dictionary2 =
       spellcheck_service2->GetCustomDictionary();
 
@@ -1064,7 +1054,7 @@
   SpellcheckService* server_spellcheck_service =
       static_cast<SpellcheckService*>(
           SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-              &server_profile, &BuildSpellcheckService));
+              &server_profile, base::BindRepeating(&BuildSpellcheckService)));
 
   // Here, |server_custom_dictionary| plays the role of the sync server.
   SpellcheckCustomDictionary* server_custom_dictionary =
@@ -1114,7 +1104,7 @@
     SpellcheckService* client_spellcheck_service =
         static_cast<SpellcheckService*>(
             SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-                &client_profile, &BuildSpellcheckService));
+                &client_profile, base::BindRepeating(&BuildSpellcheckService)));
 
     // Here, |client_custom_dictionary| plays the role of the client.
     SpellcheckCustomDictionary* client_custom_dictionary =
diff --git a/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.cc b/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.cc
index 3ed4c88..62d0a21 100644
--- a/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.cc
+++ b/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.cc
@@ -12,13 +12,15 @@
 SupervisedUserSyncModelTypeController::SupervisedUserSyncModelTypeController(
     syncer::ModelType type,
     const Profile* profile,
+    const base::RepeatingClosure& dump_stack,
     syncer::SyncClient* sync_client)
     : SyncableServiceBasedModelTypeController(
           type,
           sync_client->GetModelTypeStoreService()->GetStoreFactory(),
           base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                          base::Unretained(sync_client),
-                         type)),
+                         type),
+          dump_stack),
       profile_(profile) {
   DCHECK(type == syncer::SUPERVISED_USER_SETTINGS ||
          type == syncer::SUPERVISED_USER_WHITELISTS);
diff --git a/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.h b/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.h
index cbd908f5..2b626d0 100644
--- a/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.h
+++ b/chrome/browser/supervised_user/supervised_user_sync_model_type_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_MODEL_TYPE_CONTROLLER_H_
 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_MODEL_TYPE_CONTROLLER_H_
 
+#include "base/callback_forward.h"
 #include "base/macros.h"
 #include "components/sync/driver/syncable_service_based_model_type_controller.h"
 
@@ -20,9 +21,11 @@
     : public syncer::SyncableServiceBasedModelTypeController {
  public:
   // |sync_client| and |profile| must not be null and must outlive this object.
-  SupervisedUserSyncModelTypeController(syncer::ModelType type,
-                                        const Profile* profile,
-                                        syncer::SyncClient* sync_client);
+  SupervisedUserSyncModelTypeController(
+      syncer::ModelType type,
+      const Profile* profile,
+      const base::RepeatingClosure& dump_stack,
+      syncer::SyncClient* sync_client);
   ~SupervisedUserSyncModelTypeController() override;
 
   // DataTypeController override.
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc
index 50b0bb7e..35d792a 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -288,25 +288,24 @@
       component_factory_->CreateCommonDataTypeControllers(
           disabled_types, local_device_info_provider);
 
-  base::RepeatingClosure error_callback = base::BindRepeating(
+  const base::RepeatingClosure dump_stack = base::BindRepeating(
       &syncer::ReportUnrecoverableError, chrome::GetChannel());
 
 #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
   if (base::FeatureList::IsEnabled(switches::kSyncPseudoUSSSupervisedUsers)) {
     controllers.push_back(
         std::make_unique<SupervisedUserSyncModelTypeController>(
-            syncer::SUPERVISED_USER_SETTINGS, profile_, this));
+            syncer::SUPERVISED_USER_SETTINGS, profile_, dump_stack, this));
     controllers.push_back(
         std::make_unique<SupervisedUserSyncModelTypeController>(
-            syncer::SUPERVISED_USER_WHITELISTS, profile_, this));
+            syncer::SUPERVISED_USER_WHITELISTS, profile_, dump_stack, this));
   } else {
     controllers.push_back(
         std::make_unique<SupervisedUserSyncDataTypeController>(
-            syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_));
+            syncer::SUPERVISED_USER_SETTINGS, dump_stack, this, profile_));
     controllers.push_back(
         std::make_unique<SupervisedUserSyncDataTypeController>(
-            syncer::SUPERVISED_USER_WHITELISTS, error_callback, this,
-            profile_));
+            syncer::SUPERVISED_USER_WHITELISTS, dump_stack, this, profile_));
   }
 #endif  // BUILDFLAG(ENABLE_SUPERVISED_USERS)
 
@@ -319,10 +318,10 @@
           syncer::APPS, GetModelTypeStoreService()->GetStoreFactory(),
           base::BindOnce(&ChromeSyncClient::GetSyncableServiceForType,
                          base::Unretained(this), syncer::APPS),
-          profile_));
+          dump_stack, profile_));
     } else {
       controllers.push_back(std::make_unique<ExtensionDataTypeController>(
-          syncer::APPS, error_callback, this, profile_));
+          syncer::APPS, dump_stack, this, profile_));
     }
   }
 
@@ -334,10 +333,10 @@
           syncer::EXTENSIONS, GetModelTypeStoreService()->GetStoreFactory(),
           base::BindOnce(&ChromeSyncClient::GetSyncableServiceForType,
                          base::Unretained(this), syncer::EXTENSIONS),
-          profile_));
+          dump_stack, profile_));
     } else {
       controllers.push_back(std::make_unique<ExtensionDataTypeController>(
-          syncer::EXTENSIONS, error_callback, this, profile_));
+          syncer::EXTENSIONS, dump_stack, this, profile_));
     }
   }
 
@@ -345,14 +344,14 @@
   // disabled.
   if (!disabled_types.Has(syncer::EXTENSION_SETTINGS)) {
     controllers.push_back(std::make_unique<ExtensionSettingDataTypeController>(
-        syncer::EXTENSION_SETTINGS, error_callback, this, profile_));
+        syncer::EXTENSION_SETTINGS, dump_stack, this, profile_));
   }
 
   // App setting sync is enabled by default.  Register unless explicitly
   // disabled.
   if (!disabled_types.Has(syncer::APP_SETTINGS)) {
     controllers.push_back(std::make_unique<ExtensionSettingDataTypeController>(
-        syncer::APP_SETTINGS, error_callback, this, profile_));
+        syncer::APP_SETTINGS, dump_stack, this, profile_));
   }
 #endif  // BUILDFLAG(ENABLE_EXTENSIONS)
 
@@ -364,10 +363,10 @@
           syncer::THEMES, GetModelTypeStoreService()->GetStoreFactory(),
           base::BindOnce(&ChromeSyncClient::GetSyncableServiceForType,
                          base::Unretained(this), syncer::THEMES),
-          profile_));
+          dump_stack, profile_));
     } else {
       controllers.push_back(std::make_unique<ThemeDataTypeController>(
-          error_callback, this, profile_));
+          dump_stack, this, profile_));
     }
   }
 
@@ -376,11 +375,11 @@
   if (!disabled_types.Has(syncer::SEARCH_ENGINES)) {
     if (base::FeatureList::IsEnabled(switches::kSyncPseudoUSSSearchEngines)) {
       controllers.push_back(std::make_unique<SearchEngineModelTypeController>(
-          error_callback, GetModelTypeStoreService()->GetStoreFactory(),
+          dump_stack, GetModelTypeStoreService()->GetStoreFactory(),
           TemplateURLServiceFactory::GetForProfile(profile_)));
     } else {
       controllers.push_back(std::make_unique<SearchEngineDataTypeController>(
-          error_callback, this,
+          dump_stack, this,
           TemplateURLServiceFactory::GetForProfile(profile_)));
     }
   }
@@ -392,10 +391,11 @@
         std::make_unique<syncer::SyncableServiceBasedModelTypeController>(
             syncer::APP_LIST, GetModelTypeStoreService()->GetStoreFactory(),
             base::BindOnce(&ChromeSyncClient::GetSyncableServiceForType,
-                           base::Unretained(this), syncer::APP_LIST)));
+                           base::Unretained(this), syncer::APP_LIST),
+            dump_stack));
   } else {
     controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
-        syncer::APP_LIST, error_callback, this, syncer::GROUP_UI,
+        syncer::APP_LIST, dump_stack, this, syncer::GROUP_UI,
         base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI})));
   }
 #endif  // BUILDFLAG(ENABLE_APP_LIST)
@@ -408,10 +408,11 @@
           std::make_unique<syncer::SyncableServiceBasedModelTypeController>(
               syncer::DICTIONARY, GetModelTypeStoreService()->GetStoreFactory(),
               base::BindOnce(&ChromeSyncClient::GetSyncableServiceForType,
-                             base::Unretained(this), syncer::DICTIONARY)));
+                             base::Unretained(this), syncer::DICTIONARY),
+              dump_stack));
     } else {
       controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
-          syncer::DICTIONARY, error_callback, this, syncer::GROUP_UI,
+          syncer::DICTIONARY, dump_stack, this, syncer::GROUP_UI,
           base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI})));
     }
   }
@@ -422,12 +423,12 @@
           switches::kEnableWifiCredentialSync) &&
       !disabled_types.Has(syncer::WIFI_CREDENTIALS)) {
     controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
-        syncer::WIFI_CREDENTIALS, error_callback, this, syncer::GROUP_UI,
+        syncer::WIFI_CREDENTIALS, dump_stack, this, syncer::GROUP_UI,
         base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI})));
   }
   if (arc::IsArcAllowedForProfile(profile_)) {
     controllers.push_back(std::make_unique<ArcPackageSyncDataTypeController>(
-        syncer::ARC_PACKAGE, error_callback, this, profile_));
+        syncer::ARC_PACKAGE, dump_stack, this, profile_));
   }
 #endif  // defined(OS_CHROMEOS)
 
diff --git a/chrome/browser/sync/glue/extension_model_type_controller.cc b/chrome/browser/sync/glue/extension_model_type_controller.cc
index 619d96d9..7cd6f543 100644
--- a/chrome/browser/sync/glue/extension_model_type_controller.cc
+++ b/chrome/browser/sync/glue/extension_model_type_controller.cc
@@ -15,11 +15,13 @@
     syncer::ModelType type,
     syncer::OnceModelTypeStoreFactory store_factory,
     SyncableServiceProvider syncable_service_provider,
+    const base::RepeatingClosure& dump_stack,
     Profile* profile)
     : SyncableServiceBasedModelTypeController(
           type,
           std::move(store_factory),
-          std::move(syncable_service_provider)),
+          std::move(syncable_service_provider),
+          dump_stack),
       profile_(profile) {
   DCHECK(type == syncer::EXTENSIONS || type == syncer::APPS ||
          type == syncer::THEMES);
diff --git a/chrome/browser/sync/glue/extension_model_type_controller.h b/chrome/browser/sync/glue/extension_model_type_controller.h
index 1e61396..67092e9b 100644
--- a/chrome/browser/sync/glue/extension_model_type_controller.h
+++ b/chrome/browser/sync/glue/extension_model_type_controller.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_TYPE_CONTROLLER_H_
 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_MODEL_TYPE_CONTROLLER_H_
 
+#include "base/callback_forward.h"
 #include "base/macros.h"
 #include "components/sync/driver/syncable_service_based_model_type_controller.h"
 
@@ -22,6 +23,7 @@
       syncer::ModelType type,
       syncer::OnceModelTypeStoreFactory store_factory,
       SyncableServiceProvider syncable_service_provider,
+      const base::RepeatingClosure& dump_stack,
       Profile* profile);
   ~ExtensionModelTypeController() override;
 
diff --git a/chrome/browser/sync_file_system/drive_backend/callback_tracker.cc b/chrome/browser/sync_file_system/drive_backend/callback_tracker.cc
index e5dc5c5..c2c285b 100644
--- a/chrome/browser/sync_file_system/drive_backend/callback_tracker.cc
+++ b/chrome/browser/sync_file_system/drive_backend/callback_tracker.cc
@@ -19,8 +19,7 @@
 void CallbackTracker::AbortAll() {
   AbortClosureByHelper helpers;
   std::swap(helpers, helpers_);
-  for (AbortClosureByHelper::iterator itr = helpers.begin();
-       itr != helpers.end(); ++itr) {
+  for (auto itr = helpers.begin(); itr != helpers.end(); ++itr) {
     delete itr->first;
     itr->second.Run();
   }
diff --git a/chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc b/chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc
index bf2db541..bcec9b6 100644
--- a/chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc
+++ b/chrome/browser/sync_file_system/drive_backend/conflict_resolver.cc
@@ -71,8 +71,7 @@
         trackers.active_tracker()));
 
     DCHECK(trackers.has_active());
-    for (TrackerIDSet::const_iterator itr = trackers.begin();
-         itr != trackers.end(); ++itr) {
+    for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
       FileTracker tracker;
       if (!metadata_database()->FindTrackerByTrackerID(*itr, &tracker)) {
         NOTREACHED();
@@ -100,8 +99,7 @@
     target_file_id_ = PickPrimaryFile(trackers);
     DCHECK(!target_file_id_.empty());
     int64_t primary_tracker_id = -1;
-    for (TrackerIDSet::const_iterator itr = trackers.begin();
-         itr != trackers.end(); ++itr) {
+    for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
       FileTracker tracker;
       if (!metadata_database()->FindTrackerByTrackerID(*itr, &tracker)) {
         NOTREACHED();
@@ -166,8 +164,7 @@
 
 std::string ConflictResolver::PickPrimaryFile(const TrackerIDSet& trackers) {
   std::unique_ptr<FileMetadata> primary;
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     FileTracker tracker;
     if (!metadata_database()->FindTrackerByTrackerID(*itr, &tracker)) {
       NOTREACHED();
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
index 4ba64d8..781e7173 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc
@@ -137,9 +137,7 @@
   }
 
   void TearDown() override {
-    typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator;
-    for (iterator itr = file_systems_.begin();
-         itr != file_systems_.end(); ++itr) {
+    for (auto itr = file_systems_.begin(); itr != file_systems_.end(); ++itr) {
       itr->second->TearDown();
       delete itr->second;
     }
diff --git a/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.cc b/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.cc
index 1d252b6..e4996c2 100644
--- a/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.cc
+++ b/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.cc
@@ -163,7 +163,7 @@
 
 leveldb::Status LevelDBWrapper::Get(const std::string& key,
                                     std::string* value) {
-  PendingOperationMap::iterator itr = pending_.find(key);
+  auto itr = pending_.find(key);
   if (itr == pending_.end())
     return db_->Get(leveldb::ReadOptions(), key, value);
 
@@ -185,8 +185,7 @@
 
 leveldb::Status LevelDBWrapper::Commit() {
   leveldb::WriteBatch batch;
-  for (PendingOperationMap::iterator itr = pending_.begin();
-       itr != pending_.end(); ++itr) {
+  for (auto itr = pending_.begin(); itr != pending_.end(); ++itr) {
     const leveldb::Slice key(itr->first);
     const Transaction& transaction = itr->second;
     switch (transaction.first) {
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
index ff2203a..5dcdcd4 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
@@ -69,15 +69,12 @@
     return base::FilePath(FILE_PATH_LITERAL("/")).NormalizePathSeparators();
 
   size_t total_size = 0;
-  typedef std::vector<base::FilePath> PathComponents;
-  for (PathComponents::const_iterator itr = components.begin();
-       itr != components.end(); ++itr)
+  for (auto itr = components.begin(); itr != components.end(); ++itr)
     total_size += itr->value().size() + 1;
 
   base::FilePath::StringType result;
   result.reserve(total_size);
-  for (PathComponents::const_reverse_iterator itr = components.rbegin();
-       itr != components.rend(); ++itr) {
+  for (auto itr = components.rbegin(); itr != components.rend(); ++itr) {
     result.append(1, base::FilePath::kSeparators[0]);
     result.append(itr->value());
   }
@@ -89,10 +86,8 @@
     const google_apis::FileResource& file_resource,
     FileDetails* details) {
   details->clear_parent_folder_ids();
-  for (std::vector<google_apis::ParentReference>::const_iterator itr =
-           file_resource.parents().begin();
-       itr != file_resource.parents().end();
-       ++itr) {
+  for (auto itr = file_resource.parents().begin();
+       itr != file_resource.parents().end(); ++itr) {
     details->add_parent_folder_ids(itr->file_id());
   }
   details->set_title(file_resource.title());
@@ -282,8 +277,7 @@
 
 void MarkTrackerSetDirty(const TrackerIDSet& trackers,
                          MetadataDatabaseIndexInterface* index) {
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     std::unique_ptr<FileTracker> tracker(new FileTracker);
     index->GetFileTracker(*itr, tracker.get());
     if (tracker->dirty())
@@ -344,16 +338,15 @@
 
   // Remove trackers in the reversed order.
   base::hash_set<std::string> affected_file_ids;
-  for (std::vector<int64_t>::reverse_iterator itr = to_be_removed.rbegin();
-       itr != to_be_removed.rend(); ++itr) {
+  for (auto itr = to_be_removed.rbegin(); itr != to_be_removed.rend(); ++itr) {
     FileTracker tracker;
     index->GetFileTracker(*itr, &tracker);
     affected_file_ids.insert(tracker.file_id());
     index->RemoveFileTracker(*itr);
   }
 
-  for (base::hash_set<std::string>::iterator itr = affected_file_ids.begin();
-       itr != affected_file_ids.end(); ++itr) {
+  for (auto itr = affected_file_ids.begin(); itr != affected_file_ids.end();
+       ++itr) {
     TrackerIDSet trackers = index->GetFileTrackerIDsByFileID(*itr);
     if (trackers.empty()) {
       // Remove metadata that no longer has any tracker.
@@ -369,8 +362,7 @@
                                 int64_t parent_tracker_id,
                                 FileTracker* tracker_out) {
   FileTracker tracker;
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     if (!index->GetFileTracker(*itr, &tracker)) {
       NOTREACHED();
       continue;
@@ -392,8 +384,7 @@
     const std::string& title,
     FileTracker* result) {
   bool found = false;
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     FileTracker tracker;
     if (!index->GetFileTracker(*itr, &tracker)) {
       NOTREACHED();
@@ -427,8 +418,7 @@
     const std::string& file_id,
     FileTracker* tracker_out) {
   FileTracker tracker;
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     if (!index->GetFileTracker(*itr, &tracker)) {
       NOTREACHED();
       continue;
@@ -938,8 +928,7 @@
 
 SyncStatusCode MetadataDatabase::UpdateByDeletedRemoteFileList(
     const FileIDList& file_ids) {
-  for (FileIDList::const_iterator itr = file_ids.begin();
-       itr != file_ids.end(); ++itr) {
+  for (auto itr = file_ids.begin(); itr != file_ids.end(); ++itr) {
     std::unique_ptr<FileMetadata> metadata(
         CreateDeletedFileMetadata(GetLargestKnownChangeID(), *itr));
     UpdateByFileMetadata(FROM_HERE, std::move(metadata),
@@ -1015,8 +1004,7 @@
     children.erase(tracker.file_id());
   }
 
-  for (base::hash_set<std::string>::const_iterator itr = children.begin();
-       itr != children.end(); ++itr)
+  for (auto itr = children.begin(); itr != children.end(); ++itr)
     CreateTrackerForParentAndFileID(*folder_tracker, *itr);
   folder_tracker->set_needs_folder_listing(false);
   if (folder_tracker->dirty() && !ShouldKeepDirty(*folder_tracker))
@@ -1286,13 +1274,12 @@
   for (size_t i = 0; i < file_ids.size(); ++i) {
     TrackerIDSet trackers_for_file_id =
         index_->GetFileTrackerIDsByFileID(file_ids[i]);
-    for (TrackerIDSet::iterator itr = trackers_for_file_id.begin();
+    for (auto itr = trackers_for_file_id.begin();
          itr != trackers_for_file_id.end(); ++itr)
       tracker_ids.insert(*itr);
   }
 
-  for (std::set<int64_t>::iterator itr = tracker_ids.begin();
-       itr != tracker_ids.end(); ++itr) {
+  for (auto itr = tracker_ids.begin(); itr != tracker_ids.end(); ++itr) {
     std::unique_ptr<FileTracker> tracker(new FileTracker);
     if (!index_->GetFileTracker(*itr, tracker.get()) ||
         !CanClearDirty(*tracker))
@@ -1404,8 +1391,8 @@
   std::set<int64_t> parents_to_exclude;
   TrackerIDSet existing_trackers =
       index_->GetFileTrackerIDsByFileID(metadata.file_id());
-  for (TrackerIDSet::const_iterator itr = existing_trackers.begin();
-       itr != existing_trackers.end(); ++itr) {
+  for (auto itr = existing_trackers.begin(); itr != existing_trackers.end();
+       ++itr) {
     FileTracker tracker;
     if (!index_->GetFileTracker(*itr, &tracker)) {
       NOTREACHED();
@@ -1428,8 +1415,8 @@
     std::string parent_folder_id = metadata.details().parent_folder_ids(i);
     TrackerIDSet parent_trackers =
         index_->GetFileTrackerIDsByFileID(parent_folder_id);
-    for (TrackerIDSet::const_iterator itr = parent_trackers.begin();
-         itr != parent_trackers.end(); ++itr) {
+    for (auto itr = parent_trackers.begin(); itr != parent_trackers.end();
+         ++itr) {
       FileTracker parent_tracker;
       index_->GetFileTracker(*itr, &parent_tracker);
       if (!parent_tracker.active())
@@ -1533,8 +1520,7 @@
 void MetadataDatabase::RemoveUnneededTrackersForMissingFile(
     const std::string& file_id) {
   TrackerIDSet trackers = index_->GetFileTrackerIDsByFileID(file_id);
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     FileTracker tracker;
     if (!index_->GetFileTracker(*itr, &tracker)) {
       NOTREACHED();
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
index 3c926a7..30adec6c 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index.cc
@@ -74,7 +74,7 @@
 typename Container::mapped_type FindItem(
     const Container& container,
     const typename Container::key_type& key) {
-  typename Container::const_iterator found = container.find(key);
+  auto found = container.find(key);
   if (found == container.end())
     return typename Container::mapped_type();
   return found->second;
@@ -366,8 +366,7 @@
 TrackerIDSet MetadataDatabaseIndex::GetFileTrackerIDsByParentAndTitle(
     int64_t parent_tracker_id,
     const std::string& title) const {
-  TrackerIDsByParentAndTitle::const_iterator found =
-      trackers_by_parent_and_title_.find(parent_tracker_id);
+  auto found = trackers_by_parent_and_title_.find(parent_tracker_id);
   if (found == trackers_by_parent_and_title_.end())
     return TrackerIDSet();
   return FindItem(found->second, title);
@@ -376,13 +375,11 @@
 std::vector<int64_t> MetadataDatabaseIndex::GetFileTrackerIDsByParent(
     int64_t parent_tracker_id) const {
   std::vector<int64_t> result;
-  TrackerIDsByParentAndTitle::const_iterator found =
-      trackers_by_parent_and_title_.find(parent_tracker_id);
+  auto found = trackers_by_parent_and_title_.find(parent_tracker_id);
   if (found == trackers_by_parent_and_title_.end())
     return result;
 
-  for (TrackerIDsByTitle::const_iterator itr = found->second.begin();
-       itr != found->second.end(); ++itr) {
+  for (auto itr = found->second.begin(); itr != found->second.end(); ++itr) {
     result.insert(result.end(), itr->second.begin(), itr->second.end());
   }
 
@@ -593,8 +590,7 @@
 
 void MetadataDatabaseIndex::RemoveFromFileIDIndexes(
     const FileTracker& tracker) {
-  TrackerIDsByFileID::iterator found =
-      trackers_by_file_id_.find(tracker.file_id());
+  auto found = trackers_by_file_id_.find(tracker.file_id());
   if (found == trackers_by_file_id_.end()) {
     NOTREACHED();
     return;
@@ -649,7 +645,7 @@
   TrackerIDsByTitle* trackers_by_title = &trackers_by_parent_and_title_[parent];
 
   if (old_title != title) {
-    TrackerIDsByTitle::iterator found = trackers_by_title->find(old_title);
+    auto found = trackers_by_title->find(old_title);
     if (found != trackers_by_title->end()) {
       DVLOG(3) << "  Remove from trackers_by_parent_and_title_: "
              << parent << " " << old_title;
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
index e576b30..552d840 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_index_on_disk.cc
@@ -180,8 +180,8 @@
     }
 
     // Drop links from inactive trackers.
-    for (std::set<int64_t>::iterator iter = inactive_trackers.begin();
-         iter != inactive_trackers.end(); ++iter) {
+    for (auto iter = inactive_trackers.begin(); iter != inactive_trackers.end();
+         ++iter) {
       trackers_by_parent.erase(*iter);
     }
   }
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
index 1ed6225..c524111 100644
--- a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
+++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
@@ -156,9 +156,8 @@
 void ExpectEquivalentMaps(const Container& left, const Container& right) {
   ASSERT_EQ(left.size(), right.size());
 
-  typedef typename Container::const_iterator const_iterator;
-  const_iterator left_itr = left.begin();
-  const_iterator right_itr = right.begin();
+  auto left_itr = left.begin();
+  auto right_itr = right.begin();
   while (left_itr != left.end()) {
     EXPECT_EQ(left_itr->first, right_itr->first);
     ExpectEquivalent(left_itr->second, right_itr->second);
@@ -171,9 +170,8 @@
 void ExpectEquivalentSets(const Container& left, const Container& right) {
   ASSERT_EQ(left.size(), right.size());
 
-  typedef typename Container::const_iterator const_iterator;
-  const_iterator left_itr = left.begin();
-  const_iterator right_itr = right.begin();
+  auto left_itr = left.begin();
+  auto right_itr = right.begin();
   while (left_itr != left.end()) {
     ExpectEquivalent(*left_itr, *right_itr);
     ++left_itr;
diff --git a/chrome/browser/sync_file_system/drive_backend/register_app_task.cc b/chrome/browser/sync_file_system/drive_backend/register_app_task.cc
index 12b812d0..42131fe 100644
--- a/chrome/browser/sync_file_system/drive_backend/register_app_task.cc
+++ b/chrome/browser/sync_file_system/drive_backend/register_app_task.cc
@@ -126,8 +126,7 @@
   }
 
   std::unique_ptr<FileTracker> oldest_tracker;
-  for (TrackerIDSet::const_iterator itr = trackers.begin();
-       itr != trackers.end(); ++itr) {
+  for (auto itr = trackers.begin(); itr != trackers.end(); ++itr) {
     std::unique_ptr<FileTracker> tracker(new FileTracker);
     if (!metadata_database()->FindTrackerByTrackerID(
             *itr, tracker.get())) {
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker.cc b/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
index 48ee63a..a2a93bc 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker.cc
@@ -424,8 +424,7 @@
     return;
   }
 
-  for (std::vector<std::string>::const_iterator itr = app_ids->begin();
-       itr != app_ids->end(); ++itr) {
+  for (auto itr = app_ids->begin(); itr != app_ids->end(); ++itr) {
     const std::string& app_id = *itr;
     if (!extension_service->GetInstalledExtension(app_id))
       (*status)[app_id] = APP_STATUS_UNINSTALLED;
@@ -445,8 +444,7 @@
   DCHECK(metadata_db);
 
   // Update the status of every origin using status from ExtensionService.
-  for (AppStatusMap::const_iterator itr = app_status->begin();
-       itr != app_status->end(); ++itr) {
+  for (auto itr = app_status->begin(); itr != app_status->end(); ++itr) {
     const std::string& app_id = itr->first;
     GURL origin = extensions::Extension::GetBaseURLFromExtensionId(app_id);
 
diff --git a/chrome/browser/sync_file_system/drive_backend/task_dependency_manager.cc b/chrome/browser/sync_file_system/drive_backend/task_dependency_manager.cc
index 4d4c4f2b..79bffb3 100644
--- a/chrome/browser/sync_file_system/drive_backend/task_dependency_manager.cc
+++ b/chrome/browser/sync_file_system/drive_backend/task_dependency_manager.cc
@@ -16,8 +16,7 @@
 // Erases all items in |item_to_erase| from |container|.
 template <typename Container1, typename Container2>
 void EraseContainer(const Container1& items_to_erase, Container2* container) {
-  for (typename Container1::const_iterator itr = items_to_erase.begin();
-       itr != items_to_erase.end(); ++itr) {
+  for (auto itr = items_to_erase.begin(); itr != items_to_erase.end(); ++itr) {
     container->erase(*itr);
   }
 }
@@ -27,12 +26,11 @@
 // |container| have the original contents.
 template <typename Container1, typename Container2>
 bool InsertAllOrNone(const Container1& items_to_insert, Container2* container) {
-  typedef typename Container1::const_iterator iterator;
-  for (iterator itr = items_to_insert.begin();
-       itr != items_to_insert.end(); ++itr) {
+  for (auto itr = items_to_insert.begin(); itr != items_to_insert.end();
+       ++itr) {
     if (!container->insert(*itr).second) {
       // Revert all successful insertion.
-      iterator end = itr;
+      auto end = itr;
       itr = items_to_insert.begin();
       for (; itr != end; ++itr)
         container->erase(*itr);
@@ -48,7 +46,7 @@
   for (iterator itr = paths_to_insert.begin();
        itr != paths_to_insert.end(); ++itr) {
     if (!paths->insert(*itr)) {
-      iterator end = itr;
+      auto end = itr;
       for (itr = paths_to_insert.begin(); itr != end; ++itr)
         paths->erase(*itr);
       return false;
diff --git a/chrome/browser/sync_file_system/fake_remote_change_processor.cc b/chrome/browser/sync_file_system/fake_remote_change_processor.cc
index efe450b..a892961 100644
--- a/chrome/browser/sync_file_system/fake_remote_change_processor.cc
+++ b/chrome/browser/sync_file_system/fake_remote_change_processor.cc
@@ -37,12 +37,12 @@
         SYNC_FILE_TYPE_DIRECTORY, 0, base::Time::Now());
   }
 
-  URLToFileMetadata::iterator found_metadata = local_file_metadata_.find(url);
+  auto found_metadata = local_file_metadata_.find(url);
   if (found_metadata != local_file_metadata_.end())
     local_metadata = found_metadata->second;
 
   // Override |local_metadata| by applied changes.
-  URLToFileChangesMap::iterator found = applied_changes_.find(url);
+  auto found = applied_changes_.find(url);
   if (found != applied_changes_.end()) {
     DCHECK(!found->second.empty());
     const FileChange& applied_change = found->second.back();
@@ -55,7 +55,7 @@
   }
 
   FileChangeList change_list;
-  URLToFileChangeList::iterator found_list = local_changes_.find(url);
+  auto found_list = local_changes_.find(url);
   if (found_list != local_changes_.end())
     change_list = found_list->second;
 
@@ -77,8 +77,7 @@
     if (!ancestor_url.is_valid())
       break;
 
-    URLToFileChangeList::iterator found_list =
-        local_changes_.find(ancestor_url);
+    auto found_list = local_changes_.find(ancestor_url);
     if (found_list != local_changes_.end()) {
       const FileChange& local_change = found_list->second.back();
       if (local_change.IsAddOrUpdate() &&
@@ -145,7 +144,7 @@
   for (URLToFileChangesMap::const_iterator itr = applied_changes_.begin();
        itr != applied_changes_.end(); ++itr) {
     const storage::FileSystemURL& url = itr->first;
-    URLToFileChangesMap::const_iterator found = expected_changes.find(url);
+    auto found = expected_changes.find(url);
     if (found == expected_changes.end()) {
       EXPECT_TRUE(found != expected_changes.end())
           << "Change not expected for " << url.DebugString();
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
index b8a8b232..b7278d6 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
@@ -142,7 +142,7 @@
   urls->clear();
   // Mildly prioritizes the URLs that older changes and have not been updated
   // for a while.
-  for (ChangeSeqMap::iterator iter = change_seqs_.begin();
+  for (auto iter = change_seqs_.begin();
        iter != change_seqs_.end() &&
        (max_urls == 0 || urls->size() < static_cast<size_t>(max_urls));
        ++iter) {
@@ -155,7 +155,7 @@
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
   DCHECK(changes);
   changes->clear();
-  FileChangeMap::iterator found = changes_.find(url);
+  auto found = changes_.find(url);
   if (found == changes_.end()) {
     found = demoted_changes_.find(url);
     if (found == demoted_changes_.end())
@@ -169,7 +169,7 @@
   ClearDirtyOnDatabase(url);
   mirror_changes_.erase(url);
   demoted_changes_.erase(url);
-  FileChangeMap::iterator found = changes_.find(url);
+  auto found = changes_.find(url);
   if (found == changes_.end())
     return;
   change_seqs_.erase(found->second.change_seq);
@@ -187,7 +187,7 @@
 void LocalFileChangeTracker::RemoveMirrorAndCommitChangesForURL(
     const storage::FileSystemURL& url) {
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
-  FileChangeMap::iterator found = mirror_changes_.find(url);
+  auto found = mirror_changes_.find(url);
   if (found == mirror_changes_.end())
     return;
   mirror_changes_.erase(found);
@@ -204,7 +204,7 @@
 void LocalFileChangeTracker::ResetToMirrorAndCommitChangesForURL(
     const storage::FileSystemURL& url) {
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
-  FileChangeMap::iterator found = mirror_changes_.find(url);
+  auto found = mirror_changes_.find(url);
   if (found == mirror_changes_.end() || found->second.change_list.empty()) {
     ClearChangesForURL(url);
     return;
@@ -225,7 +225,7 @@
     const storage::FileSystemURL& url) {
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
 
-  FileChangeMap::iterator found = changes_.find(url);
+  auto found = changes_.find(url);
   if (found == changes_.end())
     return;
   DCHECK(!base::ContainsKey(demoted_changes_, url));
@@ -239,7 +239,7 @@
     const storage::FileSystemURL& url) {
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
 
-  FileChangeMap::iterator iter = demoted_changes_.find(url);
+  auto iter = demoted_changes_.find(url);
   if (iter == demoted_changes_.end())
     return;
 
@@ -282,8 +282,7 @@
                                                 storage::FileSystemType type) {
   DCHECK(file_task_runner_->RunsTasksInCurrentSequence());
   std::unique_ptr<leveldb::WriteBatch> batch(new leveldb::WriteBatch);
-  for (FileChangeMap::iterator iter = changes_.begin();
-       iter != changes_.end();) {
+  for (auto iter = changes_.begin(); iter != changes_.end();) {
     storage::FileSystemURL url = iter->first;
     int change_seq = iter->second.change_seq;
     // Advance |iter| before calling ResetForURL to avoid the iterator
@@ -293,8 +292,7 @@
       ResetForURL(url, change_seq, batch.get());
   }
 
-  for (FileChangeMap::iterator iter = demoted_changes_.begin();
-       iter != demoted_changes_.end();) {
+  for (auto iter = demoted_changes_.begin(); iter != demoted_changes_.end();) {
     storage::FileSystemURL url = iter->first;
     int change_seq = iter->second.change_seq;
     // Advance |iter| before calling ResetForURL to avoid the iterator
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
index 1e3796eb..68f47bd 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context_unittest.cc
@@ -631,8 +631,7 @@
   ASSERT_TRUE(base::ContainsKey(urls, kFile));
   ASSERT_TRUE(base::ContainsKey(urls, kDir));
   ASSERT_TRUE(base::ContainsKey(urls, kChild));
-  for (FileSystemURLSet::iterator iter = urls.begin();
-       iter != urls.end(); ++iter) {
+  for (auto iter = urls.begin(); iter != urls.end(); ++iter) {
     file_system.ClearChangeForURLInTracker(*iter);
   }
 
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service.cc b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
index a64b436..3e89d63 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
@@ -61,7 +61,7 @@
   DCHECK(origin);
   if (change_count_map_.empty())
     return false;
-  Map::iterator begin = next_;
+  auto begin = next_;
   do {
     if (next_ == change_count_map_.end())
       next_ = change_count_map_.begin();
@@ -75,8 +75,8 @@
 
 int64_t LocalFileSyncService::OriginChangeMap::GetTotalChangeCount() const {
   int64_t num_changes = 0;
-  for (Map::const_iterator iter = change_count_map_.begin();
-       iter != change_count_map_.end(); ++iter) {
+  for (auto iter = change_count_map_.begin(); iter != change_count_map_.end();
+       ++iter) {
     if (base::ContainsKey(disabled_origins_, iter->first))
       continue;
     num_changes += iter->second;
@@ -91,7 +91,7 @@
     change_count_map_[origin] = changes;
     return;
   }
-  Map::iterator found = change_count_map_.find(origin);
+  auto found = change_count_map_.find(origin);
   if (found != change_count_map_.end()) {
     if (next_ == found)
       ++next_;
@@ -207,7 +207,7 @@
       base::Bind(&InvokeCallbackOnNthInvocation,
                  base::Owned(new int(origin_to_contexts_.size() + 1)),
                  callback);
-  for (OriginToContext::iterator iter = origin_to_contexts_.begin();
+  for (auto iter = origin_to_contexts_.begin();
        iter != origin_to_contexts_.end(); ++iter)
     sync_context_->PromoteDemotedChanges(iter->first, iter->second,
                                          completion_callback);
@@ -308,8 +308,7 @@
 void LocalFileSyncService::OnChangesAvailableInOrigins(
     const std::set<GURL>& origins) {
   bool need_notification = false;
-  for (std::set<GURL>::const_iterator iter = origins.begin();
-       iter != origins.end(); ++iter) {
+  for (auto iter = origins.begin(); iter != origins.end(); ++iter) {
     const GURL& origin = *iter;
     if (!base::ContainsKey(origin_to_contexts_, origin)) {
       // This could happen if this is called for apps/origins that haven't
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_status.cc b/chrome/browser/sync_file_system/local/local_file_sync_status.cc
index c375ff7..994bb86 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_status.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_status.cc
@@ -52,8 +52,7 @@
   // Check if |paths| has a child of |normalized_path|.
   // Note that descendants of |normalized_path| are stored right after
   // |normalized_path| since |normalized_path| has trailing path separator.
-  typename Container::const_iterator upper =
-      paths.upper_bound(normalized_path);
+  auto upper = paths.upper_bound(normalized_path);
 
   if (upper != paths.end() &&
       normalized_path.IsParent(get_key_helper.GetKey(upper)))
@@ -149,7 +148,7 @@
     const FileSystemURL& url) const {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
 
-  URLBucket::const_iterator found = writing_.find(GetOriginAndType(url));
+  auto found = writing_.find(GetOriginAndType(url));
   if (found == writing_.end())
     return false;
   return ContainsChildOrParent(found->second, url.path(),
@@ -159,7 +158,7 @@
 bool LocalFileSyncStatus::IsChildOrParentSyncing(
     const FileSystemURL& url) const {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
-  URLSet::const_iterator found = syncing_.find(GetOriginAndType(url));
+  auto found = syncing_.find(GetOriginAndType(url));
   if (found == syncing_.end())
     return false;
   return ContainsChildOrParent(found->second, url.path(),
diff --git a/chrome/browser/sync_file_system/subtree_set.cc b/chrome/browser/sync_file_system/subtree_set.cc
index 19a64f38..6dfc3e1c 100644
--- a/chrome/browser/sync_file_system/subtree_set.cc
+++ b/chrome/browser/sync_file_system/subtree_set.cc
@@ -38,8 +38,7 @@
   while (!storage::VirtualPath::IsRootPath(path)) {
     path = storage::VirtualPath::DirName(path);
 
-    Subtrees::const_iterator found =
-        inclusive_ancestors_of_subtree_roots_.find(path.value());
+    auto found = inclusive_ancestors_of_subtree_roots_.find(path.value());
     if (found != inclusive_ancestors_of_subtree_roots_.end())
       return !found->second.contained_as_subtree_root;
   }
@@ -73,7 +72,7 @@
       storage::VirtualPath::GetNormalizedFilePath(subtree_root);
 
   {
-    Subtrees::iterator found =
+    auto found =
         inclusive_ancestors_of_subtree_roots_.find(normalized_subtree_root);
     if (found == inclusive_ancestors_of_subtree_roots_.end() ||
         !found->second.contained_as_subtree_root)
@@ -87,8 +86,7 @@
   while (!storage::VirtualPath::IsRootPath(path)) {
     path = storage::VirtualPath::DirName(path);
 
-    Subtrees::iterator found =
-        inclusive_ancestors_of_subtree_roots_.find(path.value());
+    auto found = inclusive_ancestors_of_subtree_roots_.find(path.value());
     if (found == inclusive_ancestors_of_subtree_roots_.end()) {
       NOTREACHED();
       continue;
@@ -103,7 +101,7 @@
 }
 
 size_t SubtreeSet::size() const {
-  Subtrees::const_iterator found =
+  auto found =
       inclusive_ancestors_of_subtree_roots_.find(storage::VirtualPath::kRoot);
   if (found == inclusive_ancestors_of_subtree_roots_.end())
     return 0;
diff --git a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
index 68d990e..f65579e 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service_factory.cc
@@ -47,9 +47,7 @@
   FactorySet factories;
   factories.insert(extensions::ExtensionRegistryFactory::GetInstance());
   RemoteFileSyncService::AppendDependsOnFactories(&factories);
-  for (FactorySet::iterator iter = factories.begin();
-       iter != factories.end();
-       ++iter) {
+  for (auto iter = factories.begin(); iter != factories.end(); ++iter) {
     DependsOn(*iter);
   }
 }
diff --git a/chrome/browser/ui/extensions/extension_installed_notification.cc b/chrome/browser/ui/extensions/extension_installed_notification.cc
index e558675..164e2908d 100644
--- a/chrome/browser/ui/extensions/extension_installed_notification.cc
+++ b/chrome/browser/ui/extensions/extension_installed_notification.cc
@@ -23,8 +23,8 @@
 #include "ui/message_center/public/cpp/notification.h"
 
 namespace {
-const char* kNotifierId = "app.downloaded-notification";
-}  // anonymous namespace
+const char kNotifierId[] = "app.downloaded-notification";
+}  // namespace
 
 using content::BrowserThread;
 
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc
index 1fa492ec..451a892 100644
--- a/chrome/browser/ui/libgtkui/gtk_ui.cc
+++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -243,7 +243,7 @@
 int indicators_count;
 
 // The unknown content type.
-const char* kUnknownContentType = "application/octet-stream";
+const char kUnknownContentType[] = "application/octet-stream";
 
 using GdkSetAllowedBackendsFn = void (*)(const gchar*);
 // Place this function pointer in read-only memory after being resolved to
diff --git a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc
index f137c1a..cac605a 100644
--- a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc
+++ b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc
@@ -44,9 +44,9 @@
 const char kSaveLabel[] = "_Save";
 #else
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-const char* kCancelLabel = GTK_STOCK_CANCEL;
-const char* kOpenLabel = GTK_STOCK_OPEN;
-const char* kSaveLabel = GTK_STOCK_SAVE;
+const char* const kCancelLabel = GTK_STOCK_CANCEL;
+const char* const kOpenLabel = GTK_STOCK_OPEN;
+const char* const kSaveLabel = GTK_STOCK_SAVE;
 G_GNUC_END_IGNORE_DEPRECATIONS;
 #endif
 
diff --git a/chrome/browser/ui/search/ntp_user_data_logger.cc b/chrome/browser/ui/search/ntp_user_data_logger.cc
index bea2a55..3f9c56d 100644
--- a/chrome/browser/ui/search/ntp_user_data_logger.cc
+++ b/chrome/browser/ui/search/ntp_user_data_logger.cc
@@ -89,7 +89,7 @@
 
 // Key used in prefs::kNtpCustomBackgroundDict to save a background image URL.
 // TODO(crbug.com/873699): Refactor customization check for better testability.
-const char* kNtpCustomBackgroundURL = "background_url";
+const char kNtpCustomBackgroundURL[] = "background_url";
 
 // Logs BackgroundCustomization availability on the NTP,
 void LogBackgroundCustomizationAvailability(
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
index d6e2bc1..c4b8845 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc
@@ -568,6 +568,18 @@
   // dragged tabs to it first.
   if (reason == END_DRAG_COMPLETE && deferred_target_tabstrip_observer_)
     PerformDeferredAttach();
+
+  // It's also possible that we need to merge the dragged tabs back into the
+  // source window even if the dragged tabs is dragged away from the source
+  // window.
+  // TODO(xdai/mukai): Move ClearTabDraggingInfo() to a later point and let
+  // RevertDrag() handle this case.
+  if (source_tabstrip_ &&
+      GetWindowForTabDraggingProperties(source_tabstrip_)
+          ->GetProperty(ash::kIsDeferredTabDraggingTargetWindowKey)) {
+    SetDeferredTargetTabstrip(source_tabstrip_);
+    PerformDeferredAttach();
+  }
 #endif
 
   EndDragImpl(reason != END_DRAG_COMPLETE && source_tabstrip_ ?
diff --git a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc
index 2268277..186f9229 100644
--- a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc
+++ b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc
@@ -64,6 +64,12 @@
       model->SetCurrentStep(
           AuthenticatorRequestDialogModel::Step::kBleDeviceSelection);
     } else if (name == "ble_pin_entry") {
+      test_authenticator_ = std::make_unique<
+          AuthenticatorRequestDialogModel::AuthenticatorReference>(
+          "authenticator" /* authenticator_id */,
+          base::string16() /* authenticator_display_name */,
+          AuthenticatorTransport::kInternal);
+      model->SetSelectedAuthenticatorForTesting(test_authenticator_.get());
       model->SetCurrentStep(
           AuthenticatorRequestDialogModel::Step::kBlePinEntry);
     } else if (name == "ble_verifying") {
@@ -84,6 +90,9 @@
   }
 
  private:
+  std::unique_ptr<AuthenticatorRequestDialogModel::AuthenticatorReference>
+      test_authenticator_;
+
   DISALLOW_COPY_AND_ASSIGN(AuthenticatorDialogTest);
 };
 
diff --git a/chrome/browser/ui/webauthn/sheet_models.cc b/chrome/browser/ui/webauthn/sheet_models.cc
index 18e4ada..8f10afc 100644
--- a/chrome/browser/ui/webauthn/sheet_models.cc
+++ b/chrome/browser/ui/webauthn/sheet_models.cc
@@ -472,8 +472,13 @@
 }
 
 base::string16 AuthenticatorBlePinEntrySheetModel::GetStepTitle() const {
-  return l10n_util::GetStringFUTF16(IDS_WEBAUTHN_BLE_PIN_ENTRY_TITLE,
-                                    GetRelyingPartyIdString());
+  base::string16 device_display_name;
+  const auto* const ble_authenticator =
+      dialog_model()->selected_authenticator();
+  DCHECK(ble_authenticator);
+  return l10n_util::GetStringFUTF16(
+      IDS_WEBAUTHN_BLE_PIN_ENTRY_TITLE,
+      ble_authenticator->authenticator_display_name);
 }
 
 base::string16 AuthenticatorBlePinEntrySheetModel::GetStepDescription() const {
diff --git a/chrome/browser/ui/webui/browsing_history_handler_unittest.cc b/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
index e73ade2e..dc91141d 100644
--- a/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
+++ b/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
@@ -9,6 +9,7 @@
 #include <set>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/macros.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
@@ -107,14 +108,15 @@
  public:
   void SetUp() override {
     TestingProfile::Builder builder;
-    builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(),
-                              &BuildFakeProfileOAuth2TokenService);
+    builder.AddTestingFactory(
+        ProfileOAuth2TokenServiceFactory::GetInstance(),
+        base::BindRepeating(&BuildFakeProfileOAuth2TokenService));
     builder.AddTestingFactory(SigninManagerFactory::GetInstance(),
-                              &BuildFakeSigninManagerBase);
+                              base::BindRepeating(&BuildFakeSigninManagerBase));
     builder.AddTestingFactory(ProfileSyncServiceFactory::GetInstance(),
-                              &BuildFakeSyncService);
+                              base::BindRepeating(&BuildFakeSyncService));
     builder.AddTestingFactory(WebHistoryServiceFactory::GetInstance(),
-                              &BuildFakeWebHistoryService);
+                              base::BindRepeating(&BuildFakeWebHistoryService));
     profile_ = builder.Build();
     profile_->CreateBookmarkModel(false);
 
diff --git a/chrome/browser/ui/webui/chromeos/video_source.cc b/chrome/browser/ui/webui/chromeos/video_source.cc
index 68989bd..c269329 100644
--- a/chrome/browser/ui/webui/chromeos/video_source.cc
+++ b/chrome/browser/ui/webui/chromeos/video_source.cc
@@ -23,7 +23,7 @@
 namespace chromeos {
 namespace {
 
-const char* kWhitelistedDirectory = "oobe_videos";
+const char kWhitelistedDirectory[] = "oobe_videos";
 
 bool IsWhitelisted(const std::string& path) {
   base::FilePath file_path(path);
diff --git a/chrome/browser/ui/webui/settings/tts_handler.cc b/chrome/browser/ui/webui/settings/tts_handler.cc
index e441b17..4a02d3d 100644
--- a/chrome/browser/ui/webui/settings/tts_handler.cc
+++ b/chrome/browser/ui/webui/settings/tts_handler.cc
@@ -27,7 +27,9 @@
 namespace settings {
 TtsHandler::TtsHandler() : weak_factory_(this) {}
 
-TtsHandler::~TtsHandler() {}
+TtsHandler::~TtsHandler() {
+  TtsController::GetInstance()->RemoveVoicesChangedDelegate(this);
+}
 
 void TtsHandler::HandleGetAllTtsVoiceData(const base::ListValue* args) {
   OnVoicesChanged();
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc b/chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc
index 4478537..04878a3 100644
--- a/chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc
+++ b/chrome/browser/ui/webui/sync_internals_message_handler_unittest.cc
@@ -7,6 +7,7 @@
 #include <memory>
 #include <utility>
 
+#include "base/bind.h"
 #include "base/command_line.h"
 #include "base/memory/ref_counted.h"
 #include "chrome/browser/sync/profile_sync_service_factory.h"
@@ -114,10 +115,11 @@
     web_ui_.set_web_contents(web_contents_.get());
     test_sync_service_ = static_cast<TestSyncService*>(
         ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
-            &profile_, &BuildTestSyncService));
+            &profile_, base::BindRepeating(&BuildTestSyncService)));
     fake_user_event_service_ = static_cast<FakeUserEventService*>(
         browser_sync::UserEventServiceFactory::GetInstance()
-            ->SetTestingFactoryAndUse(&profile_, &BuildFakeUserEventService));
+            ->SetTestingFactoryAndUse(
+                &profile_, base::BindRepeating(&BuildFakeUserEventService)));
     handler_.reset(new TestableSyncInternalsMessageHandler(
         &web_ui_,
         base::BindRepeating(
@@ -257,8 +259,8 @@
 
 TEST_F(SyncInternalsMessageHandlerTest, AddRemoveObserversSyncDisabled) {
   // Simulate completely disabling sync by flag or other mechanism.
-  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(profile(),
-                                                              nullptr);
+  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(
+      profile(), BrowserContextKeyedServiceFactory::TestingFactory());
 
   ListValue empty_list;
   handler()->HandleRegisterForEvents(&empty_list);
@@ -321,8 +323,8 @@
 
 TEST_F(SyncInternalsMessageHandlerTest, SendAboutInfoSyncDisabled) {
   // Simulate completely disabling sync by flag or other mechanism.
-  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(profile(),
-                                                              nullptr);
+  ProfileSyncServiceFactory::GetInstance()->SetTestingFactory(
+      profile(), BrowserContextKeyedServiceFactory::TestingFactory());
 
   handler()->AllowJavascriptForTesting();
   handler()->OnStateChanged(nullptr);
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.cc b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
index ddb3450a..a7d3c46 100644
--- a/chrome/browser/webauthn/authenticator_request_dialog_model.cc
+++ b/chrome/browser/webauthn/authenticator_request_dialog_model.cc
@@ -341,3 +341,8 @@
   if (it != saved_authenticators_.end())
     it->authenticator_id = std::move(new_authenticator_id);
 }
+
+void AuthenticatorRequestDialogModel::SetSelectedAuthenticatorForTesting(
+    AuthenticatorReference* authenticator) {
+  selected_authenticator_ = authenticator;
+}
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model.h b/chrome/browser/webauthn/authenticator_request_dialog_model.h
index 2ff88a9e..ad7472d 100644
--- a/chrome/browser/webauthn/authenticator_request_dialog_model.h
+++ b/chrome/browser/webauthn/authenticator_request_dialog_model.h
@@ -144,6 +144,11 @@
     return transport_availability()->is_ble_powered;
   }
 
+  const AuthenticatorReference* selected_authenticator() const {
+    DCHECK_EQ(Step::kBlePinEntry, current_step());
+    return selected_authenticator_;
+  }
+
   // Starts the UX flow, by either showing the welcome screen, the transport
   // selection screen, or the guided flow for them most likely transport.
   //
@@ -261,6 +266,9 @@
   void UpdateAuthenticatorReferenceId(base::StringPiece old_authenticator_id,
                                       std::string new_authenticator_id);
 
+  void SetSelectedAuthenticatorForTesting(
+      AuthenticatorReference* authenticator);
+
   std::vector<AuthenticatorReference>& saved_authenticators() {
     return saved_authenticators_;
   }
@@ -288,6 +296,10 @@
   // that the WebAuthN request for the corresponding authenticators can be
   // dispatched lazily after the user interacts with the UI element.
   std::vector<AuthenticatorReference> saved_authenticators_;
+
+  // Represents the Bluetooth authenticator that the user is trying to connect
+  // to or conduct WebAuthN request to via the WebAuthN UI.
+  AuthenticatorReference* selected_authenticator_ = nullptr;
   RequestCallback request_callback_;
   base::RepeatingClosure bluetooth_adapter_power_on_callback_;
 
diff --git a/chrome/test/data/chromeos/file_manager/small.jpg b/chrome/test/data/chromeos/file_manager/small.jpg
new file mode 100644
index 0000000..8668b13e
--- /dev/null
+++ b/chrome/test/data/chromeos/file_manager/small.jpg
Binary files differ
diff --git a/chrome/test/data/chromeos/file_manager/tall.pdf b/chrome/test/data/chromeos/file_manager/tall.pdf
new file mode 100644
index 0000000..88b40f82
--- /dev/null
+++ b/chrome/test/data/chromeos/file_manager/tall.pdf
Binary files differ
diff --git a/chrome/test/data/extensions/empty_script.js b/chrome/test/data/extensions/empty_script.js
new file mode 100644
index 0000000..d49db88
--- /dev/null
+++ b/chrome/test/data/extensions/empty_script.js
@@ -0,0 +1,5 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This space intentionally left blank.
diff --git a/chrome/test/data/webui/cr_elements/cr_dialog_test.js b/chrome/test/data/webui/cr_elements/cr_dialog_test.js
index 6d474a354..d1558bb 100644
--- a/chrome/test/data/webui/cr_elements/cr_dialog_test.js
+++ b/chrome/test/data/webui/cr_elements/cr_dialog_test.js
@@ -274,7 +274,7 @@
 
   // Ensuring that intersectionObserver does not fire any callbacks before the
   // dialog has been opened.
-  test('body scrollable border not added before modal shown', function(done) {
+  test('body scrollable border not added before modal shown', function() {
     document.body.innerHTML = `
       <cr-dialog>
         <div slot="title">title</div>
@@ -286,13 +286,10 @@
     const bodyContainer = dialog.$$('.body-container');
     assertTrue(!!bodyContainer);
 
-    // Waiting for 1ms because IntersectionObserver fires one message loop after
-    // dialog.attached.
-    setTimeout(function() {
+    return PolymerTest.flushTasks().then(() => {
       assertFalse(bodyContainer.classList.contains('top-scrollable'));
       assertFalse(bodyContainer.classList.contains('bottom-scrollable'));
-      done();
-    }, 1);
+    });
   });
 
   test('dialog body scrollable border when appropriate', function(done) {
@@ -427,4 +424,51 @@
         'none',
         window.getComputedStyle(dialog.getCloseButton().parentElement).display);
   });
+
+  test('keydown should be consumed when the property is true', function() {
+    document.body.innerHTML = `
+      <cr-dialog consume-keydown-event>
+        <div slot="title">title</div>
+      </cr-dialog>`;
+
+    const dialog = document.body.querySelector('cr-dialog');
+    dialog.showModal();
+    assertTrue(dialog.open);
+    assertTrue(dialog.consumeKeydownEvent);
+
+    function assertKeydownNotReached() {
+      assertNotReached('keydown event was propagated');
+    }
+    document.addEventListener('keydown', assertKeydownNotReached);
+
+    return PolymerTest.flushTasks().then(() => {
+      MockInteractions.keyDownOn(dialog, 65, undefined, 'a');
+      MockInteractions.keyDownOn(document.body, 65, undefined, 'a');
+      document.removeEventListener('keydown', assertKeydownNotReached);
+    });
+  });
+
+  test('keydown should be propagated when the property is false', function() {
+    document.body.innerHTML = `
+      <cr-dialog>
+        <div slot="title">title</div>
+      </cr-dialog>`;
+
+    const dialog = document.body.querySelector('cr-dialog');
+    dialog.showModal();
+    assertTrue(dialog.open);
+    assertFalse(dialog.consumeKeydownEvent);
+
+    let keydownCounter = 0;
+    function assertKeydownCount() {
+      keydownCounter++;
+    }
+    document.addEventListener('keydown', assertKeydownCount);
+
+    return PolymerTest.flushTasks().then(() => {
+      MockInteractions.keyDownOn(dialog, 65, undefined, 'a');
+      assertEquals(1, keydownCounter);
+      document.removeEventListener('keydown', assertKeydownCount);
+    });
+  });
 });
diff --git a/chromeos/policy/weekly_time/time_utils.cc b/chromeos/policy/weekly_time/time_utils.cc
index ccb4f2a1..6f2d7f4 100644
--- a/chromeos/policy/weekly_time/time_utils.cc
+++ b/chromeos/policy/weekly_time/time_utils.cc
@@ -22,7 +22,7 @@
 namespace weekly_time_utils {
 namespace {
 constexpr base::TimeDelta kWeek = base::TimeDelta::FromDays(7);
-const char* kFormatWeekdayHourMinute = "EEEE jj:mm a";
+const char kFormatWeekdayHourMinute[] = "EEEE jj:mm a";
 }  // namespace
 
 bool GetOffsetFromTimezoneToGmt(const std::string& timezone,
diff --git a/components/autofill_assistant/browser/BUILD.gn b/components/autofill_assistant/browser/BUILD.gn
index ad5d9997..22282e40a 100644
--- a/components/autofill_assistant/browser/BUILD.gn
+++ b/components/autofill_assistant/browser/BUILD.gn
@@ -22,6 +22,8 @@
     "actions/click_action.h",
     "actions/focus_element_action.cc",
     "actions/focus_element_action.h",
+    "actions/highlight_element_action.cc",
+    "actions/highlight_element_action.h",
     "actions/navigate_action.cc",
     "actions/navigate_action.h",
     "actions/reset_action.cc",
diff --git a/components/autofill_assistant/browser/actions/action_delegate.h b/components/autofill_assistant/browser/actions/action_delegate.h
index 15c2964..6de2b49a 100644
--- a/components/autofill_assistant/browser/actions/action_delegate.h
+++ b/components/autofill_assistant/browser/actions/action_delegate.h
@@ -75,6 +75,10 @@
   virtual void FocusElement(const std::vector<std::string>& selectors,
                             base::OnceCallback<void(bool)> callback) = 0;
 
+  // Highlight the element given by |selectors|.
+  virtual void HighlightElement(const std::vector<std::string>& selectors,
+                                base::OnceCallback<void(bool)> callback) = 0;
+
   // Get the value of |selectors| and return the result through |callback|. The
   // returned value will be the empty string in case of error or empty value.
   virtual void GetFieldValue(
diff --git a/components/autofill_assistant/browser/actions/highlight_element_action.cc b/components/autofill_assistant/browser/actions/highlight_element_action.cc
new file mode 100644
index 0000000..7474aa2
--- /dev/null
+++ b/components/autofill_assistant/browser/actions/highlight_element_action.cc
@@ -0,0 +1,47 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/autofill_assistant/browser/actions/highlight_element_action.h"
+
+#include <utility>
+
+#include "base/bind.h"
+#include "base/callback.h"
+#include "components/autofill_assistant/browser/actions/action_delegate.h"
+
+namespace autofill_assistant {
+
+HighlightElementAction::HighlightElementAction(const ActionProto& proto)
+    : Action(proto), weak_ptr_factory_(this) {
+  DCHECK(proto_.has_highlight_element());
+}
+
+HighlightElementAction::~HighlightElementAction() {}
+
+void HighlightElementAction::ProcessAction(ActionDelegate* delegate,
+                                           ProcessActionCallback callback) {
+  processed_action_proto_ = std::make_unique<ProcessedActionProto>();
+  const HighlightElementProto& highlight_element = proto_.highlight_element();
+
+  std::vector<std::string> selectors;
+  for (const auto& selector : highlight_element.element().selectors()) {
+    selectors.emplace_back(selector);
+  }
+  DCHECK(!selectors.empty());
+
+  delegate->HighlightElement(
+      selectors,
+      base::BindOnce(&HighlightElementAction::OnHighlightElement,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
+}
+
+void HighlightElementAction::OnHighlightElement(ProcessActionCallback callback,
+                                                bool status) {
+  // TODO(crbug.com/806868): Distinguish element not found from other error and
+  // report them as ELEMENT_RESOLUTION_FAILED.
+  UpdateProcessedAction(status ? ACTION_APPLIED : OTHER_ACTION_STATUS);
+  std::move(callback).Run(std::move(processed_action_proto_));
+}
+
+}  // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/highlight_element_action.h b/components/autofill_assistant/browser/actions/highlight_element_action.h
new file mode 100644
index 0000000..0187c8a
--- /dev/null
+++ b/components/autofill_assistant/browser/actions/highlight_element_action.h
@@ -0,0 +1,38 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_ACTIONS_HIGHLIGHT_ELEMENT_ACTION_H_
+#define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_ACTIONS_HIGHLIGHT_ELEMENT_ACTION_H_
+
+#include "components/autofill_assistant/browser/actions/action.h"
+
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+
+namespace autofill_assistant {
+// An action to highlight an element on Web.
+// TODO(crbug.com/806868): This action should be more configurable instead of
+// using hardcoded css styling since it depends on the content of a page.
+class HighlightElementAction : public Action {
+ public:
+  explicit HighlightElementAction(const ActionProto& proto);
+  ~HighlightElementAction() override;
+
+  // Overrides Action:
+  void ProcessAction(ActionDelegate* delegate,
+                     ProcessActionCallback callback) override;
+
+ private:
+  void OnHighlightElement(ProcessActionCallback callback, bool status);
+
+  base::WeakPtrFactory<HighlightElementAction> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(HighlightElementAction);
+};
+
+}  // namespace autofill_assistant
+#endif  // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_ACTIONS_HIGHLIGHT_ELEMENT_ACTION_H_
diff --git a/components/autofill_assistant/browser/actions/mock_action_delegate.h b/components/autofill_assistant/browser/actions/mock_action_delegate.h
index a9fc101..4bcef6f 100644
--- a/components/autofill_assistant/browser/actions/mock_action_delegate.h
+++ b/components/autofill_assistant/browser/actions/mock_action_delegate.h
@@ -73,6 +73,9 @@
   MOCK_METHOD2(FocusElement,
                void(const std::vector<std::string>& selectors,
                     base::OnceCallback<void(bool)> callback));
+  MOCK_METHOD2(HighlightElement,
+               void(const std::vector<std::string>& selectors,
+                    base::OnceCallback<void(bool)> callback));
 
   void GetFieldValue(
       const std::vector<std::string>& selectors,
diff --git a/components/autofill_assistant/browser/controller.cc b/components/autofill_assistant/browser/controller.cc
index 193058b..bc5a3b5 100644
--- a/components/autofill_assistant/browser/controller.cc
+++ b/components/autofill_assistant/browser/controller.cc
@@ -89,6 +89,7 @@
       allow_autostart_(true),
       periodic_script_check_scheduled_(false),
       periodic_script_check_count_(false),
+      clear_web_contents_delegate_(false),
       weak_ptr_factory_(this) {
   DCHECK(parameters_);
 
@@ -98,6 +99,7 @@
   // of using the controller as a web_contents delegate. It may interfere with
   // an already existing delegate.
   if (web_contents->GetDelegate() == nullptr) {
+    clear_web_contents_delegate_ = true;
     web_contents->SetDelegate(this);
   }
 
@@ -109,7 +111,9 @@
 }
 
 Controller::~Controller() {
-  web_contents()->SetDelegate(nullptr);
+  if (clear_web_contents_delegate_) {
+    web_contents()->SetDelegate(nullptr);
+  }
 }
 
 void Controller::GetOrCheckScripts(const GURL& url) {
diff --git a/components/autofill_assistant/browser/controller.h b/components/autofill_assistant/browser/controller.h
index 2ee814aa..c641572 100644
--- a/components/autofill_assistant/browser/controller.h
+++ b/components/autofill_assistant/browser/controller.h
@@ -114,6 +114,10 @@
   // Number of remaining periodic checks.
   int periodic_script_check_count_;
 
+  // Whether to clear the web_contents delegate when the controller is
+  // destroyed.
+  bool clear_web_contents_delegate_;
+
   base::WeakPtrFactory<Controller> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(Controller);
diff --git a/components/autofill_assistant/browser/protocol_utils.cc b/components/autofill_assistant/browser/protocol_utils.cc
index 730e30b..074c742 100644
--- a/components/autofill_assistant/browser/protocol_utils.cc
+++ b/components/autofill_assistant/browser/protocol_utils.cc
@@ -10,6 +10,7 @@
 #include "components/autofill_assistant/browser/actions/autofill_action.h"
 #include "components/autofill_assistant/browser/actions/click_action.h"
 #include "components/autofill_assistant/browser/actions/focus_element_action.h"
+#include "components/autofill_assistant/browser/actions/highlight_element_action.h"
 #include "components/autofill_assistant/browser/actions/navigate_action.h"
 #include "components/autofill_assistant/browser/actions/reset_action.h"
 #include "components/autofill_assistant/browser/actions/select_option_action.h"
@@ -190,6 +191,14 @@
         actions->emplace_back(std::make_unique<ResetAction>(action));
         break;
       }
+      case ActionProto::ActionInfoCase::kHighlightElement: {
+        actions->emplace_back(std::make_unique<HighlightElementAction>(action));
+        break;
+      }
+      case ActionProto::ActionInfoCase::kUploadDom: {
+        actions->emplace_back(std::make_unique<UploadDomAction>(action));
+        break;
+      }
       default:
       case ActionProto::ActionInfoCase::ACTION_INFO_NOT_SET: {
         DLOG(ERROR) << "Unknown or unsupported action with action_case="
diff --git a/components/autofill_assistant/browser/script_executor.cc b/components/autofill_assistant/browser/script_executor.cc
index 022553e..cace729 100644
--- a/components/autofill_assistant/browser/script_executor.cc
+++ b/components/autofill_assistant/browser/script_executor.cc
@@ -86,6 +86,12 @@
                                               std::move(callback));
 }
 
+void ScriptExecutor::HighlightElement(const std::vector<std::string>& selectors,
+                                      base::OnceCallback<void(bool)> callback) {
+  delegate_->GetWebController()->HighlightElement(selectors,
+                                                  std::move(callback));
+}
+
 void ScriptExecutor::FocusElement(const std::vector<std::string>& selectors,
                                   base::OnceCallback<void(bool)> callback) {
   delegate_->GetWebController()->FocusElement(selectors, std::move(callback));
diff --git a/components/autofill_assistant/browser/script_executor.h b/components/autofill_assistant/browser/script_executor.h
index a5199acc..2d32421 100644
--- a/components/autofill_assistant/browser/script_executor.h
+++ b/components/autofill_assistant/browser/script_executor.h
@@ -68,6 +68,8 @@
   void SelectOption(const std::vector<std::string>& selectors,
                     const std::string& selected_option,
                     base::OnceCallback<void(bool)> callback) override;
+  void HighlightElement(const std::vector<std::string>& selectors,
+                        base::OnceCallback<void(bool)> callback) override;
   void FocusElement(const std::vector<std::string>& selectors,
                     base::OnceCallback<void(bool)> callback) override;
   void GetFieldValue(
diff --git a/components/autofill_assistant/browser/service.proto b/components/autofill_assistant/browser/service.proto
index 61ff84e1..68771d2 100644
--- a/components/autofill_assistant/browser/service.proto
+++ b/components/autofill_assistant/browser/service.proto
@@ -194,6 +194,7 @@
     UseCreditCardProto use_card = 28;
     UseAddressProto use_address = 29;
     UploadDomProto upload_dom = 18;
+    HighlightElementProto highlight_element = 31;
     ResetProto reset = 34;
     StopProto stop = 35;
   }
@@ -333,6 +334,12 @@
   optional ElementReferenceProto tree_root = 1;
 }
 
+// Contain all arguments to perform a highlight element action.
+message HighlightElementProto {
+  // The element to highlight.
+  optional ElementReferenceProto element = 1;
+}
+
 // Load the given URL in the current tab.
 message NavigateProto {
   optional string url = 1;
diff --git a/components/autofill_assistant/browser/web_controller.cc b/components/autofill_assistant/browser/web_controller.cc
index 6874731..e743070 100644
--- a/components/autofill_assistant/browser/web_controller.cc
+++ b/components/autofill_assistant/browser/web_controller.cc
@@ -56,6 +56,14 @@
       return true;
     })";
 
+// Javascript to highlight an element.
+const char* const kHighlightElementScript =
+    R"(function() {
+      this.style.boxShadow = '0px 0px 0px 3px white, ' +
+          '0px 0px 0px 6px rgb(66, 133, 244)';
+      return true;
+    })";
+
 // Javascript code to retrieve the 'value' attribute of a node.
 const char* const kGetValueAttributeScript =
     "function () { return this.value; }";
@@ -614,6 +622,53 @@
   OnResult(result->GetResult()->GetValue()->GetBool(), std::move(callback));
 }
 
+void WebController::HighlightElement(const std::vector<std::string>& selectors,
+                                     base::OnceCallback<void(bool)> callback) {
+  FindElement(
+      selectors,
+      base::BindOnce(&WebController::OnFindElementForHighlightElement,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
+}
+
+void WebController::OnFindElementForHighlightElement(
+    base::OnceCallback<void(bool)> callback,
+    std::unique_ptr<FindElementResult> element_result) {
+  const std::string object_id = element_result->object_id;
+  if (object_id.empty()) {
+    DLOG(ERROR) << "Failed to find the element to highlight.";
+    OnResult(false, std::move(callback));
+    return;
+  }
+
+  std::vector<std::unique_ptr<runtime::CallArgument>> argument;
+  argument.emplace_back(
+      runtime::CallArgument::Builder().SetObjectId(object_id).Build());
+  devtools_client_->GetRuntime()->Enable();
+  devtools_client_->GetRuntime()->CallFunctionOn(
+      runtime::CallFunctionOnParams::Builder()
+          .SetObjectId(object_id)
+          .SetArguments(std::move(argument))
+          .SetFunctionDeclaration(std::string(kHighlightElementScript))
+          .SetReturnByValue(true)
+          .Build(),
+      base::BindOnce(&WebController::OnHighlightElement,
+                     weak_ptr_factory_.GetWeakPtr(), std::move(callback)));
+}
+
+void WebController::OnHighlightElement(
+    base::OnceCallback<void(bool)> callback,
+    std::unique_ptr<runtime::CallFunctionOnResult> result) {
+  devtools_client_->GetRuntime()->Disable();
+  if (!result || result->HasExceptionDetails()) {
+    DLOG(ERROR) << "Failed to highlight element.";
+    OnResult(false, std::move(callback));
+    return;
+  }
+  // Read the result returned from Javascript code.
+  DCHECK(result->GetResult()->GetValue()->is_bool());
+  OnResult(result->GetResult()->GetValue()->GetBool(), std::move(callback));
+}
+
 void WebController::FocusElement(const std::vector<std::string>& selectors,
                                  base::OnceCallback<void(bool)> callback) {
   DCHECK(!selectors.empty());
diff --git a/components/autofill_assistant/browser/web_controller.h b/components/autofill_assistant/browser/web_controller.h
index 642cfab4..43dc7b37 100644
--- a/components/autofill_assistant/browser/web_controller.h
+++ b/components/autofill_assistant/browser/web_controller.h
@@ -90,6 +90,10 @@
                             const std::string& selected_option,
                             base::OnceCallback<void(bool)> callback);
 
+  // Highlight an element given by |selectors|.
+  virtual void HighlightElement(const std::vector<std::string>& selectors,
+                                base::OnceCallback<void(bool)> callback);
+
   // Focus on element given by |selectors|.
   virtual void FocusElement(const std::vector<std::string>& selectors,
                             base::OnceCallback<void(bool)> callback);
@@ -228,6 +232,12 @@
       std::unique_ptr<FindElementResult> element_result);
   void OnSelectOption(base::OnceCallback<void(bool)> callback,
                       std::unique_ptr<runtime::CallFunctionOnResult> result);
+  void OnFindElementForHighlightElement(
+      base::OnceCallback<void(bool)> callback,
+      std::unique_ptr<FindElementResult> element_result);
+  void OnHighlightElement(
+      base::OnceCallback<void(bool)> callback,
+      std::unique_ptr<runtime::CallFunctionOnResult> result);
   void OnFindElementForGetFieldValue(
       base::OnceCallback<void(const std::string&)> callback,
       std::unique_ptr<FindElementResult> element_result);
diff --git a/components/autofill_assistant/browser/web_controller_browsertest.cc b/components/autofill_assistant/browser/web_controller_browsertest.cc
index 05d1f8e..8b9c48e1 100644
--- a/components/autofill_assistant/browser/web_controller_browsertest.cc
+++ b/components/autofill_assistant/browser/web_controller_browsertest.cc
@@ -120,6 +120,24 @@
     std::move(done_callback).Run();
   }
 
+  bool HighlightElement(const std::vector<std::string>& selectors) {
+    base::RunLoop run_loop;
+    bool result;
+    web_controller_->HighlightElement(
+        selectors, base::BindOnce(&WebControllerBrowserTest::OnHighlightElement,
+                                  base::Unretained(this),
+                                  run_loop.QuitClosure(), &result));
+    run_loop.Run();
+    return result;
+  }
+
+  void OnHighlightElement(base::Closure done_callback,
+                          bool* result_output,
+                          bool result) {
+    *result_output = result;
+    std::move(done_callback).Run();
+  }
+
   bool GetOuterHtml(const std::vector<std::string>& selectors,
                     std::string* html_output) {
     base::RunLoop run_loop;
@@ -416,4 +434,19 @@
   EXPECT_EQ(url::kAboutBlankURL, web_controller_->GetUrl().spec());
 }
 
+IN_PROC_BROWSER_TEST_F(WebControllerBrowserTest, HighlightElement) {
+  std::vector<std::string> selectors;
+  selectors.emplace_back("#select");
+
+  const std::string javascript = R"(
+    let select = document.querySelector("#select");
+    select.style.boxShadow;
+  )";
+  EXPECT_EQ("", content::EvalJs(shell(), javascript));
+  ASSERT_TRUE(HighlightElement(selectors));
+  // We only make sure that the element has a non-empty boxShadow style without
+  // requiring an exact string match.
+  EXPECT_NE("", content::EvalJs(shell(), javascript));
+}
+
 }  // namespace
diff --git a/components/browser_sync/profile_sync_components_factory_impl.cc b/components/browser_sync/profile_sync_components_factory_impl.cc
index 1f42706..1beceded 100644
--- a/components/browser_sync/profile_sync_components_factory_impl.cc
+++ b/components/browser_sync/profile_sync_components_factory_impl.cc
@@ -138,7 +138,7 @@
     syncer::ModelTypeSet disabled_types,
     syncer::LocalDeviceInfoProvider* local_device_info_provider) {
   syncer::DataTypeController::TypeVector controllers;
-  base::Closure error_callback =
+  const base::RepeatingClosure dump_stack =
       base::BindRepeating(&syncer::ReportUnrecoverableError, channel_);
 
   // TODO(stanisc): can DEVICE_INFO be one of disabled datatypes?
@@ -166,7 +166,7 @@
       } else {
         controllers.push_back(
             std::make_unique<AutofillProfileDataTypeController>(
-                db_thread_, error_callback, sync_client_,
+                db_thread_, dump_stack, sync_client_,
                 web_data_service_on_disk_));
       }
     }
@@ -183,7 +183,7 @@
       } else {
         controllers.push_back(
             std::make_unique<AutofillWalletDataTypeController>(
-                syncer::AUTOFILL_WALLET_DATA, db_thread_, error_callback,
+                syncer::AUTOFILL_WALLET_DATA, db_thread_, dump_stack,
                 sync_client_, web_data_service_on_disk_));
       }
     }
@@ -201,7 +201,7 @@
       } else {
         controllers.push_back(
             std::make_unique<AutofillWalletDataTypeController>(
-                syncer::AUTOFILL_WALLET_METADATA, db_thread_, error_callback,
+                syncer::AUTOFILL_WALLET_METADATA, db_thread_, dump_stack,
                 sync_client_, web_data_service_on_disk_));
       }
     }
@@ -221,7 +221,7 @@
                                   sync_client_->GetFaviconService()))));
     } else {
       controllers.push_back(std::make_unique<BookmarkDataTypeController>(
-          error_callback, sync_client_));
+          dump_stack, sync_client_));
     }
   }
 
@@ -244,12 +244,12 @@
               switches::kSyncPseudoUSSHistoryDeleteDirectives)) {
         controllers.push_back(
             std::make_unique<HistoryDeleteDirectivesModelTypeController>(
-                sync_client_));
+                dump_stack, sync_client_));
 
       } else {
         controllers.push_back(
             std::make_unique<HistoryDeleteDirectivesDataTypeController>(
-                error_callback, sync_client_));
+                dump_stack, sync_client_));
       }
     }
 
@@ -270,7 +270,7 @@
                 history_disabled_pref_));
       } else {
         controllers.push_back(std::make_unique<SessionDataTypeController>(
-            error_callback, sync_client_, local_device_info_provider,
+            dump_stack, sync_client_, local_device_info_provider,
             history_disabled_pref_));
       }
     }
@@ -285,14 +285,16 @@
                 sync_client_->GetModelTypeStoreService()->GetStoreFactory(),
                 base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                                base::Unretained(sync_client_),
-                               syncer::FAVICON_IMAGES)));
+                               syncer::FAVICON_IMAGES),
+                dump_stack));
         controllers.push_back(
             std::make_unique<SyncableServiceBasedModelTypeController>(
                 syncer::FAVICON_TRACKING,
                 sync_client_->GetModelTypeStoreService()->GetStoreFactory(),
                 base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                                base::Unretained(sync_client_),
-                               syncer::FAVICON_TRACKING)));
+                               syncer::FAVICON_TRACKING),
+                dump_stack));
       } else {
         controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
             syncer::FAVICON_IMAGES, base::RepeatingClosure(), sync_client_,
@@ -308,7 +310,7 @@
   // disabled.
   if (!disabled_types.Has(syncer::PASSWORDS)) {
     controllers.push_back(std::make_unique<PasswordDataTypeController>(
-        error_callback, sync_client_,
+        dump_stack, sync_client_,
         sync_client_->GetPasswordStateChangedCallback(), password_store_));
   }
 
@@ -324,10 +326,11 @@
               sync_client_->GetModelTypeStoreService()->GetStoreFactory(),
               base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                              base::Unretained(sync_client_),
-                             syncer::PREFERENCES)));
+                             syncer::PREFERENCES),
+              dump_stack));
     } else {
       controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
-          syncer::PREFERENCES, error_callback, sync_client_, syncer::GROUP_UI,
+          syncer::PREFERENCES, dump_stack, sync_client_, syncer::GROUP_UI,
           ui_thread_));
     }
   }
@@ -341,10 +344,11 @@
               sync_client_->GetModelTypeStoreService()->GetStoreFactory(),
               base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                              base::Unretained(sync_client_),
-                             syncer::PRIORITY_PREFERENCES)));
+                             syncer::PRIORITY_PREFERENCES),
+              dump_stack));
     } else {
       controllers.push_back(std::make_unique<AsyncDirectoryTypeController>(
-          syncer::PRIORITY_PREFERENCES, error_callback, sync_client_,
+          syncer::PRIORITY_PREFERENCES, dump_stack, sync_client_,
           syncer::GROUP_UI, ui_thread_));
     }
   }
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.cc
index 349658d..1ce2d3f 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.cc
@@ -16,7 +16,6 @@
 #include "components/data_reduction_proxy/core/common/lofi_decider.h"
 #include "components/data_use_measurement/core/data_use.h"
 #include "components/data_use_measurement/core/data_use_ascriber.h"
-#include "components/previews/core/previews_user_data.h"
 #include "net/http/http_response_headers.h"
 #include "net/url_request/url_request.h"
 #include "url/gurl.h"
@@ -48,8 +47,6 @@
 const void* const DataUseUserDataBytes::kUserDataKey =
     &DataUseUserDataBytes::kUserDataKey;
 
-const void* const kDataUsePreviewsUserDataKey = &kDataUsePreviewsUserDataKey;
-
 }  // namespace
 
 namespace data_reduction_proxy {
@@ -96,13 +93,6 @@
     return;
   }
 
-  previews::PreviewsUserData* previews_user_data =
-      previews::PreviewsUserData::GetData(request);
-  if (previews_user_data) {
-    data_use->SetUserData(kDataUsePreviewsUserDataKey,
-                          previews_user_data->DeepCopy());
-  }
-
   if (request.GetTotalReceivedBytes() <= 0)
     return;
 
@@ -144,9 +134,4 @@
     data_use_measurement::DataUse* data_use) {
 }
 
-const void*
-DataReductionProxyDataUseObserver::GetDataUsePreviewsUserDataKeyForTesting() {
-  return kDataUsePreviewsUserDataKey;
-}
-
 }  // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.h
index 3c9b8fa..6d5f679 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_data_use_observer.h
@@ -44,8 +44,6 @@
   void OnNetworkBytesUpdate(const net::URLRequest& request,
                             data_use_measurement::DataUse* data_use) override {}
 
-  const void* GetDataUsePreviewsUserDataKeyForTesting();
-
   // |data_reduction_proxy_io_data_| owns |this| and is destroyed only after
   // |this| is destroyed in the IO thread.
   DataReductionProxyIOData* data_reduction_proxy_io_data_;
diff --git a/components/history/core/browser/sync/history_delete_directives_model_type_controller.cc b/components/history/core/browser/sync/history_delete_directives_model_type_controller.cc
index 9b719bd..49e56cec 100644
--- a/components/history/core/browser/sync/history_delete_directives_model_type_controller.cc
+++ b/components/history/core/browser/sync/history_delete_directives_model_type_controller.cc
@@ -14,13 +14,16 @@
 namespace browser_sync {
 
 HistoryDeleteDirectivesModelTypeController::
-    HistoryDeleteDirectivesModelTypeController(syncer::SyncClient* sync_client)
+    HistoryDeleteDirectivesModelTypeController(
+        const base::RepeatingClosure& dump_stack,
+        syncer::SyncClient* sync_client)
     : SyncableServiceBasedModelTypeController(
           syncer::HISTORY_DELETE_DIRECTIVES,
           sync_client->GetModelTypeStoreService()->GetStoreFactory(),
           base::BindOnce(&syncer::SyncClient::GetSyncableServiceForType,
                          base::Unretained(sync_client),
-                         syncer::HISTORY_DELETE_DIRECTIVES)),
+                         syncer::HISTORY_DELETE_DIRECTIVES),
+          dump_stack),
       sync_client_(sync_client) {}
 
 HistoryDeleteDirectivesModelTypeController::
diff --git a/components/history/core/browser/sync/history_delete_directives_model_type_controller.h b/components/history/core/browser/sync/history_delete_directives_model_type_controller.h
index 516b35d..ba0e706 100644
--- a/components/history/core/browser/sync/history_delete_directives_model_type_controller.h
+++ b/components/history/core/browser/sync/history_delete_directives_model_type_controller.h
@@ -5,6 +5,7 @@
 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_SYNC_HISTORY_DELETE_DIRECTIVES_MODEL_TYPE_CONTROLLER_H_
 #define COMPONENTS_HISTORY_CORE_BROWSER_SYNC_HISTORY_DELETE_DIRECTIVES_MODEL_TYPE_CONTROLLER_H_
 
+#include "base/callback_forward.h"
 #include "base/macros.h"
 #include "components/sync/driver/sync_service_observer.h"
 #include "components/sync/driver/syncable_service_based_model_type_controller.h"
@@ -22,7 +23,8 @@
       public syncer::SyncServiceObserver {
  public:
   // |sync_client| must not be null and must outlive this object.
-  explicit HistoryDeleteDirectivesModelTypeController(
+  HistoryDeleteDirectivesModelTypeController(
+      const base::RepeatingClosure& dump_stack,
       syncer::SyncClient* sync_client);
   ~HistoryDeleteDirectivesModelTypeController() override;
 
diff --git a/components/metrics/call_stack_profile_metrics_provider.cc b/components/metrics/call_stack_profile_metrics_provider.cc
index 3001801..36a7090 100644
--- a/components/metrics/call_stack_profile_metrics_provider.cc
+++ b/components/metrics/call_stack_profile_metrics_provider.cc
@@ -4,6 +4,8 @@
 
 #include "components/metrics/call_stack_profile_metrics_provider.h"
 
+#include <algorithm>
+#include <iterator>
 #include <utility>
 #include <vector>
 
@@ -37,6 +39,34 @@
 // profile representation.
 constexpr size_t kMaxPendingUnserializedProfiles = 250;
 
+// Merges the serialized profiles into the unserialized ones, by appending them.
+// The params are not const& because they should be passed using std::move.
+// Implementation note: In order to maintain the invariant that profiles are
+// reported in correct temporal sequence, it's important to order the serialized
+// profiles to follow the unserialized profiles. This way, profiles that were
+// serialized simply for space efficiency will end up ordered correctly.
+std::vector<SampledProfile> MergeProfiles(
+    std::vector<SampledProfile> profiles,
+    std::vector<std::string> serialized_profiles) {
+  // Deserialize all serialized profiles, skipping over any that fail to parse.
+  std::vector<SampledProfile> deserialized_profiles;
+  deserialized_profiles.reserve(serialized_profiles.size());
+  for (const auto& serialized_profile : serialized_profiles) {
+    SampledProfile profile;
+    if (profile.ParseFromArray(serialized_profile.data(),
+                               serialized_profile.size())) {
+      deserialized_profiles.push_back(std::move(profile));
+    }
+  }
+
+  // Merge the profiles.
+  profiles.reserve(profiles.size() + deserialized_profiles.size());
+  std::move(deserialized_profiles.begin(), deserialized_profiles.end(),
+            std::back_inserter(profiles));
+
+  return profiles;
+}
+
 // PendingProfiles ------------------------------------------------------------
 
 // Singleton class responsible for retaining profiles received from
@@ -51,31 +81,27 @@
  public:
   static PendingProfiles* GetInstance();
 
-  // Retrieves all the pending unserialized profiles.
-  std::vector<SampledProfile> RetrieveUnserializedProfiles();
+  // Retrieves all the pending profiles.
+  std::vector<SampledProfile> RetrieveProfiles();
 
-  // Retrieves all the pending serialized profiles.
-  std::vector<std::string> RetrieveSerializedProfiles();
-
-  // Enables the collection of profiles by CollectUnserializedProfile or
-  // CollectSerializedProfile if |enabled| is true. Otherwise, clears current
-  // profiles and ignores profiles provided to future invocations of
-  // CollectUnserializedProfile or CollectSerializedProfile.
+  // Enables the collection of profiles by MaybeCollect*Profile if |enabled| is
+  // true. Otherwise, clears the currently collected profiles and ignores
+  // profiles provided to future invocations of MaybeCollect*Profile.
   void SetCollectionEnabled(bool enabled);
 
-  // Returns true if collection is enabled for a given profile based on its
-  // |profile_start_time|.
-  bool IsCollectionEnabledForProfile(base::TimeTicks profile_start_time) const;
-
   // Collects |profile|. It may be stored as it is, or in a serialized form, or
-  // ignored, depending on the pre-defined storage capacity; it is not const&
-  // because it must be passed with std::move.
-  void CollectUnserializedProfile(SampledProfile profile);
+  // ignored, depending on the pre-defined storage capacity and whether
+  // collection is enabled. |profile| is not const& because it must be passed
+  // with std::move.
+  void MaybeCollectProfile(base::TimeTicks profile_start_time,
+                           SampledProfile profile);
 
   // Collects |serialized_profile|. It may be ignored depending on the
-  // pre-defined storage capacity; it is not const& because it must be passed
-  // with std::move.
-  void CollectSerializedProfile(std::string serialized_profile);
+  // pre-defined storage capacity and whether collection is enabled.
+  // |serialized_profile| is not const& because it must be passed with
+  // std::move.
+  void MaybeCollectSerializedProfile(base::TimeTicks profile_start_time,
+                                     std::string serialized_profile);
 
   // Allows testing against the initial state multiple times.
   void ResetToDefaultStateForTesting();
@@ -86,11 +112,19 @@
   PendingProfiles();
   ~PendingProfiles() = delete;
 
+  // Returns true if collection is enabled for a given profile based on its
+  // |profile_start_time|. The |lock_| must be held prior to calling this
+  // method.
+  bool IsCollectionEnabledForProfile(base::TimeTicks profile_start_time) const;
+
+  // Whether there is spare capacity to store an additional profile.
+  // The |lock_| must be held prior to calling this method.
+  bool HasSpareCapacity() const;
+
   mutable base::Lock lock_;
 
-  // If true, profiles provided to CollectUnserializedProfile or
-  // CollectSerializedProfile should be collected. Otherwise they will be
-  // ignored.
+  // If true, profiles provided to MaybeCollect*Profile should be collected.
+  // Otherwise they will be ignored.
   bool collection_enabled_;
 
   // The last time collection was disabled. Used to determine if collection was
@@ -117,14 +151,20 @@
   return instance.get();
 }
 
-std::vector<SampledProfile> PendingProfiles::RetrieveUnserializedProfiles() {
-  base::AutoLock scoped_lock(lock_);
-  return std::move(unserialized_profiles_);
-}
+std::vector<SampledProfile> PendingProfiles::RetrieveProfiles() {
+  std::vector<SampledProfile> profiles;
+  std::vector<std::string> serialized_profiles;
 
-std::vector<std::string> PendingProfiles::RetrieveSerializedProfiles() {
-  base::AutoLock scoped_lock(lock_);
-  return std::move(serialized_profiles_);
+  {
+    base::AutoLock scoped_lock(lock_);
+    profiles.swap(unserialized_profiles_);
+    serialized_profiles.swap(serialized_profiles_);
+  }
+
+  // Merge the serialized profiles by deserializing them. Note that this work is
+  // performed without holding the lock, to avoid blocking the lock for an
+  // extended period of time.
+  return MergeProfiles(std::move(profiles), std::move(serialized_profiles));
 }
 
 void PendingProfiles::SetCollectionEnabled(bool enabled) {
@@ -143,7 +183,7 @@
 
 bool PendingProfiles::IsCollectionEnabledForProfile(
     base::TimeTicks profile_start_time) const {
-  base::AutoLock scoped_lock(lock_);
+  lock_.AssertAcquired();
 
   // Scenario 1: return false if collection is disabled.
   if (!collection_enabled_)
@@ -168,33 +208,50 @@
   return true;
 }
 
-void PendingProfiles::CollectUnserializedProfile(SampledProfile profile) {
-  base::AutoLock scoped_lock(lock_);
-
-  // Store the unserialized profile directly if we are under the capacity for
-  // unserialized profiles.
-  if (unserialized_profiles_.size() < kMaxPendingUnserializedProfiles) {
-    unserialized_profiles_.push_back(std::move(profile));
-    return;
-  }
-
-  // If there is no room for unserialized profiles but there is still room for
-  // serialized profiles, convert the unserialized profile to serialized form.
-  if ((unserialized_profiles_.size() + serialized_profiles_.size()) <
-      kMaxPendingProfiles) {
-    std::string serialized_profile;
-    profile.SerializeToString(&serialized_profile);
-    serialized_profiles_.push_back(std::move(serialized_profile));
-  }
+bool PendingProfiles::HasSpareCapacity() const {
+  lock_.AssertAcquired();
+  return (unserialized_profiles_.size() + serialized_profiles_.size()) <
+         kMaxPendingProfiles;
 }
 
-void PendingProfiles::CollectSerializedProfile(std::string serialized_profile) {
+void PendingProfiles::MaybeCollectProfile(base::TimeTicks profile_start_time,
+                                          SampledProfile profile) {
+  {
+    base::AutoLock scoped_lock(lock_);
+
+    if (!IsCollectionEnabledForProfile(profile_start_time))
+      return;
+
+    // Store the unserialized profile directly if there's room.
+    if (unserialized_profiles_.size() < kMaxPendingUnserializedProfiles) {
+      unserialized_profiles_.push_back(std::move(profile));
+      return;
+    }
+
+    // This early return is strictly a performance optimization to avoid doing
+    // unnecessary serialization below.  For correctness, since the
+    // serialization happens without holding the lock, it's necessary to check
+    // this condition again prior to actually collecting the serialized profile.
+    if (!HasSpareCapacity())
+      return;
+  }
+
+  // There was no room to store the unserialized profile directly, but there was
+  // room to store it in serialized form. Serialize the profile without holding
+  // the lock, then try again to store it.
+  std::string serialized_profile;
+  profile.SerializeToString(&serialized_profile);
+  MaybeCollectSerializedProfile(profile_start_time,
+                                std::move(serialized_profile));
+}
+
+void PendingProfiles::MaybeCollectSerializedProfile(
+    base::TimeTicks profile_start_time,
+    std::string serialized_profile) {
   base::AutoLock scoped_lock(lock_);
 
-  if ((unserialized_profiles_.size() + serialized_profiles_.size()) <
-      kMaxPendingProfiles) {
+  if (IsCollectionEnabledForProfile(profile_start_time) && HasSpareCapacity())
     serialized_profiles_.push_back(std::move(serialized_profile));
-  }
 }
 
 void PendingProfiles::ResetToDefaultStateForTesting() {
@@ -229,26 +286,16 @@
 void CallStackProfileMetricsProvider::ReceiveProfile(
     base::TimeTicks profile_start_time,
     SampledProfile profile) {
-  if (!PendingProfiles::GetInstance()->IsCollectionEnabledForProfile(
-          profile_start_time)) {
-    return;
-  }
-
-  PendingProfiles::GetInstance()->CollectUnserializedProfile(
-      std::move(profile));
+  PendingProfiles::GetInstance()->MaybeCollectProfile(profile_start_time,
+                                                      std::move(profile));
 }
 
 // static
 void CallStackProfileMetricsProvider::ReceiveSerializedProfile(
     base::TimeTicks profile_start_time,
     std::string serialized_profile) {
-  if (!PendingProfiles::GetInstance()->IsCollectionEnabledForProfile(
-          profile_start_time)) {
-    return;
-  }
-
-  PendingProfiles::GetInstance()->CollectSerializedProfile(
-      std::move(serialized_profile));
+  PendingProfiles::GetInstance()->MaybeCollectSerializedProfile(
+      profile_start_time, std::move(serialized_profile));
 }
 
 void CallStackProfileMetricsProvider::OnRecordingEnabled() {
@@ -262,25 +309,13 @@
 
 void CallStackProfileMetricsProvider::ProvideCurrentSessionData(
     ChromeUserMetricsExtension* uma_proto) {
-  std::vector<SampledProfile> unserialized_profiles =
-      PendingProfiles::GetInstance()->RetrieveUnserializedProfiles();
+  std::vector<SampledProfile> profiles =
+      PendingProfiles::GetInstance()->RetrieveProfiles();
 
-  std::vector<std::string> serialized_profiles =
-      PendingProfiles::GetInstance()->RetrieveSerializedProfiles();
+  DCHECK(base::FeatureList::IsEnabled(kEnableReporting) || profiles.empty());
 
-  DCHECK(base::FeatureList::IsEnabled(kEnableReporting) ||
-         (unserialized_profiles.empty() && serialized_profiles.empty()));
-
-  for (auto& profile : unserialized_profiles)
+  for (auto& profile : profiles)
     *uma_proto->add_sampled_profile() = std::move(profile);
-
-  for (auto& serialized_profile : serialized_profiles) {
-    SampledProfile profile;
-    if (profile.ParseFromArray(serialized_profile.data(),
-                               serialized_profile.size())) {
-      *uma_proto->add_sampled_profile() = std::move(profile);
-    }
-  }
 }
 
 // static
diff --git a/components/password_manager/core/browser/new_password_form_manager_unittest.cc b/components/password_manager/core/browser/new_password_form_manager_unittest.cc
index 7facc82c..ca29178e 100644
--- a/components/password_manager/core/browser/new_password_form_manager_unittest.cc
+++ b/components/password_manager/core/browser/new_password_form_manager_unittest.cc
@@ -208,7 +208,7 @@
     fetcher_.reset(new FakeFormFetcher());
     fetcher_->Fetch();
     form_manager_.reset(new NewPasswordFormManager(
-        &client_, driver_.AsWeakPtr(), observed_form_, fetcher_.get(),
+        &client_, driver_.AsWeakPtr(), observed_form, fetcher_.get(),
         std::make_unique<NiceMock<MockFormSaver>>()));
   }
 };
diff --git a/components/previews/content/BUILD.gn b/components/previews/content/BUILD.gn
index cda199d..37e2853 100644
--- a/components/previews/content/BUILD.gn
+++ b/components/previews/content/BUILD.gn
@@ -16,6 +16,8 @@
     "previews_optimization_guide.h",
     "previews_ui_service.cc",
     "previews_ui_service.h",
+    "previews_user_data.cc",
+    "previews_user_data.h",
   ]
 
   deps = [
@@ -40,6 +42,7 @@
     "previews_hints_unittest.cc",
     "previews_optimization_guide_unittest.cc",
     "previews_ui_service_unittest.cc",
+    "previews_user_data_unittest.cc",
   ]
 
   deps = [
diff --git a/components/previews/content/previews_content_util.cc b/components/previews/content/previews_content_util.cc
index 08075b90..f7b3e7c 100644
--- a/components/previews/content/previews_content_util.cc
+++ b/components/previews/content/previews_content_util.cc
@@ -5,7 +5,7 @@
 #include "components/previews/content/previews_content_util.h"
 
 #include "base/metrics/histogram_macros.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "net/url_request/url_request.h"
 
 namespace previews {
diff --git a/components/previews/content/previews_decider_impl.cc b/components/previews/content/previews_decider_impl.cc
index e2d95722..ec549e1 100644
--- a/components/previews/content/previews_decider_impl.cc
+++ b/components/previews/content/previews_decider_impl.cc
@@ -19,9 +19,9 @@
 #include "base/time/clock.h"
 #include "components/blacklist/opt_out_blacklist/opt_out_store.h"
 #include "components/previews/content/previews_ui_service.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_experiments.h"
 #include "components/previews/core/previews_switches.h"
-#include "components/previews/core/previews_user_data.h"
 #include "net/base/load_flags.h"
 #include "net/nqe/network_quality_estimator.h"
 #include "net/url_request/url_request.h"
diff --git a/components/previews/content/previews_decider_impl_unittest.cc b/components/previews/content/previews_decider_impl_unittest.cc
index 73a16c873..f144f5a 100644
--- a/components/previews/content/previews_decider_impl_unittest.cc
+++ b/components/previews/content/previews_decider_impl_unittest.cc
@@ -35,12 +35,12 @@
 #include "components/blacklist/opt_out_blacklist/opt_out_store.h"
 #include "components/optimization_guide/optimization_guide_service.h"
 #include "components/previews/content/previews_ui_service.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/previews_black_list.h"
 #include "components/previews/core/previews_experiments.h"
 #include "components/previews/core/previews_features.h"
 #include "components/previews/core/previews_logger.h"
 #include "components/previews/core/previews_switches.h"
-#include "components/previews/core/previews_user_data.h"
 #include "components/variations/variations_associated_data.h"
 #include "net/base/load_flags.h"
 #include "net/nqe/effective_connection_type.h"
diff --git a/components/previews/content/previews_hints.h b/components/previews/content/previews_hints.h
index 9755fb5..9ade6551 100644
--- a/components/previews/content/previews_hints.h
+++ b/components/previews/content/previews_hints.h
@@ -14,8 +14,8 @@
 #include "components/optimization_guide/proto/hints.pb.h"
 #include "components/previews/content/hint_cache.h"
 #include "components/previews/content/previews_hints.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/host_filter.h"
-#include "components/previews/core/previews_user_data.h"
 #include "components/url_matcher/url_matcher.h"
 
 class GURL;
diff --git a/components/previews/content/previews_optimization_guide.cc b/components/previews/content/previews_optimization_guide.cc
index 0ae87a2..7cdc9d15 100644
--- a/components/previews/content/previews_optimization_guide.cc
+++ b/components/previews/content/previews_optimization_guide.cc
@@ -10,7 +10,7 @@
 #include "base/task_runner_util.h"
 #include "components/optimization_guide/proto/hints.pb.h"
 #include "components/previews/content/previews_hints.h"
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 #include "net/url_request/url_request.h"
 #include "url/gurl.h"
 
diff --git a/components/previews/content/previews_optimization_guide_unittest.cc b/components/previews/content/previews_optimization_guide_unittest.cc
index 78bb615..d43177f5 100644
--- a/components/previews/content/previews_optimization_guide_unittest.cc
+++ b/components/previews/content/previews_optimization_guide_unittest.cc
@@ -21,9 +21,9 @@
 #include "components/optimization_guide/optimization_guide_service.h"
 #include "components/optimization_guide/optimization_guide_service_observer.h"
 #include "components/optimization_guide/proto/hints.pb.h"
+#include "components/previews/content/previews_user_data.h"
 #include "components/previews/core/bloom_filter.h"
 #include "components/previews/core/previews_features.h"
-#include "components/previews/core/previews_user_data.h"
 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
 #include "net/url_request/url_request.h"
 #include "net/url_request/url_request_test_util.h"
diff --git a/components/previews/core/previews_user_data.cc b/components/previews/content/previews_user_data.cc
similarity index 95%
rename from components/previews/core/previews_user_data.cc
rename to components/previews/content/previews_user_data.cc
index 670b97f6..f8546d7 100644
--- a/components/previews/core/previews_user_data.cc
+++ b/components/previews/content/previews_user_data.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 
 #include "base/memory/ptr_util.h"
 #include "net/url_request/url_request.h"
diff --git a/components/previews/core/previews_user_data.h b/components/previews/content/previews_user_data.h
similarity index 95%
rename from components/previews/core/previews_user_data.h
rename to components/previews/content/previews_user_data.h
index baa9eb1..048acc3 100644
--- a/components/previews/core/previews_user_data.h
+++ b/components/previews/content/previews_user_data.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef COMPONENTS_PREVIEWS_CORE_PREVIEWS_USER_DATA_H_
-#define COMPONENTS_PREVIEWS_CORE_PREVIEWS_USER_DATA_H_
+#ifndef COMPONENTS_PREVIEWS_CONTENT_PREVIEWS_USER_DATA_H_
+#define COMPONENTS_PREVIEWS_CONTENT_PREVIEWS_USER_DATA_H_
 
 #include <stdint.h>
 
@@ -116,4 +116,4 @@
 
 }  // namespace previews
 
-#endif  // COMPONENTS_PREVIEWS_CORE_PREVIEWS_USER_DATA_H_
+#endif  // COMPONENTS_PREVIEWS_CONTENT_PREVIEWS_USER_DATA_H_
diff --git a/components/previews/core/previews_user_data_unittest.cc b/components/previews/content/previews_user_data_unittest.cc
similarity index 97%
rename from components/previews/core/previews_user_data_unittest.cc
rename to components/previews/content/previews_user_data_unittest.cc
index 8714a342..f4d17e1 100644
--- a/components/previews/core/previews_user_data_unittest.cc
+++ b/components/previews/content/previews_user_data_unittest.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "components/previews/core/previews_user_data.h"
+#include "components/previews/content/previews_user_data.h"
 
 #include <stdint.h>
 
diff --git a/components/previews/core/BUILD.gn b/components/previews/core/BUILD.gn
index 628e078..0ae8cc9 100644
--- a/components/previews/core/BUILD.gn
+++ b/components/previews/core/BUILD.gn
@@ -20,8 +20,6 @@
     "previews_logger_observer.h",
     "previews_switches.cc",
     "previews_switches.h",
-    "previews_user_data.cc",
-    "previews_user_data.h",
   ]
 
   deps = [
@@ -61,7 +59,6 @@
     "previews_black_list_unittest.cc",
     "previews_experiments_unittest.cc",
     "previews_logger_unittest.cc",
-    "previews_user_data_unittest.cc",
   ]
 
   deps = [
diff --git a/components/sync/driver/syncable_service_based_model_type_controller.cc b/components/sync/driver/syncable_service_based_model_type_controller.cc
index acb155d..d90bbe3 100644
--- a/components/sync/driver/syncable_service_based_model_type_controller.cc
+++ b/components/sync/driver/syncable_service_based_model_type_controller.cc
@@ -22,10 +22,12 @@
 
   ControllerDelegate(ModelType type,
                      OnceModelTypeStoreFactory store_factory,
-                     SyncableServiceProvider syncable_service_provider)
+                     SyncableServiceProvider syncable_service_provider,
+                     const base::RepeatingClosure& dump_stack)
       : type_(type),
         store_factory_(std::move(store_factory)),
-        syncable_service_provider_(std::move(syncable_service_provider)) {
+        syncable_service_provider_(std::move(syncable_service_provider)),
+        dump_stack_(dump_stack) {
     DCHECK(store_factory_);
     DCHECK(syncable_service_provider_);
   }
@@ -62,9 +64,8 @@
       DCHECK(syncable_service);
       bridge_ = std::make_unique<SyncableServiceBasedBridge>(
           type_, std::move(store_factory_),
-          std::make_unique<ClientTagBasedModelTypeProcessor>(
-              type_,
-              /*dump_stack=*/base::RepeatingClosure()),
+          std::make_unique<ClientTagBasedModelTypeProcessor>(type_,
+                                                             dump_stack_),
           syncable_service.get());
     }
     return bridge_->change_processor()->GetControllerDelegate().get();
@@ -73,6 +74,7 @@
   const ModelType type_;
   OnceModelTypeStoreFactory store_factory_;
   SyncableServiceProvider syncable_service_provider_;
+  const base::RepeatingClosure dump_stack_;
   std::unique_ptr<ModelTypeSyncBridge> bridge_;
 
   DISALLOW_COPY_AND_ASSIGN(ControllerDelegate);
@@ -84,12 +86,14 @@
     SyncableServiceBasedModelTypeController(
         ModelType type,
         OnceModelTypeStoreFactory store_factory,
-        SyncableServiceProvider syncable_service_provider)
+        SyncableServiceProvider syncable_service_provider,
+        const base::RepeatingClosure& dump_stack)
     : ModelTypeController(type,
                           std::make_unique<ControllerDelegate>(
                               type,
                               std::move(store_factory),
-                              std::move(syncable_service_provider))) {}
+                              std::move(syncable_service_provider),
+                              dump_stack)) {}
 
 SyncableServiceBasedModelTypeController::
     ~SyncableServiceBasedModelTypeController() {}
diff --git a/components/sync/driver/syncable_service_based_model_type_controller.h b/components/sync/driver/syncable_service_based_model_type_controller.h
index bdc38fd..36e4457 100644
--- a/components/sync/driver/syncable_service_based_model_type_controller.h
+++ b/components/sync/driver/syncable_service_based_model_type_controller.h
@@ -28,7 +28,8 @@
   SyncableServiceBasedModelTypeController(
       ModelType type,
       OnceModelTypeStoreFactory store_factory,
-      SyncableServiceProvider syncable_service_provider);
+      SyncableServiceProvider syncable_service_provider,
+      const base::RepeatingClosure& dump_stack);
   ~SyncableServiceBasedModelTypeController() override;
 
  private:
diff --git a/components/sync/model/model_type_sync_bridge.cc b/components/sync/model/model_type_sync_bridge.cc
index 28278a1..f83c1ce0 100644
--- a/components/sync/model/model_type_sync_bridge.cc
+++ b/components/sync/model/model_type_sync_bridge.cc
@@ -56,6 +56,10 @@
   return StopSyncResponse::kModelStillReadyToSync;
 }
 
+size_t ModelTypeSyncBridge::EstimateSyncOverheadMemoryUsage() const {
+  return 0U;
+}
+
 ModelTypeChangeProcessor* ModelTypeSyncBridge::change_processor() {
   return change_processor_.get();
 }
diff --git a/components/sync/model/model_type_sync_bridge.h b/components/sync/model/model_type_sync_bridge.h
index a297134..cd97b69c 100644
--- a/components/sync/model/model_type_sync_bridge.h
+++ b/components/sync/model/model_type_sync_bridge.h
@@ -167,6 +167,13 @@
   virtual StopSyncResponse ApplyStopSyncChanges(
       std::unique_ptr<MetadataChangeList> delete_metadata_change_list);
 
+  // Returns an estimate of memory usage attributed to sync (that is, excludes
+  // the actual model). Because the resulting UMA metrics are often used to
+  // compare with the non-USS equivalent implementations (SyncableService), it's
+  // a good idea to account for overhead that would also get accounted for the
+  // SyncableService by other means.
+  virtual size_t EstimateSyncOverheadMemoryUsage() const;
+
   // Needs to be informed about any model change occurring via Delete() and
   // Put(). The changing metadata should be stored to persistent storage
   // before or atomically with the model changes.
diff --git a/components/sync/model_impl/client_tag_based_model_type_processor.cc b/components/sync/model_impl/client_tag_based_model_type_processor.cc
index f434a21..902e04a 100644
--- a/components/sync/model_impl/client_tag_based_model_type_processor.cc
+++ b/components/sync/model_impl/client_tag_based_model_type_processor.cc
@@ -1175,8 +1175,9 @@
   memory_usage += EstimateMemoryUsage(model_type_state_);
   memory_usage += EstimateMemoryUsage(entities_);
   memory_usage += EstimateMemoryUsage(storage_key_to_tag_hash_);
-  // TODO(crbug.com/870624): Let bridges provide custom additional memory
-  // overhead, which is important for SyncableServiceBasedBridge.
+  if (bridge_) {
+    memory_usage += bridge_->EstimateSyncOverheadMemoryUsage();
+  }
   return memory_usage;
 }
 
diff --git a/components/sync/model_impl/syncable_service_based_bridge.cc b/components/sync/model_impl/syncable_service_based_bridge.cc
index 49590a1..daeb696 100644
--- a/components/sync/model_impl/syncable_service_based_bridge.cc
+++ b/components/sync/model_impl/syncable_service_based_bridge.cc
@@ -10,6 +10,7 @@
 #include "base/bind.h"
 #include "base/bind_helpers.h"
 #include "base/location.h"
+#include "base/trace_event/memory_usage_estimator.h"
 #include "components/sync/base/hash_util.h"
 #include "components/sync/model/mutable_data_batch.h"
 #include "components/sync/model/sync_change.h"
@@ -17,6 +18,7 @@
 #include "components/sync/model/syncable_service.h"
 #include "components/sync/model_impl/client_tag_based_model_type_processor.h"
 #include "components/sync/protocol/persisted_entity_data.pb.h"
+#include "components/sync/protocol/proto_memory_estimations.h"
 
 namespace syncer {
 namespace {
@@ -381,6 +383,10 @@
   return StopSyncResponse::kModelStillReadyToSync;
 }
 
+size_t SyncableServiceBasedBridge::EstimateSyncOverheadMemoryUsage() const {
+  return base::trace_event::EstimateMemoryUsage(in_memory_store_);
+}
+
 void SyncableServiceBasedBridge::OnStoreCreated(
     const base::Optional<ModelError>& error,
     std::unique_ptr<ModelTypeStore> store) {
diff --git a/components/sync/model_impl/syncable_service_based_bridge.h b/components/sync/model_impl/syncable_service_based_bridge.h
index 938d809..422104dc 100644
--- a/components/sync/model_impl/syncable_service_based_bridge.h
+++ b/components/sync/model_impl/syncable_service_based_bridge.h
@@ -58,6 +58,7 @@
       const EntityData& remote_data) const override;
   StopSyncResponse ApplyStopSyncChanges(
       std::unique_ptr<MetadataChangeList> delete_metadata_change_list) override;
+  size_t EstimateSyncOverheadMemoryUsage() const override;
 
  private:
   void OnStoreCreated(const base::Optional<ModelError>& error,
diff --git a/components/sync/protocol/proto_memory_estimations.cc b/components/sync/protocol/proto_memory_estimations.cc
index 0f66046..bb4a0e9 100644
--- a/components/sync/protocol/proto_memory_estimations.cc
+++ b/components/sync/protocol/proto_memory_estimations.cc
@@ -126,6 +126,7 @@
 INSTANTIATE(EntityMetadata)
 INSTANTIATE(EntitySpecifics)
 INSTANTIATE(ModelTypeState)
+INSTANTIATE(PersistedEntityData)
 INSTANTIATE(UniquePosition)
 
 }  // namespace sync_pb
diff --git a/components/sync/protocol/proto_visitors.h b/components/sync/protocol/proto_visitors.h
index 4605004c..44853c0 100644
--- a/components/sync/protocol/proto_visitors.h
+++ b/components/sync/protocol/proto_visitors.h
@@ -26,6 +26,7 @@
 #include "components/sync/protocol/mountain_share_specifics.pb.h"
 #include "components/sync/protocol/nigori_specifics.pb.h"
 #include "components/sync/protocol/password_specifics.pb.h"
+#include "components/sync/protocol/persisted_entity_data.pb.h"
 #include "components/sync/protocol/preference_specifics.pb.h"
 #include "components/sync/protocol/printer_specifics.pb.h"
 #include "components/sync/protocol/priority_preference_specifics.pb.h"
@@ -666,6 +667,11 @@
   VISIT(url);
 }
 
+VISIT_PROTO_FIELDS(const sync_pb::PersistedEntityData& proto) {
+  VISIT(non_unique_name);
+  VISIT(specifics);
+}
+
 VISIT_PROTO_FIELDS(const sync_pb::PreCommitUpdateAvoidanceFlags& proto) {
   VISIT(enabled);
 }
diff --git a/content/browser/appcache/appcache_url_loader_job.cc b/content/browser/appcache/appcache_url_loader_job.cc
index f130eef..559ea899 100644
--- a/content/browser/appcache/appcache_url_loader_job.cc
+++ b/content/browser/appcache/appcache_url_loader_job.cc
@@ -41,6 +41,11 @@
   if (AppCacheRequestHandler::IsRunningInTests())
     return;
 
+  // Remove after http://crbug.com/882538 is fixed.
+  auto manifest_url_local = manifest_url;
+  base::debug::Alias(&manifest_url_local);
+  CHECK(loader_callback_);
+
   load_timing_info_.request_start_time = base::Time::Now();
   load_timing_info_.request_start = base::TimeTicks::Now();
 
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index 7f67abb2..c1b02ef 100644
--- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -73,8 +73,34 @@
       command_line_->HasSwitch(service_manager::switches::kNoSandbox) ||
       service_manager::IsUnsandboxedSandboxType(sandbox_type);
 
-  bool use_v2 =
-      !no_sandbox && (sandbox_type != service_manager::SANDBOX_TYPE_GPU);
+  // TODO(kerrnel): Delete this switch once the V2 sandbox is always enabled.
+  bool use_v2 = base::FeatureList::IsEnabled(features::kMacV2Sandbox);
+
+  switch (sandbox_type) {
+    case service_manager::SANDBOX_TYPE_NO_SANDBOX:
+      break;
+    case service_manager::SANDBOX_TYPE_CDM:
+    case service_manager::SANDBOX_TYPE_PPAPI:
+    case service_manager::SANDBOX_TYPE_RENDERER:
+    case service_manager::SANDBOX_TYPE_UTILITY:
+    case service_manager::SANDBOX_TYPE_NACL_LOADER:
+    case service_manager::SANDBOX_TYPE_PDF_COMPOSITOR:
+    case service_manager::SANDBOX_TYPE_PROFILING:
+      // If the feature experiment is enabled and this process type supports
+      // the v2 sandbox, use it.
+      use_v2 &= true;
+      break;
+    case service_manager::SANDBOX_TYPE_AUDIO:
+      // The audio service only exists with the v2 sandbox.
+      use_v2 |= true;
+      break;
+    default:
+      // This is a 'break' because the V2 sandbox is not enabled for all
+      // processes yet, and so there are sandbox types like NETWORK that
+      // should not be run under the V2 sandbox.
+      use_v2 = false;
+      break;
+  }
 
   if (use_v2 && !no_sandbox) {
     // Generate the profile string.
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
index 7ce9a48..cb77aba 100644
--- a/content/browser/loader/navigation_url_loader_impl.cc
+++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -677,11 +677,6 @@
     }
 
     if (signed_exchange_utils::IsSignedExchangeHandlingEnabled()) {
-      // Signed Exchange is currently disabled when Network Service is enabled
-      // (https://crbug.com/849935), but still create
-      // SignedExchangeRequestHandler in order to show error message (and
-      // devtools warning) to users.
-
       // It is safe to pass the callback of CreateURLLoaderThrottles with the
       // unretained |this|, because the passed callback will be used by a
       // SignedExchangeHandler which is indirectly owned by |this| until its
diff --git a/content/browser/service_worker/service_worker_database.cc b/content/browser/service_worker/service_worker_database.cc
index c7610f1..ce68bb22 100644
--- a/content/browser/service_worker/service_worker_database.cc
+++ b/content/browser/service_worker/service_worker_database.cc
@@ -275,6 +275,7 @@
 
 ServiceWorkerDatabase::RegistrationData::RegistrationData()
     : registration_id(blink::mojom::kInvalidServiceWorkerRegistrationId),
+      script_type(blink::mojom::ScriptType::kClassic),
       update_via_cache(blink::mojom::ServiceWorkerUpdateViaCache::kImports),
       version_id(blink::mojom::kInvalidServiceWorkerVersionId),
       is_active(false),
@@ -1410,6 +1411,15 @@
   for (uint32_t feature : data.used_features())
     out->used_features.insert(feature);
 
+  if (data.has_script_type()) {
+    auto value = data.script_type();
+    if (!ServiceWorkerRegistrationData_ServiceWorkerScriptType_IsValid(value)) {
+      DLOG(ERROR) << "Worker script type '" << value << "' is not valid.";
+      return ServiceWorkerDatabase::STATUS_ERROR_CORRUPTED;
+    }
+    out->script_type = static_cast<blink::mojom::ScriptType>(value);
+  }
+
   if (data.has_update_via_cache()) {
     auto value = data.update_via_cache();
     if (!ServiceWorkerRegistrationData_ServiceWorkerUpdateViaCacheType_IsValid(
@@ -1461,6 +1471,9 @@
   for (uint32_t feature : registration.used_features)
     data.add_used_features(feature);
 
+  data.set_script_type(
+      static_cast<ServiceWorkerRegistrationData_ServiceWorkerScriptType>(
+          registration.script_type));
   data.set_update_via_cache(
       static_cast<
           ServiceWorkerRegistrationData_ServiceWorkerUpdateViaCacheType>(
diff --git a/content/browser/service_worker/service_worker_database.h b/content/browser/service_worker/service_worker_database.h
index c99a3d8..31fee18 100644
--- a/content/browser/service_worker/service_worker_database.h
+++ b/content/browser/service_worker/service_worker_database.h
@@ -72,6 +72,7 @@
     // the waiting version. Then transition to the active version. The stored
     // version may be in the ACTIVATED state or in the INSTALLED state.
     GURL script;
+    blink::mojom::ScriptType script_type;
     blink::mojom::ServiceWorkerUpdateViaCache update_via_cache;
     int64_t version_id;
     bool is_active;
diff --git a/content/browser/service_worker/service_worker_database.proto b/content/browser/service_worker/service_worker_database.proto
index 9502e2ae..767477c 100644
--- a/content/browser/service_worker/service_worker_database.proto
+++ b/content/browser/service_worker/service_worker_database.proto
@@ -23,6 +23,10 @@
 }
 
 message ServiceWorkerRegistrationData {
+  enum ServiceWorkerScriptType {
+    CLASSIC = 0;
+    MODULE = 1;
+  }
   enum ServiceWorkerUpdateViaCacheType {
     IMPORTS = 0;
     ALL = 1;
@@ -63,6 +67,7 @@
 
   optional ServiceWorkerUpdateViaCacheType update_via_cache = 14
       [default = IMPORTS];
+  optional ServiceWorkerScriptType script_type = 15 [default = CLASSIC];
 }
 
 message ServiceWorkerResourceRecord {
diff --git a/content/browser/service_worker/service_worker_database_unittest.cc b/content/browser/service_worker/service_worker_database_unittest.cc
index 74bc0ee..011e30bf 100644
--- a/content/browser/service_worker/service_worker_database_unittest.cc
+++ b/content/browser/service_worker/service_worker_database_unittest.cc
@@ -70,14 +70,15 @@
   EXPECT_EQ(expected.registration_id, actual.registration_id);
   EXPECT_EQ(expected.scope, actual.scope);
   EXPECT_EQ(expected.script, actual.script);
+  EXPECT_EQ(expected.script_type, actual.script_type);
+  EXPECT_EQ(expected.update_via_cache, actual.update_via_cache);
   EXPECT_EQ(expected.version_id, actual.version_id);
   EXPECT_EQ(expected.is_active, actual.is_active);
   EXPECT_EQ(expected.has_fetch_handler, actual.has_fetch_handler);
   EXPECT_EQ(expected.last_update_check, actual.last_update_check);
+  EXPECT_EQ(expected.used_features, actual.used_features);
   EXPECT_EQ(expected.resources_total_size_bytes,
             actual.resources_total_size_bytes);
-  EXPECT_EQ(expected.used_features, actual.used_features);
-  EXPECT_EQ(expected.update_via_cache, actual.update_via_cache);
 }
 
 void VerifyResourceRecords(const std::vector<Resource>& expected,
@@ -124,7 +125,7 @@
 }
 
 TEST(ServiceWorkerDatabaseTest, DatabaseVersion_ValidSchemaVersion) {
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
   EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK, database->LazyOpen(true));
 
@@ -161,7 +162,7 @@
 
   // First writing triggers database initialization and bumps the schema
   // version.
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   std::vector<ServiceWorkerDatabase::ResourceRecord> resources;
   resources.push_back(CreateResource(1, URL(origin, "/resource"), 10));
   ServiceWorkerDatabase::RegistrationData deleted_version;
@@ -201,7 +202,7 @@
 
   // First writing triggers database initialization and bumps the schema
   // version.
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   std::vector<ServiceWorkerDatabase::ResourceRecord> resources;
   resources.push_back(CreateResource(1, URL(origin, "/resource"), 10));
   ServiceWorkerDatabase::RegistrationData deleted_version;
@@ -237,7 +238,7 @@
   std::unique_ptr<ServiceWorkerDatabase> database(
       CreateDatabase(database_dir.GetPath()));
 
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
 
   // The database has never been used, so returns initial values.
   AvailableIds ids;
@@ -343,7 +344,7 @@
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
 
-  GURL origin1("http://example.com");
+  GURL origin1("https://example.com");
   RegistrationData data1;
   data1.registration_id = 123;
   data1.scope = URL(origin1, "/foo");
@@ -439,7 +440,7 @@
 TEST(ServiceWorkerDatabaseTest, GetRegistrationsForOrigin) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
 
-  GURL origin1("http://example.com");
+  GURL origin1("https://example.com");
   GURL origin2("https://www.example.com");
   GURL origin3("https://example.org");
 
@@ -556,7 +557,7 @@
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
 
-  GURL origin1("http://www1.example.com");
+  GURL origin1("https://www1.example.com");
   RegistrationData data1;
   data1.registration_id = 100;
   data1.scope = URL(origin1, "/foo");
@@ -569,7 +570,7 @@
             database->WriteRegistration(data1, resources1, &deleted_version,
                                         &newly_purgeable_resources));
 
-  GURL origin2("http://www2.example.com");
+  GURL origin2("https://www2.example.com");
   RegistrationData data2;
   data2.registration_id = 200;
   data2.scope = URL(origin2, "/bar");
@@ -583,7 +584,7 @@
             database->WriteRegistration(data2, resources2, &deleted_version,
                                         &newly_purgeable_resources));
 
-  GURL origin3("http://www3.example.com");
+  GURL origin3("https://www3.example.com");
   RegistrationData data3;
   data3.registration_id = 300;
   data3.scope = URL(origin3, "/hoge");
@@ -613,6 +614,7 @@
   EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
             database->GetAllRegistrations(&registrations));
   EXPECT_EQ(4U, registrations.size());
+
   VerifyRegistrationData(data1, registrations[0]);
   VerifyRegistrationData(data2, registrations[1]);
   VerifyRegistrationData(data3, registrations[2]);
@@ -622,7 +624,7 @@
 TEST(ServiceWorkerDatabaseTest, Registration_Basic) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
 
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   RegistrationData data;
   data.registration_id = 100;
   data.scope = URL(origin, "/foo");
@@ -710,7 +712,7 @@
 TEST(ServiceWorkerDatabaseTest, DeleteNonExistentRegistration) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
 
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   RegistrationData data;
   data.registration_id = 100;
   data.scope = URL(origin, "/foo");
@@ -751,10 +753,9 @@
   deleted_version.version_id = kArbitraryVersionId;
   newly_purgeable_resources.clear();
   EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
-            database->DeleteRegistration(kNonExistentRegistrationId,
-                                         GURL("http://example.net"),
-                                         &deleted_version,
-                                         &newly_purgeable_resources));
+            database->DeleteRegistration(
+                kNonExistentRegistrationId, GURL("https://example.net"),
+                &deleted_version, &newly_purgeable_resources));
   EXPECT_EQ(blink::mojom::kInvalidServiceWorkerVersionId,
             deleted_version.version_id);
   EXPECT_TRUE(newly_purgeable_resources.empty());
@@ -763,7 +764,7 @@
 TEST(ServiceWorkerDatabaseTest, Registration_Overwrite) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
 
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   RegistrationData data;
   data.registration_id = 100;
   data.scope = URL(origin, "/foo");
@@ -802,6 +803,7 @@
   updated_data.version_id = data.version_id + 1;
   updated_data.resources_total_size_bytes = 12 + 13;
   updated_data.used_features = {109, 421, 9101};
+  updated_data.script_type = blink::mojom::ScriptType::kModule;
   updated_data.update_via_cache =
       blink::mojom::ServiceWorkerUpdateViaCache::kAll;
   std::vector<Resource> resources2;
@@ -836,7 +838,7 @@
 
 TEST(ServiceWorkerDatabaseTest, Registration_Multiple) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
 
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
@@ -941,7 +943,7 @@
 
 TEST(ServiceWorkerDatabaseTest, Registration_UninitializedDatabase) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL origin("http://example.com");
+  const GURL origin("https://example.com");
 
   // Should be failed because the database does not exist.
   RegistrationData data_out;
@@ -989,9 +991,90 @@
   EXPECT_TRUE(newly_purgeable_resources.empty());
 }
 
+TEST(ServiceWorkerDatabaseTest, Registration_ScriptType) {
+  std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
+
+  ServiceWorkerDatabase::RegistrationData deleted_version;
+  std::vector<int64_t> newly_purgeable_resources;
+
+  // Default script type.
+  GURL origin1("https://www1.example.com");
+  RegistrationData data1;
+  data1.registration_id = 100;
+  data1.scope = URL(origin1, "/foo");
+  data1.script = URL(origin1, "/resource1");
+  data1.version_id = 100;
+  data1.resources_total_size_bytes = 10 + 10000;
+  EXPECT_EQ(blink::mojom::ScriptType::kClassic, data1.script_type);
+  std::vector<Resource> resources1;
+  resources1.push_back(CreateResource(1, URL(origin1, "/resource1"), 10));
+  resources1.push_back(CreateResource(2, URL(origin1, "/resource2"), 10000));
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->WriteRegistration(data1, resources1, &deleted_version,
+                                        &newly_purgeable_resources));
+
+  // Classic script type.
+  GURL origin2("https://www2.example.com");
+  RegistrationData data2;
+  data2.registration_id = 200;
+  data2.scope = URL(origin2, "/bar");
+  data2.script = URL(origin2, "/resource3");
+  data2.version_id = 200;
+  data2.resources_total_size_bytes = 20 + 20000;
+  data2.script_type = blink::mojom::ScriptType::kClassic;
+  std::vector<Resource> resources2;
+  resources2.push_back(CreateResource(3, URL(origin2, "/resource3"), 20));
+  resources2.push_back(CreateResource(4, URL(origin2, "/resource4"), 20000));
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->WriteRegistration(data2, resources2, &deleted_version,
+                                        &newly_purgeable_resources));
+
+  // Module script type.
+  GURL origin3("https://www3.example.com");
+  RegistrationData data3;
+  data3.registration_id = 300;
+  data3.scope = URL(origin3, "/baz");
+  data3.script = URL(origin3, "/resource5");
+  data3.version_id = 300;
+  data3.resources_total_size_bytes = 30 + 30000;
+  data3.script_type = blink::mojom::ScriptType::kModule;
+  std::vector<Resource> resources3;
+  resources3.push_back(CreateResource(5, URL(origin3, "/resource5"), 30));
+  resources3.push_back(CreateResource(6, URL(origin3, "/resource6"), 30000));
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->WriteRegistration(data3, resources3, &deleted_version,
+                                        &newly_purgeable_resources));
+
+  RegistrationData data;
+  std::vector<Resource> resources;
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->ReadRegistration(data1.registration_id, origin1, &data,
+                                       &resources));
+  VerifyRegistrationData(data1, data);
+  VerifyResourceRecords(resources1, resources);
+  EXPECT_EQ(2U, resources.size());
+  resources.clear();
+
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->ReadRegistration(data2.registration_id, origin2, &data,
+                                       &resources));
+  VerifyRegistrationData(data2, data);
+  VerifyResourceRecords(resources2, resources);
+  EXPECT_EQ(2U, resources.size());
+  resources.clear();
+
+  EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
+            database->ReadRegistration(data3.registration_id, origin3, &data,
+                                       &resources));
+  VerifyRegistrationData(data3, data);
+  VerifyResourceRecords(resources3, resources);
+  EXPECT_EQ(2U, resources.size());
+  resources.clear();
+}
+
 TEST(ServiceWorkerDatabaseTest, UserData_Basic) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add a registration.
   RegistrationData data;
@@ -1107,7 +1190,7 @@
 TEST(ServiceWorkerDatabaseTest,
      UserData_ReadUserDataForAllRegistrationsByKeyPrefix) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add registration 1.
   RegistrationData data1;
@@ -1184,7 +1267,7 @@
 
 TEST(ServiceWorkerDatabaseTest, ReadUserDataByKeyPrefix) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add a registration.
   RegistrationData data;
@@ -1230,7 +1313,7 @@
 
 TEST(ServiceWorkerDatabaseTest, ReadUserKeysAndDataByKeyPrefix) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add a registration.
   RegistrationData data;
@@ -1280,7 +1363,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UserData_DeleteUserDataByKeyPrefixes) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add registration 1.
   RegistrationData data1;
@@ -1380,7 +1463,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UserData_DataIsolation) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add registration 1.
   RegistrationData data1;
@@ -1476,7 +1559,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UserData_DeleteRegistration) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Add registration 1.
   RegistrationData data1;
@@ -1557,7 +1640,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UserData_UninitializedDatabase) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  const GURL kOrigin("http://example.com");
+  const GURL kOrigin("https://example.com");
 
   // Should be failed because the database does not exist.
   std::vector<std::string> user_data_out;
@@ -1589,7 +1672,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UpdateVersionToActive) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
 
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
@@ -1650,7 +1733,7 @@
 
 TEST(ServiceWorkerDatabaseTest, UpdateLastCheckTime) {
   std::unique_ptr<ServiceWorkerDatabase> database(CreateDatabaseInMemory());
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
 
@@ -1770,8 +1853,8 @@
   std::vector<int64_t> newly_purgeable_resources;
 
   // Data associated with |origin1| will be removed.
-  GURL origin1("http://example.com");
-  GURL origin2("http://example.org");
+  GURL origin1("https://example.com");
+  GURL origin2("https://example.org");
 
   // |origin1| has two registrations (registration1 and registration2).
   RegistrationData data1;
@@ -1930,7 +2013,7 @@
   ServiceWorkerDatabase::RegistrationData deleted_version;
   std::vector<int64_t> newly_purgeable_resources;
 
-  GURL origin("http://example.com");
+  GURL origin("https://example.com");
 
   RegistrationData data;
   data.registration_id = 10;
diff --git a/content/browser/service_worker/service_worker_navigation_loader_unittest.cc b/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
index 6b10fecf..29ed62539 100644
--- a/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
+++ b/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
@@ -4,7 +4,10 @@
 
 #include "content/browser/service_worker/service_worker_navigation_loader.h"
 
+#include <string>
+#include <utility>
 #include "base/run_loop.h"
+#include "base/strings/string_number_conversions.h"
 #include "base/test/metrics/histogram_tester.h"
 #include "base/test/scoped_feature_list.h"
 #include "content/browser/loader/navigation_loader_interceptor.h"
@@ -51,6 +54,10 @@
   response->status_text = "OK";
   response->response_type = network::mojom::FetchResponseType::kDefault;
   response->blob = std::move(blob_body);
+  if (response->blob) {
+    response->headers.emplace("Content-Length",
+                              base::NumberToString(response->blob->size));
+  }
   return response;
 }
 
@@ -678,6 +685,7 @@
   const network::ResourceResponseHead& info = client_.response_head();
   EXPECT_EQ(200, info.headers->response_code());
   ExpectResponseInfo(info, *CreateResponseInfoFromServiceWorker());
+  EXPECT_EQ(33, info.content_length);
 
   // Test the body.
   std::string body;
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index c9e9f2f..2c38456a 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -61,12 +61,6 @@
     : context_(context),
       job_type_(UPDATE_JOB),
       pattern_(registration->pattern()),
-      // TODO(crbug.com/824647): Change |worker_script_type_| based on the
-      // current version's type. This constructor is called when ServiceWorker
-      // scripts have already been installed. |worker_script_type_| will be set
-      // in ContinueWithUpdate().
-      // (https://w3c.github.io/ServiceWorker/#soft-update-algorithm)
-      worker_script_type_(blink::mojom::ScriptType::kClassic),
       update_via_cache_(registration->update_via_cache()),
       phase_(INITIAL),
       doom_installing_worker_(false),
@@ -240,10 +234,16 @@
   }
 
   DCHECK(existing_registration->GetNewestVersion());
-  // "If scriptURL is equal to registration.[[ScriptURL]] and
-  // "update_via_cache is equal to registration.[[update_via_cache]], then:"
+  // We also compare |script_type| here to proceed with registration when the
+  // script type is changed.
+  // TODO(asamidoi): Update the spec comment once
+  // https://github.com/w3c/ServiceWorker/issues/1359 is resolved.
+  // "If scriptURL is equal to registration.[[ScriptURL]] and "update_via_cache
+  // is equal to registration.[[update_via_cache]], then:"
   if (existing_registration->GetNewestVersion()->script_url() == script_url_ &&
-      existing_registration->update_via_cache() == update_via_cache_) {
+      existing_registration->update_via_cache() == update_via_cache_ &&
+      existing_registration->GetNewestVersion()->script_type() ==
+          worker_script_type_) {
     // "Set registration.[[Uninstalling]] to false."
     existing_registration->AbortPendingClear(base::BindOnce(
         &ServiceWorkerRegisterJob::ContinueWithRegistrationForSameScriptUrl,
@@ -290,6 +290,7 @@
 
   DCHECK(script_url_.is_empty());
   script_url_ = registration()->GetNewestVersion()->script_url();
+  worker_script_type_ = registration()->GetNewestVersion()->script_type();
 
   // TODO(michaeln): If the last update check was less than 24 hours
   // ago, depending on the freshness of the cached worker script we
diff --git a/content/browser/service_worker/service_worker_register_job.h b/content/browser/service_worker/service_worker_register_job.h
index cb833709..1b9cca0 100644
--- a/content/browser/service_worker/service_worker_register_job.h
+++ b/content/browser/service_worker/service_worker_register_job.h
@@ -154,7 +154,8 @@
   GURL script_url_;
   // "A job has a worker type ("classic" or "module")."
   // https://w3c.github.io/ServiceWorker/#dfn-job-worker-type
-  const blink::mojom::ScriptType worker_script_type_;
+  blink::mojom::ScriptType worker_script_type_ =
+      blink::mojom::ScriptType::kClassic;
   const blink::mojom::ServiceWorkerUpdateViaCache update_via_cache_;
   std::vector<RegistrationCallback> callbacks_;
   Phase phase_;
diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc
index 54871da..ca3e891 100644
--- a/content/browser/service_worker/service_worker_storage.cc
+++ b/content/browser/service_worker/service_worker_storage.cc
@@ -431,8 +431,9 @@
   ServiceWorkerDatabase::RegistrationData data;
   data.registration_id = registration->id();
   data.scope = registration->pattern();
-  data.update_via_cache = registration->update_via_cache();
   data.script = version->script_url();
+  data.script_type = version->script_type();
+  data.update_via_cache = registration->update_via_cache();
   data.has_fetch_handler = version->fetch_handler_existence() ==
                            ServiceWorkerVersion::FetchHandlerExistence::EXISTS;
   data.version_id = version->version_id();
@@ -1538,10 +1539,7 @@
     return registration;
 
   blink::mojom::ServiceWorkerRegistrationOptions options(
-      data.scope,
-      // TODO(crbug.com/824647): Add script_type attribute to
-      // ServiceWorkerDatabase::RegistrationData
-      blink::mojom::ScriptType::kClassic, data.update_via_cache);
+      data.scope, data.script_type, data.update_via_cache);
   registration =
       new ServiceWorkerRegistration(options, data.registration_id, context_);
   registration->set_resources_total_size_bytes(data.resources_total_size_bytes);
@@ -1553,11 +1551,9 @@
   scoped_refptr<ServiceWorkerVersion> version =
       context_->GetLiveVersion(data.version_id);
   if (!version) {
-    version = new ServiceWorkerVersion(
-        registration.get(), data.script,
-        // TODO(crbug.com/824647): Replace data.script_type after add worker
-        // type attribute to ServiceWorkerDatabase::RegistrationData
-        blink::mojom::ScriptType::kClassic, data.version_id, context_);
+    version = base::MakeRefCounted<ServiceWorkerVersion>(
+        registration.get(), data.script, data.script_type, data.version_id,
+        context_);
     version->set_fetch_handler_existence(
         data.has_fetch_handler
             ? ServiceWorkerVersion::FetchHandlerExistence::EXISTS
diff --git a/content/browser/web_package/signed_exchange_prefetch_handler.cc b/content/browser/web_package/signed_exchange_prefetch_handler.cc
index abf10c2..18c656ab 100644
--- a/content/browser/web_package/signed_exchange_prefetch_handler.cc
+++ b/content/browser/web_package/signed_exchange_prefetch_handler.cc
@@ -109,6 +109,10 @@
 
 void SignedExchangePrefetchHandler::OnComplete(
     const network::URLLoaderCompletionStatus& status) {
+  // We only reach here on error, since successful completion of the
+  // outer sxg load should trigger redirect and land on ::OnReceiveRedirect.
+  DCHECK_NE(net::OK, status.error_code);
+
   forwarding_client_->OnComplete(status);
 }
 
diff --git a/content/browser/web_package/signed_exchange_request_handler_browsertest.cc b/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
index bee66b6..957abb8 100644
--- a/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
+++ b/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
@@ -51,6 +51,7 @@
 namespace {
 
 const uint64_t kSignatureHeaderDate = 1520834000;  // 2018-03-12T05:53:20Z
+const uint64_t kSignatureHeaderExpires = 1520837600;  // 2018-03-12T06:53:20Z
 
 constexpr char kExpectedSXGEnabledAcceptHeaderForPrefetch[] =
     "application/signed-exchange;v=b2;q=0.9,*/*;q=0.8";
@@ -262,6 +263,47 @@
       1);
 }
 
+IN_PROC_BROWSER_TEST_F(SignedExchangeRequestHandlerBrowserTest, Expired) {
+  SignedExchangeHandler::SetVerificationTimeForTesting(
+      base::Time::UnixEpoch() +
+      base::TimeDelta::FromSeconds(kSignatureHeaderExpires + 1));
+
+  InstallUrlInterceptor(
+      GURL("https://cert.example.org/cert.msg"),
+      "content/test/data/sxg/test.example.org.public.pem.cbor");
+  InstallUrlInterceptor(GURL("https://test.example.org/test/"),
+                        "content/test/data/sxg/fallback.html");
+
+  // Make the MockCertVerifier treat the certificate
+  // "prime256v1-sha256.public.pem" as valid for "test.example.org".
+  scoped_refptr<net::X509Certificate> original_cert =
+      LoadCertificate("prime256v1-sha256.public.pem");
+  net::CertVerifyResult dummy_result;
+  dummy_result.verified_cert = original_cert;
+  dummy_result.cert_status = net::OK;
+  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
+  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
+  mock_cert_verifier()->AddResultForCertAndHost(
+      original_cert, "test.example.org", dummy_result, net::OK);
+
+  embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data");
+  ASSERT_TRUE(embedded_test_server()->Start());
+  GURL url = embedded_test_server()->GetURL("/sxg/test.example.org_test.sxg");
+
+  base::string16 title = base::ASCIIToUTF16("Fallback URL response");
+  TitleWatcher title_watcher(shell()->web_contents(), title);
+  RedirectObserver redirect_observer(shell()->web_contents());
+  NavigateToURL(shell(), url);
+  EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
+  EXPECT_EQ(303, redirect_observer.response_code());
+  histogram_tester_.ExpectUniqueSample(
+      "SignedExchange.LoadResult",
+      SignedExchangeLoadResult::kSignatureVerificationError, 1);
+  histogram_tester_.ExpectUniqueSample(
+      "SignedExchange.SignatureVerificationResult",
+      SignedExchangeSignatureVerifier::Result::kErrInvalidTimestamp, 1);
+}
+
 IN_PROC_BROWSER_TEST_F(SignedExchangeRequestHandlerBrowserTest,
                        RedirectBrokenSignedExchanges) {
   InstallUrlInterceptor(GURL("https://test.example.org/test/"),
diff --git a/content/browser/web_package/signed_exchange_signature_verifier.cc b/content/browser/web_package/signed_exchange_signature_verifier.cc
index 0ff23c42..3e5960e 100644
--- a/content/browser/web_package/signed_exchange_signature_verifier.cc
+++ b/content/browser/web_package/signed_exchange_signature_verifier.cc
@@ -8,10 +8,13 @@
 #include <vector>
 
 #include "base/big_endian.h"
+#include "base/command_line.h"
 #include "base/containers/span.h"
 #include "base/format_macros.h"
 #include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
 #include "base/strings/string_piece.h"
+#include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
@@ -20,9 +23,12 @@
 #include "content/browser/web_package/signed_exchange_envelope.h"
 #include "content/browser/web_package/signed_exchange_signature_header_field.h"
 #include "content/browser/web_package/signed_exchange_utils.h"
+#include "content/public/browser/content_browser_client.h"
+#include "crypto/sha2.h"
 #include "crypto/signature_verifier.h"
 #include "net/cert/asn1_util.h"
 #include "net/cert/x509_util.h"
+#include "services/network/public/cpp/network_switches.h"
 #include "third_party/boringssl/src/include/openssl/bytestring.h"
 #include "third_party/boringssl/src/include/openssl/ec.h"
 #include "third_party/boringssl/src/include/openssl/ec_key.h"
@@ -226,6 +232,17 @@
   return true;
 }
 
+// Returns true if SPKI hash of |certificate| is included in the
+// --ignore-certificate-errors-spki-list command line flag, and
+// ContentBrowserClient::CanIgnoreCertificateErrorIfNeeded() returns true.
+bool ShouldIgnoreTimestampError(
+    scoped_refptr<net::X509Certificate> certificate) {
+  static base::NoDestructor<
+      SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList>
+      instance(*base::CommandLine::ForCurrentProcess());
+  return instance->ShouldIgnoreError(certificate);
+}
+
 }  // namespace
 
 SignedExchangeSignatureVerifier::Result SignedExchangeSignatureVerifier::Verify(
@@ -237,7 +254,8 @@
   TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"),
                "SignedExchangeSignatureVerifier::Verify");
 
-  if (!VerifyTimestamps(envelope, verification_time)) {
+  if (!VerifyTimestamps(envelope, verification_time) &&
+      !ShouldIgnoreTimestampError(certificate)) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy,
         base::StringPrintf(
@@ -302,4 +320,43 @@
   return Result::kSuccess;
 }
 
+SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList::IgnoreErrorsSPKIList(
+    const std::string& spki_list) {
+  Parse(spki_list);
+}
+
+SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList::IgnoreErrorsSPKIList(
+    const base::CommandLine& command_line) {
+  if (!GetContentClient()->browser()->CanIgnoreCertificateErrorIfNeeded())
+    return;
+  Parse(command_line.GetSwitchValueASCII(
+      network::switches::kIgnoreCertificateErrorsSPKIList));
+}
+
+void SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList::Parse(
+    const std::string& spki_list) {
+  hash_set_ =
+      network::IgnoreErrorsCertVerifier::MakeWhitelist(base::SplitString(
+          spki_list, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL));
+}
+
+SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList::~IgnoreErrorsSPKIList() =
+    default;
+
+bool SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList::ShouldIgnoreError(
+    scoped_refptr<net::X509Certificate> certificate) {
+  if (hash_set_.empty())
+    return false;
+
+  base::StringPiece spki;
+  if (!net::asn1::ExtractSPKIFromDERCert(
+          net::x509_util::CryptoBufferAsStringPiece(certificate->cert_buffer()),
+          &spki)) {
+    return false;
+  }
+  net::SHA256HashValue hash;
+  crypto::SHA256HashString(spki, &hash, sizeof(net::SHA256HashValue));
+  return hash_set_.find(hash) != hash_set_.end();
+}
+
 }  // namespace content
diff --git a/content/browser/web_package/signed_exchange_signature_verifier.h b/content/browser/web_package/signed_exchange_signature_verifier.h
index c066dc1..b34a54a 100644
--- a/content/browser/web_package/signed_exchange_signature_verifier.h
+++ b/content/browser/web_package/signed_exchange_signature_verifier.h
@@ -9,8 +9,10 @@
 #include "base/optional.h"
 #include "content/common/content_export.h"
 #include "net/cert/x509_certificate.h"
+#include "services/network/ignore_errors_cert_verifier.h"
 
 namespace base {
+class CommandLine;
 class Time;
 }  // namespace base
 
@@ -45,6 +47,27 @@
     kMaxValue = kErrUnsupportedCertType
   };
 
+  // An utility class which holds a set of certificates which errors should be
+  // ignored. It parses a comma-delimited list of base64-encoded SHA-256 SPKI
+  // fingerprints, and can query if a certificate is included in the set.
+  // CONTENT_EXPORT since it is used from the unit test.
+  class CONTENT_EXPORT IgnoreErrorsSPKIList {
+   public:
+    explicit IgnoreErrorsSPKIList(const base::CommandLine& command_line);
+    ~IgnoreErrorsSPKIList();
+    bool ShouldIgnoreError(scoped_refptr<net::X509Certificate> certificate);
+
+   private:
+    FRIEND_TEST_ALL_PREFIXES(SignedExchangeSignatureVerifierTest,
+                             IgnoreErrorsSPKIList);
+
+    explicit IgnoreErrorsSPKIList(const std::string& spki_list);
+    void Parse(const std::string& spki_list);
+
+    network::IgnoreErrorsCertVerifier::SPKIHashSet hash_set_;
+    DISALLOW_COPY_AND_ASSIGN(IgnoreErrorsSPKIList);
+  };
+
   static Result Verify(const SignedExchangeEnvelope& envelope,
                        scoped_refptr<net::X509Certificate> certificate,
                        const base::Time& verification_time,
diff --git a/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc b/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc
index aa85314..41cfa75 100644
--- a/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc
+++ b/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc
@@ -118,6 +118,13 @@
 Xhe5DP7VATeQq3yGV3ps+rCTHDP6qSHDEWP7DqHQdSsxtI0E
 -----END CERTIFICATE-----)";
 
+constexpr char kPEMECDSAP256SPKIHash[] =
+    "iwtEGagHhL9HbHI38aoFstFPEyB+lzZO5H2ZZAJlYOo=";
+constexpr char kPEMECDSAP384SPKIHash[] =
+    "aGcf7fF/2+mXuHjYen7FZ8HZPR0B6sK6zIsyrCoB6Y8=";
+
+}  // namespace
+
 class SignedExchangeSignatureVerifierTest : public ::testing::Test {
  protected:
   SignedExchangeSignatureVerifierTest() {}
@@ -326,5 +333,32 @@
                 nullptr /* devtools_proxy */));
 }
 
-}  // namespace
+TEST_F(SignedExchangeSignatureVerifierTest, IgnoreErrorsSPKIList) {
+  SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList ignore_nothing("");
+  SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList ignore_ecdsap256(
+      kPEMECDSAP256SPKIHash);
+  SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList ignore_ecdsap384(
+      kPEMECDSAP384SPKIHash);
+  SignedExchangeSignatureVerifier::IgnoreErrorsSPKIList ignore_both(
+      std::string(kPEMECDSAP256SPKIHash) + "," + kPEMECDSAP384SPKIHash);
+
+  scoped_refptr<net::X509Certificate> cert_ecdsap256 =
+      net::X509Certificate::CreateCertificateListFromBytes(
+          kCertPEMECDSAP256, base::size(kCertPEMECDSAP256),
+          net::X509Certificate::FORMAT_AUTO)[0];
+  scoped_refptr<net::X509Certificate> cert_ecdsap384 =
+      net::X509Certificate::CreateCertificateListFromBytes(
+          kCertPEMECDSAP384, base::size(kCertPEMECDSAP384),
+          net::X509Certificate::FORMAT_AUTO)[0];
+
+  EXPECT_FALSE(ignore_nothing.ShouldIgnoreError(cert_ecdsap256));
+  EXPECT_FALSE(ignore_nothing.ShouldIgnoreError(cert_ecdsap384));
+  EXPECT_TRUE(ignore_ecdsap256.ShouldIgnoreError(cert_ecdsap256));
+  EXPECT_FALSE(ignore_ecdsap256.ShouldIgnoreError(cert_ecdsap384));
+  EXPECT_FALSE(ignore_ecdsap384.ShouldIgnoreError(cert_ecdsap256));
+  EXPECT_TRUE(ignore_ecdsap384.ShouldIgnoreError(cert_ecdsap384));
+  EXPECT_TRUE(ignore_both.ShouldIgnoreError(cert_ecdsap256));
+  EXPECT_TRUE(ignore_both.ShouldIgnoreError(cert_ecdsap384));
+}
+
 }  // namespace content
diff --git a/content/common/service_worker/service_worker_loader_helpers.cc b/content/common/service_worker/service_worker_loader_helpers.cc
index d422ca9..4fece80 100644
--- a/content/common/service_worker/service_worker_loader_helpers.cc
+++ b/content/common/service_worker/service_worker_loader_helpers.cc
@@ -4,6 +4,7 @@
 
 #include "content/common/service_worker/service_worker_loader_helpers.h"
 
+#include <limits>
 #include <memory>
 #include <string>
 #include <utility>
@@ -44,7 +45,8 @@
 };
 
 // Sets |has_range_out| to true if |headers| specify a single range request, and
-// |offset_out| and |size_out| to the range. Returns true on valid input
+// |offset_out| and |length_out| to the range. If the range has an unbounded
+// end, |length_out| is set to uint64_t's max value. Returns true on valid input
 // (regardless of |has_range_out|), and false if there is more than one range or
 // if the bounds overflow.
 bool ExtractSinglePartHttpRange(const net::HttpRequestHeaders& headers,
@@ -67,14 +69,26 @@
   // Safely parse the single range to our more-sane output format.
   *has_range_out = true;
   const net::HttpByteRange& byte_range = ranges[0];
+
+  // The first byte must be non-negative.
   if (byte_range.first_byte_position() < 0)
     return false;
-  // Allow the range [0, -1] to be valid and specify the entire range.
-  if (byte_range.first_byte_position() == 0 &&
-      byte_range.last_byte_position() == -1) {
-    *has_range_out = false;
+
+  // The last byte can be -1 to specify unbounded end.
+  if (byte_range.last_byte_position() == -1) {
+    // The range [0, -1] is the same as the entire range (no range specified).
+    if (byte_range.first_byte_position() == 0 &&
+        byte_range.last_byte_position() == -1) {
+      *has_range_out = false;
+      return true;
+    }
+
+    // Otherwise, return the range with unbounded end.
+    *length_out = std::numeric_limits<uint64_t>::max();
     return true;
   }
+
+  // The last byte must be non-negative.
   if (byte_range.last_byte_position() < 0)
     return false;
 
@@ -133,6 +147,11 @@
     if (out_head->headers->GetCharset(&charset))
       out_head->charset = charset;
   }
+
+  // Populate |out_head|'s content length with the value from the HTTP response
+  // headers.
+  if (out_head->content_length == -1)
+    out_head->content_length = out_head->headers->GetContentLength();
 }
 
 // static
@@ -189,9 +208,8 @@
   // We don't support multiple range requests in one single URL request,
   // because we need to do multipart encoding here.
   // TODO(falken): Support multipart byte range requests.
-  if (!ExtractSinglePartHttpRange(headers, &byte_range_set, &offset, &length)) {
+  if (!ExtractSinglePartHttpRange(headers, &byte_range_set, &offset, &length))
     return net::ERR_REQUEST_RANGE_NOT_SATISFIABLE;
-  }
 
   mojo::DataPipe data_pipe(blink::BlobUtils::GetDataPipeCapacity(blob_size));
   blink::mojom::BlobReaderClientPtr blob_reader_client;
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index d220899..ccfe1eb 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -815,4 +815,8 @@
   return base::nullopt;
 }
 
+bool ContentBrowserClient::CanIgnoreCertificateErrorIfNeeded() {
+  return false;
+}
+
 }  // namespace content
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 058f398e..056852ce 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -1349,6 +1349,12 @@
       OriginPolicyErrorReason error_reason,
       const url::Origin& origin,
       const GURL& url);
+
+  // Returns true if it is OK to ignore errors for certificates specified by the
+  // --ignore-certificate-errors-spki-list command line flag. The embedder may
+  // perform additional checks, such as requiring --user-data-dir flag too to
+  // make sure that insecure contents will not persist accidentally.
+  virtual bool CanIgnoreCertificateErrorIfNeeded();
 };
 
 }  // namespace content
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 73a42c3..cc603a60 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -660,6 +660,11 @@
 // Enable IOSurface based screen capturer.
 const base::Feature kIOSurfaceCapturer{"IOSurfaceCapturer",
                                        base::FEATURE_ENABLED_BY_DEFAULT};
+
+// The V2 sandbox on MacOS removes the unsandboed warmup phase and sandboxes the
+// entire life of the process.
+const base::Feature kMacV2Sandbox{"MacV2Sandbox",
+                                  base::FEATURE_ENABLED_BY_DEFAULT};
 #endif  // defined(OS_MACOSX)
 
 enum class VideoCaptureServiceConfiguration {
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index 0c59d31..874fc98f 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -160,6 +160,7 @@
 #if defined(OS_MACOSX)
 CONTENT_EXPORT extern const base::Feature kDeviceMonitorMac;
 CONTENT_EXPORT extern const base::Feature kIOSurfaceCapturer;
+CONTENT_EXPORT extern const base::Feature kMacV2Sandbox;
 #endif  // defined(OS_MACOSX)
 
 // DON'T ADD RANDOM STUFF HERE. Put it in the main section above in
diff --git a/content/renderer/media/webrtc/webrtc_audio_renderer.cc b/content/renderer/media/webrtc/webrtc_audio_renderer.cc
index 9a1ec3a0..7b3d058a 100644
--- a/content/renderer/media/webrtc/webrtc_audio_renderer.cc
+++ b/content/renderer/media/webrtc/webrtc_audio_renderer.cc
@@ -26,11 +26,6 @@
 #include "third_party/blink/public/platform/web_media_stream_track.h"
 #include "third_party/webrtc/api/mediastreaminterface.h"
 
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#include "media/audio/win/core_audio_util_win.h"
-#endif
-
 namespace content {
 
 namespace {
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc
index e08f0a8..9434262 100644
--- a/content/renderer/pepper/ppb_var_deprecated_impl.cc
+++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc
@@ -98,9 +98,16 @@
   if (try_catch.HasException())
     return false;
 
-  bool result = accessor.GetObject()->Has(v8_name);
+  v8::Local<v8::Context> context = try_catch.GetContext();
   if (try_catch.HasException())
     return false;
+
+  bool result = false;
+  if (!accessor.GetObject()->Has(context, v8_name).To(&result)) {
+    try_catch.HasException();
+    return false;
+  }
+
   return result;
 }
 
@@ -115,8 +122,17 @@
   if (try_catch.HasException())
     return false;
 
-  bool result = accessor.GetObject()->Has(v8_name) &&
-      accessor.GetObject()->Get(v8_name)->IsFunction();
+  v8::Local<v8::Context> context = try_catch.GetContext();
+  if (try_catch.HasException())
+    return false;
+
+  bool has_name = false;
+  if (!accessor.GetObject()->Has(context, v8_name).To(&has_name)) {
+    try_catch.HasException();
+    return false;
+  }
+
+  bool result = has_name && accessor.GetObject()->Get(v8_name)->IsFunction();
   if (try_catch.HasException())
     return false;
   return result;
@@ -203,8 +219,16 @@
   if (try_catch.HasException())
     return;
 
-  accessor.GetObject()->Delete(v8_name);
-  try_catch.HasException();  // Ensure an exception gets set if one occured.
+  v8::Local<v8::Context> context = try_catch.GetContext();
+  if (try_catch.HasException())
+    return;
+
+  if (accessor.GetObject()->Delete(context, v8_name).IsNothing()) {
+    // Ensure exception object is created if V8 has thrown.
+    try_catch.HasException();
+    return;
+  }
+  return;
 }
 
 PP_Var CallDeprecatedInternal(PP_Var var,
diff --git a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
index 2b98b15..0caa164 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
@@ -133,6 +133,10 @@
     response->status_text = "OK";
     response->response_type = network::mojom::FetchResponseType::kDefault;
     response->blob = std::move(blob_body);
+    if (response->blob) {
+      response->headers.emplace("Content-Length",
+                                base::NumberToString(response->blob->size));
+    }
     return response;
   }
 
@@ -191,6 +195,7 @@
     response_mode_ = ResponseMode::kBlob;
     blob_body_ = blink::mojom::SerializedBlob::New();
     blob_body_->uuid = "dummy-blob-uuid";
+    blob_body_->size = body.size();
     mojo::MakeStrongBinding(
         std::make_unique<FakeBlob>(std::move(metadata), std::move(body)),
         mojo::MakeRequest(&blob_body_->blob));
@@ -885,6 +890,7 @@
 
   const network::ResourceResponseHead& info = client->response_head();
   ExpectResponseInfo(info, *CreateResponseInfoFromServiceWorker());
+  EXPECT_EQ(33, info.content_length);
 
   // Test the cached metadata.
   client->RunUntilCachedMetadataReceived();
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index 860f02a..1c7ae73 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -297,6 +297,11 @@
   return false;
 }
 
+bool LayoutTestContentBrowserClient::CanIgnoreCertificateErrorIfNeeded() {
+  return base::CommandLine::ForCurrentProcess()->HasSwitch(
+      switches::kRunWebTests);
+}
+
 void LayoutTestContentBrowserClient::ExposeInterfacesToFrame(
     service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
         registry) {
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
index c601d6e..76d53623 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.h
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
@@ -70,6 +70,7 @@
                        bool opener_suppressed,
                        bool* no_javascript_access) override;
   bool ShouldEnableStrictSiteIsolation() override;
+  bool CanIgnoreCertificateErrorIfNeeded() override;
 
   // ShellContentBrowserClient overrides.
   void ExposeInterfacesToFrame(
diff --git a/content/test/data/sxg/generate-test-certs.sh b/content/test/data/sxg/generate-test-certs.sh
index 6d13ba1..deadbbd3 100755
--- a/content/test/data/sxg/generate-test-certs.sh
+++ b/content/test/data/sxg/generate-test-certs.sh
@@ -6,6 +6,13 @@
 
 set -e
 
+dumpSPKIHash() {
+  openssl x509 -noout -pubkey -in $1 | \
+      openssl pkey -pubin -outform der | \
+      openssl dgst -sha256 -binary | \
+      base64
+}
+
 # Generate a "secp256r1 (== prime256v1) ecdsa with sha256" key/cert pair
 openssl ecparam -out prime256v1.key -name prime256v1 -genkey
 
@@ -47,4 +54,9 @@
 cat ./secp384r1-sha256.public.pem
 echo ')";'
 
+echo "constexpr char kPEMECDSAP256SPKIHash = "
+echo "    \"$(dumpSPKIHash ./prime256v1-sha256.public.pem)\";"
+echo "constexpr char kPEMECDSAP384SPKIHash = "
+echo "    \"$(dumpSPKIHash ./secp384r1-sha256.public.pem)\";"
+
 echo "===="
diff --git a/content/test/test_blink_web_unit_test_support.cc b/content/test/test_blink_web_unit_test_support.cc
index a0e7571bd..a9ceeed8b 100644
--- a/content/test/test_blink_web_unit_test_support.cc
+++ b/content/test/test_blink_web_unit_test_support.cc
@@ -35,7 +35,6 @@
 #include "third_party/blink/public/platform/web_rtc_certificate_generator.h"
 #include "third_party/blink/public/platform/web_runtime_features.h"
 #include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_loader_factory.h"
 #include "third_party/blink/public/web/blink.h"
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.cc b/device/bluetooth/dbus/bluetooth_adapter_client.cc
index 20f65b9..2829a2d 100644
--- a/device/bluetooth/dbus/bluetooth_adapter_client.cc
+++ b/device/bluetooth/dbus/bluetooth_adapter_client.cc
@@ -160,8 +160,12 @@
       : object_manager_(NULL), weak_ptr_factory_(this) {}
 
   ~BluetoothAdapterClientImpl() override {
-    object_manager_->UnregisterInterface(
-        bluetooth_adapter::kBluetoothAdapterInterface);
+    // There is an instance of this client that is created but not initialized
+    // on Linux. See 'Alternate D-Bus Client' note in bluez_dbus_manager.h.
+    if (object_manager_) {
+      object_manager_->UnregisterInterface(
+          bluetooth_adapter::kBluetoothAdapterInterface);
+    }
   }
 
   // BluetoothAdapterClient override.
diff --git a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.cc b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.cc
index 9819427..3258c8b 100644
--- a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.cc
+++ b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.cc
@@ -57,6 +57,8 @@
         BluetoothGattDescriptorClient::Create());
     bluetooth_gatt_manager_client_.reset(BluetoothGattManagerClient::Create());
     bluetooth_gatt_service_client_.reset(BluetoothGattServiceClient::Create());
+
+    alternate_bluetooth_adapter_client_.reset(BluetoothAdapterClient::Create());
   } else {
     bluetooth_adapter_client_.reset(new FakeBluetoothAdapterClient);
     bluetooth_le_advertising_manager_client_.reset(
@@ -75,6 +77,8 @@
         new FakeBluetoothGattDescriptorClient);
     bluetooth_gatt_manager_client_.reset(new FakeBluetoothGattManagerClient);
     bluetooth_gatt_service_client_.reset(new FakeBluetoothGattServiceClient);
+
+    alternate_bluetooth_adapter_client_.reset(new FakeBluetoothAdapterClient);
   }
 }
 
diff --git a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
index 3d97ee8..3561896a 100644
--- a/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
+++ b/device/bluetooth/dbus/bluetooth_dbus_client_bundle.h
@@ -86,6 +86,10 @@
     return bluetooth_profile_manager_client_.get();
   }
 
+  BluetoothAdapterClient* alternate_bluetooth_adapter_client() {
+    return alternate_bluetooth_adapter_client_.get();
+  }
+
  private:
   friend class BluezDBusManagerSetter;
 
@@ -109,6 +113,9 @@
   std::unique_ptr<BluetoothProfileManagerClient>
       bluetooth_profile_manager_client_;
 
+  // See "Alternate D-Bus Client" note in bluez_dbus_manager.h.
+  std::unique_ptr<BluetoothAdapterClient> alternate_bluetooth_adapter_client_;
+
   DISALLOW_COPY_AND_ASSIGN(BluetoothDBusClientBundle);
 };
 
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.cc b/device/bluetooth/dbus/bluez_dbus_manager.cc
index a17917d..4ae5de8 100644
--- a/device/bluetooth/dbus/bluez_dbus_manager.cc
+++ b/device/bluetooth/dbus/bluez_dbus_manager.cc
@@ -43,8 +43,11 @@
 static BluezDBusManager* g_bluez_dbus_manager = nullptr;
 static bool g_using_bluez_dbus_manager_for_testing = false;
 
-BluezDBusManager::BluezDBusManager(dbus::Bus* bus, bool use_dbus_fakes)
+BluezDBusManager::BluezDBusManager(dbus::Bus* bus,
+                                   dbus::Bus* alternate_bus,
+                                   bool use_dbus_fakes)
     : bus_(bus),
+      alternate_bus_(alternate_bus),
       object_manager_support_known_(false),
       object_manager_supported_(false),
       weak_ptr_factory_(this) {
@@ -161,6 +164,11 @@
   return client_bundle_->bluetooth_profile_manager_client();
 }
 
+BluetoothAdapterClient* BluezDBusManager::GetAlternateBluetoothAdapterClient() {
+  DCHECK(object_manager_support_known_);
+  return client_bundle_->alternate_bluetooth_adapter_client();
+}
+
 void BluezDBusManager::OnObjectManagerSupported(dbus::Response* response) {
   VLOG(1) << "Bluetooth supported. Initializing clients.";
   object_manager_supported_ = true;
@@ -215,6 +223,12 @@
       GetSystemBus(), bluetooth_service_name);
   client_bundle_->bluetooth_profile_manager_client()->Init(
       GetSystemBus(), bluetooth_service_name);
+
+  if (!alternate_bus_)
+    return;
+
+  client_bundle_->alternate_bluetooth_adapter_client()->Init(
+      alternate_bus_, bluetooth_service_name);
 }
 
 std::string BluezDBusManager::GetBluetoothServiceName() {
@@ -238,10 +252,19 @@
   CHECK(!g_bluez_dbus_manager);
 
 #if defined(OS_CHROMEOS)
+  // On ChromeOS, BluetoothSystem needs a separate connection to Bluez, so we
+  // use BluezDBusThreadManager to get two different connections to the same
+  // services. This allows us to have two separate sets of clients in the same
+  // process.
+  BluezDBusThreadManager::Initialize();
+
   CreateGlobalInstance(chromeos::DBusThreadManager::Get()->GetSystemBus(),
+                       BluezDBusThreadManager::Get()->GetSystemBus(),
                        chromeos::DBusThreadManager::Get()->IsUsingFakes());
 #elif defined(OS_LINUX)
-  CreateGlobalInstance(BluezDBusThreadManager::Get()->GetSystemBus(),
+  // BluetoothSystem, the client that needs the extra connection, is not
+  // implemented on Linux, so no need for an extra Bus.
+  CreateGlobalInstance(BluezDBusThreadManager::Get()->GetSystemBus(), nullptr,
                        false /* use_dbus_stubs */);
 #endif
 }
@@ -251,16 +274,18 @@
 bluez::BluezDBusManager::GetSetterForTesting() {
   if (!g_using_bluez_dbus_manager_for_testing) {
     g_using_bluez_dbus_manager_for_testing = true;
-    CreateGlobalInstance(nullptr, true);
+    CreateGlobalInstance(nullptr, nullptr, true);
   }
 
   return base::WrapUnique(new BluezDBusManagerSetter());
 }
 
 // static
-void BluezDBusManager::CreateGlobalInstance(dbus::Bus* bus, bool use_stubs) {
+void BluezDBusManager::CreateGlobalInstance(dbus::Bus* bus,
+                                            dbus::Bus* alternate_bus,
+                                            bool use_stubs) {
   CHECK(!g_bluez_dbus_manager);
-  g_bluez_dbus_manager = new BluezDBusManager(bus, use_stubs);
+  g_bluez_dbus_manager = new BluezDBusManager(bus, alternate_bus, use_stubs);
 }
 
 // static
@@ -274,8 +299,14 @@
   CHECK(g_bluez_dbus_manager);
   BluezDBusManager* dbus_manager = g_bluez_dbus_manager;
   g_bluez_dbus_manager = nullptr;
-  g_using_bluez_dbus_manager_for_testing = false;
   delete dbus_manager;
+
+#if defined(OS_CHROMEOS)
+  if (!g_using_bluez_dbus_manager_for_testing)
+    BluezDBusThreadManager::Shutdown();
+#endif
+
+  g_using_bluez_dbus_manager_for_testing = false;
   VLOG(1) << "BluezDBusManager Shutdown completed";
 }
 
@@ -364,4 +395,10 @@
       ->client_bundle_->bluetooth_profile_manager_client_ = std::move(client);
 }
 
+void BluezDBusManagerSetter::SetAlternateBluetoothAdapterClient(
+    std::unique_ptr<BluetoothAdapterClient> client) {
+  bluez::BluezDBusManager::Get()
+      ->client_bundle_->alternate_bluetooth_adapter_client_ = std::move(client);
+}
+
 }  // namespace bluez
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.h b/device/bluetooth/dbus/bluez_dbus_manager.h
index cf4c053..2202240 100644
--- a/device/bluetooth/dbus/bluez_dbus_manager.h
+++ b/device/bluetooth/dbus/bluez_dbus_manager.h
@@ -53,6 +53,20 @@
 // WeakPtrFactory when creating callbacks that run on UI thread. See
 // session_manager_client.cc for examples.
 //
+// Alternate D-Bus Client:
+//
+// BluezDBusManager is used by two separate clients. If both clients used the
+// same DBus connection to talk to BlueZ, then they could override each others'
+// state. For example, clients can start a scan with a set of filters; if
+// client #1 sets filter A, and then client #2 sets filter B, BlueZ would only
+// scan with filter B. BlueZ distinguishes between clients based on their D-Bus
+// connection, so if two clients with different connections try to start a scan
+// with two filters, BlueZ will merge these filters.
+//
+// For this reason, BluezDBusManager keeps two sets of the same client and uses
+// two separate D-Bus connections: "Bluetooth*Client" and
+// "AlternateBluetooth*Client".
+
 class DEVICE_BLUETOOTH_EXPORT BluezDBusManager {
  public:
   // Sets the global instance. Must be called before any calls to Get().
@@ -83,7 +97,7 @@
 
   // Returns true once we know whether Object Manager is supported or not.
   // Until this method returns true, no classes should try to use the
-  // DBus Clients.
+  // D-Bus Clients.
   bool IsObjectManagerSupportKnown() { return object_manager_support_known_; }
 
   // Calls |callback| once we know whether Object Manager is supported or not.
@@ -110,17 +124,25 @@
   BluetoothMediaTransportClient* GetBluetoothMediaTransportClient();
   BluetoothProfileManagerClient* GetBluetoothProfileManagerClient();
 
+  // See "Alternate D-Bus Client" note above.
+  BluetoothAdapterClient* GetAlternateBluetoothAdapterClient();
+
  private:
   friend class BluezDBusManagerSetter;
 
   // Creates a new BluezDBusManager using the DBusClients set in
-  // |client_bundle|.
-  explicit BluezDBusManager(dbus::Bus* bus, bool use_stubs);
+  // |client_bundle|. |alternate_bus| is used by a separate set of D-Bus
+  // clients; see "Alternate D-Bus Client" note above.
+  explicit BluezDBusManager(dbus::Bus* bus,
+                            dbus::Bus* alternate_bus,
+                            bool use_stubs);
   ~BluezDBusManager();
 
   // Creates a global instance of BluezDBusManager. Cannot be called more than
   // once.
-  static void CreateGlobalInstance(dbus::Bus* bus, bool use_stubs);
+  static void CreateGlobalInstance(dbus::Bus* bus,
+                                   dbus::Bus* alternate_bus,
+                                   bool use_stubs);
 
   void OnObjectManagerSupported(dbus::Response* response);
   void OnObjectManagerNotSupported(dbus::ErrorResponse* response);
@@ -133,6 +155,10 @@
   std::string GetBluetoothServiceName();
 
   dbus::Bus* bus_;
+  // Separate D-Bus connection used by the "Alternate" set of D-Bus clients. See
+  // "Alternate D-Bus Client" note above.
+  dbus::Bus* alternate_bus_;
+
   std::unique_ptr<BluetoothDBusClientBundle> client_bundle_;
 
   base::Closure object_manager_support_known_callback_;
@@ -173,6 +199,9 @@
   void SetBluetoothProfileManagerClient(
       std::unique_ptr<BluetoothProfileManagerClient> client);
 
+  void SetAlternateBluetoothAdapterClient(
+      std::unique_ptr<BluetoothAdapterClient> client);
+
  private:
   friend class BluezDBusManager;
 
diff --git a/extensions/browser/api/system_power_source/system_power_source_api_unittest.cc b/extensions/browser/api/system_power_source/system_power_source_api_unittest.cc
index f8c4ca4..82d5706 100644
--- a/extensions/browser/api/system_power_source/system_power_source_api_unittest.cc
+++ b/extensions/browser/api/system_power_source/system_power_source_api_unittest.cc
@@ -4,6 +4,7 @@
 
 #include <limits>
 
+#include "base/bind.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/fake_power_manager_client.h"
 #include "extensions/browser/api/system_power_source/system_power_source_api.h"
@@ -341,7 +342,8 @@
 TEST_F(SystemPowerSourceApiUnitTest, OnPowerChangedEvent) {
   TestEventRouter* event_router = static_cast<TestEventRouter*>(
       EventRouterFactory::GetInstance()->SetTestingFactoryAndUse(
-          browser_context(), &TestEventRouterFactoryFunction));
+          browser_context(),
+          base::BindRepeating(&TestEventRouterFactoryFunction)));
   SystemPowerSourceAPI system_power_source_api(browser_context());
 
   power_manager_client_->UpdatePowerProperties(MakePowerSupplyProperties(
@@ -365,7 +367,8 @@
 TEST_F(SystemPowerSourceApiUnitTest, RequestStatusUpdate) {
   TestEventRouter* event_router = static_cast<TestEventRouter*>(
       EventRouterFactory::GetInstance()->SetTestingFactoryAndUse(
-          browser_context(), &TestEventRouterFactoryFunction));
+          browser_context(),
+          base::BindRepeating(&TestEventRouterFactoryFunction)));
   SystemPowerSourceAPI system_power_source_api(browser_context());
 
   power_manager_client_->UpdatePowerProperties(MakePowerSupplyProperties(
diff --git a/extensions/browser/extension_registrar.cc b/extensions/browser/extension_registrar.cc
index 8df0fa6e..18a38ae 100644
--- a/extensions/browser/extension_registrar.cc
+++ b/extensions/browser/extension_registrar.cc
@@ -28,13 +28,6 @@
 
 namespace extensions {
 
-namespace {
-
-// For binding.
-void DoNothingWithExtensionHost(ExtensionHost* host) {}
-
-}  // namespace
-
 ExtensionRegistrar::ExtensionRegistrar(content::BrowserContext* browser_context,
                                        Delegate* delegate)
     : browser_context_(browser_context),
@@ -530,8 +523,7 @@
   // Wake up the event page by posting a dummy task.
   LazyBackgroundTaskQueue* queue =
       LazyBackgroundTaskQueue::Get(browser_context_);
-  queue->AddPendingTask(browser_context_, extension->id(),
-                        base::BindOnce(&DoNothingWithExtensionHost));
+  queue->AddPendingTask(browser_context_, extension->id(), base::DoNothing());
 }
 
 }  // namespace extensions
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc
index 603ebb5..faf9e3a 100644
--- a/gpu/ipc/service/direct_composition_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -172,6 +172,7 @@
   dxgi_device->GetAdapter(dxgi_adapter.GetAddressOf());
   DCHECK(dxgi_adapter);
 
+  bool supports_nv12_rec709 = false;
   unsigned int i = 0;
   while (true) {
     Microsoft::WRL::ComPtr<IDXGIOutput> output;
@@ -188,6 +189,26 @@
               info.dxgi_format, d3d11_device.Get(), &info.flags))) {
         continue;
       }
+      // Per Intel's request, use NV12 only when
+      // COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 is also supported. Rec 709 is
+      // commonly used for H.264 and HEVC. At least one Intel Gen9 SKU will not
+      // support NV12 overlays.
+      if (info.overlay_format == OverlayFormat::kNV12) {
+        UINT color_space_support_flags = 0;
+        Microsoft::WRL::ComPtr<IDXGIOutput4> output4;
+        if (FAILED(output.CopyTo(output4.GetAddressOf())))
+          continue;
+
+        if (FAILED(output4->CheckOverlayColorSpaceSupport(
+                info.dxgi_format, DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709,
+                d3d11_device.Get(), &color_space_support_flags))) {
+          continue;
+        }
+        supports_nv12_rec709 =
+            !!(color_space_support_flags &
+               DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT);
+      }
+
       // Formats are ordered by most preferred to least preferred. Don't choose
       // a less preferred format, but keep going so that we can record overlay
       // support for all formats in UMA.
@@ -200,12 +221,14 @@
       // over YUY2 is enabled.
       bool prefer_nv12 = base::FeatureList::IsEnabled(
           features::kDirectCompositionPreferNV12Overlays);
-      if (info.overlay_format == OverlayFormat::kNV12 && !prefer_nv12)
+      if (info.overlay_format == OverlayFormat::kNV12 &&
+          (!prefer_nv12 || !supports_nv12_rec709))
         continue;
       // Some new Intel drivers only claim to support unscaled overlays, but
-      // scaled overlays still work. Even when scaled overlays aren't actually
-      // supported, presentation using the overlay path should be relatively
-      // efficient.
+      // scaled overlays still work. It's possible DWM works around it by
+      // performing an extra scaling Blt before calling the driver. Even when
+      // scaled overlays aren't actually supported, presentation using the
+      // overlay path should be relatively efficient.
       if (info.flags & (DXGI_OVERLAY_SUPPORT_FLAG_DIRECT |
                         DXGI_OVERLAY_SUPPORT_FLAG_SCALING)) {
         g_overlay_format_used = info.overlay_format;
@@ -237,6 +260,13 @@
     base::UmaHistogramSparse(kOverlaySupportFlagsUmaPrefix +
                                  OverlayFormatToString(info.overlay_format),
                              info.flags);
+    if ((info.overlay_format == OverlayFormat::kNV12) &&
+        (info.flags & (DXGI_OVERLAY_SUPPORT_FLAG_DIRECT |
+                       DXGI_OVERLAY_SUPPORT_FLAG_SCALING))) {
+      // Recorded only when NV12 is supported
+      UMA_HISTOGRAM_BOOLEAN("GPU.DirectComposition.OverlayNV12Rec709Supported",
+                            supports_nv12_rec709);
+    }
   }
   if (g_supports_overlays) {
     UMA_HISTOGRAM_ENUMERATION("GPU.DirectComposition.OverlayFormatUsed2",
diff --git a/media/filters/decoder_selector.cc b/media/filters/decoder_selector.cc
index 30bfb50..7fa7dce8 100644
--- a/media/filters/decoder_selector.cc
+++ b/media/filters/decoder_selector.cc
@@ -25,6 +25,8 @@
 
 namespace media {
 
+const char kSelectDecoderTrace[] = "DecoderSelector::SelectDecoder";
+
 template <DemuxerStream::Type StreamType>
 DecoderSelector<StreamType>::DecoderSelector(
     scoped_refptr<base::SingleThreadTaskRunner> task_runner,
@@ -67,13 +69,14 @@
   DCHECK(task_runner_->BelongsToCurrentThread());
   DCHECK(select_decoder_cb);
   DCHECK(!select_decoder_cb_);
-  TRACE_EVENT_ASYNC_BEGIN1("media", "DecoderSelector::SelectDecoder", this,
-                           "type", DemuxerStream::GetTypeName(StreamType));
-
   select_decoder_cb_ = std::move(select_decoder_cb);
   output_cb_ = std::move(output_cb);
   config_ = traits_->GetDecoderConfig(stream_);
 
+  TRACE_EVENT_ASYNC_BEGIN2("media", kSelectDecoderTrace, this, "type",
+                           DemuxerStream::GetTypeName(StreamType), "config",
+                           config_.AsHumanReadableString());
+
   if (!config_.IsValidConfig()) {
     DLOG(ERROR) << "Invalid stream config";
     ReturnNullDecoder();
@@ -145,6 +148,8 @@
   decoder_ = std::move(decoders_.front());
   decoders_.erase(decoders_.begin());
   is_platform_decoder_ = decoder_->IsPlatformDecoder();
+  TRACE_EVENT_ASYNC_STEP_INTO0("media", kSelectDecoderTrace, this,
+                               decoder_->GetDisplayName());
 
   DVLOG(2) << __func__ << ": initializing " << decoder_->GetDisplayName();
   const bool is_live = stream_->liveness() == DemuxerStream::LIVENESS_LIVE;
@@ -187,6 +192,8 @@
   DCHECK(decoders_.empty());
   DCHECK(config_.is_encrypted());
   DCHECK(cdm_context_);
+  TRACE_EVENT_ASYNC_STEP_INTO0("media", kSelectDecoderTrace, this,
+                               "DecryptingDemuxerStream");
 
   decrypting_demuxer_stream_ = std::make_unique<DecryptingDemuxerStream>(
       task_runner_, media_log_, waiting_for_decryption_key_cb_);
@@ -229,7 +236,7 @@
 void DecoderSelector<StreamType>::RunSelectDecoderCB() {
   DCHECK(select_decoder_cb_);
   TRACE_EVENT_ASYNC_END2(
-      "media", "DecoderSelector::SelectDecoder", this, "type",
+      "media", kSelectDecoderTrace, this, "type",
       DemuxerStream::GetTypeName(StreamType), "decoder",
       base::StringPrintf(
           "%s (%s)", decoder_ ? decoder_->GetDisplayName().c_str() : "null",
diff --git a/media/formats/mp4/avc.cc b/media/formats/mp4/avc.cc
index 99a0b4e2..31f4df2 100644
--- a/media/formats/mp4/avc.cc
+++ b/media/formats/mp4/avc.cc
@@ -8,8 +8,10 @@
 #include <memory>
 #include <utility>
 
+#include "base/feature_list.h"
 #include "base/logging.h"
 #include "media/base/decrypt_config.h"
+#include "media/base/media_switches.h"
 #include "media/formats/mp4/box_definitions.h"
 #include "media/formats/mp4/box_reader.h"
 #include "media/video/h264_parser.h"
@@ -345,12 +347,15 @@
                                    subsamples));
 
   // |is_keyframe| may be incorrect. Analyze the frame to see if it is a
-  // keyframe. |is_keyframe| will be used if the analysis is inconclusive.
+  // keyframe. |is_keyframe| will be used if the analysis is inconclusive or if
+  // not kMseBufferByPts.
   // Also, provide the analysis result to the caller via out parameter
   // |analysis_result|.
   *analysis_result = Analyze(frame_buf, subsamples);
 
-  if (analysis_result->is_keyframe.value_or(is_keyframe)) {
+  if (base::FeatureList::IsEnabled(kMseBufferByPts)
+          ? analysis_result->is_keyframe.value_or(is_keyframe)
+          : is_keyframe) {
     // If this is a keyframe, we (re-)inject SPS and PPS headers at the start of
     // a frame. If subsample info is present, we also update the clear byte
     // count for that first subsample.
diff --git a/media/formats/mp4/mp4_stream_parser.cc b/media/formats/mp4/mp4_stream_parser.cc
index 5337c1ff..fd15800 100644
--- a/media/formats/mp4/mp4_stream_parser.cc
+++ b/media/formats/mp4/mp4_stream_parser.cc
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "base/callback_helpers.h"
+#include "base/feature_list.h"
 #include "base/logging.h"
 #include "base/numerics/math_constants.h"
 #include "base/strings/string_number_conversions.h"
@@ -849,7 +850,11 @@
         // they mismatch. If other out-of-order codecs in mp4 (e.g. HEVC, DV)
         // implement keyframe analysis in their frame_bitstream_converter, we'll
         // similarly trust that analysis instead of the mp4.
-        is_keyframe = analysis.is_keyframe.value();
+        // We'll only use the analysis to override the MP4 keyframeness if
+        // |media::kMseBufferByPts| is enabled.
+        if (base::FeatureList::IsEnabled(kMseBufferByPts)) {
+          is_keyframe = analysis.is_keyframe.value();
+        }
       }
     }
   }
diff --git a/media/formats/mp4/mp4_stream_parser_unittest.cc b/media/formats/mp4/mp4_stream_parser_unittest.cc
index 58c1cdb2..5064eea 100644
--- a/media/formats/mp4/mp4_stream_parser_unittest.cc
+++ b/media/formats/mp4/mp4_stream_parser_unittest.cc
@@ -323,13 +323,37 @@
   ParseMP4File("bear-640x360-v-2frames_frag.mp4", 512);
 }
 
-TEST_F(MP4StreamParserTest, AVC_Keyframeness_Mismatches_Container) {
+TEST_F(MP4StreamParserTest, LegacyByDts_AVC_Keyframeness_Mismatches_Container) {
   // The first AVC video frame's keyframe-ness metadata matches the MP4:
   // Frame 0: AVC IDR, trun.first_sample_flags: NOT sync sample, DEPENDS on
   //          others.
   // Frame 1: AVC Non-IDR, tfhd.default_sample_flags: not sync sample, depends
   //          on others.
   InSequence s;  // The EXPECT* sequence matters for this test.
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndDisableFeature(kMseBufferByPts);
+  auto params = GetDefaultInitParametersExpectations();
+  params.detected_audio_track_count = 0;
+  InitializeParserWithInitParametersExpectations(params);
+  verifying_keyframeness_sequence_ = true;
+  EXPECT_MEDIA_LOG(DebugLog(
+      "ISO-BMFF container metadata for video frame indicates that the frame is "
+      "not a keyframe, but the video frame contents indicate the opposite."));
+  EXPECT_CALL(*this, ParsedNonKeyframe());
+  EXPECT_CALL(*this, ParsedNonKeyframe());
+  ParseMP4File("bear-640x360-v-2frames-keyframe-is-non-sync-sample_frag.mp4",
+               512);
+}
+
+TEST_F(MP4StreamParserTest, NewByPts_AVC_Keyframeness_Mismatches_Container) {
+  // The first AVC video frame's keyframe-ness metadata matches the MP4:
+  // Frame 0: AVC IDR, trun.first_sample_flags: NOT sync sample, DEPENDS on
+  //          others.
+  // Frame 1: AVC Non-IDR, tfhd.default_sample_flags: not sync sample, depends
+  //          on others.
+  InSequence s;  // The EXPECT* sequence matters for this test.
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(kMseBufferByPts);
   auto params = GetDefaultInitParametersExpectations();
   params.detected_audio_track_count = 0;
   InitializeParserWithInitParametersExpectations(params);
@@ -343,13 +367,38 @@
                512);
 }
 
-TEST_F(MP4StreamParserTest, AVC_NonKeyframeness_Mismatches_Container) {
+TEST_F(MP4StreamParserTest,
+       LegacyByDts_AVC_NonKeyframeness_Mismatches_Container) {
   // The second AVC video frame's keyframe-ness metadata matches the MP4:
   // Frame 0: AVC IDR, trun.first_sample_flags: sync sample that doesn't
   //          depend on others.
   // Frame 1: AVC Non-IDR, tfhd.default_sample_flags: SYNC sample, DOES NOT
   //          depend on others.
   InSequence s;  // The EXPECT* sequence matters for this test.
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndDisableFeature(kMseBufferByPts);
+  auto params = GetDefaultInitParametersExpectations();
+  params.detected_audio_track_count = 0;
+  InitializeParserWithInitParametersExpectations(params);
+  verifying_keyframeness_sequence_ = true;
+  EXPECT_CALL(*this, ParsedKeyframe());
+  EXPECT_MEDIA_LOG(DebugLog(
+      "ISO-BMFF container metadata for video frame indicates that the frame is "
+      "a keyframe, but the video frame contents indicate the opposite."));
+  EXPECT_CALL(*this, ParsedKeyframe());
+  ParseMP4File("bear-640x360-v-2frames-nonkeyframe-is-sync-sample_frag.mp4",
+               512);
+}
+
+TEST_F(MP4StreamParserTest, NewByPts_AVC_NonKeyframeness_Mismatches_Container) {
+  // The second AVC video frame's keyframe-ness metadata matches the MP4:
+  // Frame 0: AVC IDR, trun.first_sample_flags: sync sample that doesn't
+  //          depend on others.
+  // Frame 1: AVC Non-IDR, tfhd.default_sample_flags: SYNC sample, DOES NOT
+  //          depend on others.
+  InSequence s;  // The EXPECT* sequence matters for this test.
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(kMseBufferByPts);
   auto params = GetDefaultInitParametersExpectations();
   params.detected_audio_track_count = 0;
   InitializeParserWithInitParametersExpectations(params);
diff --git a/net/base/address_list.cc b/net/base/address_list.cc
index 4896926..7706f10 100644
--- a/net/base/address_list.cc
+++ b/net/base/address_list.cc
@@ -23,8 +23,7 @@
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   std::unique_ptr<base::ListValue> list(new base::ListValue());
 
-  for (AddressList::const_iterator it = address_list->begin();
-       it != address_list->end(); ++it) {
+  for (auto it = address_list->begin(); it != address_list->end(); ++it) {
     list->AppendString(it->ToString());
   }
 
@@ -56,8 +55,7 @@
     const std::string& canonical_name) {
   AddressList list;
   list.set_canonical_name(canonical_name);
-  for (IPAddressList::const_iterator iter = addresses.begin();
-       iter != addresses.end(); ++iter) {
+  for (auto iter = addresses.begin(); iter != addresses.end(); ++iter) {
     list.push_back(IPEndPoint(*iter, 0));
   }
   return list;
diff --git a/net/base/address_tracker_linux.cc b/net/base/address_tracker_linux.cc
index 62b39d0..75080f0 100644
--- a/net/base/address_tracker_linux.cc
+++ b/net/base/address_tracker_linux.cc
@@ -360,7 +360,7 @@
             msg->ifa_flags |= IFA_F_DEPRECATED;
           // Only indicate change if the address is new or ifaddrmsg info has
           // changed.
-          AddressMap::iterator it = address_map_.find(address);
+          auto it = address_map_.find(address);
           if (it == address_map_.end()) {
             address_map_.insert(it, std::make_pair(address, *msg));
             *address_changed = true;
@@ -464,12 +464,9 @@
   std::unordered_set<int> online_links = GetOnlineLinks();
 
   // Strip out tunnel interfaces from online_links
-  for (std::unordered_set<int>::const_iterator it = online_links.begin();
-       it != online_links.end();) {
+  for (auto it = online_links.cbegin(); it != online_links.cend();) {
     if (IsTunnelInterface(*it)) {
-      std::unordered_set<int>::const_iterator tunnel_it = it;
-      ++it;
-      online_links.erase(*tunnel_it);
+      it = online_links.erase(it);
     } else {
       ++it;
     }
diff --git a/net/base/ip_pattern.cc b/net/base/ip_pattern.cc
index 67c21503..cf69d66 100644
--- a/net/base/ip_pattern.cc
+++ b/net/base/ip_pattern.cc
@@ -46,8 +46,7 @@
 bool IPPattern::ComponentPattern::Match(uint32_t value) const {
   // Simple linear search should be fine, as we usually only have very few
   // distinct ranges to test.
-  for (RangeVector::const_iterator range_it = ranges_.begin();
-       range_it != ranges_.end(); ++range_it) {
+  for (auto range_it = ranges_.begin(); range_it != ranges_.end(); ++range_it) {
     if (range_it->maximum >= value && range_it->minimum <= value)
       return true;
   }
@@ -64,7 +63,7 @@
   if (address.IsIPv4() != is_ipv4_)
     return false;
 
-  ComponentPatternList::const_iterator pattern_it(component_patterns_.begin());
+  auto pattern_it(component_patterns_.begin());
   int fixed_value_index = 0;
   // IPv6 |address| vectors have 16 pieces, while our  |ip_mask_| has only
   // 8, so it is easier to count separately.
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 5c5baf92..b7ea4ac 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -577,8 +577,7 @@
   size_t old_target_size = target->size();
   target->resize(old_target_size + source->size());
   size_t i = 0;
-  for (typename std::unordered_set<T>::iterator iter = source->begin();
-       iter != source->end(); ++iter, ++i)
+  for (auto iter = source->begin(); iter != source->end(); ++iter, ++i)
     (*target)[old_target_size + i] = *iter;
 }
 
diff --git a/net/base/network_interfaces_linux.cc b/net/base/network_interfaces_linux.cc
index dfe2899..a362428 100644
--- a/net/base/network_interfaces_linux.cc
+++ b/net/base/network_interfaces_linux.cc
@@ -123,9 +123,7 @@
     GetInterfaceNameFunction get_interface_name) {
   std::map<int, std::string> ifnames;
 
-  for (internal::AddressTrackerLinux::AddressMap::const_iterator it =
-           address_map.begin();
-       it != address_map.end(); ++it) {
+  for (auto it = address_map.begin(); it != address_map.end(); ++it) {
     // Ignore addresses whose links are not online.
     if (online_links.find(it->second.ifa_index) == online_links.end())
       continue;
diff --git a/net/base/network_interfaces_unittest.cc b/net/base/network_interfaces_unittest.cc
index 1469b49..428eeec 100644
--- a/net/base/network_interfaces_unittest.cc
+++ b/net/base/network_interfaces_unittest.cc
@@ -28,8 +28,7 @@
 TEST(NetworkInterfacesTest, GetNetworkList) {
   NetworkInterfaceList list;
   ASSERT_TRUE(GetNetworkList(&list, INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES));
-  for (NetworkInterfaceList::iterator it = list.begin();
-       it != list.end(); ++it) {
+  for (auto it = list.begin(); it != list.end(); ++it) {
     // Verify that the names are not empty.
     EXPECT_FALSE(it->name.empty());
     EXPECT_FALSE(it->friendly_name.empty());
diff --git a/net/base/port_util.cc b/net/base/port_util.cc
index fe3d0b30..ea3e30b 100644
--- a/net/base/port_util.cc
+++ b/net/base/port_util.cc
@@ -175,8 +175,7 @@
 }
 
 ScopedPortException::~ScopedPortException() {
-  std::multiset<int>::iterator it =
-      g_explicitly_allowed_ports.Get().find(port_);
+  auto it = g_explicitly_allowed_ports.Get().find(port_);
   if (it != g_explicitly_allowed_ports.Get().end())
     g_explicitly_allowed_ports.Get().erase(it);
   else
diff --git a/net/cert/cert_verify_proc_nss.cc b/net/cert/cert_verify_proc_nss.cc
index 9c11b054..9615b13 100644
--- a/net/cert/cert_verify_proc_nss.cc
+++ b/net/cert/cert_verify_proc_nss.cc
@@ -290,8 +290,7 @@
   // We iterate from the root certificate down to the leaf, keeping track of
   // the issuer's SPKI at each step.
   std::string issuer_spki_hash;
-  for (std::vector<CERTCertificate*>::reverse_iterator i = certs.rbegin();
-       i != certs.rend(); ++i) {
+  for (auto i = certs.rbegin(); i != certs.rend(); ++i) {
     CERTCertificate* cert = *i;
 
     base::StringPiece der(reinterpret_cast<char*>(cert->derCert.data),
diff --git a/net/cert/crl_set.cc b/net/cert/crl_set.cc
index 4758bb6..aa07edc1 100644
--- a/net/cert/crl_set.cc
+++ b/net/cert/crl_set.cc
@@ -257,8 +257,7 @@
 }
 
 CRLSet::Result CRLSet::CheckSPKI(const base::StringPiece& spki_hash) const {
-  for (std::vector<std::string>::const_iterator i = blocked_spkis_.begin();
-       i != blocked_spkis_.end(); ++i) {
+  for (auto i = blocked_spkis_.begin(); i != blocked_spkis_.end(); ++i) {
     if (spki_hash.size() == i->size() &&
         memcmp(spki_hash.data(), i->data(), i->size()) == 0) {
       return REVOKED;
diff --git a/net/cert/ct_log_verifier.cc b/net/cert/ct_log_verifier.cc
index 546301f..7559d33 100644
--- a/net/cert/ct_log_verifier.cc
+++ b/net/cert/ct_log_verifier.cc
@@ -177,7 +177,7 @@
   // 1. If "first" is an exact power of 2, then prepend "first_hash" to the
   // "consistency_path" array.
   base::StringPiece first_proof_node = old_tree_hash;
-  std::vector<std::string>::const_iterator iter = proof.nodes.begin();
+  auto iter = proof.nodes.begin();
   if (!IsPowerOfTwo(proof.first_tree_size)) {
     if (iter == proof.nodes.end())
       return false;
diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
index 480d0389..9733b822 100644
--- a/net/cert/ev_root_ca_metadata.cc
+++ b/net/cert/ev_root_ca_metadata.cc
@@ -796,7 +796,7 @@
 
 bool EVRootCAMetadata::HasEVPolicyOID(const SHA256HashValue& fingerprint,
                                       PolicyOID policy_oid) const {
-  PolicyOIDMap::const_iterator iter = ev_policy_.find(fingerprint);
+  auto iter = ev_policy_.find(fingerprint);
   if (iter == ev_policy_.end())
     return false;
   return std::find(iter->second.begin(), iter->second.end(), policy_oid) !=
@@ -837,7 +837,7 @@
 }
 
 bool EVRootCAMetadata::RemoveEVCA(const SHA256HashValue& fingerprint) {
-  PolicyOIDMap::iterator it = ev_policy_.find(fingerprint);
+  auto it = ev_policy_.find(fingerprint);
   if (it == ev_policy_.end())
     return false;
   PolicyOID oid = it->second[0];
diff --git a/net/cert/internal/certificate_policies.cc b/net/cert/internal/certificate_policies.cc
index db7cd19..bbc142d 100644
--- a/net/cert/internal/certificate_policies.cc
+++ b/net/cert/internal/certificate_policies.cc
@@ -211,8 +211,7 @@
     // Build the |policies| vector in sorted order (sorted on DER encoded policy
     // OID). Use a binary search to check whether a duplicate policy is present,
     // and if not, where to insert the policy to maintain the sorted order.
-    std::vector<der::Input>::iterator i =
-        std::lower_bound(policies->begin(), policies->end(), policy_oid);
+    auto i = std::lower_bound(policies->begin(), policies->end(), policy_oid);
     // RFC 5280 section 4.2.1.4: A certificate policy OID MUST NOT appear more
     // than once in a certificate policies extension.
     if (i != policies->end() && *i == policy_oid) {
diff --git a/net/cert/internal/verify_name_match.cc b/net/cert/internal/verify_name_match.cc
index 858f6fe..68194e7 100644
--- a/net/cert/internal/verify_name_match.cc
+++ b/net/cert/internal/verify_name_match.cc
@@ -223,7 +223,7 @@
   // small, a naive linear search for each element should be fine. (Hostile
   // certificates already have ways to provoke pathological behavior.)
   for (const auto& a : a_type_and_values) {
-    RelativeDistinguishedName::iterator b_iter = b_type_and_values.begin();
+    auto b_iter = b_type_and_values.begin();
     for (; b_iter != b_type_and_values.end(); ++b_iter) {
       const auto& b = *b_iter;
       if (a.type == b.type && VerifyValueMatch(a, b)) {
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index eb082fa..7154358 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -102,10 +102,8 @@
                                              capture_mode));
 
   std::unique_ptr<base::ListValue> hashes(new base::ListValue());
-  for (std::vector<HashValue>::const_iterator it =
-           verify_result.public_key_hashes.begin();
-       it != verify_result.public_key_hashes.end();
-       ++it) {
+  for (auto it = verify_result.public_key_hashes.begin();
+       it != verify_result.public_key_hashes.end(); ++it) {
     hashes->AppendString(it->ToString());
   }
   results->Set("public_key_hashes", std::move(hashes));
diff --git a/net/cert/pem_tokenizer.cc b/net/cert/pem_tokenizer.cc
index fe2f780c..f9edb3f 100644
--- a/net/cert/pem_tokenizer.cc
+++ b/net/cert/pem_tokenizer.cc
@@ -91,8 +91,8 @@
 
   // Construct PEM header/footer strings for all the accepted types, to
   // reduce parsing later.
-  for (std::vector<std::string>::const_iterator it =
-       allowed_block_types.begin(); it != allowed_block_types.end(); ++it) {
+  for (auto it = allowed_block_types.begin(); it != allowed_block_types.end();
+       ++it) {
     PEMType allowed_type;
     allowed_type.type = *it;
     allowed_type.header = base::StringPrintf(kPEMBeginBlock, it->c_str());
diff --git a/net/cert_net/cert_net_fetcher_impl.cc b/net/cert_net/cert_net_fetcher_impl.cc
index 5a5977a..32fb966 100644
--- a/net/cert_net/cert_net_fetcher_impl.cc
+++ b/net/cert_net/cert_net_fetcher_impl.cc
@@ -666,8 +666,8 @@
 
   // The JobSet is kept in sorted order so items can be found using binary
   // search.
-  JobSet::iterator it = std::lower_bound(jobs_.begin(), jobs_.end(), params,
-                                         JobToRequestParamsComparator());
+  auto it = std::lower_bound(jobs_.begin(), jobs_.end(), params,
+                             JobToRequestParamsComparator());
   if (it != jobs_.end() && !(params < (*it).first->request_params()))
     return (*it).first;
   return nullptr;
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index fccb3475..069df69 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -617,9 +617,8 @@
 
   // TODO(mmenke): Does it really make sense to run
   // CookieChanged callbacks when the CookieStore is destroyed?
-  for (CookieMap::iterator cookie_it = cookies_.begin();
-       cookie_it != cookies_.end();) {
-    CookieMap::iterator current_cookie_it = cookie_it;
+  for (auto cookie_it = cookies_.begin(); cookie_it != cookies_.end();) {
+    auto current_cookie_it = cookie_it;
     ++cookie_it;
     InternalDeleteCookie(current_cookie_it, false /* sync_to_store */,
                          DELETE_COOKIE_DONT_RECORD);
@@ -681,8 +680,8 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   uint32_t num_deleted = 0;
-  for (CookieMap::iterator it = cookies_.begin(); it != cookies_.end();) {
-    CookieMap::iterator curit = it;
+  for (auto it = cookies_.begin(); it != cookies_.end();) {
+    auto curit = it;
     CanonicalCookie* cc = curit->second.get();
     ++it;
 
@@ -702,8 +701,8 @@
 void CookieMonster::DeleteAllMatchingInfo(CookieDeletionInfo delete_info,
                                           DeleteCallback callback) {
   uint32_t num_deleted = 0;
-  for (CookieMap::iterator it = cookies_.begin(); it != cookies_.end();) {
-    CookieMap::iterator curit = it;
+  for (auto it = cookies_.begin(); it != cookies_.end();) {
+    auto curit = it;
     CanonicalCookie* cc = curit->second.get();
     ++it;
 
@@ -778,8 +777,8 @@
     matching_cookies.insert(cookie);
   }
 
-  for (CookieMap::iterator it = cookies_.begin(); it != cookies_.end();) {
-    CookieMap::iterator curit = it;
+  for (auto it = cookies_.begin(); it != cookies_.end();) {
+    auto curit = it;
     ++it;
     if (matching_cookies.find(curit->second.get()) != matching_cookies.end()) {
       InternalDeleteCookie(curit, true, DELETE_COOKIE_EXPLICIT);
@@ -824,8 +823,8 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   uint32_t num_deleted = 0;
-  for (CookieMap::iterator it = cookies_.begin(); it != cookies_.end();) {
-    CookieMap::iterator curit = it;
+  for (auto it = cookies_.begin(); it != cookies_.end();) {
+    auto curit = it;
     CanonicalCookie* cc = curit->second.get();
     ++it;
 
@@ -917,8 +916,8 @@
 
   for (auto& cookie : cookies) {
     CanonicalCookie* cookie_ptr = cookie.get();
-    CookieMap::iterator inserted = InternalInsertCookie(
-        GetKey(cookie_ptr->Domain()), std::move(cookie), false);
+    auto inserted = InternalInsertCookie(GetKey(cookie_ptr->Domain()),
+                                         std::move(cookie), false);
     const Time cookie_access_time(cookie_ptr->LastAccessDate());
     if (earliest_access_time_.is_null() ||
         cookie_access_time < earliest_access_time_) {
@@ -933,9 +932,9 @@
 
   // Any cookies that contain control characters that we have loaded from the
   // persistent store should be deleted. See http://crbug.com/238041.
-  for (CookieItVector::iterator it = cookies_with_control_chars.begin();
+  for (auto it = cookies_with_control_chars.begin();
        it != cookies_with_control_chars.end();) {
-    CookieItVector::iterator curit = it;
+    auto curit = it;
     ++it;
 
     InternalDeleteCookie(*curit, true, DELETE_COOKIE_CONTROL_CHAR);
@@ -984,11 +983,11 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   // Iterate through all the of the cookies, grouped by host.
-  CookieMap::iterator prev_range_end = cookies_.begin();
+  auto prev_range_end = cookies_.begin();
   while (prev_range_end != cookies_.end()) {
-    CookieMap::iterator cur_range_begin = prev_range_end;
+    auto cur_range_begin = prev_range_end;
     const std::string key = cur_range_begin->first;  // Keep a copy.
-    CookieMap::iterator cur_range_end = cookies_.upper_bound(key);
+    auto cur_range_end = cookies_.upper_bound(key);
     prev_range_end = cur_range_end;
 
     // Ensure no equivalent cookies for this host.
@@ -1013,7 +1012,7 @@
 
   // Iterate through all of the cookies in our range, and insert them into
   // the equivalence map.
-  for (CookieMap::iterator it = begin; it != end; ++it) {
+  for (auto it = begin; it != end; ++it) {
     DCHECK_EQ(key, it->first);
     CanonicalCookie* cookie = it->second.get();
 
@@ -1038,8 +1037,8 @@
 
   // Otherwise, delete all the duplicate cookies, both from our in-memory store
   // and from the backing store.
-  for (EquivalenceMap::iterator it = equivalent_cookies.begin();
-       it != equivalent_cookies.end(); ++it) {
+  for (auto it = equivalent_cookies.begin(); it != equivalent_cookies.end();
+       ++it) {
     const CookieSignature& signature = it->first;
     CookieSet& dupes = it->second;
 
@@ -1061,8 +1060,7 @@
     // Remove all the cookies identified by |dupes|. It is valid to delete our
     // list of iterators one at a time, since |cookies_| is a multimap (they
     // don't invalidate existing iterators following deletion).
-    for (CookieSet::iterator dupes_it = dupes.begin(); dupes_it != dupes.end();
-         ++dupes_it) {
+    for (auto dupes_it = dupes.begin(); dupes_it != dupes.end(); ++dupes_it) {
       InternalDeleteCookie(*dupes_it, true,
                            DELETE_COOKIE_DUPLICATE_IN_BACKING_STORE);
     }
@@ -1097,7 +1095,7 @@
 
   for (CookieMapItPair its = cookies_.equal_range(key);
        its.first != its.second;) {
-    CookieMap::iterator curit = its.first;
+    auto curit = its.first;
     CanonicalCookie* cc = curit->second.get();
     ++its.first;
 
@@ -1141,7 +1139,7 @@
   CanonicalCookie* cc_skipped_secure = nullptr;
   for (CookieMapItPair its = cookies_.equal_range(key);
        its.first != its.second;) {
-    CookieMap::iterator curit = its.first;
+    auto curit = its.first;
     CanonicalCookie* cc = curit->second.get();
     ++its.first;
 
@@ -1236,8 +1234,7 @@
       sync_to_store) {
     store_->AddCookie(*cc_ptr);
   }
-  CookieMap::iterator inserted =
-      cookies_.insert(CookieMap::value_type(key, std::move(cc)));
+  auto inserted = cookies_.insert(CookieMap::value_type(key, std::move(cc)));
 
   // See InitializeHistograms() for details.
   int32_t type_sample = cc_ptr->SameSite() != CookieSameSite::NO_RESTRICTION
@@ -1646,7 +1643,7 @@
 
   int num_deleted = 0;
   for (CookieMap::iterator it = itpair.first, end = itpair.second; it != end;) {
-    CookieMap::iterator curit = it;
+    auto curit = it;
     ++it;
 
     if (curit->second->IsExpired(current)) {
@@ -1667,7 +1664,7 @@
     CookieItVector::iterator it_end) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
-  for (CookieItVector::iterator it = it_begin; it != it_end; it++) {
+  for (auto it = it_begin; it != it_end; it++) {
     InternalDeleteCookie((*it), true, cause);
   }
   return it_end - it_begin;
@@ -1689,7 +1686,7 @@
       cookie_its.begin(), cookie_its.end(),
       cookie_its.size() < purge_goal ? purge_goal + 1 : purge_goal);
   // Find boundary to cookies older than safe_date.
-  CookieItVector::iterator global_purge_it = LowerBoundAccessDate(
+  auto global_purge_it = LowerBoundAccessDate(
       cookie_its.begin(), cookie_its.begin() + purge_goal, safe_date);
   // Only delete the old cookies and delete non-secure ones first.
   size_t num_deleted =
@@ -1884,8 +1881,7 @@
     // Checks if the domain key has been loaded.
     std::string key = GetKey(host_or_domain);
     if (keys_loaded_.find(key) == keys_loaded_.end()) {
-      std::map<std::string, base::circular_deque<base::OnceClosure>>::iterator
-          it = tasks_pending_for_key_.find(key);
+      auto it = tasks_pending_for_key_.find(key);
       if (it == tasks_pending_for_key_.end()) {
         store_->LoadCookiesForKey(
             key, base::Bind(&CookieMonster::OnKeyLoaded,
diff --git a/net/cookies/cookie_monster_change_dispatcher.cc b/net/cookies/cookie_monster_change_dispatcher.cc
index 2eadab6..a53b1ed 100644
--- a/net/cookies/cookie_monster_change_dispatcher.cc
+++ b/net/cookies/cookie_monster_change_dispatcher.cc
@@ -168,7 +168,7 @@
     const std::string& domain_key) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
-  CookieDomainMap::iterator it = cookie_domain_map_.find(domain_key);
+  auto it = cookie_domain_map_.find(domain_key);
   if (it == cookie_domain_map_.end())
     return;
 
@@ -184,7 +184,7 @@
     const std::string& name_key) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
-  CookieNameMap::iterator it = cookie_name_map.find(name_key);
+  auto it = cookie_name_map.find(name_key);
   if (it == cookie_name_map.end())
     return;
 
@@ -212,12 +212,12 @@
     Subscription* subscription) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
-  CookieDomainMap::iterator cookie_domain_map_iterator =
+  auto cookie_domain_map_iterator =
       cookie_domain_map_.find(subscription->domain_key());
   DCHECK(cookie_domain_map_iterator != cookie_domain_map_.end());
 
   CookieNameMap& cookie_name_map = cookie_domain_map_iterator->second;
-  CookieNameMap::iterator cookie_name_map_iterator =
+  auto cookie_name_map_iterator =
       cookie_name_map.find(subscription->name_key());
   DCHECK(cookie_name_map_iterator != cookie_name_map.end());
 
diff --git a/net/cookies/cookie_monster_store_test.cc b/net/cookies/cookie_monster_store_test.cc
index 4c7d7c40..652a976 100644
--- a/net/cookies/cookie_monster_store_test.cc
+++ b/net/cookies/cookie_monster_store_test.cc
@@ -179,7 +179,7 @@
 void MockSimplePersistentCookieStore::DeleteCookie(
     const CanonicalCookie& cookie) {
   int64_t creation_time = cookie.CreationDate().ToInternalValue();
-  CanonicalCookieMap::iterator it = cookies_.find(creation_time);
+  auto it = cookies_.find(creation_time);
   ASSERT_TRUE(it != cookies_.end());
   cookies_.erase(it);
 }
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 57c19d8..7d12f2e1a 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -348,7 +348,7 @@
                            const std::string& domain,
                            const std::string& name) {
     CookieList cookies = this->GetAllCookies(cm);
-    for (CookieList::iterator it = cookies.begin(); it != cookies.end(); ++it)
+    for (auto it = cookies.begin(); it != cookies.end(); ++it)
       if (it->Domain() == domain && it->Name() == name)
         return this->DeleteCanonicalCookie(cm, *it);
     return false;
@@ -838,7 +838,7 @@
   }
 
   bool IsCookieInList(const CanonicalCookie& cookie, const CookieList& list) {
-    for (CookieList::const_iterator it = list.begin(); it != list.end(); ++it) {
+    for (auto it = list.begin(); it != list.end(); ++it) {
       if (it->Name() == cookie.Name() && it->Value() == cookie.Value() &&
           it->Domain() == cookie.Domain() && it->Path() == cookie.Path() &&
           it->CreationDate() == cookie.CreationDate() &&
@@ -1507,7 +1507,7 @@
 
   // Getting all cookies for a URL doesn't update the accessed time either.
   CookieList cookies = GetAllCookiesForURL(cm.get(), http_www_foo_.url());
-  CookieList::iterator it = cookies.begin();
+  auto it = cookies.begin();
   ASSERT_TRUE(it != cookies.end());
   EXPECT_EQ(http_www_foo_.host(), it->Domain());
   EXPECT_EQ("A", it->Name());
@@ -1581,7 +1581,7 @@
 
   // Check cookies for url.
   CookieList cookies = GetAllCookiesForURL(cm.get(), http_www_foo_.url());
-  CookieList::iterator it = cookies.begin();
+  auto it = cookies.begin();
 
   ASSERT_TRUE(it != cookies.end());
   EXPECT_EQ(http_www_foo_.host(), it->Domain());
@@ -1639,7 +1639,7 @@
       SetCookieWithOptions(cm.get(), http_www_foo_.url(), "E=F;", options));
 
   CookieList cookies = GetAllCookiesForURL(cm.get(), www_foo_foo_.url());
-  CookieList::iterator it = cookies.begin();
+  auto it = cookies.begin();
 
   ASSERT_TRUE(it != cookies.end());
   EXPECT_EQ("A", it->Name());
@@ -1737,7 +1737,7 @@
   CookieList cookies = GetAllCookies(cm.get());
   size_t expected_size = 4;
   EXPECT_EQ(expected_size, cookies.size());
-  for (CookieList::iterator it = cookies.begin(); it != cookies.end(); ++it) {
+  for (auto it = cookies.begin(); it != cookies.end(); ++it) {
     EXPECT_NE("A1", it->Value());
     EXPECT_NE("A2", it->Value());
   }
@@ -2498,7 +2498,7 @@
   CookieList cookies = GetAllCookies(cm.get());
   size_t expected_size = 3;  // "A", "W" and "Y". "U" is gone.
   EXPECT_EQ(expected_size, cookies.size());
-  CookieList::iterator it = cookies.begin();
+  auto it = cookies.begin();
 
   ASSERT_TRUE(it != cookies.end());
   EXPECT_EQ("W", it->Name());
diff --git a/net/cookies/cookie_util.cc b/net/cookies/cookie_util.cc
index 7fe5300..f288878 100644
--- a/net/cookies/cookie_util.cc
+++ b/net/cookies/cookie_util.cc
@@ -349,8 +349,7 @@
 std::string SerializeRequestCookieLine(
     const ParsedRequestCookies& parsed_cookies) {
   std::string buffer;
-  for (ParsedRequestCookies::const_iterator i = parsed_cookies.begin();
-       i != parsed_cookies.end(); ++i) {
+  for (auto i = parsed_cookies.begin(); i != parsed_cookies.end(); ++i) {
     if (!buffer.empty())
       buffer.append("; ");
     buffer.append(i->first.begin(), i->first.end());
diff --git a/net/cookies/parsed_cookie.cc b/net/cookies/parsed_cookie.cc
index 701d173..9cc4c82 100644
--- a/net/cookies/parsed_cookie.cc
+++ b/net/cookies/parsed_cookie.cc
@@ -217,7 +217,7 @@
 
 std::string ParsedCookie::ToCookieLine() const {
   std::string out;
-  for (PairList::const_iterator it = pairs_.begin(); it != pairs_.end(); ++it) {
+  for (auto it = pairs_.begin(); it != pairs_.end(); ++it) {
     if (!out.empty())
       out.append("; ");
     out.append(it->first);
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc
index 6e2197c0..55925ea4 100644
--- a/net/disk_cache/blockfile/backend_impl.cc
+++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -907,7 +907,7 @@
 }
 
 void BackendImpl::OnEntryDestroyBegin(Addr address) {
-  EntriesMap::iterator it = open_entries_.find(address.value());
+  auto it = open_entries_.find(address.value());
   if (it != open_entries_.end())
     open_entries_.erase(it);
 }
@@ -928,8 +928,7 @@
 
 EntryImpl* BackendImpl::GetOpenEntry(CacheRankingsBlock* rankings) const {
   DCHECK(rankings->HasData());
-  EntriesMap::const_iterator it =
-      open_entries_.find(rankings->Data()->contents);
+  auto it = open_entries_.find(rankings->Data()->contents);
   if (it != open_entries_.end()) {
     // We have this entry in memory.
     return it->second;
@@ -1579,7 +1578,7 @@
 }
 
 int BackendImpl::NewEntry(Addr address, scoped_refptr<EntryImpl>* entry) {
-  EntriesMap::iterator it = open_entries_.find(address.value());
+  auto it = open_entries_.find(address.value());
   if (it != open_entries_.end()) {
     // Easy job. This entry is already in memory.
     *entry = base::WrapRefCounted(it->second);
diff --git a/net/disk_cache/blockfile/in_flight_io.cc b/net/disk_cache/blockfile/in_flight_io.cc
index b8fee8c4..ae2e4b7 100644
--- a/net/disk_cache/blockfile/in_flight_io.cc
+++ b/net/disk_cache/blockfile/in_flight_io.cc
@@ -52,14 +52,14 @@
 void InFlightIO::WaitForPendingIO() {
   while (!io_list_.empty()) {
     // Block the current thread until all pending IO completes.
-    IOList::iterator it = io_list_.begin();
+    auto it = io_list_.begin();
     InvokeCallback(it->get(), true);
   }
 }
 
 void InFlightIO::DropPendingIO() {
   while (!io_list_.empty()) {
-    IOList::iterator it = io_list_.begin();
+    auto it = io_list_.begin();
     BackgroundIO* operation = it->get();
     operation->Cancel();
     DCHECK(io_list_.find(operation) != io_list_.end());
diff --git a/net/disk_cache/blockfile/rankings.cc b/net/disk_cache/blockfile/rankings.cc
index c916854d..6ce0438 100644
--- a/net/disk_cache/blockfile/rankings.cc
+++ b/net/disk_cache/blockfile/rankings.cc
@@ -885,8 +885,7 @@
 // of cache iterators and update all that are pointing to the given node.
 void Rankings::UpdateIterators(CacheRankingsBlock* node) {
   CacheAddr address = node->address().value();
-  for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end();
-       ++it) {
+  for (auto it = iterators_.begin(); it != iterators_.end(); ++it) {
     if (it->first == address && it->second->HasData()) {
       CacheRankingsBlock* other = it->second;
       *other->Data() = *node->Data();
@@ -896,8 +895,7 @@
 
 void Rankings::InvalidateIterators(CacheRankingsBlock* node) {
   CacheAddr address = node->address().value();
-  for (IteratorList::iterator it = iterators_.begin(); it != iterators_.end();
-       ++it) {
+  for (auto it = iterators_.begin(); it != iterators_.end(); ++it) {
     if (it->first == address)
       it->second->Discard();
   }
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 6b0a7a3a..38aa554e 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -171,7 +171,7 @@
                               net::RequestPriority request_priority,
                               Entry** entry,
                               CompletionOnceCallback callback) {
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it == entries_.end())
     return net::ERR_FAILED;
 
@@ -201,7 +201,7 @@
 int MemBackendImpl::DoomEntry(const std::string& key,
                               net::RequestPriority priority,
                               CompletionOnceCallback callback) {
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it == entries_.end())
     return net::ERR_FAILED;
 
@@ -315,7 +315,7 @@
 }
 
 void MemBackendImpl::OnExternalCacheHit(const std::string& key) {
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it != entries_.end())
     it->second->UpdateStateOnUse(MemEntryImpl::ENTRY_WAS_NOT_MODIFIED);
 }
diff --git a/net/disk_cache/memory/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index f3b32700..e6c7d34 100644
--- a/net/disk_cache/memory/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -619,7 +619,7 @@
 MemEntryImpl* MemEntryImpl::GetChild(int64_t offset, bool create) {
   DCHECK_EQ(PARENT_ENTRY, type());
   int index = ToChildIndex(offset);
-  EntryMap::iterator i = children_->find(index);
+  auto i = children_->find(index);
   if (i != children_->end())
     return i->second;
   if (create)
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index 3dd6282a..fa46b4d 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -314,8 +314,7 @@
 
 void SimpleBackendImpl::OnDoomComplete(uint64_t entry_hash) {
   DCHECK_EQ(1u, entries_pending_doom_.count(entry_hash));
-  std::unordered_map<uint64_t, std::vector<PostDoomWaiter>>::iterator it =
-      entries_pending_doom_.find(entry_hash);
+  auto it = entries_pending_doom_.find(entry_hash);
   std::vector<PostDoomWaiter> to_handle_waiters;
   to_handle_waiters.swap(it->second);
   entries_pending_doom_.erase(it);
@@ -740,8 +739,7 @@
   DCHECK_EQ(entry_hash, simple_util::GetEntryHashKey(key));
 
   // If there is a doom pending, we would want to serialize after it.
-  std::unordered_map<uint64_t, std::vector<PostDoomWaiter>>::iterator doom_it =
-      entries_pending_doom_.find(entry_hash);
+  auto doom_it = entries_pending_doom_.find(entry_hash);
   if (doom_it != entries_pending_doom_.end()) {
     *post_doom = &doom_it->second;
     return nullptr;
@@ -778,8 +776,7 @@
 int SimpleBackendImpl::OpenEntryFromHash(uint64_t entry_hash,
                                          Entry** entry,
                                          CompletionOnceCallback callback) {
-  std::unordered_map<uint64_t, std::vector<PostDoomWaiter>>::iterator it =
-      entries_pending_doom_.find(entry_hash);
+  auto it = entries_pending_doom_.find(entry_hash);
   if (it != entries_pending_doom_.end()) {
     base::OnceCallback<int(CompletionOnceCallback)> operation =
         base::BindOnce(&SimpleBackendImpl::OpenEntryFromHash,
@@ -789,7 +786,7 @@
     return net::ERR_IO_PENDING;
   }
 
-  EntryMap::iterator has_active = active_entries_.find(entry_hash);
+  auto has_active = active_entries_.find(entry_hash);
   if (has_active != active_entries_.end()) {
     return OpenEntry(has_active->second->key(), net::HIGHEST, entry,
                      std::move(callback));
@@ -810,8 +807,7 @@
   Entry** entry = new Entry*();
   std::unique_ptr<Entry*> scoped_entry(entry);
 
-  std::unordered_map<uint64_t, std::vector<PostDoomWaiter>>::iterator
-      pending_it = entries_pending_doom_.find(entry_hash);
+  auto pending_it = entries_pending_doom_.find(entry_hash);
   if (pending_it != entries_pending_doom_.end()) {
     base::OnceCallback<int(CompletionOnceCallback)> operation =
         base::BindOnce(&SimpleBackendImpl::DoomEntryFromHash,
@@ -821,7 +817,7 @@
     return net::ERR_IO_PENDING;
   }
 
-  EntryMap::iterator active_it = active_entries_.find(entry_hash);
+  auto active_it = active_entries_.find(entry_hash);
   if (active_it != active_entries_.end())
     return active_it->second->DoomEntry(std::move(callback));
 
diff --git a/net/disk_cache/simple/simple_file_tracker.cc b/net/disk_cache/simple/simple_file_tracker.cc
index dd342b8..4f841d4 100644
--- a/net/disk_cache/simple/simple_file_tracker.cc
+++ b/net/disk_cache/simple/simple_file_tracker.cc
@@ -242,7 +242,7 @@
 
 void SimpleFileTracker::CloseFilesIfTooManyOpen(
     std::vector<std::unique_ptr<base::File>>* files_to_close) {
-  std::list<TrackedFiles*>::iterator i = lru_.end();
+  auto i = lru_.end();
   while (open_files_ > file_limit_ && i != lru_.begin()) {
     --i;  // Point to the actual entry.
     TrackedFiles* tracked_files = *i;
diff --git a/net/disk_cache/simple/simple_index.cc b/net/disk_cache/simple/simple_index.cc
index 4075402..912ed27 100644
--- a/net/disk_cache/simple/simple_index.cc
+++ b/net/disk_cache/simple/simple_index.cc
@@ -168,8 +168,9 @@
   DCHECK(io_thread_checker_.CalledOnValidThread());
 
   // Fail all callbacks waiting for the index to come up.
-  for (CallbackList::iterator it = to_run_when_initialized_.begin(),
-       end = to_run_when_initialized_.end(); it != end; ++it) {
+  for (auto it = to_run_when_initialized_.begin(),
+            end = to_run_when_initialized_.end();
+       it != end; ++it) {
     std::move(*it).Run(net::ERR_ABORTED);
   }
 }
@@ -282,7 +283,7 @@
 
 void SimpleIndex::SetLastUsedTimeForTest(uint64_t entry_hash,
                                          const base::Time last_used) {
-  EntrySet::iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   DCHECK(it != entries_set_.end());
   it->second.SetLastUsedTime(last_used);
 }
@@ -301,7 +302,7 @@
 
 void SimpleIndex::Remove(uint64_t entry_hash) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
-  EntrySet::iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   if (it != entries_set_.end()) {
     UpdateEntryIteratorSize(&it, 0u);
     entries_set_.erase(it);
@@ -320,7 +321,7 @@
 
 uint8_t SimpleIndex::GetEntryInMemoryData(uint64_t entry_hash) const {
   DCHECK(io_thread_checker_.CalledOnValidThread());
-  EntrySet::const_iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   if (it == entries_set_.end())
     return 0;
   return it->second.GetInMemoryData();
@@ -328,7 +329,7 @@
 
 void SimpleIndex::SetEntryInMemoryData(uint64_t entry_hash, uint8_t value) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
-  EntrySet::iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   if (it == entries_set_.end())
     return;
   return it->second.SetInMemoryData(value);
@@ -338,7 +339,7 @@
   DCHECK(io_thread_checker_.CalledOnValidThread());
   // Always update the last used time, even if it is during initialization.
   // It will be merged later.
-  EntrySet::iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   if (it == entries_set_.end())
     // If not initialized, always return true, forcing it to go to the disk.
     return !initialized_;
@@ -407,7 +408,7 @@
 bool SimpleIndex::UpdateEntrySize(uint64_t entry_hash,
                                   base::StrictNumeric<uint32_t> entry_size) {
   DCHECK(io_thread_checker_.CalledOnValidThread());
-  EntrySet::iterator it = entries_set_.find(entry_hash);
+  auto it = entries_set_.find(entry_hash);
   if (it == entries_set_.end())
     return false;
 
@@ -475,9 +476,7 @@
 
   EntrySet* index_file_entries = &load_result->entries;
 
-  for (std::unordered_set<uint64_t>::const_iterator it =
-           removed_entries_.begin();
-       it != removed_entries_.end(); ++it) {
+  for (auto it = removed_entries_.begin(); it != removed_entries_.end(); ++it) {
     index_file_entries->erase(*it);
   }
   removed_entries_.clear();
@@ -493,8 +492,8 @@
   }
 
   uint64_t merged_cache_size = 0;
-  for (EntrySet::iterator it = index_file_entries->begin();
-       it != index_file_entries->end(); ++it) {
+  for (auto it = index_file_entries->begin(); it != index_file_entries->end();
+       ++it) {
     merged_cache_size += it->second.GetEntrySize();
   }
 
@@ -526,8 +525,9 @@
   }
 
   // Run all callbacks waiting for the index to come up.
-  for (CallbackList::iterator it = to_run_when_initialized_.begin(),
-       end = to_run_when_initialized_.end(); it != end; ++it) {
+  for (auto it = to_run_when_initialized_.begin(),
+            end = to_run_when_initialized_.end();
+       it != end; ++it) {
     io_thread_->PostTask(FROM_HERE, base::BindOnce(std::move(*it), net::OK));
   }
   to_run_when_initialized_.clear();
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index a8dbb07..e1a4192 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -172,7 +172,7 @@
   if (last_used_time.is_null())
     last_used_time = last_modified;
 
-  SimpleIndex::EntrySet::iterator it = entries->find(hash_key);
+  auto it = entries->find(hash_key);
   base::CheckedNumeric<uint32_t> total_entry_size = size;
 
   // Sometimes we see entry sizes here which are nonsense. We can't use them
@@ -518,8 +518,7 @@
   std::unique_ptr<base::Pickle> pickle = std::make_unique<SimpleIndexPickle>();
 
   index_metadata.Serialize(pickle.get());
-  for (SimpleIndex::EntrySet::const_iterator it = entries.begin();
-       it != entries.end(); ++it) {
+  for (auto it = entries.begin(); it != entries.end(); ++it) {
     pickle->WriteUInt64(it->first);
     it->second.Serialize(pickle.get());
   }
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc
index 937c6f61..f8a56811 100644
--- a/net/disk_cache/simple/simple_index_file_unittest.cc
+++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -215,7 +215,7 @@
   EXPECT_EQ(entries.size(), new_entries.size());
 
   for (size_t i = 0; i < kNumHashes; ++i) {
-    SimpleIndex::EntrySet::const_iterator it = new_entries.find(kHashes[i]);
+    auto it = new_entries.find(kHashes[i]);
     EXPECT_TRUE(new_entries.end() != it);
     EXPECT_TRUE(CompareTwoEntryMetadata(it->second, metadata_entries[i]));
   }
@@ -257,7 +257,7 @@
   const SimpleIndex::EntrySet& new_entries = deserialize_result.entries;
   ASSERT_EQ(entries.size(), new_entries.size());
   for (size_t i = 0; i < kNumHashes; ++i) {
-    SimpleIndex::EntrySet::const_iterator it = new_entries.find(kHashes[i]);
+    auto it = new_entries.find(kHashes[i]);
     ASSERT_TRUE(new_entries.end() != it);
     EXPECT_EQ(RoundSize(kSizes[i]), it->second.GetEntrySize());
     EXPECT_EQ(0u, it->second.GetInMemoryData());
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index 2a68b3a8..2f702f31 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -148,7 +148,7 @@
 
   // Redirect to allow single "friend" declaration in base class.
   bool GetEntryForTesting(uint64_t key, EntryMetadata* metadata) {
-    SimpleIndex::EntrySet::iterator it = index_->entries_set_.find(key);
+    auto it = index_->entries_set_.find(key);
     if (index_->entries_set_.end() == it)
       return false;
     *metadata = it->second;
diff --git a/net/disk_cache/simple/simple_synchronous_entry.cc b/net/disk_cache/simple/simple_synchronous_entry.cc
index 6c888cb..01b7580 100644
--- a/net/disk_cache/simple/simple_synchronous_entry.cc
+++ b/net/disk_cache/simple/simple_synchronous_entry.cc
@@ -567,7 +567,7 @@
   }
 
   // Find the first sparse range at or after the requested offset.
-  SparseRangeIterator it = sparse_ranges_.lower_bound(offset);
+  auto it = sparse_ranges_.lower_bound(offset);
 
   if (it != sparse_ranges_.begin()) {
     // Hop back one range and read the one overlapping with the start.
@@ -655,7 +655,7 @@
     out_entry_stat->set_sparse_data_size(0);
   }
 
-  SparseRangeIterator it = sparse_ranges_.lower_bound(offset);
+  auto it = sparse_ranges_.lower_bound(offset);
 
   if (it != sparse_ranges_.begin()) {
     --it;
@@ -740,7 +740,7 @@
   int64_t offset = in_entry_op.sparse_offset;
   int len = in_entry_op.buf_len;
 
-  SparseRangeIterator it = sparse_ranges_.lower_bound(offset);
+  auto it = sparse_ranges_.lower_bound(offset);
 
   int64_t start = offset;
   int64_t avail_so_far = 0;
@@ -835,8 +835,7 @@
   base::ElapsedTimer close_time;
   DCHECK(stream_0_data);
 
-  for (std::vector<CRCRecord>::iterator it = crc32s_to_write->begin();
-       it != crc32s_to_write->end(); ++it) {
+  for (auto it = crc32s_to_write->begin(); it != crc32s_to_write->end(); ++it) {
     const int stream_index = it->index;
     const int file_index = GetFileIndexFromStreamIndex(stream_index);
     if (empty_file_omitted_[file_index])
diff --git a/net/dns/address_sorter_posix_unittest.cc b/net/dns/address_sorter_posix_unittest.cc
index da5ba524..1230756 100644
--- a/net/dns/address_sorter_posix_unittest.cc
+++ b/net/dns/address_sorter_posix_unittest.cc
@@ -114,7 +114,7 @@
   int Connect(const IPEndPoint& remote) override {
     if (connected_)
       return ERR_UNEXPECTED;
-    AddressMapping::const_iterator it = mapping_->find(remote.address());
+    auto it = mapping_->find(remote.address());
     if (it == mapping_->end())
       return ERR_FAILED;
     connected_ = true;
diff --git a/net/dns/dns_test_util.cc b/net/dns/dns_test_util.cc
index ac98c63..acc3829f 100644
--- a/net/dns/dns_test_util.cc
+++ b/net/dns/dns_test_util.cc
@@ -208,7 +208,7 @@
   void CompleteDelayedTransactions() {
     DelayedTransactionList old_delayed_transactions;
     old_delayed_transactions.swap(delayed_transactions_);
-    for (DelayedTransactionList::iterator it = old_delayed_transactions.begin();
+    for (auto it = old_delayed_transactions.begin();
          it != old_delayed_transactions.end(); ++it) {
       if (it->get())
         (*it)->FinishDelayedTransaction();
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc
index bb8e40a9..e377c616 100644
--- a/net/dns/host_cache.cc
+++ b/net/dns/host_cache.cc
@@ -43,8 +43,7 @@
 
 bool AddressListFromListValue(const base::ListValue* value, AddressList* list) {
   list->clear();
-  for (base::ListValue::const_iterator it = value->begin(); it != value->end();
-       it++) {
+  for (auto it = value->begin(); it != value->end(); it++) {
     IPAddress address;
     std::string addr_string;
     if (!it->GetAsString(&addr_string) ||
@@ -290,8 +289,8 @@
 
   bool changed = false;
   base::TimeTicks now = tick_clock_->NowTicks();
-  for (EntryMap::iterator it = entries_.begin(); it != entries_.end();) {
-    EntryMap::iterator next_it = std::next(it);
+  for (auto it = entries_.begin(); it != entries_.end();) {
+    auto next_it = std::next(it);
 
     if (host_filter.Run(it->first.hostname)) {
       RecordErase(ERASE_CLEAR, now, it->second);
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index cdad914..328105af 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -2608,16 +2608,14 @@
   // necessary.
   if (key.address_family == ADDRESS_FAMILY_IPV6 ||
       key.address_family == ADDRESS_FAMILY_UNSPECIFIED) {
-    DnsHosts::const_iterator it = hosts.find(
-        DnsHostsKey(hostname, ADDRESS_FAMILY_IPV6));
+    auto it = hosts.find(DnsHostsKey(hostname, ADDRESS_FAMILY_IPV6));
     if (it != hosts.end())
       addresses->push_back(IPEndPoint(it->second, host_port));
   }
 
   if (key.address_family == ADDRESS_FAMILY_IPV4 ||
       key.address_family == ADDRESS_FAMILY_UNSPECIFIED) {
-    DnsHosts::const_iterator it = hosts.find(
-        DnsHostsKey(hostname, ADDRESS_FAMILY_IPV4));
+    auto it = hosts.find(DnsHostsKey(hostname, ADDRESS_FAMILY_IPV4));
     if (it != hosts.end())
       addresses->push_back(IPEndPoint(it->second, host_port));
   }
diff --git a/net/dns/mdns_cache.cc b/net/dns/mdns_cache.cc
index 5fe78914..5ab6222 100644
--- a/net/dns/mdns_cache.cc
+++ b/net/dns/mdns_cache.cc
@@ -55,7 +55,7 @@
 MDnsCache::~MDnsCache() = default;
 
 const RecordParsed* MDnsCache::LookupKey(const Key& key) {
-  RecordMap::iterator found = mdns_cache_.find(key);
+  auto found = mdns_cache_.find(key);
   if (found != mdns_cache_.end()) {
     return found->second.get();
   }
@@ -101,8 +101,7 @@
   // impunity.
   if (now < next_expiration_) return;
 
-  for (RecordMap::iterator i = mdns_cache_.begin();
-       i != mdns_cache_.end(); ) {
+  for (auto i = mdns_cache_.begin(); i != mdns_cache_.end();) {
     base::Time expiration = GetEffectiveExpiration(i->second.get());
     if (now >= expiration) {
       record_removed_callback.Run(i->second.get());
@@ -125,7 +124,7 @@
   DCHECK(results);
   results->clear();
 
-  RecordMap::const_iterator i = mdns_cache_.lower_bound(Key(type, name, ""));
+  auto i = mdns_cache_.lower_bound(Key(type, name, ""));
   for (; i != mdns_cache_.end(); ++i) {
     if (i->first.name() != name ||
         (type != 0 && i->first.type() != type)) {
@@ -144,7 +143,7 @@
 std::unique_ptr<const RecordParsed> MDnsCache::RemoveRecord(
     const RecordParsed* record) {
   Key key = Key::CreateFor(record);
-  RecordMap::iterator found = mdns_cache_.find(key);
+  auto found = mdns_cache_.find(key);
 
   if (found != mdns_cache_.end() && found->second.get() == record) {
     std::unique_ptr<const RecordParsed> result = std::move(found->second);
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index 40b319a..adc5e0f8 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -270,8 +270,7 @@
     update_keys.insert(std::make_pair(update_key, update));
   }
 
-  for (std::map<MDnsCache::Key, MDnsCache::UpdateType>::iterator i =
-           update_keys.begin(); i != update_keys.end(); i++) {
+  for (auto i = update_keys.begin(); i != update_keys.end(); i++) {
     const RecordParsed* record = cache_.LookupKey(i->first);
     if (!record)
       continue;
@@ -297,8 +296,7 @@
 
   cache_.FindDnsRecords(0, record->name(), &records_to_remove, clock_->Now());
 
-  for (std::vector<const RecordParsed*>::iterator i = records_to_remove.begin();
-       i != records_to_remove.end(); i++) {
+  for (auto i = records_to_remove.begin(); i != records_to_remove.end(); i++) {
     if ((*i)->type() == dns_protocol::kTypeNSEC)
       continue;
     if (!rdata->GetBit((*i)->type())) {
@@ -310,8 +308,7 @@
   }
 
   // Alert all listeners waiting for the nonexistent RR types.
-  ListenerMap::iterator i =
-      listeners_.upper_bound(ListenerKey(record->name(), 0));
+  auto i = listeners_.upper_bound(ListenerKey(record->name(), 0));
   for (; i != listeners_.end() && i->first.first == record->name(); i++) {
     if (!rdata->GetBit(i->first.second)) {
       for (auto& observer : *i->second)
@@ -329,7 +326,7 @@
     MDnsCache::UpdateType update_type,
     const ListenerKey& key,
     const RecordParsed* record) {
-  ListenerMap::iterator listener_map_iterator = listeners_.find(key);
+  auto listener_map_iterator = listeners_.find(key);
   if (listener_map_iterator == listeners_.end()) return;
 
   for (auto& observer : *listener_map_iterator->second)
@@ -349,7 +346,7 @@
 
 void MDnsClientImpl::Core::RemoveListener(MDnsListenerImpl* listener) {
   ListenerKey key(listener->GetName(), listener->GetType());
-  ListenerMap::iterator observer_list_iterator = listeners_.find(key);
+  auto observer_list_iterator = listeners_.find(key);
 
   DCHECK(observer_list_iterator != listeners_.end());
   DCHECK(observer_list_iterator->second->HasObserver(listener));
@@ -367,7 +364,7 @@
 }
 
 void MDnsClientImpl::Core::CleanupObserverList(const ListenerKey& key) {
-  ListenerMap::iterator found = listeners_.find(key);
+  auto found = listeners_.find(key);
   if (found != listeners_.end() && !found->second->might_have_observers()) {
     listeners_.erase(found);
   }
@@ -689,8 +686,7 @@
 
   if (client_->core()) {
     client_->core()->QueryCache(rrtype_, name_, &records);
-    for (std::vector<const RecordParsed*>::iterator i = records.begin();
-         i != records.end() && weak_this; ++i) {
+    for (auto i = records.begin(); i != records.end() && weak_this; ++i) {
       weak_this->TriggerCallback(MDnsTransaction::RESULT_RECORD, *i);
     }
 
diff --git a/net/dns/mock_host_resolver.cc b/net/dns/mock_host_resolver.cc
index 43f4c5b2..b5382ab1 100644
--- a/net/dns/mock_host_resolver.cc
+++ b/net/dns/mock_host_resolver.cc
@@ -290,7 +290,7 @@
 }
 
 void MockHostResolverBase::DetachRequest(size_t id) {
-  RequestMap::iterator it = requests_.find(id);
+  auto it = requests_.find(id);
   CHECK(it != requests_.end());
   requests_.erase(it);
 }
@@ -312,7 +312,7 @@
 void MockHostResolverBase::ResolveAllPending() {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(ondemand_mode_);
-  for (RequestMap::iterator i = requests_.begin(); i != requests_.end(); ++i) {
+  for (auto i = requests_.begin(); i != requests_.end(); ++i) {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
         FROM_HERE,
         base::Bind(&MockHostResolverBase::ResolveNow, AsWeakPtr(), i->first));
@@ -449,7 +449,7 @@
 }
 
 void MockHostResolverBase::ResolveNow(size_t id) {
-  RequestMap::iterator it = requests_.find(id);
+  auto it = requests_.find(id);
   if (it == requests_.end())
     return;  // was canceled
 
diff --git a/net/extras/sqlite/sqlite_channel_id_store.cc b/net/extras/sqlite/sqlite_channel_id_store.cc
index 96d9321..b67d23f 100644
--- a/net/extras/sqlite/sqlite_channel_id_store.cc
+++ b/net/extras/sqlite/sqlite_channel_id_store.cc
@@ -436,8 +436,7 @@
   DCHECK(background_task_runner_->RunsTasksInCurrentSequence());
   base::AutoLock locked(lock_);
 
-  for (PendingOperationsList::iterator it = pending_.begin();
-       it != pending_.end();) {
+  for (auto it = pending_.begin(); it != pending_.end();) {
     if (base::ContainsValue(server_identifiers,
                             (*it)->channel_id().server_identifier())) {
       std::unique_ptr<PendingOperation> po(std::move(*it));
@@ -488,8 +487,7 @@
   if (!transaction.Begin())
     return;
 
-  for (PendingOperationsList::iterator it = ops.begin(); it != ops.end();
-       ++it) {
+  for (auto it = ops.begin(); it != ops.end(); ++it) {
     // Free the certs as we commit them to the database.
     std::unique_ptr<PendingOperation> po(std::move(*it));
     switch (po->op()) {
@@ -560,8 +558,7 @@
     return;
   }
 
-  for (std::list<std::string>::const_iterator it = server_identifiers.begin();
-       it != server_identifiers.end();
+  for (auto it = server_identifiers.begin(); it != server_identifiers.end();
        ++it) {
     del_smt.Reset(true);
     del_smt.BindString(0, *it);
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
index 5129846..26414e2 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -661,8 +661,7 @@
 
   bool success = false;
   if (InitializeDatabase()) {
-    std::map<std::string, std::set<std::string>>::iterator it =
-        keys_to_load_.find(key);
+    auto it = keys_to_load_.find(key);
     if (it != keys_to_load_.end()) {
       success = LoadCookiesForDomains(it->second);
       keys_to_load_.erase(it);
@@ -873,8 +872,7 @@
     load_success = false;
   } else if (keys_to_load_.size() > 0) {
     // Load cookies for the first domain key.
-    std::map<std::string, std::set<std::string>>::iterator it =
-        keys_to_load_.begin();
+    auto it = keys_to_load_.begin();
     load_success = LoadCookiesForDomains(it->second);
     keys_to_load_.erase(it);
   }
@@ -927,7 +925,7 @@
   }
 
   std::vector<std::unique_ptr<CanonicalCookie>> cookies;
-  std::set<std::string>::const_iterator it = domains.begin();
+  auto it = domains.begin();
   bool ok = true;
   for (; it != domains.end() && ok; ++it) {
     smt.BindString(0, *it);
diff --git a/net/ftp/ftp_auth_cache.cc b/net/ftp/ftp_auth_cache.cc
index 7bebd110..129906cf 100644
--- a/net/ftp/ftp_auth_cache.cc
+++ b/net/ftp/ftp_auth_cache.cc
@@ -25,7 +25,7 @@
 FtpAuthCache::~FtpAuthCache() = default;
 
 FtpAuthCache::Entry* FtpAuthCache::Lookup(const GURL& origin) {
-  for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
+  for (auto it = entries_.begin(); it != entries_.end(); ++it) {
     if (it->origin == origin)
       return &(*it);
   }
@@ -50,7 +50,7 @@
 
 void FtpAuthCache::Remove(const GURL& origin,
                           const AuthCredentials& credentials) {
-  for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
+  for (auto it = entries_.begin(); it != entries_.end(); ++it) {
     if (it->origin == origin && it->credentials.Equals(credentials)) {
       entries_.erase(it);
       DCHECK(!Lookup(origin));
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 957763e..e472fc574 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -1161,8 +1161,8 @@
   // Even if the PASV response specified some other address, we connect
   // to the address we used for control connection (which could be 127.0.0.1
   // or ::1 depending on whether we use IPv6).
-  for (AddressList::const_iterator it = data_socket->addresses().begin();
-      it != data_socket->addresses().end(); ++it) {
+  for (auto it = data_socket->addresses().begin();
+       it != data_socket->addresses().end(); ++it) {
     EXPECT_NE("10.1.2.3", it->ToStringWithoutPort());
   }
 }
diff --git a/net/http/http_auth_cache.cc b/net/http/http_auth_cache.cc
index ada6a91..236220fe 100644
--- a/net/http/http_auth_cache.cc
+++ b/net/http/http_auth_cache.cc
@@ -84,7 +84,7 @@
 
   int entries_examined = 0;
   // Linear scan through the realm entries.
-  for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
+  for (auto it = entries_.begin(); it != entries_.end(); ++it) {
     ++entries_examined;
     if (it->origin() == origin && it->realm() == realm &&
         it->scheme() == scheme) {
@@ -116,7 +116,7 @@
 
   int entries_examined = 0;
   // Linear scan through the realm entries.
-  for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
+  for (auto it = entries_.begin(); it != entries_.end(); ++it) {
     ++entries_examined;
     size_t len = 0;
     if (it->origin() == origin && it->HasEnclosingPath(parent_dir, &len) &&
@@ -240,7 +240,7 @@
                            const std::string& realm,
                            HttpAuth::Scheme scheme,
                            const AuthCredentials& credentials) {
-  for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
+  for (auto it = entries_.begin(); it != entries_.end(); ++it) {
     if (it->origin() == origin && it->realm() == realm &&
         it->scheme() == scheme) {
       if (credentials.Equals(it->credentials())) {
@@ -280,16 +280,14 @@
 }
 
 void HttpAuthCache::UpdateAllFrom(const HttpAuthCache& other) {
-  for (EntryList::const_iterator it = other.entries_.begin();
-       it != other.entries_.end(); ++it) {
+  for (auto it = other.entries_.begin(); it != other.entries_.end(); ++it) {
     // Add an Entry with one of the original entry's paths.
     DCHECK(it->paths_.size() > 0);
     Entry* entry = Add(it->origin(), it->realm(), it->scheme(),
                        it->auth_challenge(), it->credentials(),
                        it->paths_.back());
     // Copy all other paths.
-    for (Entry::PathList::const_reverse_iterator it2 = ++it->paths_.rbegin();
-         it2 != it->paths_.rend(); ++it2)
+    for (auto it2 = ++it->paths_.rbegin(); it2 != it->paths_.rend(); ++it2)
       entry->AddPath(*it2);
     // Copy nonce count (for digest authentication).
     entry->nonce_count_ = it->nonce_count_;
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc
index db13d5af3..dd3a643e 100644
--- a/net/http/http_auth_handler_factory.cc
+++ b/net/http/http_auth_handler_factory.cc
@@ -87,7 +87,7 @@
 HttpAuthHandlerFactory* HttpAuthHandlerRegistryFactory::GetSchemeFactory(
     const std::string& scheme) const {
   std::string lower_scheme = base::ToLowerASCII(scheme);
-  FactoryMap::const_iterator it = factory_map_.find(lower_scheme);
+  auto it = factory_map_.find(lower_scheme);
   if (it == factory_map_.end()) {
     return NULL;                  // |scheme| is not registered.
   }
@@ -202,7 +202,7 @@
     return ERR_INVALID_RESPONSE;
   }
   std::string lower_scheme = base::ToLowerASCII(scheme);
-  FactoryMap::iterator it = factory_map_.find(lower_scheme);
+  auto it = factory_map_.find(lower_scheme);
   if (it == factory_map_.end()) {
     handler->reset();
     return ERR_UNSUPPORTED_AUTH_SCHEME;
diff --git a/net/http/http_cache_writers.cc b/net/http/http_cache_writers.cc
index d21d427..0468ef8f 100644
--- a/net/http/http_cache_writers.cc
+++ b/net/http/http_cache_writers.cc
@@ -186,7 +186,7 @@
   Transaction* transaction = it->first;
   transaction->WriterAboutToBeRemovedFromEntry(result);
 
-  TransactionMap::iterator return_it = all_writers_.erase(it);
+  auto return_it = all_writers_.erase(it);
 
   if (all_writers_.empty() && next_state_ == State::NONE) {
     // This needs to be called to handle the edge case where even before Read is
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 5582ea6..1184533 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -77,8 +77,7 @@
 spdy::SettingsMap AddDefaultHttp2Settings(spdy::SettingsMap http2_settings) {
   // Set default values only if |http2_settings| does not have
   // a value set for given setting.
-  spdy::SettingsMap::iterator it =
-      http2_settings.find(spdy::SETTINGS_HEADER_TABLE_SIZE);
+  auto it = http2_settings.find(spdy::SETTINGS_HEADER_TABLE_SIZE);
   if (it == http2_settings.end())
     http2_settings[spdy::SETTINGS_HEADER_TABLE_SIZE] = kSpdyMaxHeaderTableSize;
 
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index d8b9df1..6285221 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -85,7 +85,7 @@
 
 bool HttpRequestHeaders::GetHeader(const base::StringPiece& key,
                                    std::string* out) const {
-  HeaderVector::const_iterator it = FindHeader(key);
+  auto it = FindHeader(key);
   if (it == headers_.end())
     return false;
   out->assign(it->value);
@@ -107,13 +107,13 @@
                                             const base::StringPiece& value) {
   DCHECK(HttpUtil::IsValidHeaderName(key));
   DCHECK(HttpUtil::IsValidHeaderValue(value));
-  HeaderVector::iterator it = FindHeader(key);
+  auto it = FindHeader(key);
   if (it == headers_.end())
     headers_.push_back(HeaderKeyValuePair(key, value));
 }
 
 void HttpRequestHeaders::RemoveHeader(const base::StringPiece& key) {
-  HeaderVector::iterator it = FindHeader(key);
+  auto it = FindHeader(key);
   if (it != headers_.end())
     headers_.erase(it);
 }
@@ -167,16 +167,14 @@
 }
 
 void HttpRequestHeaders::MergeFrom(const HttpRequestHeaders& other) {
-  for (HeaderVector::const_iterator it = other.headers_.begin();
-       it != other.headers_.end(); ++it ) {
+  for (auto it = other.headers_.begin(); it != other.headers_.end(); ++it) {
     SetHeader(it->key, it->value);
   }
 }
 
 std::string HttpRequestHeaders::ToString() const {
   std::string output;
-  for (HeaderVector::const_iterator it = headers_.begin();
-       it != headers_.end(); ++it) {
+  for (auto it = headers_.begin(); it != headers_.end(); ++it) {
     if (!it->value.empty()) {
       base::StringAppendF(&output, "%s: %s\r\n",
                           it->key.c_str(), it->value.c_str());
@@ -194,8 +192,7 @@
   auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("line", EscapeNonASCII(*request_line));
   auto headers = std::make_unique<base::ListValue>();
-  for (HeaderVector::const_iterator it = headers_.begin(); it != headers_.end();
-       ++it) {
+  for (auto it = headers_.begin(); it != headers_.end(); ++it) {
     std::string log_value =
         ElideHeaderValueForNetLog(capture_mode, it->key, it->value);
     std::string escaped_name = EscapeNonASCII(it->key);
@@ -209,8 +206,7 @@
 
 HttpRequestHeaders::HeaderVector::iterator
 HttpRequestHeaders::FindHeader(const base::StringPiece& key) {
-  for (HeaderVector::iterator it = headers_.begin();
-       it != headers_.end(); ++it) {
+  for (auto it = headers_.begin(); it != headers_.end(); ++it) {
     if (base::EqualsCaseInsensitiveASCII(key, it->key))
       return it;
   }
@@ -220,8 +216,7 @@
 
 HttpRequestHeaders::HeaderVector::const_iterator
 HttpRequestHeaders::FindHeader(const base::StringPiece& key) const {
-  for (HeaderVector::const_iterator it = headers_.begin();
-       it != headers_.end(); ++it) {
+  for (auto it = headers_.begin(); it != headers_.end(); ++it) {
     if (base::EqualsCaseInsensitiveASCII(key, it->key))
       return it;
   }
@@ -231,7 +226,7 @@
 
 void HttpRequestHeaders::SetHeaderInternal(const base::StringPiece& key,
                                            const base::StringPiece& value) {
-  HeaderVector::iterator it = FindHeader(key);
+  auto it = FindHeader(key);
   if (it != headers_.end())
     it->value.assign(value.data(), value.size());
   else
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index bafe124..7f205e2 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -52,8 +52,8 @@
   spdy_servers_map_.Swap(*spdy_servers_map);
 
   // Add the entries from the memory cache.
-  for (SpdyServersMap::reverse_iterator it = spdy_servers_map->rbegin();
-       it != spdy_servers_map->rend(); ++it) {
+  for (auto it = spdy_servers_map->rbegin(); it != spdy_servers_map->rend();
+       ++it) {
     // Add the entry if it is not in the cache, otherwise move it to the front
     // of recency list.
     if (spdy_servers_map_.Get(it->first) == spdy_servers_map_.end())
@@ -123,8 +123,7 @@
   server_network_stats_map_.Swap(*server_network_stats_map);
 
   // Add the entries from the memory cache.
-  for (ServerNetworkStatsMap::reverse_iterator it =
-           server_network_stats_map->rbegin();
+  for (auto it = server_network_stats_map->rbegin();
        it != server_network_stats_map->rend(); ++it) {
     if (server_network_stats_map_.Get(it->first) ==
         server_network_stats_map_.end()) {
@@ -141,7 +140,7 @@
   quic_server_info_map_.Swap(*quic_server_info_map);
 
   // Add the entries from the memory cache.
-  for (QuicServerInfoMap::reverse_iterator it = quic_server_info_map->rbegin();
+  for (auto it = quic_server_info_map->rbegin();
        it != quic_server_info_map->rend(); ++it) {
     if (quic_server_info_map_.Get(it->first) == quic_server_info_map_.end()) {
       quic_server_info_map_.Put(it->first, it->second);
@@ -151,7 +150,7 @@
   // Repopulate |canonical_server_info_map_| to stay in sync with
   // |quic_server_info_map_|.
   canonical_server_info_map_.clear();
-  for (QuicServerInfoMap::reverse_iterator it = quic_server_info_map_.rbegin();
+  for (auto it = quic_server_info_map_.rbegin();
        it != quic_server_info_map_.rend(); ++it) {
     UpdateCanonicalServerInfoMap(it->first);
   }
@@ -224,8 +223,7 @@
   if (server.host().empty())
     return false;
 
-  SpdyServersMap::iterator spdy_server =
-      spdy_servers_map_.Get(server.Serialize());
+  auto spdy_server = spdy_servers_map_.Get(server.Serialize());
   return spdy_server != spdy_servers_map_.end() && spdy_server->second;
 }
 
@@ -236,8 +234,7 @@
   if (server.host().empty())
     return;
 
-  SpdyServersMap::iterator spdy_server =
-      spdy_servers_map_.Get(server.Serialize());
+  auto spdy_server = spdy_servers_map_.Get(server.Serialize());
   if ((spdy_server != spdy_servers_map_.end()) &&
       (spdy_server->second == support_spdy)) {
     return;
@@ -291,11 +288,10 @@
   // |valid_alternative_service_infos|.
   AlternativeServiceInfoVector valid_alternative_service_infos;
   const base::Time now = clock_->Now();
-  AlternativeServiceMap::iterator map_it = alternative_service_map_.Get(origin);
+  auto map_it = alternative_service_map_.Get(origin);
   if (map_it != alternative_service_map_.end()) {
     HostPortPair host_port_pair(origin.host(), origin.port());
-    for (AlternativeServiceInfoVector::iterator it = map_it->second.begin();
-         it != map_it->second.end();) {
+    for (auto it = map_it->second.begin(); it != map_it->second.end();) {
       if (it->expiration() < now) {
         it = map_it->second.erase(it);
         continue;
@@ -329,7 +325,7 @@
     return valid_alternative_service_infos;
   }
 
-  CanonicalAltSvcMap::const_iterator canonical = GetCanonicalAltSvcHost(origin);
+  auto canonical = GetCanonicalAltSvcHost(origin);
   if (canonical == canonical_alt_svc_map_.end()) {
     return AlternativeServiceInfoVector();
   }
@@ -337,8 +333,7 @@
   if (map_it == alternative_service_map_.end()) {
     return AlternativeServiceInfoVector();
   }
-  for (AlternativeServiceInfoVector::iterator it = map_it->second.begin();
-       it != map_it->second.end();) {
+  for (auto it = map_it->second.begin(); it != map_it->second.end();) {
     if (it->expiration() < now) {
       it = map_it->second.erase(it);
       continue;
@@ -403,7 +398,7 @@
 bool HttpServerPropertiesImpl::SetAlternativeServices(
     const url::SchemeHostPort& origin,
     const AlternativeServiceInfoVector& alternative_service_info_vector) {
-  AlternativeServiceMap::iterator it = alternative_service_map_.Peek(origin);
+  auto it = alternative_service_map_.Peek(origin);
 
   if (alternative_service_info_vector.empty()) {
     RemoveAltSvcCanonicalHost(origin);
@@ -590,7 +585,7 @@
 
 void HttpServerPropertiesImpl::ClearServerNetworkStats(
     const url::SchemeHostPort& server) {
-  ServerNetworkStatsMap::iterator it = server_network_stats_map_.Get(server);
+  auto it = server_network_stats_map_.Get(server);
   if (it != server_network_stats_map_.end()) {
     server_network_stats_map_.Erase(it);
   }
@@ -598,7 +593,7 @@
 
 const ServerNetworkStats* HttpServerPropertiesImpl::GetServerNetworkStats(
     const url::SchemeHostPort& server) {
-  ServerNetworkStatsMap::iterator it = server_network_stats_map_.Get(server);
+  auto it = server_network_stats_map_.Get(server);
   if (it == server_network_stats_map_.end()) {
     return NULL;
   }
@@ -613,7 +608,7 @@
 bool HttpServerPropertiesImpl::SetQuicServerInfo(
     const quic::QuicServerId& server_id,
     const std::string& server_info) {
-  QuicServerInfoMap::iterator it = quic_server_info_map_.Peek(server_id);
+  auto it = quic_server_info_map_.Peek(server_id);
   bool changed =
       (it == quic_server_info_map_.end() || it->second != server_info);
   quic_server_info_map_.Put(server_id, server_info);
@@ -623,7 +618,7 @@
 
 const std::string* HttpServerPropertiesImpl::GetQuicServerInfo(
     const quic::QuicServerId& server_id) {
-  QuicServerInfoMap::iterator it = quic_server_info_map_.Get(server_id);
+  auto it = quic_server_info_map_.Get(server_id);
   if (it != quic_server_info_map_.end()) {
     // Since |canonical_server_info_map_| should always map to the most
     // recent host, update it with the one that became MRU in
@@ -635,8 +630,7 @@
   // If the exact match for |server_id| wasn't found, check
   // |canonical_server_info_map_| whether there is server info for a host with
   // the same canonical host suffix.
-  CanonicalServerInfoMap::const_iterator canonical_itr =
-      GetCanonicalServerInfoHost(server_id);
+  auto canonical_itr = GetCanonicalServerInfoHost(server_id);
   if (canonical_itr == canonical_server_info_map_.end())
     return nullptr;
 
@@ -686,7 +680,7 @@
   // Update the |canonical_server_info_map_| as well, so it stays in sync with
   // |quic_server_info_map_|.
   canonical_server_info_map_ = CanonicalServerInfoMap();
-  for (QuicServerInfoMap::reverse_iterator it = quic_server_info_map_.rbegin();
+  for (auto it = quic_server_info_map_.rbegin();
        it != quic_server_info_map_.rend(); ++it) {
     temp_map.Put(it->first, it->second);
     UpdateCanonicalServerInfoMap(it->first);
@@ -717,7 +711,7 @@
   if (it != alternative_service_map_.end())
     return it;
 
-  CanonicalAltSvcMap::const_iterator canonical = GetCanonicalAltSvcHost(server);
+  auto canonical = GetCanonicalAltSvcHost(server);
   if (canonical == canonical_alt_svc_map_.end()) {
     return alternative_service_map_.end();
   }
@@ -761,7 +755,7 @@
 
 void HttpServerPropertiesImpl::RemoveAltSvcCanonicalHost(
     const url::SchemeHostPort& server) {
-  CanonicalAltSvcMap::const_iterator canonical = GetCanonicalAltSvcHost(server);
+  auto canonical = GetCanonicalAltSvcHost(server);
   if (canonical == canonical_alt_svc_map_.end())
     return;
 
@@ -772,11 +766,9 @@
     const AlternativeService& expired_alternative_service) {
   // Remove every occurrence of |expired_alternative_service| from
   // |alternative_service_map_|.
-  for (AlternativeServiceMap::iterator map_it =
-           alternative_service_map_.begin();
+  for (auto map_it = alternative_service_map_.begin();
        map_it != alternative_service_map_.end();) {
-    for (AlternativeServiceInfoVector::iterator it = map_it->second.begin();
-         it != map_it->second.end();) {
+    for (auto it = map_it->second.begin(); it != map_it->second.end();) {
       AlternativeService alternative_service(it->alternative_service());
       // Empty hostname in map means hostname of key: substitute before
       // comparing to |expired_alternative_service|.
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index 1b6db76..99dd7f4 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -448,7 +448,7 @@
   // Verify alternative_service_map.
   const AlternativeServiceMap& map = impl_.alternative_service_map();
   ASSERT_EQ(3u, map.size());
-  AlternativeServiceMap::const_iterator map_it = map.begin();
+  auto map_it = map.begin();
 
   EXPECT_EQ(map_it->first, test_server2);
   ASSERT_EQ(1u, map_it->second.size());
@@ -602,7 +602,7 @@
   SetAlternativeService(test_server2, alternative_service2);
 
   const AlternativeServiceMap& map = impl_.alternative_service_map();
-  AlternativeServiceMap::const_iterator it = map.begin();
+  auto it = map.begin();
   EXPECT_EQ(it->first, test_server2);
   ASSERT_EQ(1u, it->second.size());
   EXPECT_EQ(alternative_service2, it->second[0].alternative_service());
@@ -801,7 +801,7 @@
   impl_.SetAlternativeServices(http_server, alternative_service_info_vector);
 
   const net::AlternativeServiceMap& map = impl_.alternative_service_map();
-  net::AlternativeServiceMap::const_iterator it = map.begin();
+  auto it = map.begin();
   EXPECT_EQ(it->first, http_server);
   ASSERT_EQ(2u, it->second.size());
   EXPECT_EQ(alternative_service1, it->second[0].alternative_service());
@@ -838,7 +838,7 @@
   impl_.SetAlternativeServices(test_server, alternative_service_info_vector);
 
   const net::AlternativeServiceMap& map = impl_.alternative_service_map();
-  net::AlternativeServiceMap::const_iterator it = map.begin();
+  auto it = map.begin();
   EXPECT_EQ(it->first, test_server);
   ASSERT_EQ(2u, it->second.size());
   EXPECT_EQ(alternative_service1, it->second[0].alternative_service());
@@ -1379,7 +1379,7 @@
 
   const ServerNetworkStatsMap& map = impl_.server_network_stats_map();
   ASSERT_EQ(3u, map.size());
-  ServerNetworkStatsMap::const_iterator map_it = map.begin();
+  auto map_it = map.begin();
 
   EXPECT_EQ(map_it->first, docs_server);
   EXPECT_EQ(new_stats_docs, map_it->second);
@@ -1464,7 +1464,7 @@
   // Recency order will be |docs_server| and |google_server|.
   const QuicServerInfoMap& map = impl_.quic_server_info_map();
   ASSERT_EQ(2u, map.size());
-  QuicServerInfoMap::const_iterator map_it = map.begin();
+  auto map_it = map.begin();
   EXPECT_EQ(map_it->first, docs_quic_server_id);
   EXPECT_EQ(docs_server_info, map_it->second);
   ++map_it;
@@ -1487,7 +1487,7 @@
   // Recency order will be |docs_server|, |google_server| and |mail_server|.
   const QuicServerInfoMap& memory_map = impl_.quic_server_info_map();
   ASSERT_EQ(3u, memory_map.size());
-  QuicServerInfoMap::const_iterator memory_map_it = memory_map.begin();
+  auto memory_map_it = memory_map.begin();
   EXPECT_EQ(memory_map_it->first, docs_quic_server_id);
   EXPECT_EQ(new_docs_server_info, memory_map_it->second);
   ++memory_map_it;
@@ -1504,7 +1504,7 @@
 
   const QuicServerInfoMap& memory_map1 = impl_.quic_server_info_map();
   ASSERT_EQ(2u, memory_map1.size());
-  QuicServerInfoMap::const_iterator memory_map1_it = memory_map1.begin();
+  auto memory_map1_it = memory_map1.begin();
   EXPECT_EQ(memory_map1_it->first, docs_quic_server_id);
   EXPECT_EQ(new_docs_server_info, memory_map1_it->second);
   ++memory_map1_it;
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index 1df7a1c..b3bd044 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -553,8 +553,7 @@
     // Iterate servers list in reverse MRU order so that entries are inserted
     // into |spdy_servers_map|, |alternative_service_map|, and
     // |server_network_stats_map| from oldest to newest.
-    for (base::ListValue::const_iterator it = servers_list->end();
-         it != servers_list->begin();) {
+    for (auto it = servers_list->end(); it != servers_list->begin();) {
       --it;
       if (!it->GetAsDictionary(&servers_dict)) {
         DVLOG(1) << "Malformed http_server_properties for servers dictionary.";
@@ -588,7 +587,7 @@
         std::make_unique<RecentlyBrokenAlternativeServices>();
 
     // Iterate list in reverse-MRU order
-    for (base::ListValue::const_iterator it = broken_alt_svc_list->end();
+    for (auto it = broken_alt_svc_list->end();
          it != broken_alt_svc_list->begin();) {
       --it;
       const base::DictionaryValue* entry_dict;
@@ -1027,8 +1026,8 @@
   // Add SPDY servers to |server_pref_map|.
   const SpdyServersMap& spdy_servers_map =
       http_server_properties_impl_->spdy_servers_map();
-  for (SpdyServersMap::const_reverse_iterator it = spdy_servers_map.rbegin();
-       it != spdy_servers_map.rend(); ++it) {
+  for (auto it = spdy_servers_map.rbegin(); it != spdy_servers_map.rend();
+       ++it) {
     // Only add servers that support SPDY.
     if (!it->second)
       continue;
@@ -1046,8 +1045,7 @@
   typedef std::map<std::string, bool> CanonicalHostPersistedMap;
   CanonicalHostPersistedMap persisted_map;
   const base::Time now = base::Time::Now();
-  for (AlternativeServiceMap::const_reverse_iterator it =
-           alternative_service_map.rbegin();
+  for (auto it = alternative_service_map.rbegin();
        it != alternative_service_map.rend(); ++it) {
     const url::SchemeHostPort& server = it->first;
     AlternativeServiceInfoVector notbroken_alternative_service_info_vector;
@@ -1084,8 +1082,7 @@
   // Add server network stats to |server_pref_map|.
   const ServerNetworkStatsMap& server_network_stats_map =
       http_server_properties_impl_->server_network_stats_map();
-  for (ServerNetworkStatsMap::const_reverse_iterator it =
-           server_network_stats_map.rbegin();
+  for (auto it = server_network_stats_map.rbegin();
        it != server_network_stats_map.rend(); ++it) {
     const url::SchemeHostPort& server = it->first;
     auto map_it = server_pref_map.Get(server);
@@ -1223,8 +1220,7 @@
   if (quic_server_info_map.empty())
     return;
   auto quic_servers_dict = std::make_unique<base::DictionaryValue>();
-  for (QuicServerInfoMap::const_reverse_iterator it =
-           quic_server_info_map.rbegin();
+  for (auto it = quic_server_info_map.rbegin();
        it != quic_server_info_map.rend(); ++it) {
     const quic::QuicServerId& server_id = it->first;
     auto quic_server_pref_dict = std::make_unique<base::DictionaryValue>();
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 80e3274a..b18120f 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -296,7 +296,7 @@
       http_server_props_manager_->alternative_service_map();
   ASSERT_EQ(2u, map.size());
 
-  AlternativeServiceMap::const_iterator map_it = map.begin();
+  auto map_it = map.begin();
   EXPECT_EQ("www.google.com", map_it->first.host());
   ASSERT_EQ(2u, map_it->second.size());
   EXPECT_EQ(kProtoHTTP2, map_it->second[0].alternative_service().protocol);
@@ -1257,7 +1257,7 @@
   EXPECT_TRUE(http_server_props_manager_->AddToAlternativeServiceMap(
       server, *server_dict, &alternative_service_map));
 
-  AlternativeServiceMap::iterator it = alternative_service_map.Get(server);
+  auto it = alternative_service_map.Get(server);
   ASSERT_NE(alternative_service_map.end(), it);
   AlternativeServiceInfoVector alternative_service_info_vector = it->second;
   ASSERT_EQ(3u, alternative_service_info_vector.size());
@@ -1306,7 +1306,7 @@
   EXPECT_FALSE(http_server_props_manager_->AddToAlternativeServiceMap(
       server, *server_dict, &alternative_service_map));
 
-  AlternativeServiceMap::iterator it = alternative_service_map.Get(server);
+  auto it = alternative_service_map.Get(server);
   EXPECT_EQ(alternative_service_map.end(), it);
 }
 
@@ -1359,7 +1359,7 @@
 
   const base::ListValue* servers_list = nullptr;
   ASSERT_TRUE(pref_dict->GetListWithoutPathExpansion("servers", &servers_list));
-  base::ListValue::const_iterator it = servers_list->begin();
+  auto it = servers_list->begin();
   const base::DictionaryValue* server_pref_dict;
   ASSERT_TRUE(it->GetAsDictionary(&server_pref_dict));
 
@@ -1415,7 +1415,7 @@
   ASSERT_TRUE(http_server_props_manager_->AddToAlternativeServiceMap(
       server, server_pref_dict, &alternative_service_map));
 
-  AlternativeServiceMap::iterator it = alternative_service_map.Get(server);
+  auto it = alternative_service_map.Get(server);
   ASSERT_NE(alternative_service_map.end(), it);
   AlternativeServiceInfoVector alternative_service_info_vector = it->second;
   ASSERT_EQ(1u, alternative_service_info_vector.size());
@@ -1530,7 +1530,7 @@
   EXPECT_TRUE(http_server_props_manager_->AddToAlternativeServiceMap(
       server, *server_dict, &alternative_service_map));
 
-  AlternativeServiceMap::iterator it = alternative_service_map.Get(server);
+  auto it = alternative_service_map.Get(server);
   ASSERT_NE(alternative_service_map.end(), it);
   AlternativeServiceInfoVector alternative_service_info_vector = it->second;
   ASSERT_EQ(2u, alternative_service_info_vector.size());
diff --git a/net/http/http_stream_factory_unittest.cc b/net/http/http_stream_factory_unittest.cc
index 0f23be7..548997b 100644
--- a/net/http/http_stream_factory_unittest.cc
+++ b/net/http/http_stream_factory_unittest.cc
@@ -695,7 +695,7 @@
   const ProxyRetryInfoMap& retry_info =
       session->proxy_resolution_service()->proxy_retry_info();
   EXPECT_EQ(1u, retry_info.size());
-  ProxyRetryInfoMap::const_iterator iter = retry_info.find("bad:99");
+  auto iter = retry_info.find("bad:99");
   EXPECT_TRUE(iter != retry_info.end());
 }
 
@@ -840,7 +840,7 @@
     EXPECT_EQ(1u, retry_info.size()) << quic_proxy_test_mock_errors[i];
     EXPECT_TRUE(waiter.used_proxy_info().is_direct());
 
-    ProxyRetryInfoMap::const_iterator iter = retry_info.find("quic://bad:99");
+    auto iter = retry_info.find("quic://bad:99");
     EXPECT_TRUE(iter != retry_info.end()) << quic_proxy_test_mock_errors[i];
   }
 }
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index 3005e34..5c30e6e 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -424,7 +424,7 @@
   if (fail_requests_)
     return ERR_CACHE_OPEN_FAILURE;
 
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it == entries_.end())
     return ERR_CACHE_OPEN_FAILURE;
 
@@ -457,7 +457,7 @@
   if (fail_requests_)
     return ERR_CACHE_CREATE_FAILURE;
 
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it != entries_.end()) {
     if (!it->second->is_doomed()) {
       if (double_create_check_)
@@ -504,7 +504,7 @@
                              net::RequestPriority request_priority,
                              CompletionOnceCallback callback) {
   DCHECK(!callback.is_null());
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it != entries_.end()) {
     it->second->Release();
     entries_.erase(it);
@@ -566,14 +566,14 @@
   if (!support_in_memory_entry_data_)
     return 0;
 
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it != entries_.end())
     return it->second->in_memory_data();
   return 0;
 }
 
 void MockDiskCache::SetEntryInMemoryData(const std::string& key, uint8_t data) {
-  EntryMap::iterator it = entries_.find(key);
+  auto it = entries_.find(key);
   if (it != entries_.end())
     it->second->set_in_memory_data(data);
 }
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 3f3db5c8..f1a5d1c 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -867,20 +867,19 @@
 
   const std::string hashed_host = HashHost(canonicalized_host);
   bool deleted = false;
-  STSStateMap::iterator sts_interator = enabled_sts_hosts_.find(hashed_host);
+  auto sts_interator = enabled_sts_hosts_.find(hashed_host);
   if (sts_interator != enabled_sts_hosts_.end()) {
     enabled_sts_hosts_.erase(sts_interator);
     deleted = true;
   }
 
-  PKPStateMap::iterator pkp_iterator = enabled_pkp_hosts_.find(hashed_host);
+  auto pkp_iterator = enabled_pkp_hosts_.find(hashed_host);
   if (pkp_iterator != enabled_pkp_hosts_.end()) {
     enabled_pkp_hosts_.erase(pkp_iterator);
     deleted = true;
   }
 
-  ExpectCTStateMap::iterator expect_ct_iterator =
-      enabled_expect_ct_hosts_.find(hashed_host);
+  auto expect_ct_iterator = enabled_expect_ct_hosts_.find(hashed_host);
   if (expect_ct_iterator != enabled_expect_ct_hosts_.end()) {
     enabled_expect_ct_hosts_.erase(expect_ct_iterator);
     deleted = true;
@@ -902,7 +901,7 @@
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
   bool dirtied = false;
-  STSStateMap::iterator sts_iterator = enabled_sts_hosts_.begin();
+  auto sts_iterator = enabled_sts_hosts_.begin();
   while (sts_iterator != enabled_sts_hosts_.end()) {
     if (sts_iterator->second.last_observed >= time) {
       dirtied = true;
@@ -913,7 +912,7 @@
     ++sts_iterator;
   }
 
-  PKPStateMap::iterator pkp_iterator = enabled_pkp_hosts_.begin();
+  auto pkp_iterator = enabled_pkp_hosts_.begin();
   while (pkp_iterator != enabled_pkp_hosts_.end()) {
     if (pkp_iterator->second.last_observed >= time) {
       dirtied = true;
@@ -924,8 +923,7 @@
     ++pkp_iterator;
   }
 
-  ExpectCTStateMap::iterator expect_ct_iterator =
-      enabled_expect_ct_hosts_.begin();
+  auto expect_ct_iterator = enabled_expect_ct_hosts_.begin();
   while (expect_ct_iterator != enabled_expect_ct_hosts_.end()) {
     if (expect_ct_iterator->second.last_observed >= time) {
       dirtied = true;
@@ -1259,7 +1257,7 @@
   for (size_t i = 0; canonicalized_host[i]; i += canonicalized_host[i] + 1) {
     std::string host_sub_chunk(&canonicalized_host[i],
                                canonicalized_host.size() - i);
-    STSStateMap::iterator j = enabled_sts_hosts_.find(HashHost(host_sub_chunk));
+    auto j = enabled_sts_hosts_.find(HashHost(host_sub_chunk));
     if (j == enabled_sts_hosts_.end())
       continue;
 
@@ -1300,7 +1298,7 @@
   for (size_t i = 0; canonicalized_host[i]; i += canonicalized_host[i] + 1) {
     std::string host_sub_chunk(&canonicalized_host[i],
                                canonicalized_host.size() - i);
-    PKPStateMap::iterator j = enabled_pkp_hosts_.find(HashHost(host_sub_chunk));
+    auto j = enabled_pkp_hosts_.find(HashHost(host_sub_chunk));
     if (j == enabled_pkp_hosts_.end())
       continue;
 
@@ -1337,8 +1335,7 @@
     return false;
 
   base::Time current_time(base::Time::Now());
-  ExpectCTStateMap::iterator j =
-      enabled_expect_ct_hosts_.find(HashHost(canonicalized_host));
+  auto j = enabled_expect_ct_hosts_.find(HashHost(canonicalized_host));
   if (j == enabled_expect_ct_hosts_.end())
     return false;
   // If the entry is invalid, drop it.
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index b010fc3..1243551 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -343,8 +343,7 @@
 
     auto list = std::make_unique<base::ListValue>();
 
-    for (ProxyRetryInfoMap::const_iterator it = bad_proxies_map.begin();
-         it != bad_proxies_map.end(); ++it) {
+    for (auto it = bad_proxies_map.begin(); it != bad_proxies_map.end(); ++it) {
       const std::string& proxy_uri = it->first;
       const ProxyRetryInfo& retry_info = it->second;
 
diff --git a/net/network_error_logging/network_error_logging_service.cc b/net/network_error_logging/network_error_logging_service.cc
index 2b39fad..2981e70 100644
--- a/net/network_error_logging/network_error_logging_service.cc
+++ b/net/network_error_logging/network_error_logging_service.cc
@@ -211,7 +211,7 @@
     if (outcome != HeaderOutcome::SET && outcome != HeaderOutcome::REMOVED)
       return;
 
-    PolicyMap::iterator it = policies_.find(origin);
+    auto it = policies_.find(origin);
     if (it != policies_.end()) {
       MaybeRemoveWildcardPolicy(origin, &it->second);
       policies_.erase(it);
@@ -472,7 +472,7 @@
 
   const OriginPolicy* FindPolicyForOrigin(const url::Origin& origin) const {
     // TODO(juliatuttle): Clean out expired policies sometime/somewhere.
-    PolicyMap::const_iterator it = policies_.find(origin);
+    auto it = policies_.find(origin);
     if (it != policies_.end() && tick_clock_->NowTicks() < it->second.expires)
       return &it->second;
 
@@ -490,7 +490,7 @@
       const std::string& domain) const {
     DCHECK(!domain.empty());
 
-    WildcardPolicyMap::const_iterator it = wildcard_policies_.find(domain);
+    auto it = wildcard_policies_.find(domain);
     if (it == wildcard_policies_.end())
       return nullptr;
 
@@ -503,8 +503,7 @@
                    << "choosing one arbitrarily.";
     }
 
-    for (std::set<const OriginPolicy*>::const_iterator jt = it->second.begin();
-         jt != it->second.end(); ++jt) {
+    for (auto jt = it->second.begin(); jt != it->second.end(); ++jt) {
       if (tick_clock_->NowTicks() < (*jt)->expires)
         return *jt;
     }
@@ -532,8 +531,7 @@
     if (!policy->include_subdomains)
       return;
 
-    WildcardPolicyMap::iterator wildcard_it =
-        wildcard_policies_.find(origin.host());
+    auto wildcard_it = wildcard_policies_.find(origin.host());
     DCHECK(wildcard_it != wildcard_policies_.end());
 
     size_t erased = wildcard_it->second.erase(policy);
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc
index 41d251d..604db64b 100644
--- a/net/nqe/network_quality_estimator_unittest.cc
+++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -147,8 +147,7 @@
 
   // Returns the last received RTT observation that has source set to |source|.
   base::TimeDelta last_rtt(NetworkQualityObservationSource source) {
-    for (std::vector<Observation>::reverse_iterator i = observations_.rbegin();
-         i != observations_.rend(); ++i) {
+    for (auto i = observations_.rbegin(); i != observations_.rend(); ++i) {
       Observation observation = *i;
       if (observation.source == source)
         return base::TimeDelta::FromMilliseconds(observation.rtt_ms);
diff --git a/net/nqe/network_quality_store.cc b/net/nqe/network_quality_store.cc
index 0b3d2a97..cb52e3d 100644
--- a/net/nqe/network_quality_store.cc
+++ b/net/nqe/network_quality_store.cc
@@ -44,11 +44,9 @@
 
   if (cached_network_qualities_.size() == kMaximumNetworkQualityCacheSize) {
     // Remove the oldest entry.
-    CachedNetworkQualities::iterator oldest_entry_iterator =
-        cached_network_qualities_.begin();
+    auto oldest_entry_iterator = cached_network_qualities_.begin();
 
-    for (CachedNetworkQualities::iterator it =
-             cached_network_qualities_.begin();
+    for (auto it = cached_network_qualities_.begin();
          it != cached_network_qualities_.end(); ++it) {
       if ((it->second).OlderThan(oldest_entry_iterator->second))
         oldest_entry_iterator = it;
@@ -71,8 +69,7 @@
   DCHECK(thread_checker_.CalledOnValidThread());
 
   // First check if an exact match can be found.
-  for (CachedNetworkQualities::const_iterator it =
-           cached_network_qualities_.begin();
+  for (auto it = cached_network_qualities_.begin();
        it != cached_network_qualities_.end(); ++it) {
     if (network_id.type != it->first.type || network_id.id != it->first.id) {
       // The |type| and |id| must match.
@@ -95,11 +92,9 @@
   // network quality possible for the current network, and serves as a
   // conservative estimate.
   if (network_id.signal_strength == INT32_MIN) {
-    CachedNetworkQualities::const_iterator matching_it =
-        cached_network_qualities_.end();
+    auto matching_it = cached_network_qualities_.end();
 
-    for (CachedNetworkQualities::const_iterator it =
-             cached_network_qualities_.begin();
+    for (auto it = cached_network_qualities_.begin();
          it != cached_network_qualities_.end(); ++it) {
       if (network_id.type != it->first.type || network_id.id != it->first.id) {
         // The |type| and |id| must match.
@@ -130,13 +125,11 @@
   // |matching_it| points to the entry that has the same connection type and
   // id as |network_id|, and has the signal strength closest to the signal
   // stength of |network_id|.
-  CachedNetworkQualities::const_iterator matching_it =
-      cached_network_qualities_.end();
+  auto matching_it = cached_network_qualities_.end();
   int matching_it_diff_signal_strength = INT32_MAX;
 
   // Find the closest estimate.
-  for (CachedNetworkQualities::const_iterator it =
-           cached_network_qualities_.begin();
+  for (auto it = cached_network_qualities_.begin();
        it != cached_network_qualities_.end(); ++it) {
     if (network_id.type != it->first.type || network_id.id != it->first.id) {
       // The |type| and |id| must match.
diff --git a/net/nqe/throughput_analyzer.cc b/net/nqe/throughput_analyzer.cc
index 742f038..27a3005 100644
--- a/net/nqe/throughput_analyzer.cc
+++ b/net/nqe/throughput_analyzer.cc
@@ -320,7 +320,7 @@
   // computation are now spanning a connection change event. These requests
   // would now degrade the throughput computation accuracy. So, move them to
   // |accuracy_degrading_requests_|.
-  for (Requests::iterator it = requests_.begin(); it != requests_.end(); ++it) {
+  for (auto it = requests_.begin(); it != requests_.end(); ++it) {
     accuracy_degrading_requests_.insert(it->first);
   }
   requests_.clear();
@@ -398,7 +398,7 @@
           base::TimeDelta::FromSeconds(60));
 
   size_t count_request_erased = 0;
-  Requests::iterator request_it = requests_.find(&request);
+  auto request_it = requests_.find(&request);
   if (request_it != requests_.end()) {
     base::TimeDelta time_since_last_received = now - request_it->second;
 
@@ -415,7 +415,7 @@
     // Hanging request check is done at most once per second.
     last_hanging_request_check_ = now;
 
-    for (Requests::iterator it = requests_.begin(); it != requests_.end();) {
+    for (auto it = requests_.begin(); it != requests_.end();) {
       base::TimeDelta time_since_last_received = now - it->second;
 
       if (time_since_last_received >=
diff --git a/net/proxy_resolution/mock_proxy_resolver.cc b/net/proxy_resolution/mock_proxy_resolver.cc
index 2067d7e5..31d87851 100644
--- a/net/proxy_resolution/mock_proxy_resolver.cc
+++ b/net/proxy_resolution/mock_proxy_resolver.cc
@@ -62,8 +62,7 @@
 }
 
 void MockAsyncProxyResolver::AddCancelledJob(std::unique_ptr<Job> job) {
-  std::vector<Job*>::iterator it =
-      std::find(pending_jobs_.begin(), pending_jobs_.end(), job.get());
+  auto it = std::find(pending_jobs_.begin(), pending_jobs_.end(), job.get());
   // Because this is called always when RequestImpl is destructed,
   // we need to check if it is still in pending jobs.
   if (it != pending_jobs_.end()) {
@@ -74,8 +73,7 @@
 
 void MockAsyncProxyResolver::RemovePendingJob(Job* job) {
   DCHECK(job);
-  std::vector<Job*>::iterator it =
-      std::find(pending_jobs_.begin(), pending_jobs_.end(), job);
+  auto it = std::find(pending_jobs_.begin(), pending_jobs_.end(), job);
   DCHECK(it != pending_jobs_.end());
   pending_jobs_.erase(it);
 }
@@ -155,7 +153,7 @@
 }
 
 void MockAsyncProxyResolverFactory::RemovePendingRequest(Request* request) {
-  RequestsList::iterator it =
+  auto it =
       std::find(pending_requests_.begin(), pending_requests_.end(), request);
   DCHECK(it != pending_requests_.end());
   pending_requests_.erase(it);
diff --git a/net/proxy_resolution/multi_threaded_proxy_resolver.cc b/net/proxy_resolution/multi_threaded_proxy_resolver.cc
index 19c06fba..c05969df 100644
--- a/net/proxy_resolution/multi_threaded_proxy_resolver.cc
+++ b/net/proxy_resolution/multi_threaded_proxy_resolver.cc
@@ -467,8 +467,7 @@
 
 Executor* MultiThreadedProxyResolver::FindIdleExecutor() {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  for (ExecutorList::iterator it = executors_.begin();
-       it != executors_.end(); ++it) {
+  for (auto it = executors_.begin(); it != executors_.end(); ++it) {
     Executor* executor = it->get();
     if (!executor->outstanding_job())
       return executor;
diff --git a/net/proxy_resolution/pac_file_decider_unittest.cc b/net/proxy_resolution/pac_file_decider_unittest.cc
index 45a7996..fd10db4 100644
--- a/net/proxy_resolution/pac_file_decider_unittest.cc
+++ b/net/proxy_resolution/pac_file_decider_unittest.cc
@@ -83,8 +83,7 @@
   }
 
   const Rule& GetRuleByUrl(const GURL& url) const {
-    for (RuleList::const_iterator it = rules_.begin(); it != rules_.end();
-         ++it) {
+    for (auto it = rules_.begin(); it != rules_.end(); ++it) {
       if (it->url == url)
         return *it;
     }
@@ -93,8 +92,7 @@
   }
 
   const Rule& GetRuleByText(const base::string16& text) const {
-    for (RuleList::const_iterator it = rules_.begin(); it != rules_.end();
-         ++it) {
+    for (auto it = rules_.begin(); it != rules_.end(); ++it) {
       if (it->text() == text)
         return *it;
     }
diff --git a/net/proxy_resolution/proxy_bypass_rules.cc b/net/proxy_resolution/proxy_bypass_rules.cc
index 372a048..18a6683 100644
--- a/net/proxy_resolution/proxy_bypass_rules.cc
+++ b/net/proxy_resolution/proxy_bypass_rules.cc
@@ -160,7 +160,7 @@
 }
 
 bool ProxyBypassRules::Matches(const GURL& url) const {
-  for (RuleList::const_iterator it = rules_.begin(); it != rules_.end(); ++it) {
+  for (auto it = rules_.begin(); it != rules_.end(); ++it) {
     if ((*it)->Matches(url))
       return true;
   }
@@ -213,9 +213,7 @@
 
 std::string ProxyBypassRules::ToString() const {
   std::string result;
-  for (RuleList::const_iterator rule(rules_.begin());
-       rule != rules_.end();
-       ++rule) {
+  for (auto rule(rules_.begin()); rule != rules_.end(); ++rule) {
     result += (*rule)->ToString();
     result += ";";
   }
@@ -230,8 +228,7 @@
   Clear();
 
   // Make a copy of the rules list.
-  for (RuleList::const_iterator it = other.rules_.begin();
-       it != other.rules_.end(); ++it) {
+  for (auto it = other.rules_.begin(); it != other.rules_.end(); ++it) {
     rules_.push_back((*it)->Clone());
   }
 }
diff --git a/net/proxy_resolution/proxy_config.cc b/net/proxy_resolution/proxy_config.cc
index 7c5c189..0f46b00 100644
--- a/net/proxy_resolution/proxy_config.cc
+++ b/net/proxy_resolution/proxy_config.cc
@@ -259,9 +259,7 @@
 
       auto list = std::make_unique<base::ListValue>();
 
-      for (ProxyBypassRules::RuleList::const_iterator it =
-              bypass.rules().begin();
-           it != bypass.rules().end(); ++it) {
+      for (auto it = bypass.rules().begin(); it != bypass.rules().end(); ++it) {
         list->AppendString((*it)->ToString());
       }
 
diff --git a/net/proxy_resolution/proxy_config_service_common_unittest.cc b/net/proxy_resolution/proxy_config_service_common_unittest.cc
index aa21172b..5e041f2 100644
--- a/net/proxy_resolution/proxy_config_service_common_unittest.cc
+++ b/net/proxy_resolution/proxy_config_service_common_unittest.cc
@@ -60,9 +60,8 @@
 
 std::string FlattenProxyBypass(const ProxyBypassRules& bypass_rules) {
   std::string flattened_proxy_bypass;
-  for (ProxyBypassRules::RuleList::const_iterator it =
-       bypass_rules.rules().begin();
-       it != bypass_rules.rules().end(); ++it) {
+  for (auto it = bypass_rules.rules().begin(); it != bypass_rules.rules().end();
+       ++it) {
     if (!flattened_proxy_bypass.empty())
       flattened_proxy_bypass += ",";
     flattened_proxy_bypass += (*it)->ToString();
diff --git a/net/proxy_resolution/proxy_config_service_linux.cc b/net/proxy_resolution/proxy_config_service_linux.cc
index 93514db1..239b86c 100644
--- a/net/proxy_resolution/proxy_config_service_linux.cc
+++ b/net/proxy_resolution/proxy_config_service_linux.cc
@@ -646,7 +646,7 @@
   }
 
   bool GetString(StringSetting key, std::string* result) override {
-    string_map_type::iterator it = string_table_.find(key);
+    auto it = string_table_.find(key);
     if (it == string_table_.end())
       return false;
     *result = it->second;
@@ -662,7 +662,7 @@
   }
   bool GetStringList(StringListSetting key,
                      std::vector<std::string>* result) override {
-    strings_map_type::iterator it = strings_table_.find(key);
+    auto it = strings_table_.find(key);
     if (it == strings_table_.end())
       return false;
     *result = it->second;
@@ -774,7 +774,7 @@
   }
 
   void ResolveIndirect(StringSetting key) {
-    string_map_type::iterator it = string_table_.find(key);
+    auto it = string_table_.find(key);
     if (it != string_table_.end()) {
       std::string value;
       if (env_var_getter_->GetVar(it->second.c_str(), &value))
@@ -785,7 +785,7 @@
   }
 
   void ResolveIndirectList(StringListSetting key) {
-    strings_map_type::iterator it = strings_table_.find(key);
+    auto it = strings_table_.find(key);
     if (it != strings_table_.end()) {
       std::string value;
       if (!it->second.empty() &&
diff --git a/net/proxy_resolution/proxy_list.cc b/net/proxy_resolution/proxy_list.cc
index 25fdf6db..2c4ba1a 100644
--- a/net/proxy_resolution/proxy_list.cc
+++ b/net/proxy_resolution/proxy_list.cc
@@ -57,8 +57,7 @@
 
   std::vector<ProxyServer>::const_iterator iter = proxies_.begin();
   for (; iter != proxies_.end(); ++iter) {
-    ProxyRetryInfoMap::const_iterator bad_proxy =
-        proxy_retry_info.find(iter->ToURI());
+    auto bad_proxy = proxy_retry_info.find(iter->ToURI());
     if (bad_proxy != proxy_retry_info.end()) {
       // This proxy is bad. Check if it's time to retry.
       if (bad_proxy->second.bad_until >= TimeTicks::Now()) {
@@ -78,8 +77,7 @@
 }
 
 void ProxyList::RemoveProxiesWithoutScheme(int scheme_bit_field) {
-  for (std::vector<ProxyServer>::iterator it = proxies_.begin();
-       it != proxies_.end(); ) {
+  for (auto it = proxies_.begin(); it != proxies_.end();) {
     if (!(scheme_bit_field & it->scheme())) {
       it = proxies_.erase(it);
       continue;
@@ -135,7 +133,7 @@
 
 std::string ProxyList::ToPacString() const {
   std::string proxy_list;
-  std::vector<ProxyServer>::const_iterator iter = proxies_.begin();
+  auto iter = proxies_.begin();
   for (; iter != proxies_.end(); ++iter) {
     if (!proxy_list.empty())
       proxy_list += ";";
@@ -176,7 +174,7 @@
   // Mark this proxy as bad.
   TimeTicks bad_until = TimeTicks::Now() + retry_delay;
   std::string proxy_key = proxy_to_retry.ToURI();
-  ProxyRetryInfoMap::iterator iter = proxy_retry_info->find(proxy_key);
+  auto iter = proxy_retry_info->find(proxy_key);
   if (iter == proxy_retry_info->end() || bad_until > iter->second.bad_until) {
     ProxyRetryInfo retry_info;
     retry_info.current_delay = retry_delay;
diff --git a/net/proxy_resolution/proxy_resolution_service.cc b/net/proxy_resolution/proxy_resolution_service.cc
index c08dea30..190e419 100644
--- a/net/proxy_resolution/proxy_resolution_service.cc
+++ b/net/proxy_resolution/proxy_resolution_service.cc
@@ -332,8 +332,7 @@
   auto dict = std::make_unique<base::DictionaryValue>();
   auto list = std::make_unique<base::ListValue>();
 
-  for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin();
-       iter != retry_info->end(); ++iter) {
+  for (auto iter = retry_info->begin(); iter != retry_info->end(); ++iter) {
     list->AppendString(iter->first);
   }
   dict->Set("bad_proxy_list", std::move(list));
@@ -1212,8 +1211,7 @@
 }
 
 void ProxyResolutionService::SuspendAllPendingRequests() {
-  for (PendingRequests::iterator it = pending_requests_.begin();
-       it != pending_requests_.end();
+  for (auto it = pending_requests_.begin(); it != pending_requests_.end();
        ++it) {
     RequestImpl* req = *it;
     if (req->is_started()) {
@@ -1340,9 +1338,9 @@
   if (new_retry_info.empty())
     return;
 
-  for (ProxyRetryInfoMap::const_iterator iter = new_retry_info.begin();
-       iter != new_retry_info.end(); ++iter) {
-    ProxyRetryInfoMap::iterator existing = proxy_retry_info_.find(iter->first);
+  for (auto iter = new_retry_info.begin(); iter != new_retry_info.end();
+       ++iter) {
+    auto existing = proxy_retry_info_.find(iter->first);
     if (existing == proxy_retry_info_.end()) {
       proxy_retry_info_[iter->first] = iter->second;
       if (proxy_delegate_) {
diff --git a/net/proxy_resolution/proxy_resolution_service_unittest.cc b/net/proxy_resolution/proxy_resolution_service_unittest.cc
index c3aea3a..e36c559e 100644
--- a/net/proxy_resolution/proxy_resolution_service_unittest.cc
+++ b/net/proxy_resolution/proxy_resolution_service_unittest.cc
@@ -1971,8 +1971,7 @@
   ASSERT_EQ(4u, retry_info.size());
   for (const ProxyServer& proxy_server :
        config.proxy_rules().proxies_for_http.GetAll()) {
-    ProxyRetryInfoMap::const_iterator i =
-        retry_info.find(proxy_server.host_port_pair().ToString());
+    auto i = retry_info.find(proxy_server.host_port_pair().ToString());
     ASSERT_TRUE(i != retry_info.end());
   }
 }
diff --git a/net/proxy_resolution/proxy_resolver_v8_tracing.cc b/net/proxy_resolution/proxy_resolver_v8_tracing.cc
index cdea928..844f3c5 100644
--- a/net/proxy_resolution/proxy_resolver_v8_tracing.cc
+++ b/net/proxy_resolution/proxy_resolver_v8_tracing.cc
@@ -815,8 +815,7 @@
     cache_value = addresses.front().ToStringWithoutPort();
   } else {
     // The *Ex versions are expected to return a semi-colon separated list.
-    for (AddressList::const_iterator iter = addresses.begin();
-         iter != addresses.end(); ++iter) {
+    for (auto iter = addresses.begin(); iter != addresses.end(); ++iter) {
       if (!cache_value.empty())
         cache_value += ";";
       cache_value += iter->ToStringWithoutPort();
diff --git a/net/quic/quic_chromium_client_session.cc b/net/quic/quic_chromium_client_session.cc
index f4f63b5b..5830699 100644
--- a/net/quic/quic_chromium_client_session.cc
+++ b/net/quic/quic_chromium_client_session.cc
@@ -1023,7 +1023,7 @@
 void QuicChromiumClientSession::CancelRequest(StreamRequest* request) {
   // Remove |request| from the queue while preserving the order of the
   // other elements.
-  StreamRequestQueue::iterator it =
+  auto it =
       std::find(stream_requests_.begin(), stream_requests_.end(), request);
   if (it != stream_requests_.end()) {
     it = stream_requests_.erase(it);
@@ -1385,7 +1385,7 @@
           base::TimeTicks::Now() - connect_timing_.dns_end);
     }
 
-    HandleSet::iterator it = handles_.begin();
+    auto it = handles_.begin();
     while (it != handles_.end()) {
       Handle* handle = *it;
       ++it;
@@ -2546,8 +2546,7 @@
   SSLInfo ssl_info;
 
   std::unique_ptr<base::ListValue> alias_list(new base::ListValue());
-  for (std::set<HostPortPair>::const_iterator it = aliases.begin();
-       it != aliases.end(); it++) {
+  for (auto it = aliases.begin(); it != aliases.end(); it++) {
     alias_list->AppendString(it->ToString());
   }
   dict->Set("aliases", std::move(alias_list));
diff --git a/net/quic/quic_connection_logger.cc b/net/quic/quic_connection_logger.cc
index 9269e53..9ec80ad 100644
--- a/net/quic/quic_connection_logger.cc
+++ b/net/quic/quic_connection_logger.cc
@@ -141,8 +141,7 @@
 
   auto received = std::make_unique<base::ListValue>();
   const quic::PacketTimeVector& received_times = frame->received_packet_times;
-  for (quic::PacketTimeVector::const_iterator it = received_times.begin();
-       it != received_times.end(); ++it) {
+  for (auto it = received_times.begin(); it != received_times.end(); ++it) {
     auto info = std::make_unique<base::DictionaryValue>();
     info->SetInteger("packet_number", static_cast<int>(it->first));
     info->SetString("received",
@@ -215,9 +214,7 @@
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   auto versions = std::make_unique<base::ListValue>();
-  for (quic::ParsedQuicVersionVector::const_iterator it =
-           packet->versions.begin();
-       it != packet->versions.end(); ++it) {
+  for (auto it = packet->versions.begin(); it != packet->versions.end(); ++it) {
     versions->AppendString(ParsedQuicVersionToString(*it));
   }
   dict->Set("versions", std::move(versions));
diff --git a/net/quic/quic_stream_factory.cc b/net/quic/quic_stream_factory.cc
index a24b5a18..a94e4fb 100644
--- a/net/quic/quic_stream_factory.cc
+++ b/net/quic/quic_stream_factory.cc
@@ -1177,7 +1177,7 @@
   // Use active session for |session_key| if such exists.
   // TODO(rtenneti): crbug.com/498823 - delete active_sessions_.empty() checks.
   if (!active_sessions_.empty()) {
-    SessionMap::iterator it = active_sessions_.find(session_key);
+    auto it = active_sessions_.find(session_key);
     if (it != active_sessions_.end()) {
       QuicChromiumClientSession* session = it->second;
       request->SetSession(session->CreateHandle(destination));
@@ -1242,7 +1242,7 @@
     // related changes.
     if (active_sessions_.empty())
       return ERR_QUIC_PROTOCOL_ERROR;
-    SessionMap::iterator it = active_sessions_.find(session_key);
+    auto it = active_sessions_.find(session_key);
     DCHECK(it != active_sessions_.end());
     if (it == active_sessions_.end())
       return ERR_QUIC_PROTOCOL_ERROR;
@@ -1304,8 +1304,7 @@
   if (rv == OK) {
     set_require_confirmation(false);
 
-    SessionMap::iterator session_it =
-        active_sessions_.find(job->key().session_key());
+    auto session_it = active_sessions_.find(job->key().session_key());
     CHECK(session_it != active_sessions_.end());
     QuicChromiumClientSession* session = session_it->second;
     for (auto* request : iter->second->stream_requests()) {
@@ -1332,8 +1331,7 @@
 
 void QuicStreamFactory::OnSessionGoingAway(QuicChromiumClientSession* session) {
   const AliasSet& aliases = session_aliases_[session];
-  for (AliasSet::const_iterator it = aliases.begin(); it != aliases.end();
-       ++it) {
+  for (auto it = aliases.begin(); it != aliases.end(); ++it) {
     const QuicSessionKey& session_key = it->session_key();
     DCHECK(active_sessions_.count(session_key));
     DCHECK_EQ(session, active_sessions_[session_key]);
@@ -1407,16 +1405,15 @@
     const {
   std::unique_ptr<base::ListValue> list(new base::ListValue());
 
-  for (SessionMap::const_iterator it = active_sessions_.begin();
-       it != active_sessions_.end(); ++it) {
+  for (auto it = active_sessions_.begin(); it != active_sessions_.end(); ++it) {
     const quic::QuicServerId& server_id = it->first.server_id();
     QuicChromiumClientSession* session = it->second;
     const AliasSet& aliases = session_aliases_.find(session)->second;
     // Only add a session to the list once.
     if (server_id == aliases.begin()->server_id()) {
       std::set<HostPortPair> hosts;
-      for (AliasSet::const_iterator alias_it = aliases.begin();
-           alias_it != aliases.end(); ++alias_it) {
+      for (auto alias_it = aliases.begin(); alias_it != aliases.end();
+           ++alias_it) {
         hosts.insert(HostPortPair(alias_it->server_id().host(),
                                   alias_it->server_id().port()));
       }
@@ -1454,7 +1451,7 @@
 
   ScopedConnectionMigrationEventLog scoped_event_log(net_log_,
                                                      "OnNetworkConnected");
-  QuicStreamFactory::SessionIdMap::iterator it = all_sessions_.begin();
+  auto it = all_sessions_.begin();
   // Sessions may be deleted while iterating through the map.
   while (it != all_sessions_.end()) {
     QuicChromiumClientSession* session = it->first;
@@ -1481,7 +1478,7 @@
   ScopedConnectionMigrationEventLog scoped_event_log(net_log_,
                                                      "OnNetworkMadeDefault");
 
-  QuicStreamFactory::SessionIdMap::iterator it = all_sessions_.begin();
+  auto it = all_sessions_.begin();
   // Sessions may be deleted while iterating through the map.
   while (it != all_sessions_.end()) {
     QuicChromiumClientSession* session = it->first;
@@ -1498,7 +1495,7 @@
 
   ScopedConnectionMigrationEventLog scoped_event_log(net_log_,
                                                      "OnNetworkDisconnected");
-  QuicStreamFactory::SessionIdMap::iterator it = all_sessions_.begin();
+  auto it = all_sessions_.begin();
   // Sessions may be deleted while iterating through the map.
   while (it != all_sessions_.end()) {
     QuicChromiumClientSession* session = it->first;
diff --git a/net/quic/quic_stream_factory_peer.cc b/net/quic/quic_stream_factory_peer.cc
index 3b16743..5d44d9d 100644
--- a/net/quic/quic_stream_factory_peer.cc
+++ b/net/quic/quic_stream_factory_peer.cc
@@ -77,8 +77,7 @@
   QuicSessionKey session_key = QuicSessionKey(server_id, SocketTag());
   QuicStreamFactory::QuicSessionAliasKey alias_key =
       QuicStreamFactory::QuicSessionAliasKey(destination, session_key);
-  for (QuicStreamFactory::SessionIdMap::iterator it =
-           factory->all_sessions_.begin();
+  for (auto it = factory->all_sessions_.begin();
        it != factory->all_sessions_.end(); ++it) {
     if (it->second == alias_key)
       return true;
@@ -88,8 +87,7 @@
 
 bool QuicStreamFactoryPeer::IsLiveSession(QuicStreamFactory* factory,
                                           QuicChromiumClientSession* session) {
-  for (QuicStreamFactory::SessionIdMap::iterator it =
-           factory->all_sessions_.begin();
+  for (auto it = factory->all_sessions_.begin();
        it != factory->all_sessions_.end(); ++it) {
     if (it->first == session)
       return true;
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc
index 810f89a..51f8a84 100644
--- a/net/quic/quic_stream_factory_test.cc
+++ b/net/quic/quic_stream_factory_test.cc
@@ -721,8 +721,7 @@
     const QuicServerInfoMap& quic_server_info_map =
         http_server_properties_.quic_server_info_map();
     EXPECT_EQ(2u, quic_server_info_map.size());
-    QuicServerInfoMap::const_iterator quic_server_info_map_it =
-        quic_server_info_map.begin();
+    auto quic_server_info_map_it = quic_server_info_map.begin();
     EXPECT_EQ(quic_server_info_map_it->first, quic_server_id2);
     ++quic_server_info_map_it;
     EXPECT_EQ(quic_server_info_map_it->first, quic_server_id);
diff --git a/net/quic/test_task_runner.cc b/net/quic/test_task_runner.cc
index 0661fea1..32c01bf 100644
--- a/net/quic/test_task_runner.cc
+++ b/net/quic/test_task_runner.cc
@@ -60,7 +60,7 @@
 }
 
 void TestTaskRunner::RunNextTask() {
-  std::vector<PostedTask>::iterator next = FindNextTask();
+  auto next = FindNextTask();
   DCHECK(next != tasks_.end());
   clock_->AdvanceTime(quic::QuicTime::Delta::FromMicroseconds(
       (next->GetTimeToRun() - NowInTicks(*clock_)).InMicroseconds()));
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index c5d9f8a..a702ece 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -196,9 +196,7 @@
   NetworkChangeNotifier::RemoveIPAddressObserver(this);
 
   // Remove from lower layer pools.
-  for (std::set<LowerLayeredPool*>::iterator it = lower_pools_.begin();
-       it != lower_pools_.end();
-       ++it) {
+  for (auto it = lower_pools_.begin(); it != lower_pools_.end(); ++it) {
     (*it)->RemoveHigherLayeredPool(pool_);
   }
 }
@@ -223,9 +221,7 @@
 
 bool ClientSocketPoolBaseHelper::IsStalled() const {
   // If a lower layer pool is stalled, consider |this| stalled as well.
-  for (std::set<LowerLayeredPool*>::const_iterator it = lower_pools_.begin();
-       it != lower_pools_.end();
-       ++it) {
+  for (auto it = lower_pools_.begin(); it != lower_pools_.end(); ++it) {
     if ((*it)->IsStalled())
       return true;
   }
@@ -241,8 +237,7 @@
   // |max_sockets_per_group_|.  (If the number of sockets is equal to
   // |max_sockets_per_group_|, then the request is stalled on the group limit,
   // which does not count.)
-  for (GroupMap::const_iterator it = group_map_.begin();
-       it != group_map_.end(); ++it) {
+  for (auto it = group_map_.begin(); it != group_map_.end(); ++it) {
     if (it->second->CanUseAdditionalSocketSlot(max_sockets_per_group_))
       return true;
   }
@@ -367,7 +362,7 @@
   const bool preconnecting = !handle;
 
   Group* group = nullptr;
-  GroupMap::iterator group_it = group_map_.find(group_name);
+  auto group_it = group_map_.find(group_name);
   if (group_it != group_map_.end()) {
     group = group_it->second;
 
@@ -469,14 +464,13 @@
 bool ClientSocketPoolBaseHelper::AssignIdleSocketToRequest(
     const Request& request, Group* group) {
   std::list<IdleSocket>* idle_sockets = group->mutable_idle_sockets();
-  std::list<IdleSocket>::iterator idle_socket_it = idle_sockets->end();
+  auto idle_socket_it = idle_sockets->end();
 
   // Iterate through the idle sockets forwards (oldest to newest)
   //   * Delete any disconnected ones.
   //   * If we find a used idle socket, assign to |idle_socket|.  At the end,
   //   the |idle_socket_it| will be set to the newest used idle socket.
-  for (std::list<IdleSocket>::iterator it = idle_sockets->begin();
-       it != idle_sockets->end();) {
+  for (auto it = idle_sockets->begin(); it != idle_sockets->end();) {
     // Check whether socket is usable. Note that it's unlikely that the socket
     // is not usuable because this function is always invoked after a
     // reusability check, but in theory socket can be closed asynchronously.
@@ -540,7 +534,7 @@
 void ClientSocketPoolBaseHelper::SetPriority(const std::string& group_name,
                                              ClientSocketHandle* handle,
                                              RequestPriority priority) {
-  GroupMap::iterator group_it = group_map_.find(group_name);
+  auto group_it = group_map_.find(group_name);
   if (group_it == group_map_.end()) {
     DCHECK(base::ContainsKey(pending_callback_map_, handle));
     // The Request has already completed and been destroyed; nothing to
@@ -553,7 +547,7 @@
 
 void ClientSocketPoolBaseHelper::CancelRequest(
     const std::string& group_name, ClientSocketHandle* handle) {
-  PendingCallbackMap::iterator callback_it = pending_callback_map_.find(handle);
+  auto callback_it = pending_callback_map_.find(handle);
   if (callback_it != pending_callback_map_.end()) {
     int result = callback_it->second.result;
     pending_callback_map_.erase(callback_it);
@@ -599,7 +593,7 @@
     const std::string& group_name) {
   if (idle_socket_count_ == 0)
     return;
-  GroupMap::iterator it = group_map_.find(group_name);
+  auto it = group_map_.find(group_name);
   if (it == group_map_.end())
     return;
   CleanupIdleSocketsInGroup(true, it->second, base::TimeTicks::Now());
@@ -609,7 +603,7 @@
 
 int ClientSocketPoolBaseHelper::IdleSocketCountInGroup(
     const std::string& group_name) const {
-  GroupMap::const_iterator i = group_map_.find(group_name);
+  auto i = group_map_.find(group_name);
   CHECK(i != group_map_.end());
 
   return i->second->idle_sockets().size();
@@ -621,7 +615,7 @@
   if (base::ContainsKey(pending_callback_map_, handle))
     return LOAD_STATE_CONNECTING;
 
-  GroupMap::const_iterator group_it = group_map_.find(group_name);
+  auto group_it = group_map_.find(group_name);
   if (group_it == group_map_.end()) {
     // TODO(mmenke):  This is actually reached in the wild, for unknown reasons.
     // Would be great to understand why, and if it's a bug, fix it.  If not,
@@ -658,8 +652,7 @@
     return dict;
 
   auto all_groups_dict = std::make_unique<base::DictionaryValue>();
-  for (GroupMap::const_iterator it = group_map_.begin();
-       it != group_map_.end(); it++) {
+  for (auto it = group_map_.begin(); it != group_map_.end(); it++) {
     const Group* group = it->second;
     auto group_dict = std::make_unique<base::DictionaryValue>();
 
@@ -757,12 +750,12 @@
   // inside the inner loop, since it shouldn't change by any meaningful amount.
   base::TimeTicks now = base::TimeTicks::Now();
 
-  for (GroupMap::iterator i = group_map_.begin(); i != group_map_.end();) {
+  for (auto i = group_map_.begin(); i != group_map_.end();) {
     Group* group = i->second;
     CleanupIdleSocketsInGroup(force, group, now);
     // Delete group if no longer needed.
     if (group->IsEmpty()) {
-      GroupMap::iterator old = i++;
+      auto old = i++;
       RemoveGroup(old);
     } else {
       ++i;
@@ -793,7 +786,7 @@
 
 ClientSocketPoolBaseHelper::Group* ClientSocketPoolBaseHelper::GetOrCreateGroup(
     const std::string& group_name) {
-  GroupMap::iterator it = group_map_.find(group_name);
+  auto it = group_map_.find(group_name);
   if (it != group_map_.end())
     return it->second;
   Group* group = new Group;
@@ -802,7 +795,7 @@
 }
 
 void ClientSocketPoolBaseHelper::RemoveGroup(const std::string& group_name) {
-  GroupMap::iterator it = group_map_.find(group_name);
+  auto it = group_map_.find(group_name);
   CHECK(it != group_map_.end());
 
   RemoveGroup(it);
@@ -841,7 +834,7 @@
     const std::string& group_name,
     std::unique_ptr<StreamSocket> socket,
     int id) {
-  GroupMap::iterator i = group_map_.find(group_name);
+  auto i = group_map_.find(group_name);
   CHECK(i != group_map_.end());
 
   Group* group = i->second;
@@ -873,8 +866,7 @@
     Group* top_group = NULL;
     if (!FindTopStalledGroup(&top_group, &top_group_name)) {
       // There may still be a stalled group in a lower level pool.
-      for (std::set<LowerLayeredPool*>::iterator it = lower_pools_.begin();
-           it != lower_pools_.end(); ++it) {
+      for (auto it = lower_pools_.begin(); it != lower_pools_.end(); ++it) {
         if ((*it)->IsStalled()) {
           CloseOneIdleSocket();
           break;
@@ -909,8 +901,7 @@
   Group* top_group = NULL;
   const std::string* top_group_name = NULL;
   bool has_stalled_group = false;
-  for (GroupMap::const_iterator i = group_map_.begin();
-       i != group_map_.end(); ++i) {
+  for (auto i = group_map_.begin(); i != group_map_.end(); ++i) {
     Group* curr_group = i->second;
     if (!curr_group->has_pending_requests())
       continue;
@@ -941,7 +932,7 @@
     int result, ConnectJob* job) {
   DCHECK_NE(ERR_IO_PENDING, result);
   const std::string group_name = job->group_name();
-  GroupMap::iterator group_it = group_map_.find(group_name);
+  auto group_it = group_map_.find(group_name);
   CHECK(group_it != group_map_.end());
   Group* group = group_it->second;
 
@@ -1108,14 +1099,14 @@
 }
 
 void ClientSocketPoolBaseHelper::CancelAllConnectJobs() {
-  for (GroupMap::iterator i = group_map_.begin(); i != group_map_.end();) {
+  for (auto i = group_map_.begin(); i != group_map_.end();) {
     Group* group = i->second;
     connecting_socket_count_ -= group->jobs().size();
     group->RemoveAllJobs();
 
     // Delete group if no longer needed.
     if (group->IsEmpty()) {
-      GroupMap::iterator old = i++;
+      auto old = i++;
       RemoveGroup(old);
     } else {
       ++i;
@@ -1125,7 +1116,7 @@
 }
 
 void ClientSocketPoolBaseHelper::CancelAllRequestsWithError(int error) {
-  for (GroupMap::iterator i = group_map_.begin(); i != group_map_.end();) {
+  for (auto i = group_map_.begin(); i != group_map_.end();) {
     Group* group = i->second;
 
     while (true) {
@@ -1138,7 +1129,7 @@
 
     // Delete group if no longer needed.
     if (group->IsEmpty()) {
-      GroupMap::iterator old = i++;
+      auto old = i++;
       RemoveGroup(old);
     } else {
       ++i;
@@ -1167,7 +1158,7 @@
     const Group* exception_group) {
   CHECK_GT(idle_socket_count(), 0);
 
-  for (GroupMap::iterator i = group_map_.begin(); i != group_map_.end(); ++i) {
+  for (auto i = group_map_.begin(); i != group_map_.end(); ++i) {
     Group* group = i->second;
     if (exception_group == group)
       continue;
@@ -1191,8 +1182,7 @@
   // This pool doesn't have any idle sockets. It's possible that a pool at a
   // higher layer is holding one of this sockets active, but it's actually idle.
   // Query the higher layers.
-  for (std::set<HigherLayeredPool*>::const_iterator it = higher_pools_.begin();
-       it != higher_pools_.end(); ++it) {
+  for (auto it = higher_pools_.begin(); it != higher_pools_.end(); ++it) {
     if ((*it)->CloseOneIdleConnection())
       return true;
   }
@@ -1216,7 +1206,7 @@
 
 void ClientSocketPoolBaseHelper::InvokeUserCallback(
     ClientSocketHandle* handle) {
-  PendingCallbackMap::iterator it = pending_callback_map_.find(handle);
+  auto it = pending_callback_map_.find(handle);
 
   // Exit if the request has already been cancelled.
   if (it == pending_callback_map_.end())
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 309047a1e..d09e470 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -642,8 +642,7 @@
 namespace {
 
 void MockClientSocketFactory::SignalJobs() {
-  for (std::vector<TestConnectJob*>::iterator it = waiting_jobs_.begin();
-       it != waiting_jobs_.end(); ++it) {
+  for (auto it = waiting_jobs_.begin(); it != waiting_jobs_.end(); ++it) {
     (*it)->Signal();
   }
   waiting_jobs_.clear();
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index cfd0626..f7d7486 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -29,8 +29,7 @@
                           const MapType& socket_pools,
                           const std::string& type,
                           bool include_nested_pools) {
-  for (typename MapType::const_iterator it = socket_pools.begin();
-       it != socket_pools.end(); it++) {
+  for (auto it = socket_pools.begin(); it != socket_pools.end(); it++) {
     list->Append(it->second->GetInfoAsValue(it->first.ToString(),
                                             type,
                                             include_nested_pools));
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index 58d1674..f5689ab 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -39,8 +39,7 @@
 // Returns true iff all addresses in |list| are in the IPv6 family.
 bool AddressListOnlyContainsIPv6(const AddressList& list) {
   DCHECK(!list.empty());
-  for (AddressList::const_iterator iter = list.begin(); iter != list.end();
-       ++iter) {
+  for (auto iter = list.begin(); iter != list.end(); ++iter) {
     if (iter->GetFamily() != ADDRESS_FAMILY_IPV6)
       return false;
   }
@@ -141,7 +140,7 @@
 
 // static
 void TransportConnectJob::MakeAddressListStartWithIPv4(AddressList* list) {
-  for (AddressList::iterator i = list->begin(); i != list->end(); ++i) {
+  for (auto i = list->begin(); i != list->end(); ++i) {
     if (i->GetFamily() == ADDRESS_FAMILY_IPV4) {
       std::rotate(list->begin(), i, list->end());
       break;
diff --git a/net/socket/websocket_endpoint_lock_manager.cc b/net/socket/websocket_endpoint_lock_manager.cc
index b0cce121..5071479d 100644
--- a/net/socket/websocket_endpoint_lock_manager.cc
+++ b/net/socket/websocket_endpoint_lock_manager.cc
@@ -59,7 +59,7 @@
 
 void WebSocketEndpointLockManager::RememberSocket(StreamSocket* socket,
                                                   const IPEndPoint& endpoint) {
-  LockInfoMap::iterator lock_info_it = lock_info_map_.find(endpoint);
+  auto lock_info_it = lock_info_map_.find(endpoint);
   CHECK(lock_info_it != lock_info_map_.end());
   bool inserted =
       socket_lock_info_map_.insert(SocketLockInfoMap::value_type(
@@ -73,11 +73,11 @@
 }
 
 void WebSocketEndpointLockManager::UnlockSocket(StreamSocket* socket) {
-  SocketLockInfoMap::iterator socket_it = socket_lock_info_map_.find(socket);
+  auto socket_it = socket_lock_info_map_.find(socket);
   if (socket_it == socket_lock_info_map_.end())
     return;
 
-  LockInfoMap::iterator lock_info_it = socket_it->second;
+  auto lock_info_it = socket_it->second;
 
   DVLOG(3) << "Unlocking (StreamSocket*)" << socket << " for "
            << lock_info_it->first.ToString() << " ("
@@ -89,7 +89,7 @@
 }
 
 void WebSocketEndpointLockManager::UnlockEndpoint(const IPEndPoint& endpoint) {
-  LockInfoMap::iterator lock_info_it = lock_info_map_.find(endpoint);
+  auto lock_info_it = lock_info_map_.find(endpoint);
   if (lock_info_it == lock_info_map_.end())
     return;
   if (lock_info_it->second.socket)
@@ -132,7 +132,7 @@
 
 void WebSocketEndpointLockManager::DelayedUnlockEndpoint(
     const IPEndPoint& endpoint) {
-  LockInfoMap::iterator lock_info_it = lock_info_map_.find(endpoint);
+  auto lock_info_it = lock_info_map_.find(endpoint);
   DCHECK_GT(pending_unlock_count_, 0U);
   --pending_unlock_count_;
   if (lock_info_it == lock_info_map_.end())
diff --git a/net/socket/websocket_transport_client_socket_pool.cc b/net/socket/websocket_transport_client_socket_pool.cc
index cdf411a..ea80b8e1 100644
--- a/net/socket/websocket_transport_client_socket_pool.cc
+++ b/net/socket/websocket_transport_client_socket_pool.cc
@@ -353,7 +353,7 @@
     request_net_log.AddEvent(NetLogEventType::SOCKET_POOL_STALLED_MAX_SOCKETS);
     stalled_request_queue_.emplace_back(casted_params, priority, handle,
                                         std::move(callback), request_net_log);
-    StalledRequestQueue::iterator iterator = stalled_request_queue_.end();
+    auto iterator = stalled_request_queue_.end();
     --iterator;
     DCHECK_EQ(handle, iterator->handle);
     // Because StalledRequestQueue is a std::list, its iterators are guaranteed
@@ -449,15 +449,13 @@
   // calls because this method will delete the jobs and call their callbacks
   // anyway.
   flushing_ = true;
-  for (PendingConnectsMap::iterator it = pending_connects_.begin();
-       it != pending_connects_.end();) {
+  for (auto it = pending_connects_.begin(); it != pending_connects_.end();) {
     InvokeUserCallbackLater(it->second->handle(),
                             it->second->release_callback(), error);
     it = pending_connects_.erase(it);
   }
-  for (StalledRequestQueue::iterator it = stalled_request_queue_.begin();
-       it != stalled_request_queue_.end();
-       ++it) {
+  for (auto it = stalled_request_queue_.begin();
+       it != stalled_request_queue_.end(); ++it) {
     InvokeUserCallbackLater(it->handle, std::move(it->callback), error);
   }
   stalled_request_map_.clear();
@@ -644,7 +642,7 @@
 }
 
 bool WebSocketTransportClientSocketPool::DeleteJob(ClientSocketHandle* handle) {
-  PendingConnectsMap::iterator it = pending_connects_.find(handle);
+  auto it = pending_connects_.find(handle);
   if (it == pending_connects_.end())
     return false;
   // Deleting a ConnectJob which holds an endpoint lock can lead to a different
@@ -658,7 +656,7 @@
 const WebSocketTransportConnectJob*
 WebSocketTransportClientSocketPool::LookupConnectJob(
     const ClientSocketHandle* handle) const {
-  PendingConnectsMap::const_iterator it = pending_connects_.find(handle);
+  auto it = pending_connects_.find(handle);
   CHECK(it != pending_connects_.end());
   return it->second.get();
 }
@@ -694,7 +692,7 @@
 
 bool WebSocketTransportClientSocketPool::DeleteStalledRequest(
     ClientSocketHandle* handle) {
-  StalledRequestMap::iterator it = stalled_request_map_.find(handle);
+  auto it = stalled_request_map_.find(handle);
   if (it == stalled_request_map_.end())
     return false;
   stalled_request_queue_.erase(it->second);
diff --git a/net/spdy/buffered_spdy_framer.cc b/net/spdy/buffered_spdy_framer.cc
index 4e21986..935919f 100644
--- a/net/spdy/buffered_spdy_framer.cc
+++ b/net/spdy/buffered_spdy_framer.cc
@@ -260,8 +260,7 @@
 std::unique_ptr<spdy::SpdySerializedFrame> BufferedSpdyFramer::CreateSettings(
     const spdy::SettingsMap& values) const {
   spdy::SpdySettingsIR settings_ir;
-  for (spdy::SettingsMap::const_iterator it = values.begin();
-       it != values.end(); ++it) {
+  for (auto it = values.begin(); it != values.end(); ++it) {
     settings_ir.AddSetting(it->first, it->second);
   }
   return std::make_unique<spdy::SpdySerializedFrame>(
diff --git a/net/spdy/http2_priority_dependencies.cc b/net/spdy/http2_priority_dependencies.cc
index 14dad0df..af22759 100644
--- a/net/spdy/http2_priority_dependencies.cc
+++ b/net/spdy/http2_priority_dependencies.cc
@@ -37,7 +37,7 @@
   }
 
   id_priority_lists_[priority].push_back(std::make_pair(id, priority));
-  IdList::iterator it = id_priority_lists_[priority].end();
+  auto it = id_priority_lists_[priority].end();
   --it;
   entry_by_stream_id_[id] = it;
 }
@@ -56,11 +56,11 @@
 
 bool Http2PriorityDependencies::ParentOfStream(spdy::SpdyStreamId id,
                                                IdList::iterator* parent) {
-  EntryMap::iterator entry = entry_by_stream_id_.find(id);
+  auto entry = entry_by_stream_id_.find(id);
   DCHECK(entry != entry_by_stream_id_.end());
 
   spdy::SpdyPriority priority = entry->second->second;
-  IdList::iterator curr = entry->second;
+  auto curr = entry->second;
   if (curr != id_priority_lists_[priority].begin()) {
     *parent = curr;
     --(*parent);
@@ -77,7 +77,7 @@
 
 bool Http2PriorityDependencies::ChildOfStream(spdy::SpdyStreamId id,
                                               IdList::iterator* child) {
-  EntryMap::iterator entry = entry_by_stream_id_.find(id);
+  auto entry = entry_by_stream_id_.find(id);
   DCHECK(entry != entry_by_stream_id_.end());
 
   spdy::SpdyPriority priority = entry->second->second;
@@ -105,7 +105,7 @@
   std::vector<DependencyUpdate> result;
   result.reserve(2);
 
-  EntryMap::iterator curr_entry = entry_by_stream_id_.find(id);
+  auto curr_entry = entry_by_stream_id_.find(id);
   if (curr_entry == entry_by_stream_id_.end()) {
     return result;
   }
@@ -154,10 +154,10 @@
   }
 
   // Move to the new priority.
-  EntryMap::iterator old = entry_by_stream_id_.find(id);
+  auto old = entry_by_stream_id_.find(id);
   id_priority_lists_[old->second->second].erase(old->second);
   id_priority_lists_[new_priority].push_back(std::make_pair(id, new_priority));
-  IdList::iterator it = id_priority_lists_[new_priority].end();
+  auto it = id_priority_lists_[new_priority].end();
   --it;
   entry_by_stream_id_[id] = it;
 
@@ -165,11 +165,11 @@
 }
 
 void Http2PriorityDependencies::OnStreamDestruction(spdy::SpdyStreamId id) {
-  EntryMap::iterator emit = entry_by_stream_id_.find(id);
+  auto emit = entry_by_stream_id_.find(id);
   if (emit == entry_by_stream_id_.end())
     return;
 
-  IdList::iterator it = emit->second;
+  auto it = emit->second;
   id_priority_lists_[it->second].erase(it);
   entry_by_stream_id_.erase(emit);
 }
diff --git a/net/spdy/http2_push_promise_index_test.cc b/net/spdy/http2_push_promise_index_test.cc
index fbfba38..1cbef57 100644
--- a/net/spdy/http2_push_promise_index_test.cc
+++ b/net/spdy/http2_push_promise_index_test.cc
@@ -445,9 +445,7 @@
   ASSERT_EQ(4u, entries.size());
 
   // Test that entries are ordered by URL first, not stream ID.
-  std::set<Http2PushPromiseIndexPeer::UnclaimedPushedStream,
-           Http2PushPromiseIndexPeer::CompareByUrl>::iterator it =
-      entries.begin();
+  auto it = entries.begin();
   EXPECT_EQ(8u, it->stream_id);
   ++it;
   EXPECT_EQ(4u, it->stream_id);
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index a656aae..6b5a8d0 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -296,8 +296,7 @@
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   auto settings_list = std::make_unique<base::ListValue>();
-  for (spdy::SettingsMap::const_iterator it = settings->begin();
-       it != settings->end(); ++it) {
+  for (auto it = settings->begin(); it != settings->end(); ++it) {
     const spdy::SpdySettingsId id = it->first;
     const uint32_t value = it->second;
     settings_list->AppendString(
@@ -932,7 +931,7 @@
     return ERR_CONNECTION_CLOSED;
   }
 
-  ActiveStreamMap::iterator active_it = active_streams_.find(pushed_stream_id);
+  auto active_it = active_streams_.find(pushed_stream_id);
   if (active_it == active_streams_.end()) {
     // A previously claimed pushed stream might not be available, for example,
     // if the server has reset it in the meanwhile.
@@ -985,8 +984,7 @@
   session_send_window_size_ = kDefaultInitialWindowSize;
   session_recv_window_size_ = kDefaultInitialWindowSize;
 
-  spdy::SettingsMap::const_iterator it =
-      initial_settings_.find(spdy::SETTINGS_MAX_HEADER_LIST_SIZE);
+  auto it = initial_settings_.find(spdy::SETTINGS_MAX_HEADER_LIST_SIZE);
   uint32_t spdy_max_header_list_size =
       (it == initial_settings_.end()) ? kSpdyMaxHeaderListSize : it->second;
   buffered_spdy_framer_ =
@@ -1219,7 +1217,7 @@
 void SpdySession::CloseActiveStream(spdy::SpdyStreamId stream_id, int status) {
   DCHECK_NE(stream_id, 0u);
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end()) {
     NOTREACHED();
     return;
@@ -1232,7 +1230,7 @@
                                      int status) {
   DCHECK_EQ(stream->stream_id(), 0u);
 
-  CreatedStreamSet::iterator it = created_streams_.find(stream.get());
+  auto it = created_streams_.find(stream.get());
   if (it == created_streams_.end()) {
     NOTREACHED();
     return;
@@ -1246,7 +1244,7 @@
                               const std::string& description) {
   DCHECK_NE(stream_id, 0u);
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end()) {
     NOTREACHED();
     return;
@@ -1322,8 +1320,7 @@
 
   while (true) {
     size_t old_size = active_streams_.size();
-    ActiveStreamMap::iterator it =
-        active_streams_.lower_bound(last_good_stream_id + 1);
+    auto it = active_streams_.lower_bound(last_good_stream_id + 1);
     if (it == active_streams_.end())
       break;
     LogAbandonedActiveStream(it, status);
@@ -1335,7 +1332,7 @@
 
   while (!created_streams_.empty()) {
     size_t old_size = created_streams_.size();
-    CreatedStreamSet::iterator it = created_streams_.begin();
+    auto it = created_streams_.begin();
     LogAbandonedStream(*it, status);
     CloseCreatedStreamIterator(it, status);
     // No new streams should be created while the session is going
@@ -1478,7 +1475,7 @@
     return false;
   }
 
-  ActiveStreamMap::const_iterator stream_it = active_streams_.find(stream_id);
+  auto stream_it = active_streams_.find(stream_id);
   if (stream_it == active_streams_.end()) {
     // Only active streams should be in Http2PushPromiseIndex.
     NOTREACHED();
@@ -1775,8 +1772,7 @@
   DCHECK(it != headers.end() && (it->second == "GET" || it->second == "HEAD"));
 
   // Verify we have a valid stream association.
-  ActiveStreamMap::iterator associated_it =
-      active_streams_.find(associated_stream_id);
+  auto associated_it = active_streams_.find(associated_stream_id);
   if (associated_it == active_streams_.end()) {
     RecordSpdyPushedStreamFateHistogram(
         SpdyPushedStreamFate::kInactiveAssociatedStream);
@@ -1890,7 +1886,7 @@
 
   InsertActivatedStream(std::move(stream));
 
-  ActiveStreamMap::iterator active_it = active_streams_.find(stream_id);
+  auto active_it = active_streams_.find(stream_id);
   DCHECK(active_it != active_streams_.end());
 
   // Notify the push_delegate that a push promise has been received.
@@ -2793,7 +2789,7 @@
 }
 
 void SpdySession::CancelPushedStreamIfUnclaimed(spdy::SpdyStreamId stream_id) {
-  ActiveStreamMap::iterator active_it = active_streams_.find(stream_id);
+  auto active_it = active_streams_.find(stream_id);
   if (active_it == active_streams_.end())
     return;
 
@@ -2829,7 +2825,7 @@
                                 const std::string& description) {
   CHECK(in_io_loop_);
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end()) {
     // We still want to send a frame to reset the stream even if we
     // don't know anything about it.
@@ -2874,7 +2870,7 @@
       NetLogEventType::HTTP2_SESSION_RECV_RST_STREAM,
       base::Bind(&NetLogSpdyRecvRstStreamCallback, stream_id, error_code));
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end()) {
     // NOTE:  it may just be that the stream was cancelled.
     LOG(WARNING) << "Received RST for invalid stream" << stream_id;
@@ -2946,7 +2942,7 @@
                                     bool fin) {
   CHECK(in_io_loop_);
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
 
   // By the time data comes in, the stream may already be inactive.
   if (it == active_streams_.end())
@@ -2988,7 +2984,7 @@
     DCHECK_EQ(len, 0u);
   }
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
 
   // By the time data comes in, the stream may already be inactive.
   if (it == active_streams_.end())
@@ -3008,7 +3004,7 @@
                        base::Bind(&NetLogSpdyDataCallback, stream_id, 0, true));
   }
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   // By the time data comes in, the stream may already be inactive.
   if (it == active_streams_.end())
     return;
@@ -3029,7 +3025,7 @@
   DecreaseRecvWindowSize(static_cast<int32_t>(len));
   IncreaseRecvWindowSize(static_cast<int32_t>(len));
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end())
     return;
   it->second->OnPaddingConsumed(len);
@@ -3090,7 +3086,7 @@
     IncreaseSendWindowSize(delta_window_size);
   } else {
     // WINDOW_UPDATE for a stream.
-    ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+    auto it = active_streams_.find(stream_id);
 
     if (it == active_streams_.end()) {
       // NOTE:  it may just be that the stream was cancelled.
@@ -3142,7 +3138,7 @@
                                   fin, stream_id));
   }
 
-  ActiveStreamMap::iterator it = active_streams_.find(stream_id);
+  auto it = active_streams_.find(stream_id);
   if (it == active_streams_.end()) {
     // NOTE:  it may just be that the stream was cancelled.
     LOG(WARNING) << "Received HEADERS for invalid stream " << stream_id;
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index 670a0aa2..b541e046 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -144,7 +144,7 @@
     bool enable_ip_based_pooling,
     bool is_websocket,
     const NetLogWithSource& net_log) {
-  AvailableSessionMap::iterator it = LookupAvailableSessionByKey(key);
+  auto it = LookupAvailableSessionByKey(key);
   if (it != available_sessions_.end() &&
       (!is_websocket || it->second->support_websocket())) {
     if (key == it->second->spdy_session_key()) {
@@ -203,8 +203,7 @@
         continue;
       }
 
-      AvailableSessionMap::iterator available_session_it =
-          LookupAvailableSessionByKey(alias_key);
+      auto available_session_it = LookupAvailableSessionByKey(alias_key);
       if (available_session_it == available_sessions_.end()) {
         NOTREACHED();  // It shouldn't be in the aliases table if we can't get
                        // it!
@@ -295,8 +294,7 @@
   UnmapKey(available_session->spdy_session_key());
   RemoveAliases(available_session->spdy_session_key());
   const std::set<SpdySessionKey>& aliases = available_session->pooled_aliases();
-  for (std::set<SpdySessionKey>::const_iterator it = aliases.begin();
-       it != aliases.end(); ++it) {
+  for (auto it = aliases.begin(); it != aliases.end(); ++it) {
     UnmapKey(*it);
     RemoveAliases(*it);
   }
@@ -310,7 +308,7 @@
   unavailable_session->net_log().AddEvent(
       NetLogEventType::HTTP2_SESSION_POOL_REMOVE_SESSION);
 
-  SessionSet::iterator it = sessions_.find(unavailable_session.get());
+  auto it = sessions_.find(unavailable_session.get());
   CHECK(it != sessions_.end());
   std::unique_ptr<SpdySession> owned_session(*it);
   sessions_.erase(it);
@@ -344,8 +342,8 @@
     const {
   auto list = std::make_unique<base::ListValue>();
 
-  for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
-       it != available_sessions_.end(); ++it) {
+  for (auto it = available_sessions_.begin(); it != available_sessions_.end();
+       ++it) {
     // Only add the session if the key in the map matches the main
     // host_port_proxy_pair (not an alias).
     const SpdySessionKey& key = it->first;
@@ -528,8 +526,8 @@
 
 bool SpdySessionPool::IsSessionAvailable(
     const base::WeakPtr<SpdySession>& session) const {
-  for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
-       it != available_sessions_.end(); ++it) {
+  for (auto it = available_sessions_.begin(); it != available_sessions_.end();
+       ++it) {
     if (it->second.get() == session.get())
       return true;
   }
@@ -552,7 +550,7 @@
 }
 
 void SpdySessionPool::UnmapKey(const SpdySessionKey& key) {
-  AvailableSessionMap::iterator it = LookupAvailableSessionByKey(key);
+  auto it = LookupAvailableSessionByKey(key);
   CHECK(it != available_sessions_.end());
   available_sessions_.erase(it);
 }
@@ -560,9 +558,9 @@
 void SpdySessionPool::RemoveAliases(const SpdySessionKey& key) {
   // Walk the aliases map, find references to this pair.
   // TODO(mbelshe):  Figure out if this is too expensive.
-  for (AliasMap::iterator it = aliases_.begin(); it != aliases_.end(); ) {
+  for (auto it = aliases_.begin(); it != aliases_.end();) {
     if (it->second == key) {
-      AliasMap::iterator old_it = it;
+      auto old_it = it;
       ++it;
       aliases_.erase(old_it);
     } else {
@@ -573,8 +571,7 @@
 
 SpdySessionPool::WeakSessionList SpdySessionPool::GetCurrentSessions() const {
   WeakSessionList current_sessions;
-  for (SessionSet::const_iterator it = sessions_.begin();
-       it != sessions_.end(); ++it) {
+  for (auto it = sessions_.begin(); it != sessions_.end(); ++it) {
     current_sessions.push_back((*it)->GetWeakPtr());
   }
   return current_sessions;
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 386d41e..213fa71f5 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -707,8 +707,7 @@
 spdy::SpdySerializedFrame SpdyTestUtil::ConstructSpdySettings(
     const spdy::SettingsMap& settings) {
   spdy::SpdySettingsIR settings_ir;
-  for (spdy::SettingsMap::const_iterator it = settings.begin();
-       it != settings.end(); ++it) {
+  for (auto it = settings.begin(); it != settings.end(); ++it) {
     settings_ir.AddSetting(it->first, it->second);
   }
   return spdy::SpdySerializedFrame(
diff --git a/net/ssl/channel_id_service.cc b/net/ssl/channel_id_service.cc
index d4636ec4..c2e4792 100644
--- a/net/ssl/channel_id_service.cc
+++ b/net/ssl/channel_id_service.cc
@@ -146,8 +146,7 @@
     std::vector<ChannelIDService::Request*> requests;
     requests_.swap(requests);
 
-    for (std::vector<ChannelIDService::Request*>::iterator i = requests.begin();
-         i != requests.end(); i++) {
+    for (auto i = requests.begin(); i != requests.end(); i++) {
       std::unique_ptr<crypto::ECPrivateKey> key_copy;
       if (key)
         key_copy = key->Copy();
diff --git a/net/ssl/channel_id_store.cc b/net/ssl/channel_id_store.cc
index 7fee5eaa..2182535 100644
--- a/net/ssl/channel_id_store.cc
+++ b/net/ssl/channel_id_store.cc
@@ -43,8 +43,7 @@
 }
 
 void ChannelIDStore::InitializeFrom(const ChannelIDList& list) {
-  for (ChannelIDList::const_iterator i = list.begin(); i != list.end();
-      ++i) {
+  for (auto i = list.begin(); i != list.end(); ++i) {
     SetChannelID(std::unique_ptr<ChannelID>(new ChannelID(*i)));
   }
 }
diff --git a/net/ssl/default_channel_id_store.cc b/net/ssl/default_channel_id_store.cc
index 630b57c9..5c6fdd82 100644
--- a/net/ssl/default_channel_id_store.cc
+++ b/net/ssl/default_channel_id_store.cc
@@ -222,7 +222,7 @@
     return ERR_IO_PENDING;
   }
 
-  ChannelIDMap::iterator it = channel_ids_.find(server_identifier);
+  auto it = channel_ids_.find(server_identifier);
 
   if (it == channel_ids_.end())
     return ERR_FILE_NOT_FOUND;
@@ -291,8 +291,7 @@
 void DefaultChannelIDStore::DeleteAllInMemory() {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
-  for (ChannelIDMap::iterator it = channel_ids_.begin();
-       it != channel_ids_.end(); ++it) {
+  for (auto it = channel_ids_.begin(); it != channel_ids_.end(); ++it) {
     delete it->second;
   }
   channel_ids_.clear();
@@ -310,9 +309,7 @@
 void DefaultChannelIDStore::OnLoaded(
     std::unique_ptr<std::vector<std::unique_ptr<ChannelID>>> channel_ids) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  for (std::vector<std::unique_ptr<ChannelID>>::iterator it =
-           channel_ids->begin();
-       it != channel_ids->end(); ++it) {
+  for (auto it = channel_ids->begin(); it != channel_ids->end(); ++it) {
     DCHECK(channel_ids_.find((*it)->server_identifier()) ==
            channel_ids_.end());
     std::string ident = (*it)->server_identifier();
@@ -349,9 +346,8 @@
     base::Time delete_end) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(loaded_);
-  for (ChannelIDMap::iterator it = channel_ids_.begin();
-       it != channel_ids_.end();) {
-    ChannelIDMap::iterator cur = it;
+  for (auto it = channel_ids_.begin(); it != channel_ids_.end();) {
+    auto cur = it;
     ++it;
     ChannelID* channel_id = cur->second;
 
@@ -371,8 +367,7 @@
     ChannelIDList* channel_id_list) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(loaded_);
-  for (ChannelIDMap::iterator it = channel_ids_.begin();
-       it != channel_ids_.end(); ++it)
+  for (auto it = channel_ids_.begin(); it != channel_ids_.end(); ++it)
     channel_id_list->push_back(*it->second);
 }
 
@@ -399,7 +394,7 @@
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(loaded_);
 
-  ChannelIDMap::iterator it = channel_ids_.find(server_identifier);
+  auto it = channel_ids_.find(server_identifier);
   if (it == channel_ids_.end())
     return;  // There is nothing to delete.
 
diff --git a/net/ssl/default_channel_id_store_unittest.cc b/net/ssl/default_channel_id_store_unittest.cc
index b372d4c9..40a5932 100644
--- a/net/ssl/default_channel_id_store_unittest.cc
+++ b/net/ssl/default_channel_id_store_unittest.cc
@@ -447,7 +447,7 @@
   store.GetAllChannelIDs(base::Bind(GetAllCallback, &channel_ids));
   ASSERT_EQ(3u, channel_ids.size());
 
-  ChannelIDStore::ChannelIDList::iterator channel_id = channel_ids.begin();
+  auto channel_id = channel_ids.begin();
   EXPECT_EQ("both.com", channel_id->server_identifier());
   EXPECT_TRUE(KeysEqual(both_key.get(), channel_id->key()));
 
@@ -492,7 +492,7 @@
   store.GetAllChannelIDs(base::Bind(GetAllCallback, &channel_ids));
   ASSERT_EQ(3u, channel_ids.size());
 
-  ChannelIDStore::ChannelIDList::iterator channel_id = channel_ids.begin();
+  auto channel_id = channel_ids.begin();
   EXPECT_EQ("both.com", channel_id->server_identifier());
   EXPECT_TRUE(KeysEqual(both_key.get(), channel_id->key()));
 
diff --git a/net/ssl/ssl_client_auth_cache.cc b/net/ssl/ssl_client_auth_cache.cc
index c1fce783..4cd6aef7 100644
--- a/net/ssl/ssl_client_auth_cache.cc
+++ b/net/ssl/ssl_client_auth_cache.cc
@@ -23,7 +23,7 @@
                                 scoped_refptr<SSLPrivateKey>* private_key) {
   DCHECK(certificate);
 
-  AuthCacheMap::iterator iter = cache_.find(server);
+  auto iter = cache_.find(server);
   if (iter == cache_.end())
     return false;
 
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 1a72bc45..0b5dd3cf 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -408,9 +408,7 @@
   std::string new_file_path = original_file_path;
   bool first_query_parameter = true;
   const std::vector<StringPair>::const_iterator end = text_to_replace.end();
-  for (std::vector<StringPair>::const_iterator it = text_to_replace.begin();
-       it != end;
-       ++it) {
+  for (auto it = text_to_replace.begin(); it != end; ++it) {
     const std::string& old_text = it->first;
     const std::string& new_text = it->second;
     std::string base64_old;
diff --git a/net/test/spawned_test_server/local_test_server.cc b/net/test/spawned_test_server/local_test_server.cc
index 689effb..e0522e0a 100644
--- a/net/test/spawned_test_server/local_test_server.cc
+++ b/net/test/spawned_test_server/local_test_server.cc
@@ -207,8 +207,7 @@
       const base::ListValue* list = NULL;
       if (!value.GetAsList(&list) || !list || list->empty())
         return false;
-      for (base::ListValue::const_iterator list_it = list->begin();
-           list_it != list->end(); ++list_it) {
+      for (auto list_it = list->begin(); list_it != list->end(); ++list_it) {
         if (!AppendArgumentFromJSONValue(key, *list_it, command_line))
           return false;
       }
diff --git a/net/test/spawned_test_server/local_test_server_posix.cc b/net/test/spawned_test_server/local_test_server_posix.cc
index 0ba4ee34..dd60159 100644
--- a/net/test/spawned_test_server/local_test_server_posix.cc
+++ b/net/test/spawned_test_server/local_test_server_posix.cc
@@ -41,10 +41,8 @@
       return false;
     bool found_path_string = false;
     bool found_port_string = false;
-    for (std::vector<std::string>::const_iterator it =
-         entry.cmd_line_args().begin();
-         it != entry.cmd_line_args().end();
-         ++it) {
+    for (auto it = entry.cmd_line_args().begin();
+         it != entry.cmd_line_args().end(); ++it) {
       if (it->find(path_string_) != std::string::npos)
         found_path_string = true;
       if (it->find(port_string_) != std::string::npos)
diff --git a/net/test/url_request/url_request_slow_download_job.cc b/net/test/url_request/url_request_slow_download_job.cc
index dfba97e..72a2b5a 100644
--- a/net/test/url_request/url_request_slow_download_job.cc
+++ b/net/test/url_request/url_request_slow_download_job.cc
@@ -95,16 +95,14 @@
 
 // static
 void URLRequestSlowDownloadJob::FinishPendingRequests() {
-  typedef std::set<URLRequestSlowDownloadJob*> JobList;
-  for (JobList::iterator it = pending_requests_.Get().begin();
+  for (auto it = pending_requests_.Get().begin();
        it != pending_requests_.Get().end(); ++it) {
     (*it)->set_should_finish_download();
   }
 }
 
 void URLRequestSlowDownloadJob::ErrorPendingRequests() {
-  typedef std::set<URLRequestSlowDownloadJob*> JobList;
-  for (JobList::iterator it = pending_requests_.Get().begin();
+  for (auto it = pending_requests_.Get().begin();
        it != pending_requests_.Get().end(); ++it) {
     (*it)->set_should_error_download();
   }
diff --git a/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc b/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
index b7e7c52..38dbf7ff8 100644
--- a/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
+++ b/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
@@ -67,7 +67,7 @@
       std::max(QuicTime::Delta::FromMilliseconds(kMinLossDelayMs),
                max_rtt + (max_rtt >> reordering_shift_));
   QuicPacketNumber packet_number = unacked_packets.GetLeastUnacked();
-  QuicUnackedPacketMap::const_iterator it = unacked_packets.begin();
+  auto it = unacked_packets.begin();
   if (largest_lost_ >= packet_number) {
     if (largest_lost_ > unacked_packets.largest_sent_packet()) {
       QUIC_BUG << "largest_lost: " << largest_lost_
diff --git a/net/third_party/quic/core/crypto/cert_compressor.cc b/net/third_party/quic/core/crypto/cert_compressor.cc
index c2f21d73..1e2e642 100644
--- a/net/third_party/quic/core/crypto/cert_compressor.cc
+++ b/net/third_party/quic/core/crypto/cert_compressor.cc
@@ -185,8 +185,7 @@
       client_cached_cert_hashes.size() % sizeof(uint64_t) == 0 &&
       !client_cached_cert_hashes.empty();
 
-  for (std::vector<QuicString>::const_iterator i = certs.begin();
-       i != certs.end(); ++i) {
+  for (auto i = certs.begin(); i != certs.end(); ++i) {
     CertEntry entry;
 
     if (cached_valid) {
@@ -234,8 +233,7 @@
 size_t CertEntriesSize(const std::vector<CertEntry>& entries) {
   size_t entries_size = 0;
 
-  for (std::vector<CertEntry>::const_iterator i = entries.begin();
-       i != entries.end(); ++i) {
+  for (auto i = entries.begin(); i != entries.end(); ++i) {
     entries_size++;
     switch (i->type) {
       case CertEntry::COMPRESSED:
@@ -257,8 +255,7 @@
 // SerializeCertEntries serialises |entries| to |out|, which must have enough
 // space to contain them.
 void SerializeCertEntries(uint8_t* out, const std::vector<CertEntry>& entries) {
-  for (std::vector<CertEntry>::const_iterator i = entries.begin();
-       i != entries.end(); ++i) {
+  for (auto i = entries.begin(); i != entries.end(); ++i) {
     *out++ = static_cast<uint8_t>(i->type);
     switch (i->type) {
       case CertEntry::COMPRESSED:
@@ -320,8 +317,7 @@
   std::vector<uint64_t> ret;
   ret.reserve(certs.size());
 
-  for (std::vector<QuicString>::const_iterator i = certs.begin();
-       i != certs.end(); ++i) {
+  for (auto i = certs.begin(); i != certs.end(); ++i) {
     ret.push_back(QuicUtils::FNV1a_64_Hash(*i));
   }
 
diff --git a/net/third_party/quic/core/crypto/crypto_framer.cc b/net/third_party/quic/core/crypto/crypto_framer.cc
index 81380d93..fcde749 100644
--- a/net/third_party/quic/core/crypto/crypto_framer.cc
+++ b/net/third_party/quic/core/crypto/crypto_framer.cc
@@ -170,7 +170,7 @@
 
   uint32_t end_offset = 0;
   // Tags and offsets
-  for (QuicTagValueMap::const_iterator it = message.tag_value_map().begin();
+  for (auto it = message.tag_value_map().begin();
        it != message.tag_value_map().end(); ++it) {
     if (it->first == kPAD && need_pad_tag) {
       // Existing PAD tags are only checked when padding needs to be added
@@ -205,7 +205,7 @@
   }
 
   // Values
-  for (QuicTagValueMap::const_iterator it = message.tag_value_map().begin();
+  for (auto it = message.tag_value_map().begin();
        it != message.tag_value_map().end(); ++it) {
     if (it->first > kPAD && need_pad_value) {
       need_pad_value = false;
diff --git a/net/third_party/quic/core/crypto/crypto_handshake_message.cc b/net/third_party/quic/core/crypto/crypto_handshake_message.cc
index 99dce59..b8b9be65 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake_message.cc
+++ b/net/third_party/quic/core/crypto/crypto_handshake_message.cc
@@ -95,7 +95,7 @@
 QuicErrorCode CryptoHandshakeMessage::GetTaglist(
     QuicTag tag,
     QuicTagVector* out_tags) const {
-  QuicTagValueMap::const_iterator it = tag_value_map_.find(tag);
+  auto it = tag_value_map_.find(tag);
   QuicErrorCode ret = QUIC_NO_ERROR;
 
   if (it == tag_value_map_.end()) {
@@ -148,7 +148,7 @@
 
 bool CryptoHandshakeMessage::GetStringPiece(QuicTag tag,
                                             QuicStringPiece* out) const {
-  QuicTagValueMap::const_iterator it = tag_value_map_.find(tag);
+  auto it = tag_value_map_.find(tag);
   if (it == tag_value_map_.end()) {
     return false;
   }
@@ -217,8 +217,7 @@
                sizeof(uint16_t) /* padding */;
   ret += (sizeof(QuicTag) + sizeof(uint32_t) /* end offset */) *
          tag_value_map_.size();
-  for (QuicTagValueMap::const_iterator i = tag_value_map_.begin();
-       i != tag_value_map_.end(); ++i) {
+  for (auto i = tag_value_map_.begin(); i != tag_value_map_.end(); ++i) {
     ret += i->second.size();
   }
 
@@ -244,7 +243,7 @@
 QuicErrorCode CryptoHandshakeMessage::GetPOD(QuicTag tag,
                                              void* out,
                                              size_t len) const {
-  QuicTagValueMap::const_iterator it = tag_value_map_.find(tag);
+  auto it = tag_value_map_.find(tag);
   QuicErrorCode ret = QUIC_NO_ERROR;
 
   if (it == tag_value_map_.end()) {
@@ -265,8 +264,7 @@
 QuicString CryptoHandshakeMessage::DebugStringInternal(size_t indent) const {
   QuicString ret = QuicString(2 * indent, ' ') + QuicTagToString(tag_) + "<\n";
   ++indent;
-  for (QuicTagValueMap::const_iterator it = tag_value_map_.begin();
-       it != tag_value_map_.end(); ++it) {
+  for (auto it = tag_value_map_.begin(); it != tag_value_map_.end(); ++it) {
     ret += QuicString(2 * indent, ' ') + QuicTagToString(it->first) + ": ";
 
     bool done = false;
diff --git a/net/third_party/quic/core/crypto/quic_crypto_client_config.cc b/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
index ea526aa..adb9d91 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
@@ -489,8 +489,7 @@
   if (!certs.empty()) {
     std::vector<uint64_t> hashes;
     hashes.reserve(certs.size());
-    for (std::vector<QuicString>::const_iterator i = certs.begin();
-         i != certs.end(); ++i) {
+    for (auto i = certs.begin(); i != certs.end(); ++i) {
       hashes.push_back(QuicUtils::FNV1a_64_Hash(*i));
     }
     out->SetVector(kCCRT, hashes);
@@ -954,7 +953,7 @@
   if (aead.size() <= 1) {
     return;
   }
-  QuicTagVector::iterator pos = std::find(aead.begin(), aead.end(), kAESG);
+  auto pos = std::find(aead.begin(), aead.end(), kAESG);
   if (pos != aead.end()) {
     aead.erase(pos);
     aead.insert(aead.begin(), kAESG);
diff --git a/net/third_party/quic/core/crypto/quic_crypto_server_config.cc b/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
index b41c0ec..b1b76cb 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
@@ -432,7 +432,7 @@
          i != parsed_configs.end(); ++i) {
       QuicReferenceCountedPointer<Config> config = *i;
 
-      ConfigMap::iterator it = configs_.find(config->id);
+      auto it = configs_.find(config->id);
       if (it != configs_.end()) {
         QUIC_LOG(INFO) << "Keeping scid: "
                        << QuicTextUtils::HexEncode(config->id) << " orbit: "
@@ -480,8 +480,7 @@
 void QuicCryptoServerConfig::GetConfigIds(
     std::vector<QuicString>* scids) const {
   QuicReaderMutexLock locked(&configs_lock_);
-  for (ConfigMap::const_iterator it = configs_.begin(); it != configs_.end();
-       ++it) {
+  for (auto it = configs_.begin(); it != configs_.end(); ++it) {
     scids->push_back(it->first);
   }
 }
@@ -1170,7 +1169,7 @@
   configs_lock_.AssertReaderHeld();
 
   if (!requested_scid.empty()) {
-    ConfigMap::const_iterator it = configs_.find((QuicString(requested_scid)));
+    auto it = configs_.find((QuicString(requested_scid)));
     if (it != configs_.end()) {
       // We'll use the config that the client requested in order to do
       // key-agreement.
@@ -1205,8 +1204,7 @@
   std::vector<QuicReferenceCountedPointer<Config>> configs;
   configs.reserve(configs_.size());
 
-  for (ConfigMap::const_iterator it = configs_.begin(); it != configs_.end();
-       ++it) {
+  for (auto it = configs_.begin(); it != configs_.end(); ++it) {
     // TODO(avd) Exclude expired configs?
     configs.push_back(it->second);
   }
diff --git a/net/third_party/quic/core/frames/quic_frame.cc b/net/third_party/quic/core/frames/quic_frame.cc
index 8d6b132..f3ad1c15 100644
--- a/net/third_party/quic/core/frames/quic_frame.cc
+++ b/net/third_party/quic/core/frames/quic_frame.cc
@@ -142,7 +142,7 @@
 }
 
 void RemoveFramesForStream(QuicFrames* frames, QuicStreamId stream_id) {
-  QuicFrames::iterator it = frames->begin();
+  auto it = frames->begin();
   while (it != frames->end()) {
     if (it->type != STREAM_FRAME || it->stream_frame.stream_id != stream_id) {
       ++it;
diff --git a/net/third_party/quic/core/http/end_to_end_test.cc b/net/third_party/quic/core/http/end_to_end_test.cc
index c92f7cd..2fe5803 100644
--- a/net/third_party/quic/core/http/end_to_end_test.cc
+++ b/net/third_party/quic/core/http/end_to_end_test.cc
@@ -2557,7 +2557,7 @@
       QuicServerPeer::GetDispatcher(server_thread_->server());
   QuicDispatcher::SessionMap const& map =
       QuicDispatcherPeer::session_map(dispatcher);
-  QuicDispatcher::SessionMap::const_iterator it = map.begin();
+  auto it = map.begin();
   EXPECT_TRUE(it != map.end());
   QuicSession* server_session = it->second.get();
 
diff --git a/net/third_party/quic/core/http/quic_client_push_promise_index.cc b/net/third_party/quic/core/http/quic_client_push_promise_index.cc
index 4549123..2c8f6d8 100644
--- a/net/third_party/quic/core/http/quic_client_push_promise_index.cc
+++ b/net/third_party/quic/core/http/quic_client_push_promise_index.cc
@@ -20,7 +20,7 @@
 
 QuicClientPromisedInfo* QuicClientPushPromiseIndex::GetPromised(
     const QuicString& url) {
-  QuicPromisedByUrlMap::iterator it = promised_by_url_.find(url);
+  auto it = promised_by_url_.find(url);
   if (it == promised_by_url_.end()) {
     return nullptr;
   }
@@ -32,7 +32,7 @@
     QuicClientPushPromiseIndex::Delegate* delegate,
     TryHandle** handle) {
   QuicString url(SpdyUtils::GetPromisedUrlFromHeaders(request));
-  QuicPromisedByUrlMap::iterator it = promised_by_url_.find(url);
+  auto it = promised_by_url_.find(url);
   if (it != promised_by_url_.end()) {
     QuicClientPromisedInfo* promised = it->second;
     QuicAsyncStatus rv = promised->HandleClientRequest(request, delegate);
diff --git a/net/third_party/quic/core/http/quic_spdy_client_session_base.cc b/net/third_party/quic/core/http/quic_spdy_client_session_base.cc
index 34f3794..3e11c67 100644
--- a/net/third_party/quic/core/http/quic_spdy_client_session_base.cc
+++ b/net/third_party/quic/core/http/quic_spdy_client_session_base.cc
@@ -150,8 +150,7 @@
 
 QuicClientPromisedInfo* QuicSpdyClientSessionBase::GetPromisedByUrl(
     const QuicString& url) {
-  QuicPromisedByUrlMap::iterator it =
-      push_promise_index_->promised_by_url()->find(url);
+  auto it = push_promise_index_->promised_by_url()->find(url);
   if (it != push_promise_index_->promised_by_url()->end()) {
     return it->second;
   }
@@ -160,7 +159,7 @@
 
 QuicClientPromisedInfo* QuicSpdyClientSessionBase::GetPromisedById(
     const QuicStreamId id) {
-  QuicPromisedByIdMap::iterator it = promised_by_id_.find(id);
+  auto it = promised_by_id_.find(id);
   if (it != promised_by_id_.end()) {
     return it->second.get();
   }
diff --git a/net/third_party/quic/core/qpack/qpack_header_table.cc b/net/third_party/quic/core/qpack/qpack_header_table.cc
index 55c4f3a..de07681e 100644
--- a/net/third_party/quic/core/qpack/qpack_header_table.cc
+++ b/net/third_party/quic/core/qpack/qpack_header_table.cc
@@ -31,8 +31,7 @@
     QuicStringPiece value,
     size_t* index) const {
   spdy::HpackEntry query(name, value);
-  UnorderedEntrySet::const_iterator static_index_it =
-      static_index_.find(&query);
+  auto static_index_it = static_index_.find(&query);
   if (static_index_it != static_index_.end()) {
     DCHECK((*static_index_it)->IsStatic());
     // Static table indexing starts with 1.
@@ -40,8 +39,7 @@
     return MatchType::kNameAndValue;
   }
 
-  NameToEntryMap::const_iterator static_name_index_it =
-      static_name_index_.find(name);
+  auto static_name_index_it = static_name_index_.find(name);
   if (static_name_index_it != static_name_index_.end()) {
     DCHECK(static_name_index_it->second->IsStatic());
     // Static table indexing starts with 1.
diff --git a/net/third_party/quic/core/quic_connection.cc b/net/third_party/quic/core/quic_connection.cc
index 2ce683d5..d5f0f02 100644
--- a/net/third_party/quic/core/quic_connection.cc
+++ b/net/third_party/quic/core/quic_connection.cc
@@ -369,8 +369,7 @@
 }
 
 void QuicConnection::ClearQueuedPackets() {
-  for (QueuedPacketList::iterator it = queued_packets_.begin();
-       it != queued_packets_.end(); ++it) {
+  for (auto it = queued_packets_.begin(); it != queued_packets_.end(); ++it) {
     // Delete the buffer before calling ClearSerializedPacket, which sets
     // encrypted_buffer to nullptr.
     delete[] it->encrypted_buffer;
@@ -1582,7 +1581,7 @@
   sent_packet_manager_.CancelRetransmissionsForStream(id);
   // Remove all queued packets which only contain data for the reset stream.
   // TODO(fayang): consider removing this because it should be rarely executed.
-  QueuedPacketList::iterator packet_iterator = queued_packets_.begin();
+  auto packet_iterator = queued_packets_.begin();
   while (packet_iterator != queued_packets_.end()) {
     QuicFrames* retransmittable_frames =
         &packet_iterator->retransmittable_frames;
diff --git a/net/third_party/quic/core/quic_dispatcher.cc b/net/third_party/quic/core/quic_dispatcher.cc
index 04873f3c..fb40e80 100644
--- a/net/third_party/quic/core/quic_dispatcher.cc
+++ b/net/third_party/quic/core/quic_dispatcher.cc
@@ -335,7 +335,7 @@
   // Packets with connection IDs for active connections are processed
   // immediately.
   QuicConnectionId connection_id = header.destination_connection_id;
-  SessionMap::iterator it = session_map_.find(connection_id);
+  auto it = session_map_.find(connection_id);
   if (it != session_map_.end()) {
     DCHECK(!buffered_packets_.HasBufferedPackets(connection_id));
     it->second->ProcessUdpPacket(current_self_address_, current_peer_address_,
@@ -589,7 +589,7 @@
 void QuicDispatcher::OnConnectionClosed(QuicConnectionId connection_id,
                                         QuicErrorCode error,
                                         const QuicString& error_details) {
-  SessionMap::iterator it = session_map_.find(connection_id);
+  auto it = session_map_.find(connection_id);
   if (it == session_map_.end()) {
     QUIC_BUG << "ConnectionId " << connection_id
              << " does not exist in the session map.  Error: "
diff --git a/net/third_party/quic/core/quic_framer.cc b/net/third_party/quic/core/quic_framer.cc
index 4cd48a5ee..a7febfe 100644
--- a/net/third_party/quic/core/quic_framer.cc
+++ b/net/third_party/quic/core/quic_framer.cc
@@ -3946,7 +3946,7 @@
     return true;
   }
 
-  PacketTimeVector::const_iterator it = frame.received_packet_times.begin();
+  auto it = frame.received_packet_times.begin();
   QuicPacketNumber packet_number = it->first;
   QuicPacketNumber delta_from_largest_observed =
       LargestAcked(frame) - packet_number;
diff --git a/net/third_party/quic/core/quic_received_packet_manager.cc b/net/third_party/quic/core/quic_received_packet_manager.cc
index 32f147f..ed280968 100644
--- a/net/third_party/quic/core/quic_received_packet_manager.cc
+++ b/net/third_party/quic/core/quic_received_packet_manager.cc
@@ -93,7 +93,7 @@
   }
   // Clear all packet times if any are too far from largest observed.
   // It's expected this is extremely rare.
-  for (PacketTimeVector::iterator it = ack_frame_.received_packet_times.begin();
+  for (auto it = ack_frame_.received_packet_times.begin();
        it != ack_frame_.received_packet_times.end();) {
     if (LargestAcked(ack_frame_) - it->first >=
         std::numeric_limits<uint8_t>::max()) {
diff --git a/net/third_party/quic/core/quic_sent_packet_manager.cc b/net/third_party/quic/core/quic_sent_packet_manager.cc
index e057adadb..75775fb 100644
--- a/net/third_party/quic/core/quic_sent_packet_manager.cc
+++ b/net/third_party/quic/core/quic_sent_packet_manager.cc
@@ -1005,7 +1005,7 @@
     return;
   }
   unacked_packets_.CancelRetransmissionsForStream(stream_id);
-  PendingRetransmissionMap::iterator it = pending_retransmissions_.begin();
+  auto it = pending_retransmissions_.begin();
   while (it != pending_retransmissions_.end()) {
     if (unacked_packets_.HasRetransmittableFrames(it->first)) {
       ++it;
diff --git a/net/third_party/quic/core/quic_session.cc b/net/third_party/quic/core/quic_session.cc
index 17fd031..69587ef3 100644
--- a/net/third_party/quic/core/quic_session.cc
+++ b/net/third_party/quic/core/quic_session.cc
@@ -577,8 +577,7 @@
 void QuicSession::OnFinalByteOffsetReceived(
     QuicStreamId stream_id,
     QuicStreamOffset final_byte_offset) {
-  std::map<QuicStreamId, QuicStreamOffset>::iterator it =
-      locally_closed_streams_highest_offset_.find(stream_id);
+  auto it = locally_closed_streams_highest_offset_.find(stream_id);
   if (it == locally_closed_streams_highest_offset_.end()) {
     return;
   }
diff --git a/net/third_party/quic/core/quic_time_wait_list_manager.cc b/net/third_party/quic/core/quic_time_wait_list_manager.cc
index 00aa6d5..7723bef 100644
--- a/net/third_party/quic/core/quic_time_wait_list_manager.cc
+++ b/net/third_party/quic/core/quic_time_wait_list_manager.cc
@@ -99,7 +99,7 @@
   DCHECK(action != SEND_TERMINATION_PACKETS || termination_packets != nullptr);
   DCHECK(action != DO_NOTHING || ietf_quic);
   int num_packets = 0;
-  ConnectionIdMap::iterator it = connection_id_map_.find(connection_id);
+  auto it = connection_id_map_.find(connection_id);
   const bool new_connection_id = it == connection_id_map_.end();
   if (!new_connection_id) {  // Replace record if it is reinserted.
     num_packets = it->second.num_packets;
@@ -142,7 +142,7 @@
   QUIC_DLOG(INFO) << "Processing " << connection_id << " in time wait state.";
   // TODO(satyamshekhar): Think about handling packets from different client
   // addresses.
-  ConnectionIdMap::iterator it = connection_id_map_.find(connection_id);
+  auto it = connection_id_map_.find(connection_id);
   DCHECK(it != connection_id_map_.end());
   // Increment the received packet count.
   ConnectionIdData* connection_data = &it->second;
@@ -291,7 +291,7 @@
   if (connection_id_map_.empty()) {
     return false;
   }
-  ConnectionIdMap::iterator it = connection_id_map_.begin();
+  auto it = connection_id_map_.begin();
   QuicTime oldest_connection_id_time = it->second.time_added;
   if (oldest_connection_id_time > expiration_time) {
     // Too recent, don't retire.
diff --git a/net/third_party/quic/core/quic_unacked_packet_map.cc b/net/third_party/quic/core/quic_unacked_packet_map.cc
index a7b509d7f..c20ff865 100644
--- a/net/third_party/quic/core/quic_unacked_packet_map.cc
+++ b/net/third_party/quic/core/quic_unacked_packet_map.cc
@@ -286,8 +286,8 @@
     QuicStreamId stream_id) {
   DCHECK(!session_decides_what_to_write_);
   QuicPacketNumber packet_number = least_unacked_;
-  for (UnackedPacketMap::iterator it = unacked_packets_.begin();
-       it != unacked_packets_.end(); ++it, ++packet_number) {
+  for (auto it = unacked_packets_.begin(); it != unacked_packets_.end();
+       ++it, ++packet_number) {
     QuicFrames* frames = &it->retransmittable_frames;
     if (frames->empty()) {
       continue;
@@ -314,7 +314,7 @@
 }
 
 QuicTime QuicUnackedPacketMap::GetLastPacketSentTime() const {
-  UnackedPacketMap::const_reverse_iterator it = unacked_packets_.rbegin();
+  auto it = unacked_packets_.rbegin();
   while (it != unacked_packets_.rend()) {
     if (it->in_flight) {
       QUIC_BUG_IF(it->sent_time == QuicTime::Zero())
@@ -334,8 +334,8 @@
 size_t QuicUnackedPacketMap::GetNumUnackedPacketsDebugOnly() const {
   size_t unacked_packet_count = 0;
   QuicPacketNumber packet_number = least_unacked_;
-  for (UnackedPacketMap::const_iterator it = unacked_packets_.begin();
-       it != unacked_packets_.end(); ++it, ++packet_number) {
+  for (auto it = unacked_packets_.begin(); it != unacked_packets_.end();
+       ++it, ++packet_number) {
     if (!IsPacketUseless(packet_number, *it)) {
       ++unacked_packet_count;
     }
@@ -348,8 +348,8 @@
     return true;
   }
   size_t num_in_flight = 0;
-  for (UnackedPacketMap::const_reverse_iterator it = unacked_packets_.rbegin();
-       it != unacked_packets_.rend(); ++it) {
+  for (auto it = unacked_packets_.rbegin(); it != unacked_packets_.rend();
+       ++it) {
     if (it->in_flight) {
       ++num_in_flight;
     }
@@ -369,8 +369,8 @@
 
 bool QuicUnackedPacketMap::HasUnackedRetransmittableFrames() const {
   DCHECK(!GetQuicReloadableFlag(quic_optimize_inflight_check));
-  for (UnackedPacketMap::const_reverse_iterator it = unacked_packets_.rbegin();
-       it != unacked_packets_.rend(); ++it) {
+  for (auto it = unacked_packets_.rbegin(); it != unacked_packets_.rend();
+       ++it) {
     if (it->in_flight && HasRetransmittableFrames(*it)) {
       return true;
     }
diff --git a/net/third_party/quic/test_tools/crypto_test_utils.cc b/net/third_party/quic/test_tools/crypto_test_utils.cc
index c2cfd04e..47d13835 100644
--- a/net/third_party/quic/test_tools/crypto_test_utils.cc
+++ b/net/third_party/quic/test_tools/crypto_test_utils.cc
@@ -575,7 +575,7 @@
 }
 
 QuicString GetValueForTag(const CryptoHandshakeMessage& message, QuicTag tag) {
-  QuicTagValueMap::const_iterator it = message.tag_value_map().find(tag);
+  auto it = message.tag_value_map().find(tag);
   if (it == message.tag_value_map().end()) {
     return QuicString();
   }
diff --git a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
index 0a81732..754ef0a 100644
--- a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
+++ b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
@@ -183,7 +183,7 @@
     return QuicTime::Zero();
   }
   QuicReaderMutexLock lock(&config_mutex_);
-  DelayedPacketList::iterator iter = delayed_packets_.begin();
+  auto iter = delayed_packets_.begin();
   // Determine if we should re-order.
   if (delayed_packets_.size() > 1 && fake_packet_reorder_percentage_ > 0 &&
       simple_random_.RandUint64() % 100 <
diff --git a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
index 9347a72..52813e9d 100644
--- a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
+++ b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
@@ -147,8 +147,7 @@
 size_t QuicSentPacketManagerPeer::GetNumRetransmittablePackets(
     const QuicSentPacketManager* sent_packet_manager) {
   size_t num_unacked_packets = 0;
-  for (QuicUnackedPacketMap::const_iterator it =
-           sent_packet_manager->unacked_packets_.begin();
+  for (auto it = sent_packet_manager->unacked_packets_.begin();
        it != sent_packet_manager->unacked_packets_.end(); ++it) {
     if (sent_packet_manager->unacked_packets_.HasRetransmittableFrames(*it)) {
       ++num_unacked_packets;
diff --git a/net/third_party/spdy/core/hpack/hpack_header_table.cc b/net/third_party/spdy/core/hpack/hpack_header_table.cc
index c411b34..2cc28e2 100644
--- a/net/third_party/spdy/core/hpack/hpack_header_table.cc
+++ b/net/third_party/spdy/core/hpack/hpack_header_table.cc
@@ -62,7 +62,7 @@
 
 const HpackEntry* HpackHeaderTable::GetByName(SpdyStringPiece name) {
   {
-    NameToEntryMap::const_iterator it = static_name_index_.find(name);
+    auto it = static_name_index_.find(name);
     if (it != static_name_index_.end()) {
       return it->second;
     }
@@ -84,13 +84,13 @@
                                                       SpdyStringPiece value) {
   HpackEntry query(name, value);
   {
-    UnorderedEntrySet::const_iterator it = static_index_.find(&query);
+    auto it = static_index_.find(&query);
     if (it != static_index_.end()) {
       return *it;
     }
   }
   {
-    UnorderedEntrySet::const_iterator it = dynamic_index_.find(&query);
+    auto it = dynamic_index_.find(&query);
     if (it != dynamic_index_.end()) {
       const HpackEntry* result = *it;
       if (debug_visitor_ != nullptr) {
@@ -150,7 +150,7 @@
 
 size_t HpackHeaderTable::EvictionCountToReclaim(size_t reclaim_size) const {
   size_t count = 0;
-  for (EntryTable::const_reverse_iterator it = dynamic_entries_.rbegin();
+  for (auto it = dynamic_entries_.rbegin();
        it != dynamic_entries_.rend() && reclaim_size != 0; ++it, ++count) {
     reclaim_size -= std::min(reclaim_size, it->Size());
   }
@@ -163,7 +163,7 @@
     HpackEntry* entry = &dynamic_entries_.back();
 
     size_ -= entry->Size();
-    UnorderedEntrySet::iterator it = dynamic_index_.find(entry);
+    auto it = dynamic_index_.find(entry);
     DCHECK(it != dynamic_index_.end());
     // Only remove an entry from the index if its insertion index matches;
     // otherwise, the index refers to another entry with the same name and
@@ -171,7 +171,7 @@
     if ((*it)->InsertionIndex() == entry->InsertionIndex()) {
       dynamic_index_.erase(it);
     }
-    NameToEntryMap::iterator name_it = dynamic_name_index_.find(entry->name());
+    auto name_it = dynamic_name_index_.find(entry->name());
     DCHECK(name_it != dynamic_name_index_.end());
     // Only remove an entry from the literal index if its insertion index
     /// matches; otherwise, the index refers to another entry with the same
@@ -244,8 +244,7 @@
 
 void HpackHeaderTable::DebugLogTableState() const {
   DVLOG(2) << "Dynamic table:";
-  for (EntryTable::const_iterator it = dynamic_entries_.begin();
-       it != dynamic_entries_.end(); ++it) {
+  for (auto it = dynamic_entries_.begin(); it != dynamic_entries_.end(); ++it) {
     DVLOG(2) << "  " << it->GetDebugString();
   }
   DVLOG(2) << "Full Static Index:";
diff --git a/net/third_party/spdy/core/hpack/hpack_header_table_test.cc b/net/third_party/spdy/core/hpack/hpack_header_table_test.cc
index 09d129c..d7cb23f 100644
--- a/net/third_party/spdy/core/hpack/hpack_header_table_test.cc
+++ b/net/third_party/spdy/core/hpack/hpack_header_table_test.cc
@@ -101,8 +101,7 @@
   // Adds the given vector of entries to the given header table,
   // expecting no eviction to happen.
   void AddEntriesExpectNoEviction(const HpackEntryVector& entries) {
-    for (HpackEntryVector::const_iterator it = entries.begin();
-         it != entries.end(); ++it) {
+    for (auto it = entries.begin(); it != entries.end(); ++it) {
       HpackHeaderTable::EntryTable::iterator begin, end;
 
       table_.EvictionSet(it->name(), it->value(), &begin, &end);
@@ -338,8 +337,7 @@
       MakeEntriesOfTotalSize(kDefaultHeaderTableSizeSetting / 2);
   AddEntriesExpectNoEviction(entries);
 
-  for (HpackEntryVector::iterator it = entries.begin(); it != entries.end();
-       ++it) {
+  for (auto it = entries.begin(); it != entries.end(); ++it) {
     size_t expected_count = distance(it, entries.end());
     EXPECT_EQ(expected_count, peer_.dynamic_entries().size());
 
diff --git a/net/third_party/spdy/core/spdy_alt_svc_wire_format.cc b/net/third_party/spdy/core/spdy_alt_svc_wire_format.cc
index c19d855..2d5fd214 100644
--- a/net/third_party/spdy/core/spdy_alt_svc_wire_format.cc
+++ b/net/third_party/spdy/core/spdy_alt_svc_wire_format.cc
@@ -276,8 +276,8 @@
         }
       } else {
         value.append("; v=\"");
-        for (VersionVector::const_iterator it = altsvc.version.begin();
-             it != altsvc.version.end(); ++it) {
+        for (auto it = altsvc.version.begin(); it != altsvc.version.end();
+             ++it) {
           if (it != altsvc.version.begin()) {
             value.append(",");
           }
diff --git a/net/third_party/spdy/core/spdy_alt_svc_wire_format_test.cc b/net/third_party/spdy/core/spdy_alt_svc_wire_format_test.cc
index 9fa3e4f5..d2c54e8 100644
--- a/net/third_party/spdy/core/spdy_alt_svc_wire_format_test.cc
+++ b/net/third_party/spdy/core/spdy_alt_svc_wire_format_test.cc
@@ -319,10 +319,8 @@
   ASSERT_TRUE(SpdyAltSvcWireFormat::ParseHeaderFieldValue(
       expected_header_field_value, &parsed_altsvc_vector));
   ASSERT_EQ(altsvc_vector.size(), parsed_altsvc_vector.size());
-  SpdyAltSvcWireFormat::AlternativeServiceVector::iterator expected_it =
-      altsvc_vector.begin();
-  SpdyAltSvcWireFormat::AlternativeServiceVector::iterator parsed_it =
-      parsed_altsvc_vector.begin();
+  auto expected_it = altsvc_vector.begin();
+  auto parsed_it = parsed_altsvc_vector.begin();
   for (; expected_it != altsvc_vector.end(); ++expected_it, ++parsed_it) {
     EXPECT_EQ(expected_it->protocol_id, parsed_it->protocol_id);
     EXPECT_EQ(expected_it->host, parsed_it->host);
diff --git a/net/third_party/spdy/core/spdy_framer.cc b/net/third_party/spdy/core/spdy_framer.cc
index 1855910..9b84b79 100644
--- a/net/third_party/spdy/core/spdy_framer.cc
+++ b/net/third_party/spdy/core/spdy_framer.cc
@@ -503,8 +503,7 @@
   }
 
   DCHECK_EQ(kSettingsFrameMinimumSize, builder.length());
-  for (SettingsMap::const_iterator it = values->begin(); it != values->end();
-       ++it) {
+  for (auto it = values->begin(); it != values->end(); ++it) {
     int setting_id = it->first;
     DCHECK_GE(setting_id, 0);
     builder.WriteUInt16(static_cast<SpdySettingsId>(setting_id));
@@ -999,8 +998,7 @@
   }
 
   DCHECK_EQ(kSettingsFrameMinimumSize, builder.length());
-  for (SettingsMap::const_iterator it = values->begin(); it != values->end();
-       ++it) {
+  for (auto it = values->begin(); it != values->end(); ++it) {
     int setting_id = it->first;
     DCHECK_GE(setting_id, 0);
     ok = ok && builder.WriteUInt16(static_cast<SpdySettingsId>(setting_id)) &&
diff --git a/net/tools/epoll_server/epoll_server.cc b/net/tools/epoll_server/epoll_server.cc
index dda77431..8740b2a 100644
--- a/net/tools/epoll_server/epoll_server.cc
+++ b/net/tools/epoll_server/epoll_server.cc
@@ -112,7 +112,7 @@
 }
 
 void EpollServer::CleanupFDToCBMap() {
-  FDToCBMap::iterator cb_iter = cb_map_.begin();
+  auto cb_iter = cb_map_.begin();
   while (cb_iter != cb_map_.end()) {
     int fd = cb_iter->fd;
     CB* cb = cb_iter->cb;
@@ -132,9 +132,7 @@
 
   // Call OnShutdown() on alarms. Note that the structure of the loop
   // is similar to the structure of loop in the function HandleAlarms()
-  for (TimeToAlarmCBMap::iterator i = alarm_map_.begin();
-       i != alarm_map_.end();
-      ) {
+  for (auto i = alarm_map_.begin(); i != alarm_map_.end();) {
     // Note that OnShutdown() can call UnregisterAlarm() on
     // other iterators. OnShutdown() should not call UnregisterAlarm()
     // on self because by definition the iterator is not valid any more.
@@ -192,7 +190,7 @@
 void EpollServer::RegisterFD(int fd, CB* cb, int event_mask) {
   CHECK(cb);
   VLOG(3) << "RegisterFD fd=" << fd << " event_mask=" << event_mask;
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (cb_map_.end() != fd_i) {
     // do we just abort, or do we just unregister the other callback?
     // for now, lets just unregister the other callback.
@@ -266,7 +264,7 @@
 }
 
 void EpollServer::UnregisterFD(int fd) {
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (cb_map_.end() == fd_i || fd_i->cb == NULL) {
     // Doesn't exist in server, or has gone through UnregisterFD once and still
     // inside the callchain of OnEvent.
@@ -323,7 +321,7 @@
 #ifdef EPOLL_SERVER_EVENT_TRACING
   event_recorder_.RecordEpollEvent(fd, event_mask);
 #endif
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (fd_i == cb_map_.end() || fd_i->cb == NULL) {
     // Ignore the event.
     // This could occur if epoll() returns a set of events, and
@@ -395,7 +393,7 @@
 }
 
 void EpollServer::SetFDReady(int fd, int events_to_fake) {
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (cb_map_.end() != fd_i && fd_i->cb != NULL) {
     // This const_cast is necessary for LIST_HEAD_INSERT to work. Declaring
     // entry mutable is insufficient because LIST_HEAD_INSERT assigns the
@@ -416,14 +414,14 @@
 }
 
 void EpollServer::SetFDNotReady(int fd) {
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (cb_map_.end() != fd_i) {
     RemoveFromReadyList(*fd_i);
   }
 }
 
 bool EpollServer::IsFDReady(int fd) const {
-  FDToCBMap::const_iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   return (cb_map_.end() != fd_i &&
           fd_i->cb != NULL &&
           fd_i->entry.le_prev != NULL);
@@ -448,8 +446,7 @@
   }
   VLOG(4) << "RegisteringAlarm at : " << timeout_time_in_us;
 
-  TimeToAlarmCBMap::iterator alarm_iter =
-      alarm_map_.insert(std::make_pair(timeout_time_in_us, ac));
+  auto alarm_iter = alarm_map_.insert(std::make_pair(timeout_time_in_us, ac));
 
   all_alarms_.insert(ac);
   // Pass the iterator to the EpollAlarmCallbackInterface.
@@ -512,9 +509,7 @@
 
   // Log sessions with alarms.
   LOG(ERROR) << alarm_map_.size() << " alarms registered.";
-  for (TimeToAlarmCBMap::iterator it = alarm_map_.begin();
-       it != alarm_map_.end();
-       ++it) {
+  for (auto it = alarm_map_.begin(); it != alarm_map_.end(); ++it) {
     const bool skipped =
         alarms_reregistered_and_should_be_skipped_.find(it->second)
         != alarms_reregistered_and_should_be_skipped_.end();
@@ -523,9 +518,7 @@
   }
 
   LOG(ERROR) << cb_map_.size() << " fd callbacks registered.";
-  for (FDToCBMap::iterator it = cb_map_.begin();
-       it != cb_map_.end();
-       ++it) {
+  for (auto it = cb_map_.begin(); it != cb_map_.end(); ++it) {
     LOG(ERROR) << "fd: " << it->fd << " with mask " << it->event_mask
                << " registered with cb: " << it->cb;
   }
@@ -592,7 +585,7 @@
 ////////////////////////////////////////
 
 void EpollServer::ModifyFD(int fd, int remove_event, int add_event) {
-  FDToCBMap::iterator fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
+  auto fd_i = cb_map_.find(CBAndEventMask(NULL, 0, fd));
   if (cb_map_.end() == fd_i) {
     VLOG(2) << "Didn't find the fd " << fd << "in internal structures";
     return;
@@ -723,9 +716,7 @@
   TimeToAlarmCBMap::iterator erase_it;
 
   // execute alarms.
-  for (TimeToAlarmCBMap::iterator i = alarm_map_.begin();
-       i != alarm_map_.end();
-      ) {
+  for (auto i = alarm_map_.begin(); i != alarm_map_.end();) {
     if (i->first > now_in_us) {
       break;
     }
diff --git a/net/tools/huffman_trie/trie/trie_writer.cc b/net/tools/huffman_trie/trie/trie_writer.cc
index 6dc38eb..e510646 100644
--- a/net/tools/huffman_trie/trie/trie_writer.cc
+++ b/net/tools/huffman_trie/trie/trie_writer.cc
@@ -41,7 +41,7 @@
     }
 
     bool ok = true;
-    for (ReversedEntries::const_iterator it = start + 1; it != end; ++it) {
+    for (auto it = start + 1; it != end; ++it) {
       if (i > (*it)->reversed_name.size() ||
           (*it)->reversed_name.at(i) != candidate) {
         ok = false;
@@ -78,7 +78,7 @@
 void RemovePrefix(size_t length,
                   ReversedEntries::iterator start,
                   ReversedEntries::iterator end) {
-  for (ReversedEntries::iterator it = start; it != end; ++it) {
+  for (auto it = start; it != end; ++it) {
     (*it)->reversed_name.erase((*it)->reversed_name.begin(),
                                (*it)->reversed_name.begin() + length);
   }
@@ -142,7 +142,7 @@
 
   while (start != end) {
     uint8_t candidate = (*start)->reversed_name.at(0);
-    ReversedEntries::iterator sub_entries_end = start + 1;
+    auto sub_entries_end = start + 1;
 
     for (; sub_entries_end != end; sub_entries_end++) {
       if ((*sub_entries_end)->reversed_name.at(0) != candidate) {
diff --git a/net/tools/quic/quic_http_proxy_backend.cc b/net/tools/quic/quic_http_proxy_backend.cc
index 610c98f..e68e4ec 100644
--- a/net/tools/quic/quic_http_proxy_backend.cc
+++ b/net/tools/quic/quic_http_proxy_backend.cc
@@ -136,8 +136,7 @@
     base::AutoLock lock(backend_stream_mutex_);
     QuicHttpProxyBackendStream* proxy_backend_stream = nullptr;
 
-    ProxyBackendStreamMap::iterator it =
-        backend_stream_map_.find(quic_server_stream);
+    auto it = backend_stream_map_.find(quic_server_stream);
     if (it != backend_stream_map_.end()) {
       proxy_backend_stream = it->second.get();
       proxy_backend_stream->CancelRequest();
diff --git a/net/tools/quic/quic_http_proxy_backend_test.cc b/net/tools/quic/quic_http_proxy_backend_test.cc
index 7aa833b..9919535 100644
--- a/net/tools/quic/quic_http_proxy_backend_test.cc
+++ b/net/tools/quic/quic_http_proxy_backend_test.cc
@@ -110,8 +110,7 @@
 TEST_F(QuicHttpProxyBackendTest, CheckProxyStreamManager) {
   TestQuicServerStream quic_stream;
   SendRequestOverBackend(&quic_stream);
-  QuicHttpProxyBackend::ProxyBackendStreamMap::const_iterator it_find_success =
-      proxy_stream_map_->find(&quic_stream);
+  auto it_find_success = proxy_stream_map_->find(&quic_stream);
   EXPECT_NE(it_find_success, proxy_stream_map_->end());
 
   http_proxy_.CloseBackendResponseStream(&quic_stream);
diff --git a/net/tools/tld_cleanup/tld_cleanup_util.cc b/net/tools/tld_cleanup/tld_cleanup_util.cc
index 6ed431f..72db0a9 100644
--- a/net/tools/tld_cleanup/tld_cleanup_util.cc
+++ b/net/tools/tld_cleanup/tld_cleanup_util.cc
@@ -43,7 +43,7 @@
               "};\n"
               "%%\n");
 
-  for (RuleMap::const_iterator i = rules.begin(); i != rules.end(); ++i) {
+  for (auto i = rules.begin(); i != rules.end(); ++i) {
     data.append(i->first);
     data.append(", ");
     int type = 0;
diff --git a/net/tools/transport_security_state_generator/input_file_parsers_unittest.cc b/net/tools/transport_security_state_generator/input_file_parsers_unittest.cc
index babe915..4b5057cdc 100644
--- a/net/tools/transport_security_state_generator/input_file_parsers_unittest.cc
+++ b/net/tools/transport_security_state_generator/input_file_parsers_unittest.cc
@@ -61,7 +61,7 @@
   EXPECT_TRUE(ParseJSON(valid, &entries, &pinsets));
 
   ASSERT_EQ(1U, pinsets.size());
-  PinsetMap::const_iterator pinset = pinsets.pinsets().find("test");
+  auto pinset = pinsets.pinsets().find("test");
   ASSERT_NE(pinset, pinsets.pinsets().cend());
   EXPECT_EQ("test", pinset->second->name());
   EXPECT_EQ("https://hpkp-log.example.com", pinset->second->report_uri());
diff --git a/net/tools/transport_security_state_generator/transport_security_state_entry.cc b/net/tools/transport_security_state_generator/transport_security_state_entry.cc
index a1bbe6ed..2aa3cb4 100644
--- a/net/tools/transport_security_state_generator/transport_security_state_entry.cc
+++ b/net/tools/transport_security_state_generator/transport_security_state_entry.cc
@@ -62,7 +62,7 @@
   if (entry_->pinset.size()) {
     writer->WriteBit(1);
 
-    NameIDMap::const_iterator pin_id_it = pinsets_map_.find(entry_->pinset);
+    auto pin_id_it = pinsets_map_.find(entry_->pinset);
     if (pin_id_it == pinsets_map_.cend()) {
       return false;
     }
@@ -87,7 +87,7 @@
 
   if (entry_->expect_ct) {
     writer->WriteBit(1);
-    NameIDMap::const_iterator expect_ct_report_uri_it =
+    auto expect_ct_report_uri_it =
         expect_ct_report_uri_map_.find(entry_->expect_ct_report_uri);
     if (expect_ct_report_uri_it == expect_ct_report_uri_map_.cend()) {
       return false;
diff --git a/net/tools/transport_security_state_generator/transport_security_state_generator.cc b/net/tools/transport_security_state_generator/transport_security_state_generator.cc
index ce3e570..f6d95a8 100644
--- a/net/tools/transport_security_state_generator/transport_security_state_generator.cc
+++ b/net/tools/transport_security_state_generator/transport_security_state_generator.cc
@@ -46,7 +46,7 @@
 
     std::string hash =
         std::string(pin.second.data(), pin.second.data() + pin.second.size());
-    std::map<std::string, std::string>::iterator it = seen_hashes.find(hash);
+    auto it = seen_hashes.find(hash);
     if (it != seen_hashes.cend()) {
       LOG(ERROR) << "Duplicate pin hash for " << pin.first
                  << ", already seen as " << it->second;
diff --git a/net/url_request/test_url_fetcher_factory.cc b/net/url_request/test_url_fetcher_factory.cc
index 9efb2fb..916190f 100644
--- a/net/url_request/test_url_fetcher_factory.cc
+++ b/net/url_request/test_url_fetcher_factory.cc
@@ -350,12 +350,12 @@
 }
 
 TestURLFetcher* TestURLFetcherFactory::GetFetcherByID(int id) const {
-  Fetchers::const_iterator i = fetchers_.find(id);
+  auto i = fetchers_.find(id);
   return i == fetchers_.end() ? NULL : i->second;
 }
 
 void TestURLFetcherFactory::RemoveFetcherFromMap(int id) {
-  Fetchers::iterator i = fetchers_.find(id);
+  auto i = fetchers_.find(id);
   DCHECK(i != fetchers_.end());
   fetchers_.erase(i);
 }
diff --git a/net/url_request/test_url_request_interceptor.cc b/net/url_request/test_url_request_interceptor.cc
index 0fbd073..bf32386 100644
--- a/net/url_request/test_url_request_interceptor.cc
+++ b/net/url_request/test_url_request_interceptor.cc
@@ -104,7 +104,7 @@
       return NULL;
     }
 
-    ResponseMap::const_iterator it = responses_.find(request->url());
+    auto it = responses_.find(request->url());
     if (it == responses_.end()) {
       // Search for this request's url, ignoring any query parameters.
       GURL url = request->url();
diff --git a/net/url_request/url_request_filter.cc b/net/url_request/url_request_filter.cc
index 59641e3a..628a912 100644
--- a/net/url_request/url_request_filter.cc
+++ b/net/url_request/url_request_filter.cc
@@ -123,8 +123,7 @@
   const std::string scheme = request->url().scheme();
 
   {
-    HostnameInterceptorMap::const_iterator it =
-        hostname_interceptor_map_.find(make_pair(scheme, hostname));
+    auto it = hostname_interceptor_map_.find(make_pair(scheme, hostname));
     if (it != hostname_interceptor_map_.end())
       job = it->second->MaybeInterceptRequest(request, network_delegate);
   }
@@ -132,7 +131,7 @@
   if (!job) {
     // Not in the hostname map, check the url map.
     const std::string& url = request->url().spec();
-    URLInterceptorMap::const_iterator it = url_interceptor_map_.find(url);
+    auto it = url_interceptor_map_.find(url);
     if (it != url_interceptor_map_.end())
       job = it->second->MaybeInterceptRequest(request, network_delegate);
   }
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 7c98db2..e526507 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -1213,9 +1213,7 @@
     }
   }
 
-  for (std::vector<SourceStream::SourceType>::reverse_iterator r_iter =
-           types.rbegin();
-       r_iter != types.rend(); ++r_iter) {
+  for (auto r_iter = types.rbegin(); r_iter != types.rend(); ++r_iter) {
     std::unique_ptr<FilterSourceStream> downstream;
     SourceStream::SourceType type = *r_iter;
     switch (type) {
diff --git a/net/url_request/url_request_job_factory_impl.cc b/net/url_request/url_request_job_factory_impl.cc
index 61187634..c8f540ab 100644
--- a/net/url_request/url_request_job_factory_impl.cc
+++ b/net/url_request/url_request_job_factory_impl.cc
@@ -28,7 +28,7 @@
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
 
   if (!protocol_handler) {
-    ProtocolHandlerMap::iterator it = protocol_handler_map_.find(scheme);
+    auto it = protocol_handler_map_.find(scheme);
     if (it == protocol_handler_map_.end())
       return false;
 
@@ -54,7 +54,7 @@
       return job;
   }
 
-  ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find(scheme);
+  auto it = protocol_handler_map_.find(scheme);
   if (it == protocol_handler_map_.end())
     return NULL;
   return it->second->MaybeCreateJob(request, network_delegate);
@@ -87,8 +87,7 @@
     // Error cases are safely handled.
     return true;
   }
-  ProtocolHandlerMap::const_iterator it = protocol_handler_map_.find(
-      location.scheme());
+  auto it = protocol_handler_map_.find(location.scheme());
   if (it == protocol_handler_map_.end()) {
     // Unhandled cases are safely handled.
     return true;
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index e684c78..2e5d3fc 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -379,8 +379,7 @@
       add_header_to_first_response_(false) {}
 
 TestNetworkDelegate::~TestNetworkDelegate() {
-  for (std::map<int, int>::iterator i = next_states_.begin();
-       i != next_states_.end(); ++i) {
+  for (auto i = next_states_.begin(); i != next_states_.end(); ++i) {
     event_order_[i->first] += "~TestNetworkDelegate\n";
     EXPECT_TRUE(i->second & kStageDestruction) << event_order_[i->first];
   }
diff --git a/net/url_request/url_request_throttler_manager.cc b/net/url_request/url_request_throttler_manager.cc
index f9ad03c1..cf2b0c31 100644
--- a/net/url_request/url_request_throttler_manager.cc
+++ b/net/url_request/url_request_throttler_manager.cc
@@ -36,7 +36,7 @@
 
   // Since the manager object might conceivably go away before the
   // entries, detach the entries' back-pointer to the manager.
-  UrlEntryMap::iterator i = url_entries_.begin();
+  auto i = url_entries_.begin();
   while (i != url_entries_.end()) {
     if (i->second.get() != NULL) {
       i->second->DetachManager();
@@ -149,7 +149,7 @@
 }
 
 void URLRequestThrottlerManager::GarbageCollectEntries() {
-  UrlEntryMap::iterator i = url_entries_.begin();
+  auto i = url_entries_.begin();
   while (i != url_entries_.end()) {
     if ((i->second)->IsEntryOutdated()) {
       url_entries_.erase(i++);
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc
index d266a1f..48ff6698 100644
--- a/net/url_request/url_request_throttler_simulation_unittest.cc
+++ b/net/url_request/url_request_throttler_simulation_unittest.cc
@@ -95,15 +95,11 @@
     TimeTicks start_time = TimeTicks();
     TimeTicks now = start_time;
     while ((now - start_time) <= maximum_simulated_duration) {
-      for (std::vector<Actor*>::iterator it = actors_.begin();
-           it != actors_.end();
-           ++it) {
+      for (auto it = actors_.begin(); it != actors_.end(); ++it) {
         (*it)->AdvanceTime(now);
       }
 
-      for (std::vector<Actor*>::iterator it = actors_.begin();
-           it != actors_.end();
-           ++it) {
+      for (auto it = actors_.begin(); it != actors_.end(); ++it) {
         (*it)->PerformAction();
       }
 
diff --git a/services/device/bluetooth/BUILD.gn b/services/device/bluetooth/BUILD.gn
index 373e7b6..e598c5f 100644
--- a/services/device/bluetooth/BUILD.gn
+++ b/services/device/bluetooth/BUILD.gn
@@ -23,6 +23,8 @@
 
   deps = [
     "//base",
+    "//dbus",
+    "//device/bluetooth",
   ]
 }
 
@@ -35,6 +37,8 @@
 
   deps = [
     ":bluetooth_system",
+    "//dbus",
+    "//device/bluetooth",
     "//net",
     "//services/device:test_support",
     "//testing/gtest",
diff --git a/services/device/bluetooth/DEPS b/services/device/bluetooth/DEPS
new file mode 100644
index 0000000..18af175
--- /dev/null
+++ b/services/device/bluetooth/DEPS
@@ -0,0 +1,9 @@
+include_rules = [
+  "+dbus",
+]
+
+specific_include_rules = {
+  "bluetooth_system_unittest.cc": [
+    "+third_party/cros_system_api/dbus/service_constants.h"
+  ],
+}
diff --git a/services/device/bluetooth/bluetooth_system.cc b/services/device/bluetooth/bluetooth_system.cc
index 86ea59b..b13b82f 100644
--- a/services/device/bluetooth/bluetooth_system.cc
+++ b/services/device/bluetooth/bluetooth_system.cc
@@ -6,7 +6,11 @@
 
 #include <memory>
 #include <utility>
+#include <vector>
 
+#include "dbus/object_path.h"
+#include "device/bluetooth/dbus/bluetooth_adapter_client.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 
 namespace device {
@@ -23,4 +27,22 @@
 
 BluetoothSystem::~BluetoothSystem() = default;
 
+void BluetoothSystem::GetState(GetStateCallback callback) {
+  std::vector<dbus::ObjectPath> object_paths =
+      GetBluetoothAdapterClient()->GetAdapters();
+  if (object_paths.empty()) {
+    std::move(callback).Run(State::kUnavailable);
+    return;
+  }
+
+  // TODO(crbug.com/870192): Return the state based on the adapter's state.
+  std::move(callback).Run(State::kPoweredOff);
+}
+
+bluez::BluetoothAdapterClient* BluetoothSystem::GetBluetoothAdapterClient() {
+  // Use AlternateBluetoothAdapterClient to avoid interfering with users of the
+  // regular BluetoothAdapterClient.
+  return bluez::BluezDBusManager::Get()->GetAlternateBluetoothAdapterClient();
+}
+
 }  // namespace device
diff --git a/services/device/bluetooth/bluetooth_system.h b/services/device/bluetooth/bluetooth_system.h
index 99412f39..64703d5 100644
--- a/services/device/bluetooth/bluetooth_system.h
+++ b/services/device/bluetooth/bluetooth_system.h
@@ -8,6 +8,10 @@
 #include "base/macros.h"
 #include "services/device/public/mojom/bluetooth_system.mojom.h"
 
+namespace bluez {
+class BluetoothAdapterClient;
+}
+
 namespace device {
 
 class BluetoothSystem : public mojom::BluetoothSystem {
@@ -18,7 +22,12 @@
   explicit BluetoothSystem(mojom::BluetoothSystemClientPtr client);
   ~BluetoothSystem() override;
 
+  // mojom::BluetoothSystem
+  void GetState(GetStateCallback callback) override;
+
  private:
+  bluez::BluetoothAdapterClient* GetBluetoothAdapterClient();
+
   mojom::BluetoothSystemClientPtr client_ptr_;
 
   DISALLOW_COPY_AND_ASSIGN(BluetoothSystem);
diff --git a/services/device/bluetooth/bluetooth_system_unittest.cc b/services/device/bluetooth/bluetooth_system_unittest.cc
index 220499f6..6879364 100644
--- a/services/device/bluetooth/bluetooth_system_unittest.cc
+++ b/services/device/bluetooth/bluetooth_system_unittest.cc
@@ -6,14 +6,150 @@
 
 #include <utility>
 
+#include "base/observer_list.h"
 #include "base/run_loop.h"
+#include "base/strings/stringprintf.h"
+#include "device/bluetooth/dbus/bluetooth_adapter_client.h"
+#include "device/bluetooth/dbus/bluez_dbus_manager.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "services/device/device_service_test_base.h"
 #include "services/device/public/mojom/bluetooth_system.mojom.h"
 #include "services/device/public/mojom/constants.mojom.h"
+#include "third_party/cros_system_api/dbus/service_constants.h"
 
 namespace device {
 
+// Exposes high-level methods to simulate Bluetooth events e.g. a new adapter
+// was added, adapter power state changed, etc.
+//
+// As opposed to FakeBluetoothAdapterClient, the other fake implementation of
+// BluetoothAdapterClient, this class does not have any built-in behavior
+// e.g. it won't start triggering device discovery events when StartDiscovery is
+// called. It's up to its users to call the relevant Simulate*() method to
+// trigger each event.
+class DEVICE_BLUETOOTH_EXPORT TestBluetoothAdapterClient
+    : public bluez::BluetoothAdapterClient {
+ public:
+  struct Properties : public bluez::BluetoothAdapterClient::Properties {
+    explicit Properties(const PropertyChangedCallback& callback)
+        : BluetoothAdapterClient::Properties(
+              nullptr, /* object_proxy */
+              bluetooth_adapter::kBluetoothAdapterInterface,
+              callback) {}
+    ~Properties() override = default;
+
+    // dbus::PropertySet override
+    void Get(dbus::PropertyBase* property,
+             dbus::PropertySet::GetCallback callback) override {
+      DVLOG(1) << "Get " << property->name();
+      NOTIMPLEMENTED();
+    }
+
+    void GetAll() override {
+      DVLOG(1) << "GetAll";
+      NOTIMPLEMENTED();
+    }
+
+    void Set(dbus::PropertyBase* property,
+             dbus::PropertySet::SetCallback callback) override {
+      DVLOG(1) << "Set " << property->name();
+      NOTIMPLEMENTED();
+    }
+  };
+
+  TestBluetoothAdapterClient() = default;
+  ~TestBluetoothAdapterClient() override = default;
+
+  // Simulates a new adapter being added to the system.
+  void SimulateAdapterAdded() {
+    static int next_adapter_index = 0;
+    dbus::ObjectPath adapter_object_path(
+        base::StringPrintf("fake/hci%d", next_adapter_index++));
+
+    DCHECK(!base::ContainsValue(adapter_object_paths_, adapter_object_path));
+    adapter_object_paths_.push_back(adapter_object_path);
+  }
+
+  // BluetoothAdapterClient:
+  void Init(dbus::Bus* bus,
+            const std::string& bluetooth_service_name) override {}
+
+  void AddObserver(Observer* observer) override {
+    observers_.AddObserver(observer);
+  }
+
+  void RemoveObserver(Observer* observer) override {
+    observers_.RemoveObserver(observer);
+  }
+
+  std::vector<dbus::ObjectPath> GetAdapters() override {
+    return std::vector<dbus::ObjectPath>(adapter_object_paths_.begin(),
+                                         adapter_object_paths_.end());
+  }
+
+  Properties* GetProperties(const dbus::ObjectPath& object_path) override {
+    NOTIMPLEMENTED();
+    return nullptr;
+  }
+
+  void StartDiscovery(const dbus::ObjectPath& object_path,
+                      const base::Closure& callback,
+                      ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void StopDiscovery(const dbus::ObjectPath& object_path,
+                     const base::Closure& callback,
+                     ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void PauseDiscovery(const dbus::ObjectPath& object_path,
+                      const base::Closure& callback,
+                      ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void UnpauseDiscovery(const dbus::ObjectPath& object_path,
+                        const base::Closure& callback,
+                        ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void RemoveDevice(const dbus::ObjectPath& object_path,
+                    const dbus::ObjectPath& device_path,
+                    const base::Closure& callback,
+                    ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void SetDiscoveryFilter(const dbus::ObjectPath& object_path,
+                          const DiscoveryFilter& discovery_filter,
+                          const base::Closure& callback,
+                          ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void CreateServiceRecord(const dbus::ObjectPath& object_path,
+                           const bluez::BluetoothServiceRecordBlueZ& record,
+                           const ServiceRecordCallback& callback,
+                           ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+  void RemoveServiceRecord(const dbus::ObjectPath& object_path,
+                           uint32_t handle,
+                           const base::Closure& callback,
+                           ErrorCallback error_callback) override {
+    NOTIMPLEMENTED();
+  }
+
+ private:
+  std::vector<dbus::ObjectPath> adapter_object_paths_;
+
+  base::ObserverList<Observer>::Unchecked observers_;
+};
+
 class BluetoothSystemTest : public DeviceServiceTestBase,
                             public mojom::BluetoothSystemClient {
  public:
@@ -23,11 +159,43 @@
   void SetUp() override {
     DeviceServiceTestBase::SetUp();
     connector()->BindInterface(mojom::kServiceName, &system_factory_);
+
+    auto test_bluetooth_adapter_client =
+        std::make_unique<TestBluetoothAdapterClient>();
+    test_bluetooth_adapter_client_ = test_bluetooth_adapter_client.get();
+
+    std::unique_ptr<bluez::BluezDBusManagerSetter> dbus_setter =
+        bluez::BluezDBusManager::GetSetterForTesting();
+    dbus_setter->SetAlternateBluetoothAdapterClient(
+        std::move(test_bluetooth_adapter_client));
+  }
+
+  void StateCallback(base::OnceClosure quit_closure,
+                     mojom::BluetoothSystem::State state) {
+    last_state_ = state;
+    std::move(quit_closure).Run();
   }
 
  protected:
+  mojom::BluetoothSystemPtr CreateBluetoothSystem() {
+    mojom::BluetoothSystemClientPtr client_ptr;
+    system_client_binding_.Bind(mojo::MakeRequest(&client_ptr));
+
+    mojom::BluetoothSystemPtr system_ptr;
+    system_factory_->Create(mojo::MakeRequest(&system_ptr),
+                            std::move(client_ptr));
+    return system_ptr;
+  }
+
+  // Saves the last state passed to StateCallback.
+  base::Optional<mojom::BluetoothSystem::State> last_state_;
+
   mojom::BluetoothSystemFactoryPtr system_factory_;
 
+  TestBluetoothAdapterClient* test_bluetooth_adapter_client_;
+
+  mojo::Binding<mojom::BluetoothSystemClient> system_client_binding_{this};
+
  private:
   DISALLOW_COPY_AND_ASSIGN(BluetoothSystemTest);
 };
@@ -50,4 +218,30 @@
   EXPECT_TRUE(system_ptr.is_bound());
 }
 
+TEST_F(BluetoothSystemTest, GetState_NoAdapter) {
+  auto system = CreateBluetoothSystem();
+
+  base::RunLoop run_loop;
+  system->GetState(base::BindOnce(&BluetoothSystemTest::StateCallback,
+                                  base::Unretained(this),
+                                  run_loop.QuitClosure()));
+  run_loop.Run();
+
+  EXPECT_EQ(mojom::BluetoothSystem::State::kUnavailable, last_state_.value());
+}
+
+TEST_F(BluetoothSystemTest, GetState_PoweredOffAdapter) {
+  auto system = CreateBluetoothSystem();
+
+  test_bluetooth_adapter_client_->SimulateAdapterAdded();
+
+  base::RunLoop run_loop;
+  system->GetState(base::BindOnce(&BluetoothSystemTest::StateCallback,
+                                  base::Unretained(this),
+                                  run_loop.QuitClosure()));
+  run_loop.Run();
+
+  EXPECT_EQ(mojom::BluetoothSystem::State::kPoweredOff, last_state_.value());
+}
+
 }  // namespace device
diff --git a/services/device/public/mojom/bluetooth_system.mojom b/services/device/public/mojom/bluetooth_system.mojom
index fb890036..1523efd 100644
--- a/services/device/public/mojom/bluetooth_system.mojom
+++ b/services/device/public/mojom/bluetooth_system.mojom
@@ -34,6 +34,7 @@
     kPoweredOn,
   };
 
+  GetState() => (State state);
 };
 
 // Interface used by clients of BluetoothSystem to get notified of events
diff --git a/storage/browser/blob/blob_impl.cc b/storage/browser/blob/blob_impl.cc
index 903a5607..da4e65a3 100644
--- a/storage/browser/blob/blob_impl.cc
+++ b/storage/browser/blob/blob_impl.cc
@@ -4,8 +4,10 @@
 
 #include "storage/browser/blob/blob_impl.h"
 
+#include <limits>
 #include <memory>
 #include <utility>
+#include <vector>
 
 #include "net/base/io_buffer.h"
 #include "net/disk_cache/disk_cache.h"
@@ -108,7 +110,10 @@
                          mojo::ScopedDataPipeProducerHandle handle,
                          blink::mojom::BlobReaderClientPtr client) {
   MojoBlobReader::Create(
-      handle_.get(), net::HttpByteRange::Bounded(offset, offset + length - 1),
+      handle_.get(),
+      (length == std::numeric_limits<uint64_t>::max())
+          ? net::HttpByteRange::RightUnbounded(offset)
+          : net::HttpByteRange::Bounded(offset, offset + length - 1),
       std::make_unique<ReaderDelegate>(std::move(handle), std::move(client)));
 }
 
diff --git a/storage/browser/blob/blob_impl_unittest.cc b/storage/browser/blob/blob_impl_unittest.cc
index 3295c4e..8d9536b 100644
--- a/storage/browser/blob/blob_impl_unittest.cc
+++ b/storage/browser/blob/blob_impl_unittest.cc
@@ -4,7 +4,10 @@
 
 #include "storage/browser/blob/blob_impl.h"
 
+#include <limits>
 #include <memory>
+#include <string>
+#include <utility>
 
 #include "base/run_loop.h"
 #include "base/task/post_task.h"
@@ -281,6 +284,36 @@
   EXPECT_EQ(kContents.size() - 2, client.data_length_);
 }
 
+TEST_F(BlobImplTest, ReadRange_UnboundedLength) {
+  const std::string kId = "id";
+  const std::string kContents = "hello world";
+  auto handle = CreateBlobFromString(kId, kContents);
+
+  blink::mojom::BlobPtr ptr;
+  BlobImpl::Create(std::move(handle), MakeRequest(&ptr));
+
+  MockBlobReaderClient client;
+  blink::mojom::BlobReaderClientPtr client_ptr;
+  mojo::Binding<blink::mojom::BlobReaderClient> client_binding(
+      &client, MakeRequest(&client_ptr));
+
+  mojo::DataPipe pipe;
+  ptr->ReadRange(2, std::numeric_limits<uint64_t>::max(),
+                 std::move(pipe.producer_handle), std::move(client_ptr));
+
+  std::string received = ReadDataPipe(std::move(pipe.consumer_handle));
+  EXPECT_EQ(kContents.substr(2, kContents.size()), received);
+
+  client_binding.FlushForTesting();
+  EXPECT_TRUE(client.calculated_size_);
+  EXPECT_EQ(kContents.size(), client.total_size_);
+  EXPECT_EQ(kContents.size() - 2, client.expected_content_size_);
+
+  EXPECT_TRUE(client.completed_);
+  EXPECT_EQ(net::OK, client.status_);
+  EXPECT_EQ(kContents.size() - 2, client.data_length_);
+}
+
 TEST_F(BlobImplTest, ReadRange_BrokenBlob) {
   const std::string kId = "id";
   auto handle = context_->AddBrokenBlob(
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json
index 388dc78..c3dd504 100644
--- a/testing/buildbot/chromium.android.json
+++ b/testing/buildbot/chromium.android.json
@@ -544,51 +544,6 @@
     ]
   },
   "Android WebView L (dbg)": {
-    "gtest_tests": [
-      {
-        "args": [
-          "--gs-results-bucket=chromium-result-details",
-          "--recover-devices"
-        ],
-        "merge": {
-          "args": [
-            "--bucket",
-            "chromium-result-details",
-            "--test-name",
-            "system_webview_shell_layout_test_apk"
-          ],
-          "script": "//build/android/pylib/results/presentation/test_results_presentation.py"
-        },
-        "swarming": {
-          "can_use_on_swarming_builders": true,
-          "cipd_packages": [
-            {
-              "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
-              "location": "bin",
-              "revision": "git_revision:ff387eadf445b24c935f1cf7d6ddd279f8a6b04c"
-            }
-          ],
-          "dimension_sets": [
-            {
-              "device_os": "LMY47I",
-              "device_type": "hammerhead",
-              "os": "Android"
-            }
-          ],
-          "output_links": [
-            {
-              "link": [
-                "https://luci-logdog.appspot.com/v/?s",
-                "=android%2Fswarming%2Flogcats%2F",
-                "${TASK_ID}%2F%2B%2Funified_logcats"
-              ],
-              "name": "shard #${SHARD_INDEX} logcats"
-            }
-          ]
-        },
-        "test": "system_webview_shell_layout_test_apk"
-      }
-    ],
     "isolated_scripts": [
       {
         "isolate_name": "webview_cts_tests",
diff --git a/testing/buildbot/chromium.mac.json b/testing/buildbot/chromium.mac.json
index 7ce1e63..ad7731ce 100644
--- a/testing/buildbot/chromium.mac.json
+++ b/testing/buildbot/chromium.mac.json
@@ -5763,6 +5763,36 @@
       }
     ]
   },
+  "WebKit Mac10.13 (retina)": {
+    "isolated_scripts": [
+      {
+        "args": [
+          "--num-retries=3"
+        ],
+        "isolate_name": "webkit_layout_tests_exparchive",
+        "merge": {
+          "args": [
+            "--verbose"
+          ],
+          "script": "//third_party/blink/tools/merge_web_test_results.py"
+        },
+        "name": "webkit_layout_tests",
+        "results_handler": "layout tests",
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "gpu": "1002:6821",
+              "hidpi": "1",
+              "os": "Mac-10.13.6",
+              "pool": "Chrome-GPU"
+            }
+          ],
+          "shards": 12
+        }
+      }
+    ]
+  },
   "mac-jumbo-rel": {
     "additional_compile_targets": [
       "all"
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl
index d2121b80..4bf33da1 100644
--- a/testing/buildbot/gn_isolate_map.pyl
+++ b/testing/buildbot/gn_isolate_map.pyl
@@ -1375,12 +1375,20 @@
   "webview_cts_tests": {
     "label": "//android_webview/test:webview_cts_tests",
     "type": "script",
-    "script": "//android_webview/tools/run_cts.py",
+    "script": "//third_party/catapult/devil/devil/android/tools/system_app.py",
     "args": [
+      "remove",
+      "--package",
+      "com.android.webview",
+      "com.google.android.webview",
+      "com.android.chrome",
+      "-v",
+      "--",
+      "../../android_webview/tools/run_cts.py",
       "--skip-expected-failures",
       "--additional-apk",
       "apks/SystemWebView.apk"
-    ]
+    ],
   },
   "webkit_python_tests": {
     "label": "//:webkit_python_tests",
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl
index bf257a7..b46f47f 100644
--- a/testing/buildbot/waterfalls.pyl
+++ b/testing/buildbot/waterfalls.pyl
@@ -141,7 +141,6 @@
       },
       'Android WebView L (dbg)': {
         'test_suites': {
-          'gtest_tests': 'system_webview_shell_instrumentation_tests',
           'isolated_scripts': 'webview_cts_tests_isolated_scripts',
         },
         'swarming': {
@@ -3225,6 +3224,21 @@
           'isolated_scripts': 'chromium_dbg_isolated_scripts',
         },
       },
+      'WebKit Mac10.13 (retina)': {
+        'test_suites': {
+          'isolated_scripts': 'chromium_webkit_isolated_scripts',
+        },
+        'swarming': {
+          'dimension_sets': [
+            {
+              'gpu': '1002:6821',
+              'hidpi': '1',
+              'os': 'Mac-10.13.6',
+              'pool': 'Chrome-GPU',
+            }
+          ],
+        },
+      },
       'mac-jumbo-rel': {
         'additional_compile_targets': [
           'all'
@@ -3419,6 +3433,8 @@
           'isolated_scripts': 'chromium_webkit_isolated_scripts',
         },
       },
+      # TODO(vadimsh): This builder is in chromium.mac on LUCI, see
+      # crbug.com/864817.
       'WebKit Mac10.13 (retina)': {
         'test_suites': {
           'isolated_scripts': 'chromium_webkit_isolated_scripts',
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index b474050..750ca67 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -2440,6 +2440,21 @@
             ]
         }
     ],
+    "MacV2Sandbox": [
+        {
+            "platforms": [
+                "mac"
+            ],
+            "experiments": [
+                {
+                    "name": "Enabled",
+                    "enable_features": [
+                        "MacV2Sandbox"
+                    ]
+                }
+            ]
+        }
+    ],
     "MediaFoundationH264Encoding": [
         {
             "platforms": [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index b79c1d6..19f2a1e6 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -190,6 +190,8 @@
 crbug.com/591099 external/wpt/css/css-writing-modes/vertical-alignment-003.xht [ Pass ]
 crbug.com/591099 external/wpt/css/css-writing-modes/vertical-alignment-009.xht [ Pass ]
 crbug.com/591099 external/wpt/css/cssom/cssstyledeclaration-mutationrecord-001.html [ Pass ]
+crbug.com/591099 external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html [ Pass ]
+crbug.com/591099 external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html [ Pass ]
 crbug.com/591099 external/wpt/css/cssom-view/offsetTopLeftInline.html [ Pass ]
 crbug.com/591099 external/wpt/css/selectors/selector-placeholder-shown-type-change-001.html [ Pass ]
 crbug.com/591099 external/wpt/css/selectors/selector-read-write-type-change-002.html [ Pass ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 2696bf6..a94b1f6 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -419,6 +419,8 @@
 crbug.com/845902 external/wpt/css/css-sizing/whitespace-and-break.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-sizing/intrinsic-percent-non-replaced-004.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-sizing/intrinsic-percent-non-replaced-005.html [ Failure ]
+crbug.com/591099 external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html [ Failure ]
+crbug.com/591099 external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html [ Failure ]
 crbug.com/591099 external/wpt/css/cssom-view/offsetTopLeftInline.html [ Failure ]
 crbug.com/591099 tables/mozilla/bugs/bug14159-1.html [ Failure ]
 
@@ -4659,6 +4661,7 @@
 crbug.com/806249 external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html [ Failure ]
 crbug.com/806249 external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html [ Failure ]
 crbug.com/806249 external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html [ Failure ]
+crbug.com/806249 external/wpt/feature-policy/reporting/picture-in-picture-reporting.html [ Failure ]
 crbug.com/806249 media/picture-in-picture/controls/picture-in-picture-button.html [ Failure ]
 crbug.com/806249 media/picture-in-picture/controls/picture-in-picture-video-with-audio-only-button.html [ Failure ]
 crbug.com/806249 media/picture-in-picture/picture-in-picture-enabled.html [ Failure ]
@@ -4668,6 +4671,7 @@
 crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy-attribute.https.sub.html [ Failure ]
 crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-allowed-by-feature-policy.https.sub.html [ Failure ]
 crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/picture-in-picture-default-feature-policy.https.sub.html [ Failure ]
+crbug.com/806249 virtual/unified-autoplay/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html [ Failure ]
 crbug.com/806249 virtual/video-surface-layer/external/wpt/html/semantics/embedded-content/media-elements/autoplay-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html [ Skip ]
 crbug.com/806249 virtual/video-surface-layer/external/wpt/html/semantics/embedded-content/media-elements/autoplay-default-feature-policy.https.sub.html [ Skip ]
 crbug.com/806249 virtual/video-surface-layer/external/wpt/html/semantics/embedded-content/media-elements/autoplay-disabled-by-feature-policy.https.sub.html [ Skip ]
@@ -4687,7 +4691,7 @@
 crbug.com/803774 http/tests/loading/sxg/ [ Skip ]
 
 # Prefetching Signed Exchange DevTools tests are flaky.
-crbug.com/851363 virtual/sxg/http/tests/devtools/sxg/sxg-prefetch-expired.js [ Pass Failure ]
+crbug.com/851363 virtual/sxg/http/tests/devtools/sxg/sxg-prefetch-fail.js [ Pass Failure ]
 crbug.com/851363 virtual/sxg/http/tests/devtools/sxg/sxg-prefetch.js [ Pass Failure ]
 
 # Sheriff 2018-03-22
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
index 6a8329a..7ec1a9a 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST_5.json
@@ -150420,6 +150420,11 @@
      {}
     ]
    ],
+   "feature-policy/reporting/encrypted-media-reporting.https.html.headers": [
+    [
+     {}
+    ]
+   ],
    "feature-policy/reporting/fullscreen-reporting.html.headers": [
     [
      {}
@@ -150450,6 +150455,11 @@
      {}
     ]
    ],
+   "feature-policy/reporting/picture-in-picture-reporting.html.headers": [
+    [
+     {}
+    ]
+   ],
    "feature-policy/reporting/sync-xhr-reporting.html.headers": [
     [
      {}
@@ -176755,11 +176765,6 @@
      {}
     ]
    ],
-   "wake-lock/wakelock-type.https-expected.txt": [
-    [
-     {}
-    ]
-   ],
    "wasm/META.yml": [
     [
      {}
@@ -206616,6 +206621,42 @@
      {}
     ]
    ],
+   "css/cssom-view/getClientRects-br-htb-ltr.html": [
+    [
+     "/css/cssom-view/getClientRects-br-htb-ltr.html",
+     {}
+    ]
+   ],
+   "css/cssom-view/getClientRects-br-htb-rtl.html": [
+    [
+     "/css/cssom-view/getClientRects-br-htb-rtl.html",
+     {}
+    ]
+   ],
+   "css/cssom-view/getClientRects-br-vlr-ltr.html": [
+    [
+     "/css/cssom-view/getClientRects-br-vlr-ltr.html",
+     {}
+    ]
+   ],
+   "css/cssom-view/getClientRects-br-vlr-rtl.html": [
+    [
+     "/css/cssom-view/getClientRects-br-vlr-rtl.html",
+     {}
+    ]
+   ],
+   "css/cssom-view/getClientRects-br-vrl-ltr.html": [
+    [
+     "/css/cssom-view/getClientRects-br-vrl-ltr.html",
+     {}
+    ]
+   ],
+   "css/cssom-view/getClientRects-br-vrl-rtl.html": [
+    [
+     "/css/cssom-view/getClientRects-br-vrl-rtl.html",
+     {}
+    ]
+   ],
    "css/cssom-view/historical.html": [
     [
      "/css/cssom-view/historical.html",
@@ -220258,6 +220299,12 @@
      {}
     ]
    ],
+   "feature-policy/reporting/encrypted-media-reporting.https.html": [
+    [
+     "/feature-policy/reporting/encrypted-media-reporting.https.html",
+     {}
+    ]
+   ],
    "feature-policy/reporting/fullscreen-reporting.html": [
     [
      "/feature-policy/reporting/fullscreen-reporting.html",
@@ -220288,6 +220335,14 @@
      {}
     ]
    ],
+   "feature-policy/reporting/picture-in-picture-reporting.html": [
+    [
+     "/feature-policy/reporting/picture-in-picture-reporting.html",
+     {
+      "testdriver": true
+     }
+    ]
+   ],
    "feature-policy/reporting/sync-xhr-reporting.html": [
     [
      "/feature-policy/reporting/sync-xhr-reporting.html",
@@ -289308,11 +289363,11 @@
    "testharness"
   ],
   "background-fetch/fetch.https.window-expected.txt": [
-   "8066dd23d555ca290cf54306cfd9e4c261812686",
+   "2bfe031299445374ab357cedd73908da265f1321",
    "support"
   ],
   "background-fetch/fetch.https.window.js": [
-   "b8b1ff0983cdce1c799d03c7f1856548fa649b17",
+   "77297186ca456148c94ce3375434673aa54a90de",
    "testharness"
   ],
   "background-fetch/get-ids.https.window.js": [
@@ -359379,6 +359434,30 @@
    "bf883a1423a150a49fa3170014308a6252365810",
    "testharness"
   ],
+  "css/cssom-view/getClientRects-br-htb-ltr.html": [
+   "e952d61b677164c3b5d49799c80063174120307f",
+   "testharness"
+  ],
+  "css/cssom-view/getClientRects-br-htb-rtl.html": [
+   "24dbc929a693de66dc59dcde39c0001204f91439",
+   "testharness"
+  ],
+  "css/cssom-view/getClientRects-br-vlr-ltr.html": [
+   "b324342d64b9f9026ca80cd7a78a2adbeb3404b7",
+   "testharness"
+  ],
+  "css/cssom-view/getClientRects-br-vlr-rtl.html": [
+   "3a36f9730615b0b1160b9abd78c99bbfa84370c3",
+   "testharness"
+  ],
+  "css/cssom-view/getClientRects-br-vrl-ltr.html": [
+   "c0be872a0f86931d401901378c5943289040251f",
+   "testharness"
+  ],
+  "css/cssom-view/getClientRects-br-vrl-rtl.html": [
+   "c5a3062cf495fdb5061951c4184156d90ff056d5",
+   "testharness"
+  ],
   "css/cssom-view/getClientRects-inline.html": [
    "415e34a6f0430e08441ee32b3f7c0ca8cd11a692",
    "reftest"
@@ -361020,7 +361099,7 @@
    "testharness"
   ],
   "css/selectors/focus-visible-009.html": [
-   "c7d682baa4377fd9ccb5857437f172d782d90824",
+   "4dae6407adac3971db6064822643332cf7f1722d",
    "testharness"
   ],
   "css/selectors/focus-visible-010.html": [
@@ -373387,6 +373466,14 @@
    "57102d5ee7c072e433fa44c0c13521573b32f469",
    "support"
   ],
+  "feature-policy/reporting/encrypted-media-reporting.https.html": [
+   "d309d5390f1ec5f6f3edd00327e9a36b54926499",
+   "testharness"
+  ],
+  "feature-policy/reporting/encrypted-media-reporting.https.html.headers": [
+   "73753a2e41d10b0a0398831350b1f17e586ab847",
+   "support"
+  ],
   "feature-policy/reporting/fullscreen-reporting.html": [
    "83d97c91fab60e593cf3bf0cceff4db80552ef02",
    "testharness"
@@ -373431,6 +373518,14 @@
    "a2836778bc5389fdb65e9f6d5f83c7967200866f",
    "support"
   ],
+  "feature-policy/reporting/picture-in-picture-reporting.html": [
+   "a8a998ed2a15af10ffa6dba02273bc8d0b2d5eb4",
+   "testharness"
+  ],
+  "feature-policy/reporting/picture-in-picture-reporting.html.headers": [
+   "1759381fdc4141302f1b95868550ead76d9f5ca7",
+   "support"
+  ],
   "feature-policy/reporting/sync-xhr-reporting.html": [
    "2c76390847be29c5bb2f3ec8605d1cb746c33e00",
    "testharness"
@@ -380136,11 +380231,11 @@
    "testharness"
   ],
   "html/dom/elements/the-innertext-idl-attribute/getter-expected.txt": [
-   "db065e18a32ae585b6d6cb2f3c8771bd436d98c4",
+   "2da312e1cc840d64d4bdfc8ac0db621a3c940c97",
    "support"
   ],
   "html/dom/elements/the-innertext-idl-attribute/getter-tests.js": [
-   "8adce5b215e6cb539d615c8c6b3d86b6967fa580",
+   "1195656a2a497b73a5da83580dd3a44d54f511ac",
    "support"
   ],
   "html/dom/elements/the-innertext-idl-attribute/getter.html": [
@@ -396404,7 +396499,7 @@
    "support"
   ],
   "interfaces/webrtc.idl": [
-   "c4ca910d6d18bf8c8d817c76deacb03a74cef59e",
+   "cdeb5204e6a0b5735948b94d5e30931bc2fd062e",
    "support"
   ],
   "interfaces/webusb.idl": [
@@ -426587,10 +426682,6 @@
    "98cebe01c1126e0ebdc26784e15e9a057d1a03fb",
    "testharness"
   ],
-  "wake-lock/wakelock-type.https-expected.txt": [
-   "4b361c2b2242aec768e07b059c56591fb852179c",
-   "support"
-  ],
   "wake-lock/wakelock-type.https.html": [
    "2f9e1242614d57a79b2aada32cdd3d2cb3ae012d",
    "testharness"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-ltr.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-ltr.html
new file mode 100644
index 0000000..5d6f92f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-rtl.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-rtl.html
new file mode 100644
index 0000000..3ff7f01
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-htb-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:horizontal-tb; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html
new file mode 100644
index 0000000..c22c005
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html
new file mode 100644
index 0000000..e8e600a
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vlr-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-lr; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(15, 200);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html
new file mode 100644
index 0000000..598d41e4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-ltr.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:ltr;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 15);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html
new file mode 100644
index 0000000..4d93bf5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/elementsFromPoint-inline-vrl-rtl.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/cssom-view-1/#extensions-to-the-document-interface">
+<div id="container" style="width:200px; height:200px; writing-mode:vertical-rl; direction:rtl;">
+  <span id="target">target</span>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+  test(()=> {
+      var elements = document.elementsFromPoint(200, 200);
+      assert_equals(elements.length, 4);
+      assert_equals(elements[0].id, "target");
+      assert_equals(elements[1].id, "container");
+      assert_equals(elements[2].nodeName, "BODY");
+      assert_equals(elements[3].nodeName, "HTML");
+  }, "elementsFromPoint should return all elements under a point");
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-009.html b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-009.html
index c7d682ba..4dae6407 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-009.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/selectors/focus-visible-009.html
@@ -33,7 +33,7 @@
       }));
 
       // Handle the case where the button is focused before the test runs.
-     if (document.activeButtonement === button) {
+     if (document.activeElement === button) {
         assert_equals(getComputedStyle(button).outlineColor, "rgb(0, 100, 0)");
         t.done();
      }
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html
new file mode 100644
index 0000000..d309d53
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script src='/resources/testharness.js'></script>
+    <script src='/resources/testharnessreport.js'></script>
+  </head>
+  <body>
+    <script>
+var check_report_format = (reports, observer) => {
+  let report = reports[0];
+  assert_equals(report.type, "feature-policy");
+  assert_equals(report.url, document.location.href);
+  assert_equals(report.body.feature, "encrypted-media");
+  assert_equals(report.body.sourceFile, document.location.href);
+  assert_equals(typeof report.body.message, "string");
+  assert_equals(typeof report.body.lineNumber, "number");
+  assert_equals(typeof report.body.columnNumber, "number");
+};
+
+promise_test(async t => {
+  const report = new Promise(resolve => {
+    new ReportingObserver((reports, observer) => resolve([reports, observer]),
+                          {types: ['feature-policy']}).observe();
+  });
+  await promise_rejects(t, "SecurityError",
+    navigator.requestMediaKeySystemAccess("org.w3.clearkey",
+      [{
+        initDataTypes: ["webm"],
+        videoCapabilities: [{contentType: 'video/webm;codecs="vp8"'}],
+      }]),
+      "requestMediaKeySystemAccess() should not be allowed in this document.");
+  const [reports, observer] = await report;
+  check_report_format(reports, observer);
+}, "Encrypted Media report format");
+    </script>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html.headers b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html.headers
new file mode 100644
index 0000000..73753a2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/encrypted-media-reporting.https.html.headers
@@ -0,0 +1 @@
+Feature-Policy: encrypted-media 'none'
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html
new file mode 100644
index 0000000..a8a998e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <script src='/resources/testharness.js'></script>
+    <script src='/resources/testharnessreport.js'></script>
+    <script src="/resources/testdriver.js"></script>
+    <script src="/resources/testdriver-vendor.js"></script>
+  </head>
+  <body>
+    <script>
+const check_report_format = (reports, observer) => {
+  const report = reports[0];
+  assert_equals(report.type, "feature-policy");
+  assert_equals(report.url, document.location.href);
+  assert_equals(report.body.feature, "picture-in-picture");
+  assert_equals(report.body.sourceFile, document.location.href);
+  assert_equals(typeof report.body.message, "string");
+  assert_equals(typeof report.body.lineNumber, "number");
+  assert_equals(typeof report.body.columnNumber, "number");
+};
+
+const loadVideo = () => new Promise(resolve => {
+    const video = document.createElement('video');
+    video.src = '/media/movie_5.ogv';
+    video.addEventListener('loadedmetadata', () => {
+      resolve(video);
+    }, { once: true });
+});
+
+promise_test(async (t) => {
+  const report = new Promise(resolve => {
+    new ReportingObserver((reports, observer) => resolve([reports, observer]),
+                          {types: ['feature-policy']}).observe();
+  });
+  const videoElement = await loadVideo();
+  await test_driver.bless('picture-in-picture');
+  await promise_rejects(t, 'SecurityError', videoElement.requestPictureInPicture(),
+                        "Picture-in-Picture should not be allowed in this document.");
+  const [reports, observer] = await report;
+  check_report_format(reports, observer);
+}, "Picture-in-Picture Report Format");
+    </script>
+  </body>
+</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html.headers b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html.headers
new file mode 100644
index 0000000..1759381f
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/feature-policy/reporting/picture-in-picture-reporting.html.headers
@@ -0,0 +1 @@
+Feature-Policy: picture-in-picture 'none'
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
index db065e1..2da312e 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
@@ -1,5 +1,5 @@
 This is a testharness.js-based test.
-Found 217 tests; 214 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 218 tests; 215 PASS, 3 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS Simplest possible test ("<div>abc")
 PASS Leading whitespace removed ("<div> abc")
 PASS Trailing whitespace removed ("<div>abc ")
@@ -8,6 +8,7 @@
 PASS \r converted to space ("<div>abc\rdef")
 PASS \t converted to space ("<div>abc\tdef")
 PASS Trailing whitespace before hard line break removed ("<div>abc <br>def")
+PASS Leading whitespace after hard line break removed ("<div>abc<br> def")
 PASS Leading whitespace preserved ("<pre> abc")
 PASS Trailing whitespace preserved ("<pre>abc ")
 PASS Internal whitespace preserved ("<pre>abc  def")
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-tests.js b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
index 8adce5b2..1195656 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
@@ -9,6 +9,7 @@
 testText("<div>abc\rdef", "abc def", "\\r converted to space");
 testText("<div>abc\tdef", "abc def", "\\t converted to space");
 testText("<div>abc <br>def", "abc\ndef", "Trailing whitespace before hard line break removed");
+testText("<div>abc<br> def", "abc\ndef", "Leading whitespace after hard line break removed");
 
 /**** <pre> ****/
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/onerroreventhandler-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/onerroreventhandler-expected.txt
deleted file mode 100644
index 6d7a7f2..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/events/onerroreventhandler-expected.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is a testharness.js-based test.
-FAIL onerror + ErrorEvent + Window assert_equals: expected 5 but got 1
-FAIL onerror + !ErrorEvent + Window assert_equals: expected 5 but got 1
-PASS onerror + Document
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url-expected.txt
deleted file mode 100644
index 7069faa..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-data-url-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL <body onerror> - compile error in <script src=data:...> assert_equals: first arg expected "string" but got "object"
-FAIL <body onerror> - compile error in <script src=data:...> (column) assert_equals: fourth arg expected "number" but got "undefined"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-expected.txt
deleted file mode 100644
index 8087429..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-compile-error-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL <body onerror> - compile error in <script> assert_equals: first arg expected "string" but got "object"
-FAIL <body onerror> - compile error in <script> (column) assert_equals: fourth arg expected "number" but got "undefined"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error-expected.txt
deleted file mode 100644
index 7a55daf..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/html/webappapis/scripting/processing-model-2/body-onerror-runtime-error-expected.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-This is a testharness.js-based test.
-FAIL <body onerror> - runtime error in <script> assert_equals: first arg expected "string" but got "object"
-FAIL <body onerror> - runtime error in <script> (column) assert_equals: fourth arg expected "number" but got "undefined"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl
index c4ca910..cdeb520 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl
+++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webrtc.idl
@@ -520,6 +520,7 @@
     readonly        attribute RTCPriorityType priority;
     readonly        attribute RTCDataChannelState readyState;
     readonly        attribute unsigned long bufferedAmount;
+                    [EnforceRange]
                     attribute unsigned long bufferedAmountLowThreshold;
                     attribute EventHandler onopen;
                     attribute EventHandler onbufferedamountlow;
@@ -536,7 +537,9 @@
 
 dictionary RTCDataChannelInit {
              boolean ordered = true;
+             [EnforceRange]
              unsigned short maxPacketLifeTime;
+             [EnforceRange]
              unsigned short maxRetransmits;
              USVString protocol = "";
              boolean negotiated = false;
diff --git a/third_party/WebKit/LayoutTests/external/wpt/svg/interfaces-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/svg/interfaces-expected.txt
deleted file mode 100644
index 4e71ea45..0000000
--- a/third_party/WebKit/LayoutTests/external/wpt/svg/interfaces-expected.txt
+++ /dev/null
@@ -1,3022 +0,0 @@
-This is a testharness.js-based test.
-Found 3018 tests; 2936 PASS, 82 FAIL, 0 TIMEOUT, 0 NOTRUN.
-PASS Partial interface Document: original interface defined
-PASS Document interface: attribute rootElement
-PASS Unscopable handled correctly for rootElement property on Document
-PASS SVGElement interface: existence and properties of interface object
-PASS SVGElement interface object length
-PASS SVGElement interface object name
-PASS SVGElement interface: existence and properties of interface prototype object
-PASS SVGElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGElement interface: attribute className
-PASS Unscopable handled correctly for className property on SVGElement
-PASS SVGElement interface: attribute dataset
-PASS Unscopable handled correctly for dataset property on SVGElement
-PASS SVGElement interface: attribute ownerSVGElement
-PASS Unscopable handled correctly for ownerSVGElement property on SVGElement
-PASS SVGElement interface: attribute viewportElement
-PASS Unscopable handled correctly for viewportElement property on SVGElement
-PASS SVGElement interface: attribute tabIndex
-PASS Unscopable handled correctly for tabIndex property on SVGElement
-PASS SVGElement interface: operation focus()
-PASS Unscopable handled correctly for focus() on SVGElement
-PASS SVGElement interface: operation blur()
-PASS Unscopable handled correctly for blur() on SVGElement
-PASS SVGGraphicsElement interface: existence and properties of interface object
-PASS SVGGraphicsElement interface object length
-PASS SVGGraphicsElement interface object name
-PASS SVGGraphicsElement interface: existence and properties of interface prototype object
-PASS SVGGraphicsElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGGraphicsElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGGraphicsElement interface: attribute transform
-PASS Unscopable handled correctly for transform property on SVGGraphicsElement
-PASS SVGGraphicsElement interface: operation getBBox(SVGBoundingBoxOptions)
-PASS Unscopable handled correctly for getBBox(SVGBoundingBoxOptions) on SVGGraphicsElement
-PASS SVGGraphicsElement interface: operation getCTM()
-PASS Unscopable handled correctly for getCTM() on SVGGraphicsElement
-PASS SVGGraphicsElement interface: operation getScreenCTM()
-PASS Unscopable handled correctly for getScreenCTM() on SVGGraphicsElement
-PASS SVGGraphicsElement interface: attribute requiredExtensions
-PASS Unscopable handled correctly for requiredExtensions property on SVGGraphicsElement
-PASS SVGGraphicsElement interface: attribute systemLanguage
-PASS Unscopable handled correctly for systemLanguage property on SVGGraphicsElement
-PASS SVGGeometryElement interface: existence and properties of interface object
-PASS SVGGeometryElement interface object length
-PASS SVGGeometryElement interface object name
-PASS SVGGeometryElement interface: existence and properties of interface prototype object
-PASS SVGGeometryElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGGeometryElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGGeometryElement interface: attribute pathLength
-PASS Unscopable handled correctly for pathLength property on SVGGeometryElement
-PASS SVGGeometryElement interface: operation isPointInFill(DOMPoint)
-PASS Unscopable handled correctly for isPointInFill(DOMPoint) on SVGGeometryElement
-PASS SVGGeometryElement interface: operation isPointInStroke(DOMPoint)
-PASS Unscopable handled correctly for isPointInStroke(DOMPoint) on SVGGeometryElement
-PASS SVGGeometryElement interface: operation getTotalLength()
-PASS Unscopable handled correctly for getTotalLength() on SVGGeometryElement
-PASS SVGGeometryElement interface: operation getPointAtLength(float)
-PASS Unscopable handled correctly for getPointAtLength(float) on SVGGeometryElement
-PASS SVGNumber interface: existence and properties of interface object
-PASS SVGNumber interface object length
-PASS SVGNumber interface object name
-PASS SVGNumber interface: existence and properties of interface prototype object
-PASS SVGNumber interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGNumber interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGNumber interface: attribute value
-PASS Unscopable handled correctly for value property on SVGNumber
-PASS SVGNumber must be primary interface of svg.createSVGNumber()
-PASS Stringification of svg.createSVGNumber()
-PASS SVGNumber interface: svg.createSVGNumber() must inherit property "value" with the proper type
-PASS SVGLength interface: existence and properties of interface object
-PASS SVGLength interface object length
-PASS SVGLength interface object name
-PASS SVGLength interface: existence and properties of interface prototype object
-PASS SVGLength interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGLength interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGLength interface: constant SVG_LENGTHTYPE_UNKNOWN on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_UNKNOWN on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_NUMBER on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_NUMBER on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PERCENTAGE on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PERCENTAGE on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_EMS on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_EMS on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_EXS on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_EXS on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PX on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PX on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_CM on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_CM on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_MM on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_MM on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_IN on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_IN on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PT on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PT on interface prototype object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PC on interface object
-PASS SVGLength interface: constant SVG_LENGTHTYPE_PC on interface prototype object
-PASS SVGLength interface: attribute unitType
-PASS Unscopable handled correctly for unitType property on SVGLength
-PASS SVGLength interface: attribute value
-PASS Unscopable handled correctly for value property on SVGLength
-PASS SVGLength interface: attribute valueInSpecifiedUnits
-PASS Unscopable handled correctly for valueInSpecifiedUnits property on SVGLength
-PASS SVGLength interface: attribute valueAsString
-PASS Unscopable handled correctly for valueAsString property on SVGLength
-PASS SVGLength interface: operation newValueSpecifiedUnits(unsigned short, float)
-PASS Unscopable handled correctly for newValueSpecifiedUnits(unsigned short, float) on SVGLength
-PASS SVGLength interface: operation convertToSpecifiedUnits(unsigned short)
-PASS Unscopable handled correctly for convertToSpecifiedUnits(unsigned short) on SVGLength
-PASS SVGLength must be primary interface of svg.createSVGLength()
-PASS Stringification of svg.createSVGLength()
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_UNKNOWN" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_NUMBER" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_PERCENTAGE" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_EMS" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_EXS" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_PX" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_CM" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_MM" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_IN" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_PT" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "SVG_LENGTHTYPE_PC" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "unitType" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "value" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "valueInSpecifiedUnits" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "valueAsString" with the proper type
-PASS SVGLength interface: svg.createSVGLength() must inherit property "newValueSpecifiedUnits(unsigned short, float)" with the proper type
-PASS SVGLength interface: calling newValueSpecifiedUnits(unsigned short, float) on svg.createSVGLength() with too few arguments must throw TypeError
-PASS SVGLength interface: svg.createSVGLength() must inherit property "convertToSpecifiedUnits(unsigned short)" with the proper type
-PASS SVGLength interface: calling convertToSpecifiedUnits(unsigned short) on svg.createSVGLength() with too few arguments must throw TypeError
-PASS SVGAngle interface: existence and properties of interface object
-PASS SVGAngle interface object length
-PASS SVGAngle interface object name
-PASS SVGAngle interface: existence and properties of interface prototype object
-PASS SVGAngle interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAngle interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAngle interface: constant SVG_ANGLETYPE_UNKNOWN on interface object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_UNKNOWN on interface prototype object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_UNSPECIFIED on interface object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_UNSPECIFIED on interface prototype object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_DEG on interface object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_DEG on interface prototype object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_RAD on interface object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_RAD on interface prototype object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_GRAD on interface object
-PASS SVGAngle interface: constant SVG_ANGLETYPE_GRAD on interface prototype object
-PASS SVGAngle interface: attribute unitType
-PASS Unscopable handled correctly for unitType property on SVGAngle
-PASS SVGAngle interface: attribute value
-PASS Unscopable handled correctly for value property on SVGAngle
-PASS SVGAngle interface: attribute valueInSpecifiedUnits
-PASS Unscopable handled correctly for valueInSpecifiedUnits property on SVGAngle
-PASS SVGAngle interface: attribute valueAsString
-PASS Unscopable handled correctly for valueAsString property on SVGAngle
-PASS SVGAngle interface: operation newValueSpecifiedUnits(unsigned short, float)
-PASS Unscopable handled correctly for newValueSpecifiedUnits(unsigned short, float) on SVGAngle
-PASS SVGAngle interface: operation convertToSpecifiedUnits(unsigned short)
-PASS Unscopable handled correctly for convertToSpecifiedUnits(unsigned short) on SVGAngle
-PASS SVGAngle must be primary interface of svg.createSVGAngle()
-PASS Stringification of svg.createSVGAngle()
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "SVG_ANGLETYPE_UNKNOWN" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "SVG_ANGLETYPE_UNSPECIFIED" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "SVG_ANGLETYPE_DEG" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "SVG_ANGLETYPE_RAD" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "SVG_ANGLETYPE_GRAD" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "unitType" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "value" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "valueInSpecifiedUnits" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "valueAsString" with the proper type
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "newValueSpecifiedUnits(unsigned short, float)" with the proper type
-PASS SVGAngle interface: calling newValueSpecifiedUnits(unsigned short, float) on svg.createSVGAngle() with too few arguments must throw TypeError
-PASS SVGAngle interface: svg.createSVGAngle() must inherit property "convertToSpecifiedUnits(unsigned short)" with the proper type
-PASS SVGAngle interface: calling convertToSpecifiedUnits(unsigned short) on svg.createSVGAngle() with too few arguments must throw TypeError
-PASS SVGNumberList interface: existence and properties of interface object
-PASS SVGNumberList interface object length
-PASS SVGNumberList interface object name
-PASS SVGNumberList interface: existence and properties of interface prototype object
-PASS SVGNumberList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGNumberList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGNumberList interface: attribute length
-PASS Unscopable handled correctly for length property on SVGNumberList
-PASS SVGNumberList interface: attribute numberOfItems
-PASS Unscopable handled correctly for numberOfItems property on SVGNumberList
-PASS SVGNumberList interface: operation clear()
-PASS Unscopable handled correctly for clear() on SVGNumberList
-PASS SVGNumberList interface: operation initialize(SVGNumber)
-PASS Unscopable handled correctly for initialize(SVGNumber) on SVGNumberList
-PASS SVGNumberList interface: operation getItem(unsigned long)
-PASS Unscopable handled correctly for getItem(unsigned long) on SVGNumberList
-PASS SVGNumberList interface: operation insertItemBefore(SVGNumber, unsigned long)
-PASS Unscopable handled correctly for insertItemBefore(SVGNumber, unsigned long) on SVGNumberList
-PASS SVGNumberList interface: operation replaceItem(SVGNumber, unsigned long)
-PASS Unscopable handled correctly for replaceItem(SVGNumber, unsigned long) on SVGNumberList
-PASS SVGNumberList interface: operation removeItem(unsigned long)
-PASS Unscopable handled correctly for removeItem(unsigned long) on SVGNumberList
-PASS SVGNumberList interface: operation appendItem(SVGNumber)
-PASS Unscopable handled correctly for appendItem(SVGNumber) on SVGNumberList
-PASS SVGNumberList must be primary interface of text.rotate.baseVal
-PASS Stringification of text.rotate.baseVal
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "length" with the proper type
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "numberOfItems" with the proper type
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "clear()" with the proper type
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "initialize(SVGNumber)" with the proper type
-PASS SVGNumberList interface: calling initialize(SVGNumber) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "getItem(unsigned long)" with the proper type
-PASS SVGNumberList interface: calling getItem(unsigned long) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "insertItemBefore(SVGNumber, unsigned long)" with the proper type
-PASS SVGNumberList interface: calling insertItemBefore(SVGNumber, unsigned long) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "replaceItem(SVGNumber, unsigned long)" with the proper type
-PASS SVGNumberList interface: calling replaceItem(SVGNumber, unsigned long) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "removeItem(unsigned long)" with the proper type
-PASS SVGNumberList interface: calling removeItem(unsigned long) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGNumberList interface: text.rotate.baseVal must inherit property "appendItem(SVGNumber)" with the proper type
-PASS SVGNumberList interface: calling appendItem(SVGNumber) on text.rotate.baseVal with too few arguments must throw TypeError
-PASS SVGLengthList interface: existence and properties of interface object
-PASS SVGLengthList interface object length
-PASS SVGLengthList interface object name
-PASS SVGLengthList interface: existence and properties of interface prototype object
-PASS SVGLengthList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGLengthList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGLengthList interface: attribute length
-PASS Unscopable handled correctly for length property on SVGLengthList
-PASS SVGLengthList interface: attribute numberOfItems
-PASS Unscopable handled correctly for numberOfItems property on SVGLengthList
-PASS SVGLengthList interface: operation clear()
-PASS Unscopable handled correctly for clear() on SVGLengthList
-PASS SVGLengthList interface: operation initialize(SVGLength)
-PASS Unscopable handled correctly for initialize(SVGLength) on SVGLengthList
-PASS SVGLengthList interface: operation getItem(unsigned long)
-PASS Unscopable handled correctly for getItem(unsigned long) on SVGLengthList
-PASS SVGLengthList interface: operation insertItemBefore(SVGLength, unsigned long)
-PASS Unscopable handled correctly for insertItemBefore(SVGLength, unsigned long) on SVGLengthList
-PASS SVGLengthList interface: operation replaceItem(SVGLength, unsigned long)
-PASS Unscopable handled correctly for replaceItem(SVGLength, unsigned long) on SVGLengthList
-PASS SVGLengthList interface: operation removeItem(unsigned long)
-PASS Unscopable handled correctly for removeItem(unsigned long) on SVGLengthList
-PASS SVGLengthList interface: operation appendItem(SVGLength)
-PASS Unscopable handled correctly for appendItem(SVGLength) on SVGLengthList
-PASS SVGAnimatedBoolean interface: existence and properties of interface object
-PASS SVGAnimatedBoolean interface object length
-PASS SVGAnimatedBoolean interface object name
-PASS SVGAnimatedBoolean interface: existence and properties of interface prototype object
-PASS SVGAnimatedBoolean interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedBoolean interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedBoolean interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedBoolean
-PASS SVGAnimatedBoolean interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedBoolean
-PASS SVGAnimatedBoolean must be primary interface of feConvolveMatrix.preserveAlpha
-PASS Stringification of feConvolveMatrix.preserveAlpha
-PASS SVGAnimatedBoolean interface: feConvolveMatrix.preserveAlpha must inherit property "baseVal" with the proper type
-PASS SVGAnimatedBoolean interface: feConvolveMatrix.preserveAlpha must inherit property "animVal" with the proper type
-PASS SVGAnimatedEnumeration interface: existence and properties of interface object
-PASS SVGAnimatedEnumeration interface object length
-PASS SVGAnimatedEnumeration interface object name
-PASS SVGAnimatedEnumeration interface: existence and properties of interface prototype object
-PASS SVGAnimatedEnumeration interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedEnumeration interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedEnumeration interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedEnumeration
-PASS SVGAnimatedEnumeration interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedEnumeration
-PASS SVGAnimatedEnumeration must be primary interface of text.lengthAdjust
-PASS Stringification of text.lengthAdjust
-PASS SVGAnimatedEnumeration interface: text.lengthAdjust must inherit property "baseVal" with the proper type
-PASS SVGAnimatedEnumeration interface: text.lengthAdjust must inherit property "animVal" with the proper type
-PASS SVGAnimatedInteger interface: existence and properties of interface object
-PASS SVGAnimatedInteger interface object length
-PASS SVGAnimatedInteger interface object name
-PASS SVGAnimatedInteger interface: existence and properties of interface prototype object
-PASS SVGAnimatedInteger interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedInteger interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedInteger interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedInteger
-PASS SVGAnimatedInteger interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedInteger
-PASS SVGAnimatedInteger must be primary interface of feConvolveMatrix.orderX
-PASS Stringification of feConvolveMatrix.orderX
-PASS SVGAnimatedInteger interface: feConvolveMatrix.orderX must inherit property "baseVal" with the proper type
-PASS SVGAnimatedInteger interface: feConvolveMatrix.orderX must inherit property "animVal" with the proper type
-PASS SVGAnimatedNumber interface: existence and properties of interface object
-PASS SVGAnimatedNumber interface object length
-PASS SVGAnimatedNumber interface object name
-PASS SVGAnimatedNumber interface: existence and properties of interface prototype object
-PASS SVGAnimatedNumber interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedNumber interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedNumber interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedNumber
-PASS SVGAnimatedNumber interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedNumber
-PASS SVGAnimatedNumber must be primary interface of stop.offset
-PASS Stringification of stop.offset
-PASS SVGAnimatedNumber interface: stop.offset must inherit property "baseVal" with the proper type
-PASS SVGAnimatedNumber interface: stop.offset must inherit property "animVal" with the proper type
-PASS SVGAnimatedLength interface: existence and properties of interface object
-PASS SVGAnimatedLength interface object length
-PASS SVGAnimatedLength interface object name
-PASS SVGAnimatedLength interface: existence and properties of interface prototype object
-PASS SVGAnimatedLength interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedLength interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedLength interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedLength
-PASS SVGAnimatedLength interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedLength
-PASS SVGAnimatedLength must be primary interface of svg.x
-PASS Stringification of svg.x
-PASS SVGAnimatedLength interface: svg.x must inherit property "baseVal" with the proper type
-PASS SVGAnimatedLength interface: svg.x must inherit property "animVal" with the proper type
-PASS SVGAnimatedAngle interface: existence and properties of interface object
-PASS SVGAnimatedAngle interface object length
-PASS SVGAnimatedAngle interface object name
-PASS SVGAnimatedAngle interface: existence and properties of interface prototype object
-PASS SVGAnimatedAngle interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedAngle interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedAngle interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedAngle
-PASS SVGAnimatedAngle interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedAngle
-PASS SVGAnimatedAngle must be primary interface of marker.orientAngle
-PASS Stringification of marker.orientAngle
-PASS SVGAnimatedAngle interface: marker.orientAngle must inherit property "baseVal" with the proper type
-PASS SVGAnimatedAngle interface: marker.orientAngle must inherit property "animVal" with the proper type
-PASS SVGAnimatedString interface: existence and properties of interface object
-PASS SVGAnimatedString interface object length
-PASS SVGAnimatedString interface object name
-PASS SVGAnimatedString interface: existence and properties of interface prototype object
-PASS SVGAnimatedString interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedString interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedString interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedString
-PASS SVGAnimatedString interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedString
-PASS SVGAnimatedString must be primary interface of a.target
-PASS Stringification of a.target
-PASS SVGAnimatedString interface: a.target must inherit property "baseVal" with the proper type
-PASS SVGAnimatedString interface: a.target must inherit property "animVal" with the proper type
-PASS SVGAnimatedRect interface: existence and properties of interface object
-PASS SVGAnimatedRect interface object length
-PASS SVGAnimatedRect interface object name
-PASS SVGAnimatedRect interface: existence and properties of interface prototype object
-PASS SVGAnimatedRect interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedRect interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedRect interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedRect
-PASS SVGAnimatedRect interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedRect
-PASS SVGAnimatedRect must be primary interface of svg.viewBox
-PASS Stringification of svg.viewBox
-FAIL SVGAnimatedRect interface: svg.viewBox must inherit property "baseVal" with the proper type assert_true: instanceof DOMRect expected true got false
-FAIL SVGAnimatedRect interface: svg.viewBox must inherit property "animVal" with the proper type assert_true: instanceof DOMRectReadOnly expected true got false
-PASS SVGAnimatedNumberList interface: existence and properties of interface object
-PASS SVGAnimatedNumberList interface object length
-PASS SVGAnimatedNumberList interface object name
-PASS SVGAnimatedNumberList interface: existence and properties of interface prototype object
-PASS SVGAnimatedNumberList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedNumberList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedNumberList interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedNumberList
-PASS SVGAnimatedNumberList interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedNumberList
-PASS SVGAnimatedNumberList must be primary interface of text.rotate
-PASS Stringification of text.rotate
-PASS SVGAnimatedNumberList interface: text.rotate must inherit property "baseVal" with the proper type
-PASS SVGAnimatedNumberList interface: text.rotate must inherit property "animVal" with the proper type
-PASS SVGAnimatedLengthList interface: existence and properties of interface object
-PASS SVGAnimatedLengthList interface object length
-PASS SVGAnimatedLengthList interface object name
-PASS SVGAnimatedLengthList interface: existence and properties of interface prototype object
-PASS SVGAnimatedLengthList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedLengthList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedLengthList interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedLengthList
-PASS SVGAnimatedLengthList interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedLengthList
-PASS SVGAnimatedLengthList must be primary interface of text.x
-PASS Stringification of text.x
-PASS SVGAnimatedLengthList interface: text.x must inherit property "baseVal" with the proper type
-PASS SVGAnimatedLengthList interface: text.x must inherit property "animVal" with the proper type
-PASS SVGStringList interface: existence and properties of interface object
-PASS SVGStringList interface object length
-PASS SVGStringList interface object name
-PASS SVGStringList interface: existence and properties of interface prototype object
-PASS SVGStringList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGStringList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGStringList interface: attribute length
-PASS Unscopable handled correctly for length property on SVGStringList
-PASS SVGStringList interface: attribute numberOfItems
-PASS Unscopable handled correctly for numberOfItems property on SVGStringList
-PASS SVGStringList interface: operation clear()
-PASS Unscopable handled correctly for clear() on SVGStringList
-PASS SVGStringList interface: operation initialize(DOMString)
-PASS Unscopable handled correctly for initialize(DOMString) on SVGStringList
-PASS SVGStringList interface: operation getItem(unsigned long)
-PASS Unscopable handled correctly for getItem(unsigned long) on SVGStringList
-PASS SVGStringList interface: operation insertItemBefore(DOMString, unsigned long)
-PASS Unscopable handled correctly for insertItemBefore(DOMString, unsigned long) on SVGStringList
-PASS SVGStringList interface: operation replaceItem(DOMString, unsigned long)
-PASS Unscopable handled correctly for replaceItem(DOMString, unsigned long) on SVGStringList
-PASS SVGStringList interface: operation removeItem(unsigned long)
-PASS Unscopable handled correctly for removeItem(unsigned long) on SVGStringList
-PASS SVGStringList interface: operation appendItem(DOMString)
-PASS Unscopable handled correctly for appendItem(DOMString) on SVGStringList
-PASS SVGStringList must be primary interface of a.requiredExtensions
-PASS Stringification of a.requiredExtensions
-PASS SVGStringList interface: a.requiredExtensions must inherit property "length" with the proper type
-PASS SVGStringList interface: a.requiredExtensions must inherit property "numberOfItems" with the proper type
-PASS SVGStringList interface: a.requiredExtensions must inherit property "clear()" with the proper type
-PASS SVGStringList interface: a.requiredExtensions must inherit property "initialize(DOMString)" with the proper type
-PASS SVGStringList interface: calling initialize(DOMString) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGStringList interface: a.requiredExtensions must inherit property "getItem(unsigned long)" with the proper type
-PASS SVGStringList interface: calling getItem(unsigned long) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGStringList interface: a.requiredExtensions must inherit property "insertItemBefore(DOMString, unsigned long)" with the proper type
-PASS SVGStringList interface: calling insertItemBefore(DOMString, unsigned long) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGStringList interface: a.requiredExtensions must inherit property "replaceItem(DOMString, unsigned long)" with the proper type
-PASS SVGStringList interface: calling replaceItem(DOMString, unsigned long) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGStringList interface: a.requiredExtensions must inherit property "removeItem(unsigned long)" with the proper type
-PASS SVGStringList interface: calling removeItem(unsigned long) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGStringList interface: a.requiredExtensions must inherit property "appendItem(DOMString)" with the proper type
-PASS SVGStringList interface: calling appendItem(DOMString) on a.requiredExtensions with too few arguments must throw TypeError
-PASS SVGUnitTypes interface: existence and properties of interface object
-PASS SVGUnitTypes interface object length
-PASS SVGUnitTypes interface object name
-PASS SVGUnitTypes interface: existence and properties of interface prototype object
-PASS SVGUnitTypes interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGUnitTypes interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_UNKNOWN on interface object
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_UNKNOWN on interface prototype object
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_USERSPACEONUSE on interface object
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_USERSPACEONUSE on interface prototype object
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_OBJECTBOUNDINGBOX on interface object
-PASS SVGUnitTypes interface: constant SVG_UNIT_TYPE_OBJECTBOUNDINGBOX on interface prototype object
-PASS SVGSVGElement interface: existence and properties of interface object
-PASS SVGSVGElement interface object length
-PASS SVGSVGElement interface object name
-PASS SVGSVGElement interface: existence and properties of interface prototype object
-PASS SVGSVGElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGSVGElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGSVGElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGSVGElement
-PASS SVGSVGElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGSVGElement
-PASS SVGSVGElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGSVGElement
-PASS SVGSVGElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGSVGElement
-PASS SVGSVGElement interface: attribute currentScale
-PASS Unscopable handled correctly for currentScale property on SVGSVGElement
-PASS SVGSVGElement interface: attribute currentTranslate
-PASS Unscopable handled correctly for currentTranslate property on SVGSVGElement
-PASS SVGSVGElement interface: operation getIntersectionList(DOMRectReadOnly, SVGElement)
-PASS Unscopable handled correctly for getIntersectionList(DOMRectReadOnly, SVGElement) on SVGSVGElement
-PASS SVGSVGElement interface: operation getEnclosureList(DOMRectReadOnly, SVGElement)
-PASS Unscopable handled correctly for getEnclosureList(DOMRectReadOnly, SVGElement) on SVGSVGElement
-PASS SVGSVGElement interface: operation checkIntersection(SVGElement, DOMRectReadOnly)
-PASS Unscopable handled correctly for checkIntersection(SVGElement, DOMRectReadOnly) on SVGSVGElement
-PASS SVGSVGElement interface: operation checkEnclosure(SVGElement, DOMRectReadOnly)
-PASS Unscopable handled correctly for checkEnclosure(SVGElement, DOMRectReadOnly) on SVGSVGElement
-PASS SVGSVGElement interface: operation deselectAll()
-PASS Unscopable handled correctly for deselectAll() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGNumber()
-PASS Unscopable handled correctly for createSVGNumber() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGLength()
-PASS Unscopable handled correctly for createSVGLength() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGAngle()
-PASS Unscopable handled correctly for createSVGAngle() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGPoint()
-PASS Unscopable handled correctly for createSVGPoint() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGMatrix()
-PASS Unscopable handled correctly for createSVGMatrix() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGRect()
-PASS Unscopable handled correctly for createSVGRect() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGTransform()
-PASS Unscopable handled correctly for createSVGTransform() on SVGSVGElement
-PASS SVGSVGElement interface: operation createSVGTransformFromMatrix(DOMMatrixReadOnly)
-PASS Unscopable handled correctly for createSVGTransformFromMatrix(DOMMatrixReadOnly) on SVGSVGElement
-PASS SVGSVGElement interface: operation suspendRedraw(unsigned long)
-PASS Unscopable handled correctly for suspendRedraw(unsigned long) on SVGSVGElement
-PASS SVGSVGElement interface: operation unsuspendRedraw(unsigned long)
-PASS Unscopable handled correctly for unsuspendRedraw(unsigned long) on SVGSVGElement
-PASS SVGSVGElement interface: operation unsuspendRedrawAll()
-PASS Unscopable handled correctly for unsuspendRedrawAll() on SVGSVGElement
-PASS SVGSVGElement interface: operation forceRedraw()
-PASS Unscopable handled correctly for forceRedraw() on SVGSVGElement
-PASS SVGSVGElement interface: attribute viewBox
-PASS Unscopable handled correctly for viewBox property on SVGSVGElement
-PASS SVGSVGElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGSVGElement
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_UNKNOWN on interface object
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_UNKNOWN on interface prototype object
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_DISABLE on interface object
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_DISABLE on interface prototype object
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_MAGNIFY on interface object
-PASS SVGSVGElement interface: constant SVG_ZOOMANDPAN_MAGNIFY on interface prototype object
-PASS SVGSVGElement interface: attribute zoomAndPan
-PASS Unscopable handled correctly for zoomAndPan property on SVGSVGElement
-PASS SVGSVGElement must be primary interface of svg
-PASS Stringification of svg
-PASS SVGSVGElement interface: svg must inherit property "x" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "y" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "width" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "height" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "currentScale" with the proper type
-FAIL SVGSVGElement interface: svg must inherit property "currentTranslate" with the proper type assert_true: instanceof DOMPointReadOnly expected true got false
-PASS SVGSVGElement interface: svg must inherit property "getIntersectionList(DOMRectReadOnly, SVGElement)" with the proper type
-PASS SVGSVGElement interface: calling getIntersectionList(DOMRectReadOnly, SVGElement) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "getEnclosureList(DOMRectReadOnly, SVGElement)" with the proper type
-PASS SVGSVGElement interface: calling getEnclosureList(DOMRectReadOnly, SVGElement) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "checkIntersection(SVGElement, DOMRectReadOnly)" with the proper type
-PASS SVGSVGElement interface: calling checkIntersection(SVGElement, DOMRectReadOnly) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "checkEnclosure(SVGElement, DOMRectReadOnly)" with the proper type
-PASS SVGSVGElement interface: calling checkEnclosure(SVGElement, DOMRectReadOnly) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "deselectAll()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGNumber()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGLength()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGAngle()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGPoint()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGMatrix()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGRect()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGTransform()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "createSVGTransformFromMatrix(DOMMatrixReadOnly)" with the proper type
-PASS SVGSVGElement interface: calling createSVGTransformFromMatrix(DOMMatrixReadOnly) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "suspendRedraw(unsigned long)" with the proper type
-PASS SVGSVGElement interface: calling suspendRedraw(unsigned long) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "unsuspendRedraw(unsigned long)" with the proper type
-PASS SVGSVGElement interface: calling unsuspendRedraw(unsigned long) on svg with too few arguments must throw TypeError
-PASS SVGSVGElement interface: svg must inherit property "unsuspendRedrawAll()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "forceRedraw()" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "viewBox" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "preserveAspectRatio" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "SVG_ZOOMANDPAN_UNKNOWN" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "SVG_ZOOMANDPAN_DISABLE" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "SVG_ZOOMANDPAN_MAGNIFY" with the proper type
-PASS SVGSVGElement interface: svg must inherit property "zoomAndPan" with the proper type
-PASS SVGGraphicsElement interface: svg must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: svg must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on svg with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: svg must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: svg must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: svg must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: svg must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: svg must inherit property "className" with the proper type
-PASS SVGElement interface: svg must inherit property "dataset" with the proper type
-PASS SVGElement interface: svg must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: svg must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: svg must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: svg must inherit property "focus()" with the proper type
-PASS SVGElement interface: svg must inherit property "blur()" with the proper type
-PASS SVGGElement interface: existence and properties of interface object
-PASS SVGGElement interface object length
-PASS SVGGElement interface object name
-PASS SVGGElement interface: existence and properties of interface prototype object
-PASS SVGGElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGGElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGGElement must be primary interface of g
-PASS Stringification of g
-PASS SVGGraphicsElement interface: g must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: g must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on g with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: g must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: g must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: g must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: g must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: g must inherit property "className" with the proper type
-PASS SVGElement interface: g must inherit property "dataset" with the proper type
-PASS SVGElement interface: g must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: g must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: g must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: g must inherit property "focus()" with the proper type
-PASS SVGElement interface: g must inherit property "blur()" with the proper type
-FAIL SVGUnknownElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-FAIL SVGUnknownElement interface object length assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-FAIL SVGUnknownElement interface object name assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-FAIL SVGUnknownElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-FAIL SVGUnknownElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-FAIL SVGUnknownElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGUnknownElement" expected property "SVGUnknownElement" missing
-PASS SVGDefsElement interface: existence and properties of interface object
-PASS SVGDefsElement interface object length
-PASS SVGDefsElement interface object name
-PASS SVGDefsElement interface: existence and properties of interface prototype object
-PASS SVGDefsElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGDefsElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGDefsElement must be primary interface of defs
-PASS Stringification of defs
-PASS SVGGraphicsElement interface: defs must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: defs must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on defs with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: defs must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: defs must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: defs must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: defs must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: defs must inherit property "className" with the proper type
-PASS SVGElement interface: defs must inherit property "dataset" with the proper type
-PASS SVGElement interface: defs must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: defs must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: defs must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: defs must inherit property "focus()" with the proper type
-PASS SVGElement interface: defs must inherit property "blur()" with the proper type
-PASS SVGDescElement interface: existence and properties of interface object
-PASS SVGDescElement interface object length
-PASS SVGDescElement interface object name
-PASS SVGDescElement interface: existence and properties of interface prototype object
-PASS SVGDescElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGDescElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGDescElement must be primary interface of Desc
-PASS Stringification of Desc
-PASS SVGElement interface: Desc must inherit property "className" with the proper type
-PASS SVGElement interface: Desc must inherit property "dataset" with the proper type
-PASS SVGElement interface: Desc must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: Desc must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: Desc must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: Desc must inherit property "focus()" with the proper type
-PASS SVGElement interface: Desc must inherit property "blur()" with the proper type
-PASS SVGMetadataElement interface: existence and properties of interface object
-PASS SVGMetadataElement interface object length
-PASS SVGMetadataElement interface object name
-PASS SVGMetadataElement interface: existence and properties of interface prototype object
-PASS SVGMetadataElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGMetadataElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGMetadataElement must be primary interface of metadata
-PASS Stringification of metadata
-PASS SVGElement interface: metadata must inherit property "className" with the proper type
-PASS SVGElement interface: metadata must inherit property "dataset" with the proper type
-PASS SVGElement interface: metadata must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: metadata must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: metadata must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: metadata must inherit property "focus()" with the proper type
-PASS SVGElement interface: metadata must inherit property "blur()" with the proper type
-PASS SVGTitleElement interface: existence and properties of interface object
-PASS SVGTitleElement interface object length
-PASS SVGTitleElement interface object name
-PASS SVGTitleElement interface: existence and properties of interface prototype object
-PASS SVGTitleElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTitleElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTitleElement must be primary interface of title
-PASS Stringification of title
-PASS SVGElement interface: title must inherit property "className" with the proper type
-PASS SVGElement interface: title must inherit property "dataset" with the proper type
-PASS SVGElement interface: title must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: title must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: title must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: title must inherit property "focus()" with the proper type
-PASS SVGElement interface: title must inherit property "blur()" with the proper type
-PASS SVGSymbolElement interface: existence and properties of interface object
-PASS SVGSymbolElement interface object length
-PASS SVGSymbolElement interface object name
-PASS SVGSymbolElement interface: existence and properties of interface prototype object
-PASS SVGSymbolElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGSymbolElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGSymbolElement interface: attribute viewBox
-PASS Unscopable handled correctly for viewBox property on SVGSymbolElement
-PASS SVGSymbolElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGSymbolElement
-PASS SVGSymbolElement must be primary interface of symbol
-PASS Stringification of symbol
-PASS SVGSymbolElement interface: symbol must inherit property "viewBox" with the proper type
-PASS SVGSymbolElement interface: symbol must inherit property "preserveAspectRatio" with the proper type
-PASS SVGElement interface: symbol must inherit property "className" with the proper type
-PASS SVGElement interface: symbol must inherit property "dataset" with the proper type
-PASS SVGElement interface: symbol must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: symbol must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: symbol must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: symbol must inherit property "focus()" with the proper type
-PASS SVGElement interface: symbol must inherit property "blur()" with the proper type
-PASS SVGUseElement interface: existence and properties of interface object
-PASS SVGUseElement interface object length
-PASS SVGUseElement interface object name
-PASS SVGUseElement interface: existence and properties of interface prototype object
-PASS SVGUseElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGUseElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGUseElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGUseElement
-PASS SVGUseElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGUseElement
-PASS SVGUseElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGUseElement
-PASS SVGUseElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGUseElement
-PASS SVGUseElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGUseElement
-PASS SVGUseElement must be primary interface of use
-PASS Stringification of use
-PASS SVGUseElement interface: use must inherit property "x" with the proper type
-PASS SVGUseElement interface: use must inherit property "y" with the proper type
-PASS SVGUseElement interface: use must inherit property "width" with the proper type
-PASS SVGUseElement interface: use must inherit property "height" with the proper type
-PASS SVGUseElement interface: use must inherit property "href" with the proper type
-PASS SVGGraphicsElement interface: use must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: use must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on use with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: use must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: use must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: use must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: use must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: use must inherit property "className" with the proper type
-PASS SVGElement interface: use must inherit property "dataset" with the proper type
-PASS SVGElement interface: use must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: use must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: use must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: use must inherit property "focus()" with the proper type
-PASS SVGElement interface: use must inherit property "blur()" with the proper type
-PASS SVGSwitchElement interface: existence and properties of interface object
-PASS SVGSwitchElement interface object length
-PASS SVGSwitchElement interface object name
-PASS SVGSwitchElement interface: existence and properties of interface prototype object
-PASS SVGSwitchElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGSwitchElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGSwitchElement must be primary interface of Switch
-PASS Stringification of Switch
-PASS SVGGraphicsElement interface: Switch must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: Switch must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on Switch with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: Switch must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: Switch must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: Switch must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: Switch must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: Switch must inherit property "className" with the proper type
-PASS SVGElement interface: Switch must inherit property "dataset" with the proper type
-PASS SVGElement interface: Switch must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: Switch must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: Switch must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: Switch must inherit property "focus()" with the proper type
-PASS SVGElement interface: Switch must inherit property "blur()" with the proper type
-PASS SVGStyleElement interface: existence and properties of interface object
-PASS SVGStyleElement interface object length
-PASS SVGStyleElement interface object name
-PASS SVGStyleElement interface: existence and properties of interface prototype object
-PASS SVGStyleElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGStyleElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGStyleElement interface: attribute type
-PASS Unscopable handled correctly for type property on SVGStyleElement
-PASS SVGStyleElement interface: attribute media
-PASS Unscopable handled correctly for media property on SVGStyleElement
-PASS SVGStyleElement interface: attribute title
-PASS Unscopable handled correctly for title property on SVGStyleElement
-PASS SVGStyleElement must be primary interface of style
-PASS Stringification of style
-PASS SVGStyleElement interface: style must inherit property "type" with the proper type
-PASS SVGStyleElement interface: style must inherit property "media" with the proper type
-PASS SVGStyleElement interface: style must inherit property "title" with the proper type
-PASS SVGElement interface: style must inherit property "className" with the proper type
-PASS SVGElement interface: style must inherit property "dataset" with the proper type
-PASS SVGElement interface: style must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: style must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: style must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: style must inherit property "focus()" with the proper type
-PASS SVGElement interface: style must inherit property "blur()" with the proper type
-PASS SVGTransform interface: existence and properties of interface object
-PASS SVGTransform interface object length
-PASS SVGTransform interface object name
-PASS SVGTransform interface: existence and properties of interface prototype object
-PASS SVGTransform interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTransform interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTransform interface: constant SVG_TRANSFORM_UNKNOWN on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_UNKNOWN on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_MATRIX on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_MATRIX on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_TRANSLATE on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_TRANSLATE on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SCALE on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SCALE on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_ROTATE on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_ROTATE on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SKEWX on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SKEWX on interface prototype object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SKEWY on interface object
-PASS SVGTransform interface: constant SVG_TRANSFORM_SKEWY on interface prototype object
-PASS SVGTransform interface: attribute type
-PASS Unscopable handled correctly for type property on SVGTransform
-PASS SVGTransform interface: attribute matrix
-PASS Unscopable handled correctly for matrix property on SVGTransform
-PASS SVGTransform interface: attribute angle
-PASS Unscopable handled correctly for angle property on SVGTransform
-PASS SVGTransform interface: operation setMatrix(DOMMatrixReadOnly)
-PASS Unscopable handled correctly for setMatrix(DOMMatrixReadOnly) on SVGTransform
-PASS SVGTransform interface: operation setTranslate(float, float)
-PASS Unscopable handled correctly for setTranslate(float, float) on SVGTransform
-PASS SVGTransform interface: operation setScale(float, float)
-PASS Unscopable handled correctly for setScale(float, float) on SVGTransform
-PASS SVGTransform interface: operation setRotate(float, float, float)
-PASS Unscopable handled correctly for setRotate(float, float, float) on SVGTransform
-PASS SVGTransform interface: operation setSkewX(float)
-PASS Unscopable handled correctly for setSkewX(float) on SVGTransform
-PASS SVGTransform interface: operation setSkewY(float)
-PASS Unscopable handled correctly for setSkewY(float) on SVGTransform
-PASS SVGTransform must be primary interface of svg.createSVGTransform()
-PASS Stringification of svg.createSVGTransform()
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_UNKNOWN" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_MATRIX" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_TRANSLATE" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_SCALE" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_ROTATE" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_SKEWX" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "SVG_TRANSFORM_SKEWY" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "type" with the proper type
-FAIL SVGTransform interface: svg.createSVGTransform() must inherit property "matrix" with the proper type assert_true: instanceof DOMMatrix expected true got false
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "angle" with the proper type
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setMatrix(DOMMatrixReadOnly)" with the proper type
-PASS SVGTransform interface: calling setMatrix(DOMMatrixReadOnly) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setTranslate(float, float)" with the proper type
-PASS SVGTransform interface: calling setTranslate(float, float) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setScale(float, float)" with the proper type
-PASS SVGTransform interface: calling setScale(float, float) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setRotate(float, float, float)" with the proper type
-PASS SVGTransform interface: calling setRotate(float, float, float) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setSkewX(float)" with the proper type
-PASS SVGTransform interface: calling setSkewX(float) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransform interface: svg.createSVGTransform() must inherit property "setSkewY(float)" with the proper type
-PASS SVGTransform interface: calling setSkewY(float) on svg.createSVGTransform() with too few arguments must throw TypeError
-PASS SVGTransformList interface: existence and properties of interface object
-PASS SVGTransformList interface object length
-PASS SVGTransformList interface object name
-PASS SVGTransformList interface: existence and properties of interface prototype object
-PASS SVGTransformList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTransformList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTransformList interface: attribute length
-PASS Unscopable handled correctly for length property on SVGTransformList
-PASS SVGTransformList interface: attribute numberOfItems
-PASS Unscopable handled correctly for numberOfItems property on SVGTransformList
-PASS SVGTransformList interface: operation clear()
-PASS Unscopable handled correctly for clear() on SVGTransformList
-PASS SVGTransformList interface: operation initialize(SVGTransform)
-PASS Unscopable handled correctly for initialize(SVGTransform) on SVGTransformList
-PASS SVGTransformList interface: operation getItem(unsigned long)
-PASS Unscopable handled correctly for getItem(unsigned long) on SVGTransformList
-PASS SVGTransformList interface: operation insertItemBefore(SVGTransform, unsigned long)
-PASS Unscopable handled correctly for insertItemBefore(SVGTransform, unsigned long) on SVGTransformList
-PASS SVGTransformList interface: operation replaceItem(SVGTransform, unsigned long)
-PASS Unscopable handled correctly for replaceItem(SVGTransform, unsigned long) on SVGTransformList
-PASS SVGTransformList interface: operation removeItem(unsigned long)
-PASS Unscopable handled correctly for removeItem(unsigned long) on SVGTransformList
-PASS SVGTransformList interface: operation appendItem(SVGTransform)
-PASS Unscopable handled correctly for appendItem(SVGTransform) on SVGTransformList
-PASS SVGTransformList interface: operation createSVGTransformFromMatrix(DOMMatrixReadOnly)
-PASS Unscopable handled correctly for createSVGTransformFromMatrix(DOMMatrixReadOnly) on SVGTransformList
-PASS SVGTransformList interface: operation consolidate()
-PASS Unscopable handled correctly for consolidate() on SVGTransformList
-PASS SVGTransformList must be primary interface of pattern.patternTransform.baseVal
-PASS Stringification of pattern.patternTransform.baseVal
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "length" with the proper type
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "numberOfItems" with the proper type
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "clear()" with the proper type
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "initialize(SVGTransform)" with the proper type
-PASS SVGTransformList interface: calling initialize(SVGTransform) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "getItem(unsigned long)" with the proper type
-PASS SVGTransformList interface: calling getItem(unsigned long) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "insertItemBefore(SVGTransform, unsigned long)" with the proper type
-PASS SVGTransformList interface: calling insertItemBefore(SVGTransform, unsigned long) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "replaceItem(SVGTransform, unsigned long)" with the proper type
-PASS SVGTransformList interface: calling replaceItem(SVGTransform, unsigned long) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "removeItem(unsigned long)" with the proper type
-PASS SVGTransformList interface: calling removeItem(unsigned long) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "appendItem(SVGTransform)" with the proper type
-PASS SVGTransformList interface: calling appendItem(SVGTransform) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "createSVGTransformFromMatrix(DOMMatrixReadOnly)" with the proper type
-PASS SVGTransformList interface: calling createSVGTransformFromMatrix(DOMMatrixReadOnly) on pattern.patternTransform.baseVal with too few arguments must throw TypeError
-PASS SVGTransformList interface: pattern.patternTransform.baseVal must inherit property "consolidate()" with the proper type
-PASS SVGAnimatedTransformList interface: existence and properties of interface object
-PASS SVGAnimatedTransformList interface object length
-PASS SVGAnimatedTransformList interface object name
-PASS SVGAnimatedTransformList interface: existence and properties of interface prototype object
-PASS SVGAnimatedTransformList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedTransformList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedTransformList interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedTransformList
-PASS SVGAnimatedTransformList interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedTransformList
-PASS SVGAnimatedTransformList must be primary interface of pattern.patternTransform
-PASS Stringification of pattern.patternTransform
-PASS SVGAnimatedTransformList interface: pattern.patternTransform must inherit property "baseVal" with the proper type
-PASS SVGAnimatedTransformList interface: pattern.patternTransform must inherit property "animVal" with the proper type
-PASS SVGPreserveAspectRatio interface: existence and properties of interface object
-PASS SVGPreserveAspectRatio interface object length
-PASS SVGPreserveAspectRatio interface object name
-PASS SVGPreserveAspectRatio interface: existence and properties of interface prototype object
-PASS SVGPreserveAspectRatio interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPreserveAspectRatio interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_UNKNOWN on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_UNKNOWN on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_NONE on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_NONE on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMIN on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMIN on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMIN on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMIN on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMIN on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMIN on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMID on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMID on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMID on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMID on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMID on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMID on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMAX on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMINYMAX on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMAX on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMIDYMAX on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMAX on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_PRESERVEASPECTRATIO_XMAXYMAX on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_UNKNOWN on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_UNKNOWN on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_MEET on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_MEET on interface prototype object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_SLICE on interface object
-PASS SVGPreserveAspectRatio interface: constant SVG_MEETORSLICE_SLICE on interface prototype object
-PASS SVGPreserveAspectRatio interface: attribute align
-PASS Unscopable handled correctly for align property on SVGPreserveAspectRatio
-PASS SVGPreserveAspectRatio interface: attribute meetOrSlice
-PASS Unscopable handled correctly for meetOrSlice property on SVGPreserveAspectRatio
-PASS SVGPreserveAspectRatio must be primary interface of image.preserveAspectRatio.baseVal
-PASS Stringification of image.preserveAspectRatio.baseVal
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_UNKNOWN" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_NONE" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMINYMIN" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMIDYMIN" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMAXYMIN" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMINYMID" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMIDYMID" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMAXYMID" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMINYMAX" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMIDYMAX" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_PRESERVEASPECTRATIO_XMAXYMAX" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_MEETORSLICE_UNKNOWN" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_MEETORSLICE_MEET" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "SVG_MEETORSLICE_SLICE" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "align" with the proper type
-PASS SVGPreserveAspectRatio interface: image.preserveAspectRatio.baseVal must inherit property "meetOrSlice" with the proper type
-PASS SVGAnimatedPreserveAspectRatio interface: existence and properties of interface object
-PASS SVGAnimatedPreserveAspectRatio interface object length
-PASS SVGAnimatedPreserveAspectRatio interface object name
-PASS SVGAnimatedPreserveAspectRatio interface: existence and properties of interface prototype object
-PASS SVGAnimatedPreserveAspectRatio interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAnimatedPreserveAspectRatio interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAnimatedPreserveAspectRatio interface: attribute baseVal
-PASS Unscopable handled correctly for baseVal property on SVGAnimatedPreserveAspectRatio
-PASS SVGAnimatedPreserveAspectRatio interface: attribute animVal
-PASS Unscopable handled correctly for animVal property on SVGAnimatedPreserveAspectRatio
-PASS SVGAnimatedPreserveAspectRatio must be primary interface of image.preserveAspectRatio
-PASS Stringification of image.preserveAspectRatio
-PASS SVGAnimatedPreserveAspectRatio interface: image.preserveAspectRatio must inherit property "baseVal" with the proper type
-PASS SVGAnimatedPreserveAspectRatio interface: image.preserveAspectRatio must inherit property "animVal" with the proper type
-PASS SVGPathElement interface: existence and properties of interface object
-PASS SVGPathElement interface object length
-PASS SVGPathElement interface object name
-PASS SVGPathElement interface: existence and properties of interface prototype object
-PASS SVGPathElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPathElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPathElement must be primary interface of path
-PASS Stringification of path
-PASS SVGGeometryElement interface: path must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: path must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on path with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: path must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on path with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: path must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: path must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on path with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: path must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: path must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on path with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: path must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: path must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: path must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: path must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: path must inherit property "className" with the proper type
-PASS SVGElement interface: path must inherit property "dataset" with the proper type
-PASS SVGElement interface: path must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: path must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: path must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: path must inherit property "focus()" with the proper type
-PASS SVGElement interface: path must inherit property "blur()" with the proper type
-PASS SVGRectElement interface: existence and properties of interface object
-PASS SVGRectElement interface object length
-PASS SVGRectElement interface object name
-PASS SVGRectElement interface: existence and properties of interface prototype object
-PASS SVGRectElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGRectElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGRectElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGRectElement
-PASS SVGRectElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGRectElement
-PASS SVGRectElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGRectElement
-PASS SVGRectElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGRectElement
-PASS SVGRectElement interface: attribute rx
-PASS Unscopable handled correctly for rx property on SVGRectElement
-PASS SVGRectElement interface: attribute ry
-PASS Unscopable handled correctly for ry property on SVGRectElement
-PASS SVGRectElement must be primary interface of rect
-PASS Stringification of rect
-PASS SVGRectElement interface: rect must inherit property "x" with the proper type
-PASS SVGRectElement interface: rect must inherit property "y" with the proper type
-PASS SVGRectElement interface: rect must inherit property "width" with the proper type
-PASS SVGRectElement interface: rect must inherit property "height" with the proper type
-PASS SVGRectElement interface: rect must inherit property "rx" with the proper type
-PASS SVGRectElement interface: rect must inherit property "ry" with the proper type
-PASS SVGGeometryElement interface: rect must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: rect must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on rect with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: rect must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on rect with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: rect must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: rect must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on rect with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: rect must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: rect must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on rect with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: rect must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: rect must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: rect must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: rect must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: rect must inherit property "className" with the proper type
-PASS SVGElement interface: rect must inherit property "dataset" with the proper type
-PASS SVGElement interface: rect must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: rect must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: rect must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: rect must inherit property "focus()" with the proper type
-PASS SVGElement interface: rect must inherit property "blur()" with the proper type
-PASS SVGCircleElement interface: existence and properties of interface object
-PASS SVGCircleElement interface object length
-PASS SVGCircleElement interface object name
-PASS SVGCircleElement interface: existence and properties of interface prototype object
-PASS SVGCircleElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGCircleElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGCircleElement interface: attribute cx
-PASS Unscopable handled correctly for cx property on SVGCircleElement
-PASS SVGCircleElement interface: attribute cy
-PASS Unscopable handled correctly for cy property on SVGCircleElement
-PASS SVGCircleElement interface: attribute r
-PASS Unscopable handled correctly for r property on SVGCircleElement
-PASS SVGCircleElement must be primary interface of circle
-PASS Stringification of circle
-PASS SVGCircleElement interface: circle must inherit property "cx" with the proper type
-PASS SVGCircleElement interface: circle must inherit property "cy" with the proper type
-PASS SVGCircleElement interface: circle must inherit property "r" with the proper type
-PASS SVGGeometryElement interface: circle must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: circle must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on circle with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: circle must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on circle with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: circle must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: circle must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on circle with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: circle must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: circle must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on circle with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: circle must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: circle must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: circle must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: circle must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: circle must inherit property "className" with the proper type
-PASS SVGElement interface: circle must inherit property "dataset" with the proper type
-PASS SVGElement interface: circle must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: circle must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: circle must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: circle must inherit property "focus()" with the proper type
-PASS SVGElement interface: circle must inherit property "blur()" with the proper type
-PASS SVGEllipseElement interface: existence and properties of interface object
-PASS SVGEllipseElement interface object length
-PASS SVGEllipseElement interface object name
-PASS SVGEllipseElement interface: existence and properties of interface prototype object
-PASS SVGEllipseElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGEllipseElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGEllipseElement interface: attribute cx
-PASS Unscopable handled correctly for cx property on SVGEllipseElement
-PASS SVGEllipseElement interface: attribute cy
-PASS Unscopable handled correctly for cy property on SVGEllipseElement
-PASS SVGEllipseElement interface: attribute rx
-PASS Unscopable handled correctly for rx property on SVGEllipseElement
-PASS SVGEllipseElement interface: attribute ry
-PASS Unscopable handled correctly for ry property on SVGEllipseElement
-PASS SVGEllipseElement must be primary interface of ellipse
-PASS Stringification of ellipse
-PASS SVGEllipseElement interface: ellipse must inherit property "cx" with the proper type
-PASS SVGEllipseElement interface: ellipse must inherit property "cy" with the proper type
-PASS SVGEllipseElement interface: ellipse must inherit property "rx" with the proper type
-PASS SVGEllipseElement interface: ellipse must inherit property "ry" with the proper type
-PASS SVGGeometryElement interface: ellipse must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: ellipse must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on ellipse with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: ellipse must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on ellipse with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: ellipse must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: ellipse must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on ellipse with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: ellipse must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: ellipse must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on ellipse with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: ellipse must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: ellipse must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: ellipse must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: ellipse must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: ellipse must inherit property "className" with the proper type
-PASS SVGElement interface: ellipse must inherit property "dataset" with the proper type
-PASS SVGElement interface: ellipse must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: ellipse must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: ellipse must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: ellipse must inherit property "focus()" with the proper type
-PASS SVGElement interface: ellipse must inherit property "blur()" with the proper type
-PASS SVGLineElement interface: existence and properties of interface object
-PASS SVGLineElement interface object length
-PASS SVGLineElement interface object name
-PASS SVGLineElement interface: existence and properties of interface prototype object
-PASS SVGLineElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGLineElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGLineElement interface: attribute x1
-PASS Unscopable handled correctly for x1 property on SVGLineElement
-PASS SVGLineElement interface: attribute y1
-PASS Unscopable handled correctly for y1 property on SVGLineElement
-PASS SVGLineElement interface: attribute x2
-PASS Unscopable handled correctly for x2 property on SVGLineElement
-PASS SVGLineElement interface: attribute y2
-PASS Unscopable handled correctly for y2 property on SVGLineElement
-PASS SVGLineElement must be primary interface of line
-PASS Stringification of line
-PASS SVGLineElement interface: line must inherit property "x1" with the proper type
-PASS SVGLineElement interface: line must inherit property "y1" with the proper type
-PASS SVGLineElement interface: line must inherit property "x2" with the proper type
-PASS SVGLineElement interface: line must inherit property "y2" with the proper type
-PASS SVGGeometryElement interface: line must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: line must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on line with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: line must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on line with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: line must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: line must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on line with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: line must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: line must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on line with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: line must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: line must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: line must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: line must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: line must inherit property "className" with the proper type
-PASS SVGElement interface: line must inherit property "dataset" with the proper type
-PASS SVGElement interface: line must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: line must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: line must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: line must inherit property "focus()" with the proper type
-PASS SVGElement interface: line must inherit property "blur()" with the proper type
-PASS SVGPointList interface: existence and properties of interface object
-PASS SVGPointList interface object length
-PASS SVGPointList interface object name
-PASS SVGPointList interface: existence and properties of interface prototype object
-PASS SVGPointList interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPointList interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPointList interface: attribute length
-PASS Unscopable handled correctly for length property on SVGPointList
-PASS SVGPointList interface: attribute numberOfItems
-PASS Unscopable handled correctly for numberOfItems property on SVGPointList
-PASS SVGPointList interface: operation clear()
-PASS Unscopable handled correctly for clear() on SVGPointList
-PASS SVGPointList interface: operation initialize(DOMPoint)
-PASS Unscopable handled correctly for initialize(DOMPoint) on SVGPointList
-PASS SVGPointList interface: operation getItem(unsigned long)
-PASS Unscopable handled correctly for getItem(unsigned long) on SVGPointList
-PASS SVGPointList interface: operation insertItemBefore(DOMPoint, unsigned long)
-PASS Unscopable handled correctly for insertItemBefore(DOMPoint, unsigned long) on SVGPointList
-PASS SVGPointList interface: operation replaceItem(DOMPoint, unsigned long)
-PASS Unscopable handled correctly for replaceItem(DOMPoint, unsigned long) on SVGPointList
-PASS SVGPointList interface: operation removeItem(unsigned long)
-PASS Unscopable handled correctly for removeItem(unsigned long) on SVGPointList
-PASS SVGPointList interface: operation appendItem(DOMPoint)
-PASS Unscopable handled correctly for appendItem(DOMPoint) on SVGPointList
-PASS SVGPointList must be primary interface of polygon.points
-PASS Stringification of polygon.points
-PASS SVGPointList interface: polygon.points must inherit property "length" with the proper type
-PASS SVGPointList interface: polygon.points must inherit property "numberOfItems" with the proper type
-PASS SVGPointList interface: polygon.points must inherit property "clear()" with the proper type
-PASS SVGPointList interface: polygon.points must inherit property "initialize(DOMPoint)" with the proper type
-PASS SVGPointList interface: calling initialize(DOMPoint) on polygon.points with too few arguments must throw TypeError
-PASS SVGPointList interface: polygon.points must inherit property "getItem(unsigned long)" with the proper type
-PASS SVGPointList interface: calling getItem(unsigned long) on polygon.points with too few arguments must throw TypeError
-PASS SVGPointList interface: polygon.points must inherit property "insertItemBefore(DOMPoint, unsigned long)" with the proper type
-PASS SVGPointList interface: calling insertItemBefore(DOMPoint, unsigned long) on polygon.points with too few arguments must throw TypeError
-PASS SVGPointList interface: polygon.points must inherit property "replaceItem(DOMPoint, unsigned long)" with the proper type
-PASS SVGPointList interface: calling replaceItem(DOMPoint, unsigned long) on polygon.points with too few arguments must throw TypeError
-PASS SVGPointList interface: polygon.points must inherit property "removeItem(unsigned long)" with the proper type
-PASS SVGPointList interface: calling removeItem(unsigned long) on polygon.points with too few arguments must throw TypeError
-PASS SVGPointList interface: polygon.points must inherit property "appendItem(DOMPoint)" with the proper type
-PASS SVGPointList interface: calling appendItem(DOMPoint) on polygon.points with too few arguments must throw TypeError
-PASS SVGPolylineElement interface: existence and properties of interface object
-PASS SVGPolylineElement interface object length
-PASS SVGPolylineElement interface object name
-PASS SVGPolylineElement interface: existence and properties of interface prototype object
-PASS SVGPolylineElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPolylineElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPolylineElement interface: attribute points
-PASS Unscopable handled correctly for points property on SVGPolylineElement
-PASS SVGPolylineElement interface: attribute animatedPoints
-PASS Unscopable handled correctly for animatedPoints property on SVGPolylineElement
-PASS SVGPolylineElement must be primary interface of polyline
-PASS Stringification of polyline
-PASS SVGPolylineElement interface: polyline must inherit property "points" with the proper type
-PASS SVGPolylineElement interface: polyline must inherit property "animatedPoints" with the proper type
-PASS SVGGeometryElement interface: polyline must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: polyline must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on polyline with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: polyline must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polyline with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: polyline must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: polyline must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on polyline with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: polyline must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: polyline must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on polyline with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: polyline must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: polyline must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: polyline must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: polyline must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: polyline must inherit property "className" with the proper type
-PASS SVGElement interface: polyline must inherit property "dataset" with the proper type
-PASS SVGElement interface: polyline must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: polyline must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: polyline must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: polyline must inherit property "focus()" with the proper type
-PASS SVGElement interface: polyline must inherit property "blur()" with the proper type
-PASS SVGPolygonElement interface: existence and properties of interface object
-PASS SVGPolygonElement interface object length
-PASS SVGPolygonElement interface object name
-PASS SVGPolygonElement interface: existence and properties of interface prototype object
-PASS SVGPolygonElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPolygonElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPolygonElement interface: attribute points
-PASS Unscopable handled correctly for points property on SVGPolygonElement
-PASS SVGPolygonElement interface: attribute animatedPoints
-PASS Unscopable handled correctly for animatedPoints property on SVGPolygonElement
-PASS SVGPolygonElement must be primary interface of polygon
-PASS Stringification of polygon
-PASS SVGPolygonElement interface: polygon must inherit property "points" with the proper type
-PASS SVGPolygonElement interface: polygon must inherit property "animatedPoints" with the proper type
-PASS SVGGeometryElement interface: polygon must inherit property "pathLength" with the proper type
-PASS SVGGeometryElement interface: polygon must inherit property "isPointInFill(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInFill(DOMPoint) on polygon with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: polygon must inherit property "isPointInStroke(DOMPoint)" with the proper type
-PASS SVGGeometryElement interface: calling isPointInStroke(DOMPoint) on polygon with too few arguments must throw TypeError
-PASS SVGGeometryElement interface: polygon must inherit property "getTotalLength()" with the proper type
-PASS SVGGeometryElement interface: polygon must inherit property "getPointAtLength(float)" with the proper type
-PASS SVGGeometryElement interface: calling getPointAtLength(float) on polygon with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: polygon must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: polygon must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on polygon with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: polygon must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: polygon must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: polygon must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: polygon must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: polygon must inherit property "className" with the proper type
-PASS SVGElement interface: polygon must inherit property "dataset" with the proper type
-PASS SVGElement interface: polygon must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: polygon must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: polygon must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: polygon must inherit property "focus()" with the proper type
-PASS SVGElement interface: polygon must inherit property "blur()" with the proper type
-PASS SVGTextContentElement interface: existence and properties of interface object
-PASS SVGTextContentElement interface object length
-PASS SVGTextContentElement interface object name
-PASS SVGTextContentElement interface: existence and properties of interface prototype object
-PASS SVGTextContentElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTextContentElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTextContentElement interface: constant LENGTHADJUST_UNKNOWN on interface object
-PASS SVGTextContentElement interface: constant LENGTHADJUST_UNKNOWN on interface prototype object
-PASS SVGTextContentElement interface: constant LENGTHADJUST_SPACING on interface object
-PASS SVGTextContentElement interface: constant LENGTHADJUST_SPACING on interface prototype object
-PASS SVGTextContentElement interface: constant LENGTHADJUST_SPACINGANDGLYPHS on interface object
-PASS SVGTextContentElement interface: constant LENGTHADJUST_SPACINGANDGLYPHS on interface prototype object
-PASS SVGTextContentElement interface: attribute textLength
-PASS Unscopable handled correctly for textLength property on SVGTextContentElement
-PASS SVGTextContentElement interface: attribute lengthAdjust
-PASS Unscopable handled correctly for lengthAdjust property on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getNumberOfChars()
-PASS Unscopable handled correctly for getNumberOfChars() on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getComputedTextLength()
-PASS Unscopable handled correctly for getComputedTextLength() on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getSubStringLength(unsigned long, unsigned long)
-PASS Unscopable handled correctly for getSubStringLength(unsigned long, unsigned long) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getStartPositionOfChar(unsigned long)
-PASS Unscopable handled correctly for getStartPositionOfChar(unsigned long) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getEndPositionOfChar(unsigned long)
-PASS Unscopable handled correctly for getEndPositionOfChar(unsigned long) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getExtentOfChar(unsigned long)
-PASS Unscopable handled correctly for getExtentOfChar(unsigned long) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getRotationOfChar(unsigned long)
-PASS Unscopable handled correctly for getRotationOfChar(unsigned long) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation getCharNumAtPosition(DOMPoint)
-PASS Unscopable handled correctly for getCharNumAtPosition(DOMPoint) on SVGTextContentElement
-PASS SVGTextContentElement interface: operation selectSubString(unsigned long, unsigned long)
-PASS Unscopable handled correctly for selectSubString(unsigned long, unsigned long) on SVGTextContentElement
-PASS SVGTextPositioningElement interface: existence and properties of interface object
-PASS SVGTextPositioningElement interface object length
-PASS SVGTextPositioningElement interface object name
-PASS SVGTextPositioningElement interface: existence and properties of interface prototype object
-PASS SVGTextPositioningElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTextPositioningElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTextPositioningElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGTextPositioningElement
-PASS SVGTextPositioningElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGTextPositioningElement
-PASS SVGTextPositioningElement interface: attribute dx
-PASS Unscopable handled correctly for dx property on SVGTextPositioningElement
-PASS SVGTextPositioningElement interface: attribute dy
-PASS Unscopable handled correctly for dy property on SVGTextPositioningElement
-PASS SVGTextPositioningElement interface: attribute rotate
-PASS Unscopable handled correctly for rotate property on SVGTextPositioningElement
-PASS SVGTextElement interface: existence and properties of interface object
-PASS SVGTextElement interface object length
-PASS SVGTextElement interface object name
-PASS SVGTextElement interface: existence and properties of interface prototype object
-PASS SVGTextElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTextElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTextElement must be primary interface of text
-PASS Stringification of text
-PASS SVGTextPositioningElement interface: text must inherit property "x" with the proper type
-PASS SVGTextPositioningElement interface: text must inherit property "y" with the proper type
-PASS SVGTextPositioningElement interface: text must inherit property "dx" with the proper type
-PASS SVGTextPositioningElement interface: text must inherit property "dy" with the proper type
-PASS SVGTextPositioningElement interface: text must inherit property "rotate" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "LENGTHADJUST_UNKNOWN" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "LENGTHADJUST_SPACING" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "LENGTHADJUST_SPACINGANDGLYPHS" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "textLength" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "lengthAdjust" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "getNumberOfChars()" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "getComputedTextLength()" with the proper type
-PASS SVGTextContentElement interface: text must inherit property "getSubStringLength(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getSubStringLength(unsigned long, unsigned long) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "getStartPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getStartPositionOfChar(unsigned long) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "getEndPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getEndPositionOfChar(unsigned long) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "getExtentOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getExtentOfChar(unsigned long) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "getRotationOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getRotationOfChar(unsigned long) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "getCharNumAtPosition(DOMPoint)" with the proper type
-PASS SVGTextContentElement interface: calling getCharNumAtPosition(DOMPoint) on text with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: text must inherit property "selectSubString(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling selectSubString(unsigned long, unsigned long) on text with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: text must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: text must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on text with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: text must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: text must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: text must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: text must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: text must inherit property "className" with the proper type
-PASS SVGElement interface: text must inherit property "dataset" with the proper type
-PASS SVGElement interface: text must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: text must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: text must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: text must inherit property "focus()" with the proper type
-PASS SVGElement interface: text must inherit property "blur()" with the proper type
-PASS SVGTSpanElement interface: existence and properties of interface object
-PASS SVGTSpanElement interface object length
-PASS SVGTSpanElement interface object name
-PASS SVGTSpanElement interface: existence and properties of interface prototype object
-PASS SVGTSpanElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTSpanElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTSpanElement must be primary interface of tspan
-PASS Stringification of tspan
-PASS SVGTextPositioningElement interface: tspan must inherit property "x" with the proper type
-PASS SVGTextPositioningElement interface: tspan must inherit property "y" with the proper type
-PASS SVGTextPositioningElement interface: tspan must inherit property "dx" with the proper type
-PASS SVGTextPositioningElement interface: tspan must inherit property "dy" with the proper type
-PASS SVGTextPositioningElement interface: tspan must inherit property "rotate" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "LENGTHADJUST_UNKNOWN" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "LENGTHADJUST_SPACING" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "LENGTHADJUST_SPACINGANDGLYPHS" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "textLength" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "lengthAdjust" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "getNumberOfChars()" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "getComputedTextLength()" with the proper type
-PASS SVGTextContentElement interface: tspan must inherit property "getSubStringLength(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getSubStringLength(unsigned long, unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "getStartPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getStartPositionOfChar(unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "getEndPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getEndPositionOfChar(unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "getExtentOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getExtentOfChar(unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "getRotationOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getRotationOfChar(unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "getCharNumAtPosition(DOMPoint)" with the proper type
-PASS SVGTextContentElement interface: calling getCharNumAtPosition(DOMPoint) on tspan with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: tspan must inherit property "selectSubString(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling selectSubString(unsigned long, unsigned long) on tspan with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: tspan must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: tspan must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on tspan with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: tspan must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: tspan must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: tspan must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: tspan must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: tspan must inherit property "className" with the proper type
-PASS SVGElement interface: tspan must inherit property "dataset" with the proper type
-PASS SVGElement interface: tspan must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: tspan must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: tspan must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: tspan must inherit property "focus()" with the proper type
-PASS SVGElement interface: tspan must inherit property "blur()" with the proper type
-PASS SVGTextPathElement interface: existence and properties of interface object
-PASS SVGTextPathElement interface object length
-PASS SVGTextPathElement interface object name
-PASS SVGTextPathElement interface: existence and properties of interface prototype object
-PASS SVGTextPathElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGTextPathElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_UNKNOWN on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_UNKNOWN on interface prototype object
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_ALIGN on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_ALIGN on interface prototype object
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_STRETCH on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_METHODTYPE_STRETCH on interface prototype object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_UNKNOWN on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_UNKNOWN on interface prototype object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_AUTO on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_AUTO on interface prototype object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_EXACT on interface object
-PASS SVGTextPathElement interface: constant TEXTPATH_SPACINGTYPE_EXACT on interface prototype object
-PASS SVGTextPathElement interface: attribute startOffset
-PASS Unscopable handled correctly for startOffset property on SVGTextPathElement
-PASS SVGTextPathElement interface: attribute method
-PASS Unscopable handled correctly for method property on SVGTextPathElement
-PASS SVGTextPathElement interface: attribute spacing
-PASS Unscopable handled correctly for spacing property on SVGTextPathElement
-PASS SVGTextPathElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGTextPathElement
-PASS SVGTextPathElement must be primary interface of textPath
-PASS Stringification of textPath
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_METHODTYPE_UNKNOWN" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_METHODTYPE_ALIGN" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_METHODTYPE_STRETCH" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_SPACINGTYPE_UNKNOWN" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_SPACINGTYPE_AUTO" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "TEXTPATH_SPACINGTYPE_EXACT" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "startOffset" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "method" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "spacing" with the proper type
-PASS SVGTextPathElement interface: textPath must inherit property "href" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "LENGTHADJUST_UNKNOWN" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "LENGTHADJUST_SPACING" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "LENGTHADJUST_SPACINGANDGLYPHS" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "textLength" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "lengthAdjust" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "getNumberOfChars()" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "getComputedTextLength()" with the proper type
-PASS SVGTextContentElement interface: textPath must inherit property "getSubStringLength(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getSubStringLength(unsigned long, unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "getStartPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getStartPositionOfChar(unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "getEndPositionOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getEndPositionOfChar(unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "getExtentOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getExtentOfChar(unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "getRotationOfChar(unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling getRotationOfChar(unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "getCharNumAtPosition(DOMPoint)" with the proper type
-PASS SVGTextContentElement interface: calling getCharNumAtPosition(DOMPoint) on textPath with too few arguments must throw TypeError
-PASS SVGTextContentElement interface: textPath must inherit property "selectSubString(unsigned long, unsigned long)" with the proper type
-PASS SVGTextContentElement interface: calling selectSubString(unsigned long, unsigned long) on textPath with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: textPath must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: textPath must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on textPath with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: textPath must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: textPath must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: textPath must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: textPath must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: textPath must inherit property "className" with the proper type
-PASS SVGElement interface: textPath must inherit property "dataset" with the proper type
-PASS SVGElement interface: textPath must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: textPath must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: textPath must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: textPath must inherit property "focus()" with the proper type
-PASS SVGElement interface: textPath must inherit property "blur()" with the proper type
-PASS SVGImageElement interface: existence and properties of interface object
-PASS SVGImageElement interface object length
-PASS SVGImageElement interface object name
-PASS SVGImageElement interface: existence and properties of interface prototype object
-PASS SVGImageElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGImageElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGImageElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGImageElement
-PASS SVGImageElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGImageElement
-PASS SVGImageElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGImageElement
-PASS SVGImageElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGImageElement
-PASS SVGImageElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGImageElement
-FAIL SVGImageElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false
-PASS Unscopable handled correctly for crossOrigin property on SVGImageElement
-PASS SVGImageElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGImageElement
-PASS SVGImageElement must be primary interface of image
-PASS Stringification of image
-PASS SVGImageElement interface: image must inherit property "x" with the proper type
-PASS SVGImageElement interface: image must inherit property "y" with the proper type
-PASS SVGImageElement interface: image must inherit property "width" with the proper type
-PASS SVGImageElement interface: image must inherit property "height" with the proper type
-PASS SVGImageElement interface: image must inherit property "preserveAspectRatio" with the proper type
-FAIL SVGImageElement interface: image must inherit property "crossOrigin" with the proper type assert_inherits: property "crossOrigin" not found in prototype chain
-PASS SVGImageElement interface: image must inherit property "href" with the proper type
-PASS SVGGraphicsElement interface: image must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: image must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on image with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: image must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: image must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: image must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: image must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: image must inherit property "className" with the proper type
-PASS SVGElement interface: image must inherit property "dataset" with the proper type
-PASS SVGElement interface: image must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: image must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: image must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: image must inherit property "focus()" with the proper type
-PASS SVGElement interface: image must inherit property "blur()" with the proper type
-PASS SVGForeignObjectElement interface: existence and properties of interface object
-PASS SVGForeignObjectElement interface object length
-PASS SVGForeignObjectElement interface object name
-PASS SVGForeignObjectElement interface: existence and properties of interface prototype object
-PASS SVGForeignObjectElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGForeignObjectElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGForeignObjectElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGForeignObjectElement
-PASS SVGForeignObjectElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGForeignObjectElement
-PASS SVGForeignObjectElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGForeignObjectElement
-PASS SVGForeignObjectElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGForeignObjectElement
-PASS SVGForeignObjectElement must be primary interface of foreignObject
-PASS Stringification of foreignObject
-PASS SVGForeignObjectElement interface: foreignObject must inherit property "x" with the proper type
-PASS SVGForeignObjectElement interface: foreignObject must inherit property "y" with the proper type
-PASS SVGForeignObjectElement interface: foreignObject must inherit property "width" with the proper type
-PASS SVGForeignObjectElement interface: foreignObject must inherit property "height" with the proper type
-PASS SVGGraphicsElement interface: foreignObject must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: foreignObject must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on foreignObject with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: foreignObject must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: foreignObject must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: foreignObject must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: foreignObject must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "className" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "dataset" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "focus()" with the proper type
-PASS SVGElement interface: foreignObject must inherit property "blur()" with the proper type
-PASS SVGMarkerElement interface: existence and properties of interface object
-PASS SVGMarkerElement interface object length
-PASS SVGMarkerElement interface object name
-PASS SVGMarkerElement interface: existence and properties of interface prototype object
-PASS SVGMarkerElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGMarkerElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_UNKNOWN on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_UNKNOWN on interface prototype object
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_USERSPACEONUSE on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_USERSPACEONUSE on interface prototype object
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_STROKEWIDTH on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKERUNITS_STROKEWIDTH on interface prototype object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_UNKNOWN on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_UNKNOWN on interface prototype object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_AUTO on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_AUTO on interface prototype object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_ANGLE on interface object
-PASS SVGMarkerElement interface: constant SVG_MARKER_ORIENT_ANGLE on interface prototype object
-PASS SVGMarkerElement interface: attribute refX
-PASS Unscopable handled correctly for refX property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute refY
-PASS Unscopable handled correctly for refY property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute markerUnits
-PASS Unscopable handled correctly for markerUnits property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute markerWidth
-PASS Unscopable handled correctly for markerWidth property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute markerHeight
-PASS Unscopable handled correctly for markerHeight property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute orientType
-PASS Unscopable handled correctly for orientType property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute orientAngle
-PASS Unscopable handled correctly for orientAngle property on SVGMarkerElement
-FAIL SVGMarkerElement interface: attribute orient assert_true: The prototype object must have a property "orient" expected true got false
-PASS Unscopable handled correctly for orient property on SVGMarkerElement
-PASS SVGMarkerElement interface: operation setOrientToAuto()
-PASS Unscopable handled correctly for setOrientToAuto() on SVGMarkerElement
-PASS SVGMarkerElement interface: operation setOrientToAngle(SVGAngle)
-PASS Unscopable handled correctly for setOrientToAngle(SVGAngle) on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute viewBox
-PASS Unscopable handled correctly for viewBox property on SVGMarkerElement
-PASS SVGMarkerElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGMarkerElement
-PASS SVGMarkerElement must be primary interface of marker
-PASS Stringification of marker
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKERUNITS_UNKNOWN" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKERUNITS_USERSPACEONUSE" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKERUNITS_STROKEWIDTH" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKER_ORIENT_UNKNOWN" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKER_ORIENT_AUTO" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "SVG_MARKER_ORIENT_ANGLE" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "refX" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "refY" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "markerUnits" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "markerWidth" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "markerHeight" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "orientType" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "orientAngle" with the proper type
-FAIL SVGMarkerElement interface: marker must inherit property "orient" with the proper type assert_inherits: property "orient" not found in prototype chain
-PASS SVGMarkerElement interface: marker must inherit property "setOrientToAuto()" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "setOrientToAngle(SVGAngle)" with the proper type
-PASS SVGMarkerElement interface: calling setOrientToAngle(SVGAngle) on marker with too few arguments must throw TypeError
-PASS SVGMarkerElement interface: marker must inherit property "viewBox" with the proper type
-PASS SVGMarkerElement interface: marker must inherit property "preserveAspectRatio" with the proper type
-PASS SVGElement interface: marker must inherit property "className" with the proper type
-PASS SVGElement interface: marker must inherit property "dataset" with the proper type
-PASS SVGElement interface: marker must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: marker must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: marker must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: marker must inherit property "focus()" with the proper type
-PASS SVGElement interface: marker must inherit property "blur()" with the proper type
-FAIL SVGSolidcolorElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-FAIL SVGSolidcolorElement interface object length assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-FAIL SVGSolidcolorElement interface object name assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-FAIL SVGSolidcolorElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-FAIL SVGSolidcolorElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-FAIL SVGSolidcolorElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGSolidcolorElement" expected property "SVGSolidcolorElement" missing
-PASS SVGGradientElement interface: existence and properties of interface object
-PASS SVGGradientElement interface object length
-PASS SVGGradientElement interface object name
-PASS SVGGradientElement interface: existence and properties of interface prototype object
-PASS SVGGradientElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGGradientElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_UNKNOWN on interface object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_UNKNOWN on interface prototype object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_PAD on interface object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_PAD on interface prototype object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_REFLECT on interface object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_REFLECT on interface prototype object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_REPEAT on interface object
-PASS SVGGradientElement interface: constant SVG_SPREADMETHOD_REPEAT on interface prototype object
-PASS SVGGradientElement interface: attribute gradientUnits
-PASS Unscopable handled correctly for gradientUnits property on SVGGradientElement
-PASS SVGGradientElement interface: attribute gradientTransform
-PASS Unscopable handled correctly for gradientTransform property on SVGGradientElement
-PASS SVGGradientElement interface: attribute spreadMethod
-PASS Unscopable handled correctly for spreadMethod property on SVGGradientElement
-PASS SVGGradientElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGGradientElement
-PASS SVGLinearGradientElement interface: existence and properties of interface object
-PASS SVGLinearGradientElement interface object length
-PASS SVGLinearGradientElement interface object name
-PASS SVGLinearGradientElement interface: existence and properties of interface prototype object
-PASS SVGLinearGradientElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGLinearGradientElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGLinearGradientElement interface: attribute x1
-PASS Unscopable handled correctly for x1 property on SVGLinearGradientElement
-PASS SVGLinearGradientElement interface: attribute y1
-PASS Unscopable handled correctly for y1 property on SVGLinearGradientElement
-PASS SVGLinearGradientElement interface: attribute x2
-PASS Unscopable handled correctly for x2 property on SVGLinearGradientElement
-PASS SVGLinearGradientElement interface: attribute y2
-PASS Unscopable handled correctly for y2 property on SVGLinearGradientElement
-PASS SVGLinearGradientElement must be primary interface of linearGradient
-PASS Stringification of linearGradient
-PASS SVGLinearGradientElement interface: linearGradient must inherit property "x1" with the proper type
-PASS SVGLinearGradientElement interface: linearGradient must inherit property "y1" with the proper type
-PASS SVGLinearGradientElement interface: linearGradient must inherit property "x2" with the proper type
-PASS SVGLinearGradientElement interface: linearGradient must inherit property "y2" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "SVG_SPREADMETHOD_UNKNOWN" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "SVG_SPREADMETHOD_PAD" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "SVG_SPREADMETHOD_REFLECT" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "SVG_SPREADMETHOD_REPEAT" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "gradientUnits" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "gradientTransform" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "spreadMethod" with the proper type
-PASS SVGGradientElement interface: linearGradient must inherit property "href" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "className" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "dataset" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "focus()" with the proper type
-PASS SVGElement interface: linearGradient must inherit property "blur()" with the proper type
-PASS SVGRadialGradientElement interface: existence and properties of interface object
-PASS SVGRadialGradientElement interface object length
-PASS SVGRadialGradientElement interface object name
-PASS SVGRadialGradientElement interface: existence and properties of interface prototype object
-PASS SVGRadialGradientElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGRadialGradientElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGRadialGradientElement interface: attribute cx
-PASS Unscopable handled correctly for cx property on SVGRadialGradientElement
-PASS SVGRadialGradientElement interface: attribute cy
-PASS Unscopable handled correctly for cy property on SVGRadialGradientElement
-PASS SVGRadialGradientElement interface: attribute r
-PASS Unscopable handled correctly for r property on SVGRadialGradientElement
-PASS SVGRadialGradientElement interface: attribute fx
-PASS Unscopable handled correctly for fx property on SVGRadialGradientElement
-PASS SVGRadialGradientElement interface: attribute fy
-PASS Unscopable handled correctly for fy property on SVGRadialGradientElement
-PASS SVGRadialGradientElement interface: attribute fr
-PASS Unscopable handled correctly for fr property on SVGRadialGradientElement
-PASS SVGRadialGradientElement must be primary interface of radialGradient
-PASS Stringification of radialGradient
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "cx" with the proper type
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "cy" with the proper type
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "r" with the proper type
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "fx" with the proper type
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "fy" with the proper type
-PASS SVGRadialGradientElement interface: radialGradient must inherit property "fr" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "SVG_SPREADMETHOD_UNKNOWN" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "SVG_SPREADMETHOD_PAD" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "SVG_SPREADMETHOD_REFLECT" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "SVG_SPREADMETHOD_REPEAT" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "gradientUnits" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "gradientTransform" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "spreadMethod" with the proper type
-PASS SVGGradientElement interface: radialGradient must inherit property "href" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "className" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "dataset" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "focus()" with the proper type
-PASS SVGElement interface: radialGradient must inherit property "blur()" with the proper type
-FAIL SVGMeshElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshElement interface object length assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshElement interface object name assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGMeshElement" expected property "SVGMeshElement" missing
-FAIL SVGMeshrowElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshrowElement interface object length assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshrowElement interface object name assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshrowElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshrowElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshrowElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGMeshrowElement" expected property "SVGMeshrowElement" missing
-FAIL SVGMeshpatchElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-FAIL SVGMeshpatchElement interface object length assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-FAIL SVGMeshpatchElement interface object name assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-FAIL SVGMeshpatchElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-FAIL SVGMeshpatchElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-FAIL SVGMeshpatchElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGMeshpatchElement" expected property "SVGMeshpatchElement" missing
-PASS SVGStopElement interface: existence and properties of interface object
-PASS SVGStopElement interface object length
-PASS SVGStopElement interface object name
-PASS SVGStopElement interface: existence and properties of interface prototype object
-PASS SVGStopElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGStopElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGStopElement interface: attribute offset
-PASS Unscopable handled correctly for offset property on SVGStopElement
-PASS SVGStopElement must be primary interface of stop
-PASS Stringification of stop
-PASS SVGStopElement interface: stop must inherit property "offset" with the proper type
-PASS SVGElement interface: stop must inherit property "className" with the proper type
-PASS SVGElement interface: stop must inherit property "dataset" with the proper type
-PASS SVGElement interface: stop must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: stop must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: stop must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: stop must inherit property "focus()" with the proper type
-PASS SVGElement interface: stop must inherit property "blur()" with the proper type
-PASS SVGPatternElement interface: existence and properties of interface object
-PASS SVGPatternElement interface object length
-PASS SVGPatternElement interface object name
-PASS SVGPatternElement interface: existence and properties of interface prototype object
-PASS SVGPatternElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGPatternElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGPatternElement interface: attribute patternUnits
-PASS Unscopable handled correctly for patternUnits property on SVGPatternElement
-PASS SVGPatternElement interface: attribute patternContentUnits
-PASS Unscopable handled correctly for patternContentUnits property on SVGPatternElement
-PASS SVGPatternElement interface: attribute patternTransform
-PASS Unscopable handled correctly for patternTransform property on SVGPatternElement
-PASS SVGPatternElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGPatternElement
-PASS SVGPatternElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGPatternElement
-PASS SVGPatternElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGPatternElement
-PASS SVGPatternElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGPatternElement
-PASS SVGPatternElement interface: attribute viewBox
-PASS Unscopable handled correctly for viewBox property on SVGPatternElement
-PASS SVGPatternElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGPatternElement
-PASS SVGPatternElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGPatternElement
-PASS SVGPatternElement must be primary interface of pattern
-PASS Stringification of pattern
-PASS SVGPatternElement interface: pattern must inherit property "patternUnits" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "patternContentUnits" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "patternTransform" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "x" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "y" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "width" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "height" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "viewBox" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "preserveAspectRatio" with the proper type
-PASS SVGPatternElement interface: pattern must inherit property "href" with the proper type
-PASS SVGElement interface: pattern must inherit property "className" with the proper type
-PASS SVGElement interface: pattern must inherit property "dataset" with the proper type
-PASS SVGElement interface: pattern must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: pattern must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: pattern must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: pattern must inherit property "focus()" with the proper type
-PASS SVGElement interface: pattern must inherit property "blur()" with the proper type
-FAIL SVGHatchElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchElement interface object length assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchElement interface object name assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGHatchElement" expected property "SVGHatchElement" missing
-FAIL SVGHatchpathElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGHatchpathElement interface object length assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGHatchpathElement interface object name assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGHatchpathElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGHatchpathElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGHatchpathElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGHatchpathElement" expected property "SVGHatchpathElement" missing
-FAIL SVGCursorElement interface: existence and properties of interface object assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface object length assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface object name assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface: existence and properties of interface prototype object assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface: existence and properties of interface prototype object's @@unscopables property assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL SVGCursorElement interface: attribute x assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-PASS Unscopable handled correctly for x property on SVGCursorElement
-FAIL SVGCursorElement interface: attribute y assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-PASS Unscopable handled correctly for y property on SVGCursorElement
-FAIL SVGCursorElement interface: attribute href assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-PASS Unscopable handled correctly for href property on SVGCursorElement
-FAIL SVGCursorElement must be primary interface of cursor assert_own_property: self does not have own property "SVGCursorElement" expected property "SVGCursorElement" missing
-FAIL Stringification of cursor assert_equals: class string of cursor expected "[object SVGCursorElement]" but got "[object SVGElement]"
-FAIL SVGCursorElement interface: cursor must inherit property "x" with the proper type assert_inherits: property "x" not found in prototype chain
-FAIL SVGCursorElement interface: cursor must inherit property "y" with the proper type assert_inherits: property "y" not found in prototype chain
-FAIL SVGCursorElement interface: cursor must inherit property "href" with the proper type assert_inherits: property "href" not found in prototype chain
-PASS SVGElement interface: cursor must inherit property "className" with the proper type
-PASS SVGElement interface: cursor must inherit property "dataset" with the proper type
-PASS SVGElement interface: cursor must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: cursor must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: cursor must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: cursor must inherit property "focus()" with the proper type
-PASS SVGElement interface: cursor must inherit property "blur()" with the proper type
-PASS SVGScriptElement interface: existence and properties of interface object
-PASS SVGScriptElement interface object length
-PASS SVGScriptElement interface object name
-PASS SVGScriptElement interface: existence and properties of interface prototype object
-PASS SVGScriptElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGScriptElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGScriptElement interface: attribute type
-PASS Unscopable handled correctly for type property on SVGScriptElement
-FAIL SVGScriptElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false
-PASS Unscopable handled correctly for crossOrigin property on SVGScriptElement
-PASS SVGScriptElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGScriptElement
-PASS SVGScriptElement must be primary interface of script
-PASS Stringification of script
-PASS SVGScriptElement interface: script must inherit property "type" with the proper type
-FAIL SVGScriptElement interface: script must inherit property "crossOrigin" with the proper type assert_inherits: property "crossOrigin" not found in prototype chain
-PASS SVGScriptElement interface: script must inherit property "href" with the proper type
-PASS SVGElement interface: script must inherit property "className" with the proper type
-PASS SVGElement interface: script must inherit property "dataset" with the proper type
-PASS SVGElement interface: script must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: script must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: script must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: script must inherit property "focus()" with the proper type
-PASS SVGElement interface: script must inherit property "blur()" with the proper type
-PASS SVGAElement interface: existence and properties of interface object
-PASS SVGAElement interface object length
-PASS SVGAElement interface object name
-PASS SVGAElement interface: existence and properties of interface prototype object
-PASS SVGAElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGAElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGAElement interface: attribute target
-PASS Unscopable handled correctly for target property on SVGAElement
-PASS SVGAElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGAElement
-PASS SVGAElement must be primary interface of a
-PASS Stringification of a
-PASS SVGAElement interface: a must inherit property "target" with the proper type
-PASS SVGAElement interface: a must inherit property "href" with the proper type
-PASS SVGGraphicsElement interface: a must inherit property "transform" with the proper type
-PASS SVGGraphicsElement interface: a must inherit property "getBBox(SVGBoundingBoxOptions)" with the proper type
-PASS SVGGraphicsElement interface: calling getBBox(SVGBoundingBoxOptions) on a with too few arguments must throw TypeError
-PASS SVGGraphicsElement interface: a must inherit property "getCTM()" with the proper type
-PASS SVGGraphicsElement interface: a must inherit property "getScreenCTM()" with the proper type
-PASS SVGGraphicsElement interface: a must inherit property "requiredExtensions" with the proper type
-PASS SVGGraphicsElement interface: a must inherit property "systemLanguage" with the proper type
-PASS SVGElement interface: a must inherit property "className" with the proper type
-PASS SVGElement interface: a must inherit property "dataset" with the proper type
-PASS SVGElement interface: a must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: a must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: a must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: a must inherit property "focus()" with the proper type
-PASS SVGElement interface: a must inherit property "blur()" with the proper type
-PASS SVGViewElement interface: existence and properties of interface object
-PASS SVGViewElement interface object length
-PASS SVGViewElement interface object name
-PASS SVGViewElement interface: existence and properties of interface prototype object
-PASS SVGViewElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGViewElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGViewElement interface: attribute viewBox
-PASS Unscopable handled correctly for viewBox property on SVGViewElement
-PASS SVGViewElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGViewElement
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_UNKNOWN on interface object
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_UNKNOWN on interface prototype object
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_DISABLE on interface object
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_DISABLE on interface prototype object
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_MAGNIFY on interface object
-PASS SVGViewElement interface: constant SVG_ZOOMANDPAN_MAGNIFY on interface prototype object
-PASS SVGViewElement interface: attribute zoomAndPan
-PASS Unscopable handled correctly for zoomAndPan property on SVGViewElement
-PASS SVGViewElement must be primary interface of view
-PASS Stringification of view
-PASS SVGViewElement interface: view must inherit property "viewBox" with the proper type
-PASS SVGViewElement interface: view must inherit property "preserveAspectRatio" with the proper type
-PASS SVGViewElement interface: view must inherit property "SVG_ZOOMANDPAN_UNKNOWN" with the proper type
-PASS SVGViewElement interface: view must inherit property "SVG_ZOOMANDPAN_DISABLE" with the proper type
-PASS SVGViewElement interface: view must inherit property "SVG_ZOOMANDPAN_MAGNIFY" with the proper type
-PASS SVGViewElement interface: view must inherit property "zoomAndPan" with the proper type
-PASS SVGElement interface: view must inherit property "className" with the proper type
-PASS SVGElement interface: view must inherit property "dataset" with the proper type
-PASS SVGElement interface: view must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: view must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: view must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: view must inherit property "focus()" with the proper type
-PASS SVGElement interface: view must inherit property "blur()" with the proper type
-PASS SVGFilterElement interface: existence and properties of interface object
-PASS SVGFilterElement interface object length
-PASS SVGFilterElement interface object name
-PASS SVGFilterElement interface: existence and properties of interface prototype object
-PASS SVGFilterElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFilterElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFilterElement interface: attribute filterUnits
-PASS Unscopable handled correctly for filterUnits property on SVGFilterElement
-PASS SVGFilterElement interface: attribute primitiveUnits
-PASS Unscopable handled correctly for primitiveUnits property on SVGFilterElement
-PASS SVGFilterElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFilterElement
-PASS SVGFilterElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFilterElement
-PASS SVGFilterElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFilterElement
-PASS SVGFilterElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFilterElement
-PASS SVGFilterElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGFilterElement
-PASS SVGFilterElement must be primary interface of filter
-PASS Stringification of filter
-PASS SVGFilterElement interface: filter must inherit property "filterUnits" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "primitiveUnits" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "x" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "y" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "width" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "height" with the proper type
-PASS SVGFilterElement interface: filter must inherit property "href" with the proper type
-PASS SVGElement interface: filter must inherit property "className" with the proper type
-PASS SVGElement interface: filter must inherit property "dataset" with the proper type
-PASS SVGElement interface: filter must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: filter must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: filter must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: filter must inherit property "focus()" with the proper type
-PASS SVGElement interface: filter must inherit property "blur()" with the proper type
-PASS SVGFEBlendElement interface: existence and properties of interface object
-PASS SVGFEBlendElement interface object length
-PASS SVGFEBlendElement interface object name
-PASS SVGFEBlendElement interface: existence and properties of interface prototype object
-PASS SVGFEBlendElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEBlendElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_UNKNOWN on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_UNKNOWN on interface prototype object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_NORMAL on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_NORMAL on interface prototype object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_MULTIPLY on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_MULTIPLY on interface prototype object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_SCREEN on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_SCREEN on interface prototype object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_DARKEN on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_DARKEN on interface prototype object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_LIGHTEN on interface object
-PASS SVGFEBlendElement interface: constant SVG_FEBLEND_MODE_LIGHTEN on interface prototype object
-PASS SVGFEBlendElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute in2
-PASS Unscopable handled correctly for in2 property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute mode
-PASS Unscopable handled correctly for mode property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEBlendElement
-PASS SVGFEBlendElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEBlendElement
-PASS SVGFEBlendElement must be primary interface of feBlend
-PASS Stringification of feBlend
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_UNKNOWN" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_NORMAL" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_MULTIPLY" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_SCREEN" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_DARKEN" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "SVG_FEBLEND_MODE_LIGHTEN" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "in1" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "in2" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "mode" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "x" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "y" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "width" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "height" with the proper type
-PASS SVGFEBlendElement interface: feBlend must inherit property "result" with the proper type
-PASS SVGElement interface: feBlend must inherit property "className" with the proper type
-PASS SVGElement interface: feBlend must inherit property "dataset" with the proper type
-PASS SVGElement interface: feBlend must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feBlend must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feBlend must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feBlend must inherit property "focus()" with the proper type
-PASS SVGElement interface: feBlend must inherit property "blur()" with the proper type
-PASS SVGFEColorMatrixElement interface: existence and properties of interface object
-PASS SVGFEColorMatrixElement interface object length
-PASS SVGFEColorMatrixElement interface object name
-PASS SVGFEColorMatrixElement interface: existence and properties of interface prototype object
-PASS SVGFEColorMatrixElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEColorMatrixElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_UNKNOWN on interface object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_UNKNOWN on interface prototype object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_MATRIX on interface object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_MATRIX on interface prototype object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_SATURATE on interface object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_SATURATE on interface prototype object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_HUEROTATE on interface object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_HUEROTATE on interface prototype object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA on interface object
-PASS SVGFEColorMatrixElement interface: constant SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA on interface prototype object
-PASS SVGFEColorMatrixElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute type
-PASS Unscopable handled correctly for type property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute values
-PASS Unscopable handled correctly for values property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEColorMatrixElement
-PASS SVGFEColorMatrixElement must be primary interface of feColorMatrix
-PASS Stringification of feColorMatrix
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "SVG_FECOLORMATRIX_TYPE_UNKNOWN" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "SVG_FECOLORMATRIX_TYPE_MATRIX" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "SVG_FECOLORMATRIX_TYPE_SATURATE" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "SVG_FECOLORMATRIX_TYPE_HUEROTATE" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "in1" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "type" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "values" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "x" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "y" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "width" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "height" with the proper type
-PASS SVGFEColorMatrixElement interface: feColorMatrix must inherit property "result" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "className" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "dataset" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "focus()" with the proper type
-PASS SVGElement interface: feColorMatrix must inherit property "blur()" with the proper type
-PASS SVGFEComponentTransferElement interface: existence and properties of interface object
-PASS SVGFEComponentTransferElement interface object length
-PASS SVGFEComponentTransferElement interface object name
-PASS SVGFEComponentTransferElement interface: existence and properties of interface prototype object
-PASS SVGFEComponentTransferElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEComponentTransferElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEComponentTransferElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEComponentTransferElement
-PASS SVGFEComponentTransferElement must be primary interface of feComponentTransfer
-PASS Stringification of feComponentTransfer
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "in1" with the proper type
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "x" with the proper type
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "y" with the proper type
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "width" with the proper type
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "height" with the proper type
-PASS SVGFEComponentTransferElement interface: feComponentTransfer must inherit property "result" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "className" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "dataset" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "focus()" with the proper type
-PASS SVGElement interface: feComponentTransfer must inherit property "blur()" with the proper type
-PASS SVGComponentTransferFunctionElement interface: existence and properties of interface object
-PASS SVGComponentTransferFunctionElement interface object length
-PASS SVGComponentTransferFunctionElement interface object name
-PASS SVGComponentTransferFunctionElement interface: existence and properties of interface prototype object
-PASS SVGComponentTransferFunctionElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGComponentTransferFunctionElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_TABLE on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_TABLE on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_LINEAR on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_LINEAR on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_GAMMA on interface object
-PASS SVGComponentTransferFunctionElement interface: constant SVG_FECOMPONENTTRANSFER_TYPE_GAMMA on interface prototype object
-PASS SVGComponentTransferFunctionElement interface: attribute type
-PASS Unscopable handled correctly for type property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute tableValues
-PASS Unscopable handled correctly for tableValues property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute slope
-PASS Unscopable handled correctly for slope property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute intercept
-PASS Unscopable handled correctly for intercept property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute amplitude
-PASS Unscopable handled correctly for amplitude property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute exponent
-PASS Unscopable handled correctly for exponent property on SVGComponentTransferFunctionElement
-PASS SVGComponentTransferFunctionElement interface: attribute offset
-PASS Unscopable handled correctly for offset property on SVGComponentTransferFunctionElement
-PASS SVGFEFuncRElement interface: existence and properties of interface object
-PASS SVGFEFuncRElement interface object length
-PASS SVGFEFuncRElement interface object name
-PASS SVGFEFuncRElement interface: existence and properties of interface prototype object
-PASS SVGFEFuncRElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEFuncRElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEFuncRElement must be primary interface of feFuncR
-PASS Stringification of feFuncR
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_TABLE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "type" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "tableValues" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "slope" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "intercept" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "amplitude" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "exponent" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncR must inherit property "offset" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "className" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "dataset" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "focus()" with the proper type
-PASS SVGElement interface: feFuncR must inherit property "blur()" with the proper type
-PASS SVGFEFuncGElement interface: existence and properties of interface object
-PASS SVGFEFuncGElement interface object length
-PASS SVGFEFuncGElement interface object name
-PASS SVGFEFuncGElement interface: existence and properties of interface prototype object
-PASS SVGFEFuncGElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEFuncGElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEFuncGElement must be primary interface of feFuncG
-PASS Stringification of feFuncG
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_TABLE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "type" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "tableValues" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "slope" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "intercept" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "amplitude" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "exponent" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncG must inherit property "offset" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "className" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "dataset" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "focus()" with the proper type
-PASS SVGElement interface: feFuncG must inherit property "blur()" with the proper type
-PASS SVGFEFuncBElement interface: existence and properties of interface object
-PASS SVGFEFuncBElement interface object length
-PASS SVGFEFuncBElement interface object name
-PASS SVGFEFuncBElement interface: existence and properties of interface prototype object
-PASS SVGFEFuncBElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEFuncBElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEFuncBElement must be primary interface of feFuncB
-PASS Stringification of feFuncB
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_TABLE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "type" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "tableValues" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "slope" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "intercept" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "amplitude" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "exponent" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncB must inherit property "offset" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "className" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "dataset" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "focus()" with the proper type
-PASS SVGElement interface: feFuncB must inherit property "blur()" with the proper type
-PASS SVGFEFuncAElement interface: existence and properties of interface object
-PASS SVGFEFuncAElement interface object length
-PASS SVGFEFuncAElement interface object name
-PASS SVGFEFuncAElement interface: existence and properties of interface prototype object
-PASS SVGFEFuncAElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEFuncAElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEFuncAElement must be primary interface of feFuncA
-PASS Stringification of feFuncA
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_TABLE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_LINEAR" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "SVG_FECOMPONENTTRANSFER_TYPE_GAMMA" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "type" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "tableValues" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "slope" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "intercept" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "amplitude" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "exponent" with the proper type
-PASS SVGComponentTransferFunctionElement interface: feFuncA must inherit property "offset" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "className" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "dataset" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "focus()" with the proper type
-PASS SVGElement interface: feFuncA must inherit property "blur()" with the proper type
-PASS SVGFECompositeElement interface: existence and properties of interface object
-PASS SVGFECompositeElement interface object length
-PASS SVGFECompositeElement interface object name
-PASS SVGFECompositeElement interface: existence and properties of interface prototype object
-PASS SVGFECompositeElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFECompositeElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_UNKNOWN on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_UNKNOWN on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_OVER on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_OVER on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_IN on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_IN on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_OUT on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_OUT on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_ATOP on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_ATOP on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_XOR on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_XOR on interface prototype object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_ARITHMETIC on interface object
-PASS SVGFECompositeElement interface: constant SVG_FECOMPOSITE_OPERATOR_ARITHMETIC on interface prototype object
-PASS SVGFECompositeElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute in2
-PASS Unscopable handled correctly for in2 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute operator
-PASS Unscopable handled correctly for operator property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute k1
-PASS Unscopable handled correctly for k1 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute k2
-PASS Unscopable handled correctly for k2 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute k3
-PASS Unscopable handled correctly for k3 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute k4
-PASS Unscopable handled correctly for k4 property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFECompositeElement
-PASS SVGFECompositeElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFECompositeElement
-PASS SVGFECompositeElement must be primary interface of feComposite
-PASS Stringification of feComposite
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_UNKNOWN" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_OVER" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_IN" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_OUT" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_ATOP" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_XOR" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "SVG_FECOMPOSITE_OPERATOR_ARITHMETIC" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "in1" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "in2" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "operator" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "k1" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "k2" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "k3" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "k4" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "x" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "y" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "width" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "height" with the proper type
-PASS SVGFECompositeElement interface: feComposite must inherit property "result" with the proper type
-PASS SVGElement interface: feComposite must inherit property "className" with the proper type
-PASS SVGElement interface: feComposite must inherit property "dataset" with the proper type
-PASS SVGElement interface: feComposite must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feComposite must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feComposite must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feComposite must inherit property "focus()" with the proper type
-PASS SVGElement interface: feComposite must inherit property "blur()" with the proper type
-PASS SVGFEConvolveMatrixElement interface: existence and properties of interface object
-PASS SVGFEConvolveMatrixElement interface object length
-PASS SVGFEConvolveMatrixElement interface object name
-PASS SVGFEConvolveMatrixElement interface: existence and properties of interface prototype object
-PASS SVGFEConvolveMatrixElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEConvolveMatrixElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_UNKNOWN on interface object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_UNKNOWN on interface prototype object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_DUPLICATE on interface object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_DUPLICATE on interface prototype object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_WRAP on interface object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_WRAP on interface prototype object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_NONE on interface object
-PASS SVGFEConvolveMatrixElement interface: constant SVG_EDGEMODE_NONE on interface prototype object
-PASS SVGFEConvolveMatrixElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute orderX
-PASS Unscopable handled correctly for orderX property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute orderY
-PASS Unscopable handled correctly for orderY property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute kernelMatrix
-PASS Unscopable handled correctly for kernelMatrix property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute divisor
-PASS Unscopable handled correctly for divisor property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute bias
-PASS Unscopable handled correctly for bias property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute targetX
-PASS Unscopable handled correctly for targetX property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute targetY
-PASS Unscopable handled correctly for targetY property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute edgeMode
-PASS Unscopable handled correctly for edgeMode property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute kernelUnitLengthX
-PASS Unscopable handled correctly for kernelUnitLengthX property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute kernelUnitLengthY
-PASS Unscopable handled correctly for kernelUnitLengthY property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEConvolveMatrixElement
-PASS SVGFEConvolveMatrixElement must be primary interface of feConvolveMatrix
-PASS Stringification of feConvolveMatrix
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "SVG_EDGEMODE_UNKNOWN" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "SVG_EDGEMODE_DUPLICATE" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "SVG_EDGEMODE_WRAP" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "SVG_EDGEMODE_NONE" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "in1" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "orderX" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "orderY" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "kernelMatrix" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "divisor" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "bias" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "targetX" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "targetY" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "edgeMode" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "kernelUnitLengthX" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "kernelUnitLengthY" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "x" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "y" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "width" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "height" with the proper type
-PASS SVGFEConvolveMatrixElement interface: feConvolveMatrix must inherit property "result" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "className" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "dataset" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "focus()" with the proper type
-PASS SVGElement interface: feConvolveMatrix must inherit property "blur()" with the proper type
-PASS SVGFEDiffuseLightingElement interface: existence and properties of interface object
-PASS SVGFEDiffuseLightingElement interface object length
-PASS SVGFEDiffuseLightingElement interface object name
-PASS SVGFEDiffuseLightingElement interface: existence and properties of interface prototype object
-PASS SVGFEDiffuseLightingElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEDiffuseLightingElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEDiffuseLightingElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute surfaceScale
-PASS Unscopable handled correctly for surfaceScale property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute diffuseConstant
-PASS Unscopable handled correctly for diffuseConstant property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute kernelUnitLengthX
-PASS Unscopable handled correctly for kernelUnitLengthX property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute kernelUnitLengthY
-PASS Unscopable handled correctly for kernelUnitLengthY property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEDiffuseLightingElement
-PASS SVGFEDiffuseLightingElement must be primary interface of feDiffuseLighting
-PASS Stringification of feDiffuseLighting
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "in1" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "surfaceScale" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "diffuseConstant" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "kernelUnitLengthX" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "kernelUnitLengthY" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "x" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "y" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "width" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "height" with the proper type
-PASS SVGFEDiffuseLightingElement interface: feDiffuseLighting must inherit property "result" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "className" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "dataset" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "focus()" with the proper type
-PASS SVGElement interface: feDiffuseLighting must inherit property "blur()" with the proper type
-PASS SVGFEDistantLightElement interface: existence and properties of interface object
-PASS SVGFEDistantLightElement interface object length
-PASS SVGFEDistantLightElement interface object name
-PASS SVGFEDistantLightElement interface: existence and properties of interface prototype object
-PASS SVGFEDistantLightElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEDistantLightElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEDistantLightElement interface: attribute azimuth
-PASS Unscopable handled correctly for azimuth property on SVGFEDistantLightElement
-PASS SVGFEDistantLightElement interface: attribute elevation
-PASS Unscopable handled correctly for elevation property on SVGFEDistantLightElement
-PASS SVGFEPointLightElement interface: existence and properties of interface object
-PASS SVGFEPointLightElement interface object length
-PASS SVGFEPointLightElement interface object name
-PASS SVGFEPointLightElement interface: existence and properties of interface prototype object
-PASS SVGFEPointLightElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEPointLightElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEPointLightElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEPointLightElement
-PASS SVGFEPointLightElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEPointLightElement
-PASS SVGFEPointLightElement interface: attribute z
-PASS Unscopable handled correctly for z property on SVGFEPointLightElement
-PASS SVGFEPointLightElement must be primary interface of fePointLight
-PASS Stringification of fePointLight
-PASS SVGFEPointLightElement interface: fePointLight must inherit property "x" with the proper type
-PASS SVGFEPointLightElement interface: fePointLight must inherit property "y" with the proper type
-PASS SVGFEPointLightElement interface: fePointLight must inherit property "z" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "className" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "dataset" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "focus()" with the proper type
-PASS SVGElement interface: fePointLight must inherit property "blur()" with the proper type
-PASS SVGFESpotLightElement interface: existence and properties of interface object
-PASS SVGFESpotLightElement interface object length
-PASS SVGFESpotLightElement interface object name
-PASS SVGFESpotLightElement interface: existence and properties of interface prototype object
-PASS SVGFESpotLightElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFESpotLightElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFESpotLightElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute z
-PASS Unscopable handled correctly for z property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute pointsAtX
-PASS Unscopable handled correctly for pointsAtX property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute pointsAtY
-PASS Unscopable handled correctly for pointsAtY property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute pointsAtZ
-PASS Unscopable handled correctly for pointsAtZ property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute specularExponent
-PASS Unscopable handled correctly for specularExponent property on SVGFESpotLightElement
-PASS SVGFESpotLightElement interface: attribute limitingConeAngle
-PASS Unscopable handled correctly for limitingConeAngle property on SVGFESpotLightElement
-PASS SVGFESpotLightElement must be primary interface of feSpotLight
-PASS Stringification of feSpotLight
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "x" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "y" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "z" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "pointsAtX" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "pointsAtY" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "pointsAtZ" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "specularExponent" with the proper type
-PASS SVGFESpotLightElement interface: feSpotLight must inherit property "limitingConeAngle" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "className" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "dataset" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "focus()" with the proper type
-PASS SVGElement interface: feSpotLight must inherit property "blur()" with the proper type
-PASS SVGFEDisplacementMapElement interface: existence and properties of interface object
-PASS SVGFEDisplacementMapElement interface object length
-PASS SVGFEDisplacementMapElement interface object name
-PASS SVGFEDisplacementMapElement interface: existence and properties of interface prototype object
-PASS SVGFEDisplacementMapElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEDisplacementMapElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_UNKNOWN on interface object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_UNKNOWN on interface prototype object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_R on interface object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_R on interface prototype object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_G on interface object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_G on interface prototype object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_B on interface object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_B on interface prototype object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_A on interface object
-PASS SVGFEDisplacementMapElement interface: constant SVG_CHANNEL_A on interface prototype object
-PASS SVGFEDisplacementMapElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute in2
-PASS Unscopable handled correctly for in2 property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute scale
-PASS Unscopable handled correctly for scale property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute xChannelSelector
-PASS Unscopable handled correctly for xChannelSelector property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute yChannelSelector
-PASS Unscopable handled correctly for yChannelSelector property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEDisplacementMapElement
-PASS SVGFEDisplacementMapElement must be primary interface of feDisplacementMap
-PASS Stringification of feDisplacementMap
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "SVG_CHANNEL_UNKNOWN" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "SVG_CHANNEL_R" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "SVG_CHANNEL_G" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "SVG_CHANNEL_B" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "SVG_CHANNEL_A" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "in1" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "in2" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "scale" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "xChannelSelector" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "yChannelSelector" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "x" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "y" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "width" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "height" with the proper type
-PASS SVGFEDisplacementMapElement interface: feDisplacementMap must inherit property "result" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "className" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "dataset" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "focus()" with the proper type
-PASS SVGElement interface: feDisplacementMap must inherit property "blur()" with the proper type
-PASS SVGFEDropShadowElement interface: existence and properties of interface object
-PASS SVGFEDropShadowElement interface object length
-PASS SVGFEDropShadowElement interface object name
-PASS SVGFEDropShadowElement interface: existence and properties of interface prototype object
-PASS SVGFEDropShadowElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEDropShadowElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEDropShadowElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute dx
-PASS Unscopable handled correctly for dx property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute dy
-PASS Unscopable handled correctly for dy property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute stdDeviationX
-PASS Unscopable handled correctly for stdDeviationX property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute stdDeviationY
-PASS Unscopable handled correctly for stdDeviationY property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: operation setStdDeviation(float, float)
-PASS Unscopable handled correctly for setStdDeviation(float, float) on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEDropShadowElement
-PASS SVGFEDropShadowElement must be primary interface of feDropShadow
-PASS Stringification of feDropShadow
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "in1" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "dx" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "dy" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "stdDeviationX" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "stdDeviationY" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "setStdDeviation(float, float)" with the proper type
-PASS SVGFEDropShadowElement interface: calling setStdDeviation(float, float) on feDropShadow with too few arguments must throw TypeError
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "x" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "y" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "width" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "height" with the proper type
-PASS SVGFEDropShadowElement interface: feDropShadow must inherit property "result" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "className" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "dataset" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "focus()" with the proper type
-PASS SVGElement interface: feDropShadow must inherit property "blur()" with the proper type
-PASS SVGFEFloodElement interface: existence and properties of interface object
-PASS SVGFEFloodElement interface object length
-PASS SVGFEFloodElement interface object name
-PASS SVGFEFloodElement interface: existence and properties of interface prototype object
-PASS SVGFEFloodElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEFloodElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEFloodElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEFloodElement
-PASS SVGFEFloodElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEFloodElement
-PASS SVGFEFloodElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEFloodElement
-PASS SVGFEFloodElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEFloodElement
-PASS SVGFEFloodElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEFloodElement
-PASS SVGFEFloodElement must be primary interface of feFlood
-PASS Stringification of feFlood
-PASS SVGFEFloodElement interface: feFlood must inherit property "x" with the proper type
-PASS SVGFEFloodElement interface: feFlood must inherit property "y" with the proper type
-PASS SVGFEFloodElement interface: feFlood must inherit property "width" with the proper type
-PASS SVGFEFloodElement interface: feFlood must inherit property "height" with the proper type
-PASS SVGFEFloodElement interface: feFlood must inherit property "result" with the proper type
-PASS SVGElement interface: feFlood must inherit property "className" with the proper type
-PASS SVGElement interface: feFlood must inherit property "dataset" with the proper type
-PASS SVGElement interface: feFlood must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feFlood must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feFlood must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feFlood must inherit property "focus()" with the proper type
-PASS SVGElement interface: feFlood must inherit property "blur()" with the proper type
-PASS SVGFEGaussianBlurElement interface: existence and properties of interface object
-PASS SVGFEGaussianBlurElement interface object length
-PASS SVGFEGaussianBlurElement interface object name
-PASS SVGFEGaussianBlurElement interface: existence and properties of interface prototype object
-PASS SVGFEGaussianBlurElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEGaussianBlurElement interface: existence and properties of interface prototype object's @@unscopables property
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_UNKNOWN on interface object assert_own_property: expected property "SVG_EDGEMODE_UNKNOWN" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_UNKNOWN on interface prototype object assert_own_property: expected property "SVG_EDGEMODE_UNKNOWN" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_DUPLICATE on interface object assert_own_property: expected property "SVG_EDGEMODE_DUPLICATE" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_DUPLICATE on interface prototype object assert_own_property: expected property "SVG_EDGEMODE_DUPLICATE" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_WRAP on interface object assert_own_property: expected property "SVG_EDGEMODE_WRAP" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_WRAP on interface prototype object assert_own_property: expected property "SVG_EDGEMODE_WRAP" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_NONE on interface object assert_own_property: expected property "SVG_EDGEMODE_NONE" missing
-FAIL SVGFEGaussianBlurElement interface: constant SVG_EDGEMODE_NONE on interface prototype object assert_own_property: expected property "SVG_EDGEMODE_NONE" missing
-PASS SVGFEGaussianBlurElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute stdDeviationX
-PASS Unscopable handled correctly for stdDeviationX property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute stdDeviationY
-PASS Unscopable handled correctly for stdDeviationY property on SVGFEGaussianBlurElement
-FAIL SVGFEGaussianBlurElement interface: attribute edgeMode assert_true: The prototype object must have a property "edgeMode" expected true got false
-PASS Unscopable handled correctly for edgeMode property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: operation setStdDeviation(float, float)
-PASS Unscopable handled correctly for setStdDeviation(float, float) on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEGaussianBlurElement
-PASS SVGFEGaussianBlurElement must be primary interface of feGaussianBlur
-PASS Stringification of feGaussianBlur
-FAIL SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "SVG_EDGEMODE_UNKNOWN" with the proper type assert_inherits: property "SVG_EDGEMODE_UNKNOWN" not found in prototype chain
-FAIL SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "SVG_EDGEMODE_DUPLICATE" with the proper type assert_inherits: property "SVG_EDGEMODE_DUPLICATE" not found in prototype chain
-FAIL SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "SVG_EDGEMODE_WRAP" with the proper type assert_inherits: property "SVG_EDGEMODE_WRAP" not found in prototype chain
-FAIL SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "SVG_EDGEMODE_NONE" with the proper type assert_inherits: property "SVG_EDGEMODE_NONE" not found in prototype chain
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "in1" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "stdDeviationX" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "stdDeviationY" with the proper type
-FAIL SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "edgeMode" with the proper type assert_inherits: property "edgeMode" not found in prototype chain
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "setStdDeviation(float, float)" with the proper type
-PASS SVGFEGaussianBlurElement interface: calling setStdDeviation(float, float) on feGaussianBlur with too few arguments must throw TypeError
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "x" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "y" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "width" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "height" with the proper type
-PASS SVGFEGaussianBlurElement interface: feGaussianBlur must inherit property "result" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "className" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "dataset" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "focus()" with the proper type
-PASS SVGElement interface: feGaussianBlur must inherit property "blur()" with the proper type
-PASS SVGFEImageElement interface: existence and properties of interface object
-PASS SVGFEImageElement interface object length
-PASS SVGFEImageElement interface object name
-PASS SVGFEImageElement interface: existence and properties of interface prototype object
-PASS SVGFEImageElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEImageElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEImageElement interface: attribute preserveAspectRatio
-PASS Unscopable handled correctly for preserveAspectRatio property on SVGFEImageElement
-FAIL SVGFEImageElement interface: attribute crossOrigin assert_true: The prototype object must have a property "crossOrigin" expected true got false
-PASS Unscopable handled correctly for crossOrigin property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEImageElement
-PASS SVGFEImageElement interface: attribute href
-PASS Unscopable handled correctly for href property on SVGFEImageElement
-PASS SVGFEImageElement must be primary interface of feImage
-PASS Stringification of feImage
-PASS SVGFEImageElement interface: feImage must inherit property "preserveAspectRatio" with the proper type
-FAIL SVGFEImageElement interface: feImage must inherit property "crossOrigin" with the proper type assert_inherits: property "crossOrigin" not found in prototype chain
-PASS SVGFEImageElement interface: feImage must inherit property "x" with the proper type
-PASS SVGFEImageElement interface: feImage must inherit property "y" with the proper type
-PASS SVGFEImageElement interface: feImage must inherit property "width" with the proper type
-PASS SVGFEImageElement interface: feImage must inherit property "height" with the proper type
-PASS SVGFEImageElement interface: feImage must inherit property "result" with the proper type
-PASS SVGFEImageElement interface: feImage must inherit property "href" with the proper type
-PASS SVGElement interface: feImage must inherit property "className" with the proper type
-PASS SVGElement interface: feImage must inherit property "dataset" with the proper type
-PASS SVGElement interface: feImage must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feImage must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feImage must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feImage must inherit property "focus()" with the proper type
-PASS SVGElement interface: feImage must inherit property "blur()" with the proper type
-PASS SVGFEMergeElement interface: existence and properties of interface object
-PASS SVGFEMergeElement interface object length
-PASS SVGFEMergeElement interface object name
-PASS SVGFEMergeElement interface: existence and properties of interface prototype object
-PASS SVGFEMergeElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEMergeElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEMergeElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEMergeElement
-PASS SVGFEMergeElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEMergeElement
-PASS SVGFEMergeElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEMergeElement
-PASS SVGFEMergeElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEMergeElement
-PASS SVGFEMergeElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEMergeElement
-PASS SVGFEMergeElement must be primary interface of feMerge
-PASS Stringification of feMerge
-PASS SVGFEMergeElement interface: feMerge must inherit property "x" with the proper type
-PASS SVGFEMergeElement interface: feMerge must inherit property "y" with the proper type
-PASS SVGFEMergeElement interface: feMerge must inherit property "width" with the proper type
-PASS SVGFEMergeElement interface: feMerge must inherit property "height" with the proper type
-PASS SVGFEMergeElement interface: feMerge must inherit property "result" with the proper type
-PASS SVGElement interface: feMerge must inherit property "className" with the proper type
-PASS SVGElement interface: feMerge must inherit property "dataset" with the proper type
-PASS SVGElement interface: feMerge must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feMerge must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feMerge must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feMerge must inherit property "focus()" with the proper type
-PASS SVGElement interface: feMerge must inherit property "blur()" with the proper type
-PASS SVGFEMergeNodeElement interface: existence and properties of interface object
-PASS SVGFEMergeNodeElement interface object length
-PASS SVGFEMergeNodeElement interface object name
-PASS SVGFEMergeNodeElement interface: existence and properties of interface prototype object
-PASS SVGFEMergeNodeElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEMergeNodeElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEMergeNodeElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEMergeNodeElement
-PASS SVGFEMergeNodeElement must be primary interface of feMergeNode
-PASS Stringification of feMergeNode
-PASS SVGFEMergeNodeElement interface: feMergeNode must inherit property "in1" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "className" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "dataset" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "focus()" with the proper type
-PASS SVGElement interface: feMergeNode must inherit property "blur()" with the proper type
-PASS SVGFEMorphologyElement interface: existence and properties of interface object
-PASS SVGFEMorphologyElement interface object length
-PASS SVGFEMorphologyElement interface object name
-PASS SVGFEMorphologyElement interface: existence and properties of interface prototype object
-PASS SVGFEMorphologyElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEMorphologyElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_UNKNOWN on interface object
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_UNKNOWN on interface prototype object
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_ERODE on interface object
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_ERODE on interface prototype object
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_DILATE on interface object
-PASS SVGFEMorphologyElement interface: constant SVG_MORPHOLOGY_OPERATOR_DILATE on interface prototype object
-PASS SVGFEMorphologyElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute operator
-PASS Unscopable handled correctly for operator property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute radiusX
-PASS Unscopable handled correctly for radiusX property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute radiusY
-PASS Unscopable handled correctly for radiusY property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEMorphologyElement
-PASS SVGFEMorphologyElement must be primary interface of feMorphology
-PASS Stringification of feMorphology
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "SVG_MORPHOLOGY_OPERATOR_UNKNOWN" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "SVG_MORPHOLOGY_OPERATOR_ERODE" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "SVG_MORPHOLOGY_OPERATOR_DILATE" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "in1" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "operator" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "radiusX" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "radiusY" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "x" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "y" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "width" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "height" with the proper type
-PASS SVGFEMorphologyElement interface: feMorphology must inherit property "result" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "className" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "dataset" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "focus()" with the proper type
-PASS SVGElement interface: feMorphology must inherit property "blur()" with the proper type
-PASS SVGFEOffsetElement interface: existence and properties of interface object
-PASS SVGFEOffsetElement interface object length
-PASS SVGFEOffsetElement interface object name
-PASS SVGFEOffsetElement interface: existence and properties of interface prototype object
-PASS SVGFEOffsetElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFEOffsetElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFEOffsetElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute dx
-PASS Unscopable handled correctly for dx property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute dy
-PASS Unscopable handled correctly for dy property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFEOffsetElement
-PASS SVGFEOffsetElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFEOffsetElement
-PASS SVGFESpecularLightingElement interface: existence and properties of interface object
-PASS SVGFESpecularLightingElement interface object length
-PASS SVGFESpecularLightingElement interface object name
-PASS SVGFESpecularLightingElement interface: existence and properties of interface prototype object
-PASS SVGFESpecularLightingElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFESpecularLightingElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFESpecularLightingElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute surfaceScale
-PASS Unscopable handled correctly for surfaceScale property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute specularConstant
-PASS Unscopable handled correctly for specularConstant property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute specularExponent
-PASS Unscopable handled correctly for specularExponent property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute kernelUnitLengthX
-PASS Unscopable handled correctly for kernelUnitLengthX property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute kernelUnitLengthY
-PASS Unscopable handled correctly for kernelUnitLengthY property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFESpecularLightingElement
-PASS SVGFESpecularLightingElement must be primary interface of feSpecularLighting
-PASS Stringification of feSpecularLighting
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "in1" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "surfaceScale" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "specularConstant" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "specularExponent" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "kernelUnitLengthX" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "kernelUnitLengthY" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "x" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "y" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "width" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "height" with the proper type
-PASS SVGFESpecularLightingElement interface: feSpecularLighting must inherit property "result" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "className" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "dataset" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "focus()" with the proper type
-PASS SVGElement interface: feSpecularLighting must inherit property "blur()" with the proper type
-PASS SVGFETileElement interface: existence and properties of interface object
-PASS SVGFETileElement interface object length
-PASS SVGFETileElement interface object name
-PASS SVGFETileElement interface: existence and properties of interface prototype object
-PASS SVGFETileElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFETileElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFETileElement interface: attribute in1
-PASS Unscopable handled correctly for in1 property on SVGFETileElement
-PASS SVGFETileElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFETileElement
-PASS SVGFETileElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFETileElement
-PASS SVGFETileElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFETileElement
-PASS SVGFETileElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFETileElement
-PASS SVGFETileElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFETileElement
-PASS SVGFETileElement must be primary interface of feTile
-PASS Stringification of feTile
-PASS SVGFETileElement interface: feTile must inherit property "in1" with the proper type
-PASS SVGFETileElement interface: feTile must inherit property "x" with the proper type
-PASS SVGFETileElement interface: feTile must inherit property "y" with the proper type
-PASS SVGFETileElement interface: feTile must inherit property "width" with the proper type
-PASS SVGFETileElement interface: feTile must inherit property "height" with the proper type
-PASS SVGFETileElement interface: feTile must inherit property "result" with the proper type
-PASS SVGElement interface: feTile must inherit property "className" with the proper type
-PASS SVGElement interface: feTile must inherit property "dataset" with the proper type
-PASS SVGElement interface: feTile must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feTile must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feTile must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feTile must inherit property "focus()" with the proper type
-PASS SVGElement interface: feTile must inherit property "blur()" with the proper type
-PASS SVGFETurbulenceElement interface: existence and properties of interface object
-PASS SVGFETurbulenceElement interface object length
-PASS SVGFETurbulenceElement interface object name
-PASS SVGFETurbulenceElement interface: existence and properties of interface prototype object
-PASS SVGFETurbulenceElement interface: existence and properties of interface prototype object's "constructor" property
-PASS SVGFETurbulenceElement interface: existence and properties of interface prototype object's @@unscopables property
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_UNKNOWN on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_UNKNOWN on interface prototype object
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_FRACTALNOISE on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_FRACTALNOISE on interface prototype object
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_TURBULENCE on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_TURBULENCE_TYPE_TURBULENCE on interface prototype object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_UNKNOWN on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_UNKNOWN on interface prototype object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_STITCH on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_STITCH on interface prototype object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_NOSTITCH on interface object
-PASS SVGFETurbulenceElement interface: constant SVG_STITCHTYPE_NOSTITCH on interface prototype object
-PASS SVGFETurbulenceElement interface: attribute baseFrequencyX
-PASS Unscopable handled correctly for baseFrequencyX property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute baseFrequencyY
-PASS Unscopable handled correctly for baseFrequencyY property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute numOctaves
-PASS Unscopable handled correctly for numOctaves property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute seed
-PASS Unscopable handled correctly for seed property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute stitchTiles
-PASS Unscopable handled correctly for stitchTiles property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute type
-PASS Unscopable handled correctly for type property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute x
-PASS Unscopable handled correctly for x property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute y
-PASS Unscopable handled correctly for y property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute width
-PASS Unscopable handled correctly for width property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute height
-PASS Unscopable handled correctly for height property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement interface: attribute result
-PASS Unscopable handled correctly for result property on SVGFETurbulenceElement
-PASS SVGFETurbulenceElement must be primary interface of feTurbulence
-PASS Stringification of feTurbulence
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_TURBULENCE_TYPE_UNKNOWN" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_TURBULENCE_TYPE_FRACTALNOISE" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_TURBULENCE_TYPE_TURBULENCE" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_STITCHTYPE_UNKNOWN" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_STITCHTYPE_STITCH" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "SVG_STITCHTYPE_NOSTITCH" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "baseFrequencyX" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "baseFrequencyY" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "numOctaves" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "seed" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "stitchTiles" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "type" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "x" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "y" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "width" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "height" with the proper type
-PASS SVGFETurbulenceElement interface: feTurbulence must inherit property "result" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "className" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "dataset" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "ownerSVGElement" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "viewportElement" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "tabIndex" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "focus()" with the proper type
-PASS SVGElement interface: feTurbulence must inherit property "blur()" with the proper type
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/fast/dom/inner-text-001-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/inner-text-001-expected.txt
index 728ae80..a84b120a 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/inner-text-001-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/dom/inner-text-001-expected.txt
@@ -27,8 +27,8 @@
 4	5	6
 
 Right here is an inline block.
- And an inline	table	with	one	row is here, too.
- And an inline	table
+And an inline	table	with	one	row is here, too.
+And an inline	table
 with	rows not far behind.
 Check collapsed margins
 Collapsed margins are supposed to result in an extra line break.
diff --git a/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html b/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
index a21c6e5..f06ce86 100644
--- a/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
+++ b/third_party/WebKit/LayoutTests/fast/events/before-unload-return-bad-value.html
@@ -14,10 +14,12 @@
     alreadyTested = true;
 
     frame.contentWindow.onbeforeunload = function(event) {
+        // This exception should be caught by |window.onerror|, not
+        // |frame.contentWindow.onerror| in this test case.
         return {toString: function() { throw "Exception in toString()"; }};
     };
 
-    frame.contentWindow.onerror = function(msg) {
+    window.onerror = function(msg) {
         testMessage = msg;
         testPassed("Exception was thrown");
         shouldBeEqualToString("testMessage", "Uncaught Exception in toString()");
diff --git a/third_party/WebKit/LayoutTests/fast/events/window-onerror-11-expected.txt b/third_party/WebKit/LayoutTests/fast/events/window-onerror-11-expected.txt
index 94aa9a66..58e6b91 100644
--- a/third_party/WebKit/LayoutTests/fast/events/window-onerror-11-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/events/window-onerror-11-expected.txt
@@ -4,17 +4,23 @@
 
 
 window.onerror: "Uncaught SyntaxError: Unexpected token %" at window-onerror-11.html (Line: 11, Column: 25)
-No stack trace.
+Stack Trace:
+SyntaxError: Unexpected token %
+    at window-onerror-11.html:31:24
 Returning 'true': the error should not be reported in the console as an unhandled exception.
 
 
 window.onerror: "Uncaught SyntaxError: Unexpected token %" at window-onerror-11.html (Line: 33, Column: 14)
-No stack trace.
+Stack Trace:
+SyntaxError: Unexpected token %
+    at window-onerror-11.html:31:24
 Returning 'true': the error should not be reported in the console as an unhandled exception.
 
 
 window.onerror: "Uncaught SyntaxError: Unexpected token %" at window-onerror-11.html (Line: 33, Column: 14)
-No stack trace.
+Stack Trace:
+SyntaxError: Unexpected token %
+    at window-onerror-11.html:31:24
 Returning 'true': the error should not be reported in the console as an unhandled exception.
 
 
diff --git a/third_party/WebKit/LayoutTests/fast/performance/detached-event-timestamp.html b/third_party/WebKit/LayoutTests/fast/performance/detached-event-timestamp.html
index bb02dfd3..5347344 100644
--- a/third_party/WebKit/LayoutTests/fast/performance/detached-event-timestamp.html
+++ b/third_party/WebKit/LayoutTests/fast/performance/detached-event-timestamp.html
@@ -8,7 +8,8 @@
 }
 
 i.contentWindow.onload = function() {
-  var detached_event = i.contentWindow.event;
+  // |window.event| should be set to invoked load event.
+  var detached_event = window.event;
   i.remove();
   detached_event.timeStamp;
   if (window.testRunner)
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
index 5280154..bae769b 100644
--- a/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
+++ b/third_party/WebKit/LayoutTests/flag-specific/enable-blink-features=LayoutNG/external/wpt/html/dom/elements/the-innertext-idl-attribute/getter-expected.txt
@@ -1,5 +1,5 @@
 This is a testharness.js-based test.
-Found 217 tests; 215 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 218 tests; 216 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS Simplest possible test ("<div>abc")
 PASS Leading whitespace removed ("<div> abc")
 PASS Trailing whitespace removed ("<div>abc ")
@@ -8,6 +8,7 @@
 PASS \r converted to space ("<div>abc\rdef")
 PASS \t converted to space ("<div>abc\tdef")
 PASS Trailing whitespace before hard line break removed ("<div>abc <br>def")
+PASS Leading whitespace after hard line break removed ("<div>abc<br> def")
 PASS Leading whitespace preserved ("<pre> abc")
 PASS Trailing whitespace preserved ("<pre>abc ")
 PASS Internal whitespace preserved ("<pre>abc  def")
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-cert-not-found.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-cert-not-found.js
index 6230c2d..b4cac415 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-cert-not-found.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-cert-not-found.js
@@ -6,11 +6,6 @@
   await TestRunner.loadModule('network_test_runner');
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
   SDK.networkLog.reset();
   await TestRunner.addIframe('/loading/sxg/resources/sxg-cert-not-found.sxg');
   ConsoleTestRunner.dumpConsoleMessages();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-disable-cache.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-disable-cache.js
index 2110083e..ed336d7 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-disable-cache.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-disable-cache.js
@@ -12,12 +12,6 @@
 
   await TestRunner.loadModule('network_test_runner');
   await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
-
   await TestRunner.NetworkAgent.setCacheDisabled(false);
 
   // Load the test signed exchange first, to cache the certificate file.
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired-expected.txt
deleted file mode 100644
index a40695a..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired-expected.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Tests the signed exchange information are available when the navigation failed.
-
-inspected-page.html:1 Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460
-inspected-page.html:1 Failed to verify the signed exchange header.
-* http://127.0.0.1:8000/loading/sxg/resources/sxg-location.sxg
-  failed: false
-  statusCode: 200
-  resourceType: signed-exchange
-  SignedExchangeInfo
-    Request URL: https://127.0.0.1:8443/loading/sxg/resources/inner-url.html
-    Certificate URL: https://127.0.0.1:8443/loading/sxg/resources/127.0.0.1.sxg.pem.cbor
-    Error: {"message":"Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460"}
-    Error: {"message":"Failed to verify the signed exchange header.","signatureIndex":0,"errorField":"signatureTimestamps"}
-* https://127.0.0.1:8443/loading/sxg/resources/127.0.0.1.sxg.pem.cbor
-  failed: false
-  statusCode: 200
-  resourceType: other
-* https://127.0.0.1:8443/loading/sxg/resources/inner-url.html
-  failed: false
-  statusCode: 200
-  resourceType: document
-
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired.js
deleted file mode 100644
index 96f3d9b..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-expired.js
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-(async function() {
-  TestRunner.addResult('Tests the signed exchange information are available when the navigation failed.\n');
-  await TestRunner.loadModule('network_test_runner');
-  await TestRunner.loadModule('console_test_runner');
-  await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC". So in Apr 10, the page load should fail.
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"))');
-  SDK.networkLog.reset();
-  await TestRunner.addIframe('/loading/sxg/resources/sxg-location.sxg');
-  ConsoleTestRunner.dumpConsoleMessages();
-  NetworkTestRunner.dumpNetworkRequestsWithSignedExchangeInfo();
-  TestRunner.completeTest();
-})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail-expected.txt
new file mode 100644
index 0000000..3b091f5b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail-expected.txt
@@ -0,0 +1,16 @@
+Tests the signed exchange information are available when the navigation failed.
+
+inspected-page.html:1 Validity URL must be same-origin with request URL.
+inspected-page.html:1 Failed to parse SignedExchange header.
+* http://127.0.0.1:8000/loading/sxg/resources/sxg-invalid-validity-url.sxg
+  failed: false
+  statusCode: 200
+  resourceType: signed-exchange
+  SignedExchangeInfo
+    Error: {"message":"Validity URL must be same-origin with request URL."}
+    Error: {"message":"Failed to parse SignedExchange header."}
+* https://127.0.0.1:8443/loading/sxg/resources/inner-url.html
+  failed: false
+  statusCode: 200
+  resourceType: document
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail.js
new file mode 100644
index 0000000..2a866601
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation-fail.js
@@ -0,0 +1,14 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+(async function() {
+  TestRunner.addResult('Tests the signed exchange information are available when the navigation failed.\n');
+  await TestRunner.loadModule('network_test_runner');
+  await TestRunner.loadModule('console_test_runner');
+  await TestRunner.showPanel('network');
+  SDK.networkLog.reset();
+  await TestRunner.addIframe('/loading/sxg/resources/sxg-invalid-validity-url.sxg');
+  ConsoleTestRunner.dumpConsoleMessages();
+  NetworkTestRunner.dumpNetworkRequestsWithSignedExchangeInfo();
+  TestRunner.completeTest();
+})();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation.js
index 4ffc82a..1fe9973b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-navigation.js
@@ -6,11 +6,6 @@
   await TestRunner.loadModule('network_test_runner');
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
   SDK.networkLog.reset();
   await TestRunner.addIframe('/loading/sxg/resources/sxg-location.sxg');
   ConsoleTestRunner.dumpConsoleMessages();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired-expected.txt
deleted file mode 100644
index 0e4f6cb..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired-expected.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Tests the signed exchange information are available when the prefetch failed.
-
-* http://127.0.0.1:8000/loading/sxg/resources/sxg-location.sxg
-  failed: true
-  statusCode: 200
-  resourceType: other
-  SignedExchangeInfo
-    Request URL: https://127.0.0.1:8443/loading/sxg/resources/inner-url.html
-    Certificate URL: https://127.0.0.1:8443/loading/sxg/resources/127.0.0.1.sxg.pem.cbor
-    Error: {"message":"Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460"}
-    Error: {"message":"Failed to verify the signed exchange header.","signatureIndex":0,"errorField":"signatureTimestamps"}
-* https://127.0.0.1:8443/loading/sxg/resources/127.0.0.1.sxg.pem.cbor
-  failed: false
-  statusCode: 200
-  resourceType: other
-
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail-expected.txt
new file mode 100644
index 0000000..d5a0342
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail-expected.txt
@@ -0,0 +1,10 @@
+Tests the signed exchange information are available when the prefetch failed.
+
+* http://127.0.0.1:8000/loading/sxg/resources/sxg-invalid-validity-url.sxg
+  failed: true
+  statusCode: 200
+  resourceType: other
+  SignedExchangeInfo
+    Error: {"message":"Validity URL must be same-origin with request URL."}
+    Error: {"message":"Failed to parse SignedExchange header."}
+
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail.js
similarity index 71%
rename from third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired.js
rename to third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail.js
index e45fd566..b869c57 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-expired.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch-fail.js
@@ -6,18 +6,13 @@
   await TestRunner.loadModule('network_test_runner');
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC". So in Apr 10, the prefetch should fail.
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"))');
   SDK.networkLog.reset();
 
   const promise = new Promise(resolve => {
     TestRunner.addSniffer(SDK.NetworkDispatcher.prototype, 'loadingFailed', loadingFailed, true);
     function loadingFailed(requestId, time, localizedDescription, canceled) {
       var request = SDK.networkLog.requestByManagerAndId(TestRunner.networkManager, requestId);
-      if (/sxg-location\.sxg/.exec(request.url()))
+      if (/sxg-invalid-validity-url\.sxg/.exec(request.url()))
         resolve();
     }
   });
@@ -26,7 +21,7 @@
     (function () {
       const link = document.createElement('link');
       link.rel = 'prefetch';
-      link.href = '/loading/sxg/resources/sxg-location.sxg';
+      link.href = '/loading/sxg/resources/sxg-invalid-validity-url.sxg';
       document.body.appendChild(link);
     })()
   `);
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch.js
index 5ceed34..35730c42 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sxg/sxg-prefetch.js
@@ -6,11 +6,6 @@
   await TestRunner.loadModule('network_test_runner');
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
-  await TestRunner.addScriptTag('/loading/sxg/resources/sxg-util.js');
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await TestRunner.evaluateInPageAsync(
-    'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
   SDK.networkLog.reset();
 
   const promise = new Promise(resolve => {
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/fallback-to-another-sxg.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/fallback-to-another-sxg.html
index dc46c0f..afbef67e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/fallback-to-another-sxg.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/fallback-to-another-sxg.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/fallback-to-another-sxg.sxg');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
   assert_false(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/nested-sxg.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/nested-sxg.html
index 165d677..7f34e4aa 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/nested-sxg.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/nested-sxg.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/nested-sxg.sxg');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html?fallback-from-nested-sxg');
   assert_true(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-util.js b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-util.js
index 47390a8..7cefe6bc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-util.js
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-util.js
@@ -40,24 +40,3 @@
 const waitUntilDidFinishLoadForFrame = new Promise((resolve) => {
   window.addEventListener('load', () => setTimeout(resolve, 0));
 });
-
-const mojoBindingsLoaded = (async () => {
-  await loadScript('/gen/layout_test_data/mojo/public/js/mojo_bindings.js');
-  mojo.config.autoLoadMojomDeps = false;
-  const urls = [
-    '/gen/mojo/public/mojom/base/time.mojom.js',
-    '/gen/third_party/blink/public/mojom/web_package/web_package_internals.mojom.js',
-  ];
-  await Promise.all(urls.map(loadScript));
-})();
-
-async function setSignedExchangeVerificationTime(time) {
-  await mojoBindingsLoaded;
-  const webPackageInternals = new blink.test.mojom.WebPackageInternalsPtr();
-  Mojo.bindInterface(blink.test.mojom.WebPackageInternals.name,
-                     mojo.makeRequest(webPackageInternals).handle, 'process');
-  const windowsEpoch = Date.UTC(1601, 0, 1, 0, 0, 0, 0);
-  return webPackageInternals.setSignedExchangeVerificationTime({
-        internalValue: (time - windowsEpoch) * 1000
-      });
-}
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-double-prefetch.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-double-prefetch.html
index 6a20b87c..02e1ffb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-double-prefetch.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-double-prefetch.html
@@ -12,9 +12,6 @@
   document.body.appendChild(link);
 }
 promise_test(async (t) => {
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
   const sxg1_url =
       'http://127.0.0.1:8000/loading/sxg/resources/sxg-location.sxg?1';
   const sxg2_url =
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-expired.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-expired.html
deleted file mode 100644
index 6da0658..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-expired.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<!DOCTYPE html>
-<title>Loading expired SignedHTTPExchange must fail</title>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="./resources/sxg-util.js"></script>
-<body>
-<script>
-promise_test(async (t) => {
-  await waitUntilDidFinishLoadForFrame;
-
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC". So in Apr 10, the page load should fail.
-  await setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"));
-
-  const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-location.sxg');
-  assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
-  assert_true(message.is_fallback);
-}, 'Loading expired SignedHTTPExchange must fail');
-</script>
-</body>
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-fallback-with-fragment.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-fallback-with-fragment.html
index 285699f4..73b61cdb 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-fallback-with-fragment.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-fallback-with-fragment.html
@@ -8,11 +8,7 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC". So in Apr 10, the page load should fail.
-  await setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"));
-
-  const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-location.sxg#fragment');
+  const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-invalid-validity-url.sxg#fragment');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html#fragment');
   assert_true(message.is_fallback);
 }, 'Fallback redirect of SignedHTTPExchange should preserve URL fragment');
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-invalid-validity-url.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-invalid-validity-url.html
index 4e303c4..b993c80a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-invalid-validity-url.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-invalid-validity-url.html
@@ -9,10 +9,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-invalid-validity-url.sxg');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
   assert_true(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-fragment.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-fragment.html
index a90d6e8..0581d536 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-fragment.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-fragment.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-location.sxg#fragment');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html#fragment');
   assert_false(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-origin-trial.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-origin-trial.html
index 5ed96b3..4ef3fb4 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-origin-trial.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location-origin-trial.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-location-origin-trial.php');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
   assert_false(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location.html
index ce5f01ea..bd9c066 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-location.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-location.sxg');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
   assert_false(message.is_fallback);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-non-secure-origin.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-non-secure-origin.html
index ed5fad7e..4ed3f678 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-non-secure-origin.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-non-secure-origin.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   try {
     await openSXGInIframeAndWaitForMessage(
         t, 'http://example.test:8080/loading/sxg/resources/sxg-location.sxg');
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-usecounter.html b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-usecounter.html
index 77607c4..855ae453 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-usecounter.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-usecounter.html
@@ -8,10 +8,6 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
-  // until "Apr 8 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
-
   const message = await openSXGInIframeAndWaitForMessage(t, 'resources/sxg-usecounter.sxg');
   assert_equals(message.location, 'https://127.0.0.1:8443/loading/sxg/resources/inner-url.html');
   assert_true(message.is_use_counted);
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt
index 6765c31..9042b744 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt
@@ -2,6 +2,5 @@
 CONSOLE MESSAGE: line 21: PASS: Event handler triggered pre-policy.
 CONSOLE MESSAGE: line 14: Injecting Content-Security-Policy.
 CONSOLE MESSAGE: line 19: Clicking a link, post-policy:
-CONSOLE ERROR: line 20: Refused to execute inline event handler because it violates the following Content Security Policy directive: "default-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
-
+CONSOLE MESSAGE: line 21: FAIL: Event handler triggered post-policy.
 This test checks that CSP is evaluated on each call to an inline event handler, even if it's been executed pre-policy. It passes if one 'PASS' and no 'FAIL' messages appear.
diff --git a/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial-with-network-service/http/tests/loading/sxg/sxg-expired-expected.txt b/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial-with-network-service/http/tests/loading/sxg/sxg-expired-expected.txt
deleted file mode 100644
index 9bb86a8..0000000
--- a/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial-with-network-service/http/tests/loading/sxg/sxg-expired-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-main frame - didStartProvisionalLoadForFrame
-main frame - didCommitLoadForFrame
-main frame - didReceiveTitle: Loading expired SignedHTTPExchange must fail
-main frame - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
-main frame - didFinishLoadForFrame
-frame "sxg_iframe" - didReceiveTitle: 
-frame "sxg_iframe" - didStartProvisionalLoadForFrame
-frame "sxg_iframe" - didFailProvisionalLoadWithError
-This is a testharness.js-based test.
-FAIL Loading expired SignedHTTPExchange must fail promise_test: Unhandled rejection with value: "timeout"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial/http/tests/loading/sxg/sxg-expired-expected.txt b/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial/http/tests/loading/sxg/sxg-expired-expected.txt
deleted file mode 100644
index 9bb86a8..0000000
--- a/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial/http/tests/loading/sxg/sxg-expired-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-main frame - didStartProvisionalLoadForFrame
-main frame - didCommitLoadForFrame
-main frame - didReceiveTitle: Loading expired SignedHTTPExchange must fail
-main frame - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
-main frame - didFinishLoadForFrame
-frame "sxg_iframe" - didReceiveTitle: 
-frame "sxg_iframe" - didStartProvisionalLoadForFrame
-frame "sxg_iframe" - didFailProvisionalLoadWithError
-This is a testharness.js-based test.
-FAIL Loading expired SignedHTTPExchange must fail promise_test: Unhandled rejection with value: "timeout"
-Harness: the test ran to completion.
-
diff --git a/third_party/blink/PRESUBMIT.py b/third_party/blink/PRESUBMIT.py
index b08509a7..709a88d 100644
--- a/third_party/blink/PRESUBMIT.py
+++ b/third_party/blink/PRESUBMIT.py
@@ -16,7 +16,8 @@
     # pylint: disable=C0103
     audit_non_blink_usage = imp.load_source(
         'audit_non_blink_usage',
-        os.path.join(os.path.dirname(inspect.stack()[0][1]), 'tools/audit_non_blink_usage.py'))
+        os.path.join(os.path.dirname(inspect.stack()[0][1]),
+                     'tools/blinkpy/presubmit/audit_non_blink_usage.py'))
 except IOError:
     # One of the presubmit upload tests tries to exec this script, which doesn't interact so well
     # with the import hack... just ignore the exception here and hope for the best.
@@ -165,9 +166,12 @@
         if errors:
             errors = audit_non_blink_usage.check(path, f.ChangedContents())
             if errors:
-                for line_number, disallowed_identifier in errors:
-                    results.append(output_api.PresubmitError(
-                        '%s:%d uses disallowed identifier %s' % (path, line_number, disallowed_identifier)))
+                for error in errors:
+                    msg = '%s:%d uses disallowed identifier %s' % (
+                        path, error.line, error.identifier)
+                    if error.advice:
+                        msg += ". Advice: %s" % "\n".join(error.advice)
+                    results.append(output_api.PresubmitError(msg))
     return results
 
 
diff --git a/third_party/blink/public/BUILD.gn b/third_party/blink/public/BUILD.gn
index 4c7ab11..8df3300 100644
--- a/third_party/blink/public/BUILD.gn
+++ b/third_party/blink/public/BUILD.gn
@@ -368,7 +368,6 @@
     "platform/web_text_input_type.h",
     "platform/web_text_run.h",
     "platform/web_theme_engine.h",
-    "platform/web_thread.h",
     "platform/web_thread_safe_data.h",
     "platform/web_time_range.h",
     "platform/web_touch_action.h",
diff --git a/third_party/blink/public/mojom/blob/blob.mojom b/third_party/blink/public/mojom/blob/blob.mojom
index bff2d65f..cb7ded0061 100644
--- a/third_party/blink/public/mojom/blob/blob.mojom
+++ b/third_party/blink/public/mojom/blob/blob.mojom
@@ -39,9 +39,11 @@
   // read operation.
   ReadAll(handle<data_pipe_producer> pipe, BlobReaderClient? client);
 
-  // Causes a subrange of the contents of this blob to be written into the given
-  // data pipe. An optional BlobReaderClient will be informed of the result of
-  // the read operation.
+  // Causes a subrange of the contents of this blob to be written into the
+  // given data pipe. If |length| is -1 (uint64_t max), the range's end is
+  // unbounded so the entire contents are read starting at |offset|. An
+  // optional BlobReaderClient will be informed of the result of the read
+  // operation.
   ReadRange(uint64 offset, uint64 length, handle<data_pipe_producer> pipe,
             BlobReaderClient? client);
 
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 5a98eaf6..5fb1b09a 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -97,6 +97,8 @@
 namespace blink {
 
 class InterfaceProvider;
+class Thread;
+struct ThreadCreationParams;
 class WebAudioBus;
 class WebAudioLatencyHint;
 class WebBlobRegistry;
@@ -128,13 +130,14 @@
 class WebSpeechSynthesizerClient;
 class WebStorageNamespace;
 class WebThemeEngine;
-class WebThread;
-struct WebThreadCreationParams;
 class WebURLLoaderMockFactory;
 class WebURLResponse;
 class WebURLResponse;
 struct WebSize;
 
+using WebThread = Thread;
+using WebThreadCreationParams = ThreadCreationParams;
+
 namespace scheduler {
 class WebThreadScheduler;
 }
diff --git a/third_party/blink/public/platform/scheduler/child/webthread_base.h b/third_party/blink/public/platform/scheduler/child/webthread_base.h
index 5b787fb..667d407 100644
--- a/third_party/blink/public/platform/scheduler/child/webthread_base.h
+++ b/third_party/blink/public/platform/scheduler/child/webthread_base.h
@@ -13,7 +13,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/threading/thread.h"
 #include "third_party/blink/public/platform/web_common.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace base {
 namespace sequence_manager {
diff --git a/third_party/blink/public/platform/scheduler/test/mock_renderer_scheduler.h b/third_party/blink/public/platform/scheduler/test/mock_renderer_scheduler.h
index 3fd8500..b93cadb 100644
--- a/third_party/blink/public/platform/scheduler/test/mock_renderer_scheduler.h
+++ b/third_party/blink/public/platform/scheduler/test/mock_renderer_scheduler.h
@@ -12,7 +12,7 @@
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 namespace scheduler {
diff --git a/third_party/blink/public/platform/scheduler/web_thread_scheduler.h b/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
index d02b7c7..f989a16 100644
--- a/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
+++ b/third_party/blink/public/platform/scheduler/web_thread_scheduler.h
@@ -26,8 +26,10 @@
 }  // namespace base
 
 namespace blink {
-class WebThread;
+class Thread;
 class WebInputEvent;
+
+using WebThread = Thread;
 }  // namespace blink
 
 namespace viz {
diff --git a/third_party/blink/public/platform/web_feature.mojom b/third_party/blink/public/platform/web_feature.mojom
index a551994..c220e60 100644
--- a/third_party/blink/public/platform/web_feature.mojom
+++ b/third_party/blink/public/platform/web_feature.mojom
@@ -2007,6 +2007,8 @@
   kBackgroundFetchRegistrationMatchAll = 2554,
   kV8AtomicsNotify = 2555,
   kV8AtomicsWake = 2556,
+  kFormDisabledAttributePresent = 2557,
+  kFormDisabledAttributePresentAndSubmit = 2558,
 
   // Add new features immediately above this line. Don't change assigned
   // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/renderer/bindings/bindings.gni b/third_party/blink/renderer/bindings/bindings.gni
index f83a200..92ba4896 100644
--- a/third_party/blink/renderer/bindings/bindings.gni
+++ b/third_party/blink/renderer/bindings/bindings.gni
@@ -44,6 +44,14 @@
                     "core/v8/idl_types.h",
                     "core/v8/idl_types_base.h",
                     "core/v8/iterable.h",
+                    "core/v8/js_based_event_listener.cc",
+                    "core/v8/js_based_event_listener.h",
+                    "core/v8/js_event_handler.cc",
+                    "core/v8/js_event_handler.h",
+                    "core/v8/js_event_handler_for_content_attribute.h",
+                    "core/v8/js_event_handler_for_content_attribute.cc",
+                    "core/v8/js_event_listener.cc",
+                    "core/v8/js_event_listener.h",
                     "core/v8/local_window_proxy.cc",
                     "core/v8/local_window_proxy.h",
                     "core/v8/maplike.h",
@@ -111,8 +119,6 @@
                     "core/v8/v8_embedder_graph_builder.h",
                     "core/v8/v8_error_handler.cc",
                     "core/v8/v8_error_handler.h",
-                    "core/v8/v8_event_listener_impl.cc",
-                    "core/v8/v8_event_listener_impl.h",
                     "core/v8/v8_event_listener_or_event_handler.cc",
                     "core/v8/v8_event_listener_or_event_handler.h",
                     "core/v8/v8_event_listener_helper.cc",
diff --git a/third_party/blink/renderer/bindings/core/v8/BUILD.gn b/third_party/blink/renderer/bindings/core/v8/BUILD.gn
index d12c0db..136cb11 100644
--- a/third_party/blink/renderer/bindings/core/v8/BUILD.gn
+++ b/third_party/blink/renderer/bindings/core/v8/BUILD.gn
@@ -134,6 +134,8 @@
   "$bindings_core_v8_output_dir/v8_custom_element_constructor.h",
   "$bindings_core_v8_output_dir/v8_display_lock_callback.cc",
   "$bindings_core_v8_output_dir/v8_display_lock_callback.h",
+  "$bindings_core_v8_output_dir/v8_event_handler_non_null.cc",
+  "$bindings_core_v8_output_dir/v8_event_handler_non_null.h",
   "$bindings_core_v8_output_dir/v8_frame_request_callback.cc",
   "$bindings_core_v8_output_dir/v8_frame_request_callback.h",
   "$bindings_core_v8_output_dir/v8_function.cc",
diff --git a/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
new file mode 100644
index 0000000..285310d
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.cc
@@ -0,0 +1,184 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h"
+
+#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
+#include "third_party/blink/renderer/core/dom/document.h"
+#include "third_party/blink/renderer/core/dom/document_parser.h"
+#include "third_party/blink/renderer/core/dom/events/event.h"
+#include "third_party/blink/renderer/core/dom/events/event_target.h"
+#include "third_party/blink/renderer/platform/instance_counters.h"
+
+namespace blink {
+
+JSBasedEventListener::JSBasedEventListener(ListenerType listener_type)
+    : EventListener(listener_type) {
+  DCHECK(IsJSBased());
+  if (IsMainThread()) {
+    InstanceCounters::IncrementCounter(
+        InstanceCounters::kJSEventListenerCounter);
+  }
+}
+
+JSBasedEventListener::~JSBasedEventListener() {
+  if (IsMainThread()) {
+    InstanceCounters::DecrementCounter(
+        InstanceCounters::kJSEventListenerCounter);
+  }
+}
+
+// static
+v8::Local<v8::Function> JSBasedEventListener::EventListenerEffectiveFunction(
+    v8::Isolate* isolate,
+    v8::Local<v8::Object> handler) {
+  v8::Local<v8::Function> function;
+  if (handler->IsFunction()) {
+    function = handler.As<v8::Function>();
+  } else if (handler->IsObject()) {
+    v8::Local<v8::Value> property;
+    // Try the "handleEvent" method (EventListener interface).
+    if (handler
+            ->Get(isolate->GetCurrentContext(),
+                  V8AtomicString(isolate, "handleEvent"))
+            .ToLocal(&property) &&
+        property->IsFunction())
+      function = property.As<v8::Function>();
+    // Fall back to the "constructor" property.
+    else if (handler
+                 ->Get(isolate->GetCurrentContext(),
+                       V8AtomicString(isolate, "constructor"))
+                 .ToLocal(&property) &&
+             property->IsFunction())
+      function = property.As<v8::Function>();
+  }
+  if (!function.IsEmpty())
+    return GetBoundFunction(function);
+  return v8::Local<v8::Function>();
+}
+
+bool JSBasedEventListener::BelongsToTheCurrentWorld(
+    ExecutionContext* execution_context) const {
+  v8::Isolate* isolate = GetIsolate();
+  if (!isolate->GetCurrentContext().IsEmpty() &&
+      &GetWorld() == &DOMWrapperWorld::Current(isolate))
+    return true;
+  // If currently parsing, the parser could be accessing this listener
+  // outside of any v8 context; check if it belongs to the main world.
+  if (!isolate->InContext() && execution_context &&
+      execution_context->IsDocument()) {
+    Document* document = To<Document>(execution_context);
+    if (document->Parser() && document->Parser()->IsParsing())
+      return GetWorld().IsMainWorld();
+  }
+  return false;
+}
+
+// Implements step 2. of "inner invoke".
+// https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
+void JSBasedEventListener::handleEvent(
+    ExecutionContext* execution_context_of_event_target,
+    Event* event) {
+  DCHECK(execution_context_of_event_target);
+  DCHECK(event);
+
+  v8::Isolate* isolate = GetIsolate();
+
+  // Don't reenter V8 if execution was terminated in this instance of V8.
+  // For example, worker can be terminated in event listener, and also window
+  // can be terminated from inspector by the TerminateExecution method.
+  if (isolate->IsExecutionTerminating())
+    return;
+
+  if (!event->CanBeDispatchedInWorld(GetWorld()))
+    return;
+
+  {
+    v8::HandleScope scope(isolate);
+
+    // Calling |GetListenerObject()| here may cause compilation of the
+    // uncompiled script body in eventHandler's value earlier than standard's
+    // order, which says it should be done in step 10. There is no behavioral
+    // difference but the advantage that we can use listener's |ScriptState|
+    // after it get compiled.
+    // https://html.spec.whatwg.org/multipage/webappapis.html#event-handler-value
+    v8::Local<v8::Value> listener = GetListenerObject(*event->target());
+
+    if (listener.IsEmpty() || !listener->IsObject())
+      return;
+  }
+
+  ScriptState* script_state_of_listener = GetScriptState();
+  DCHECK(script_state_of_listener);
+  if (!script_state_of_listener->ContextIsValid())
+    return;
+
+  ScriptState::Scope scope(script_state_of_listener);
+
+  // https://dom.spec.whatwg.org/#firing-events
+  // Step 2. of firing events: Let event be the result of creating an event
+  // given eventConstructor, in the relevant Realm of target.
+  //
+  // |js_event|, a V8 wrapper object for |event|, must be created in the
+  // relevant realm of the event target. The world must match the event
+  // listener's world.
+  v8::Local<v8::Context> v8_context =
+      ToV8Context(execution_context_of_event_target, GetWorld());
+  if (v8_context.IsEmpty())
+    return;
+  v8::Local<v8::Value> js_event = ToV8(event, v8_context->Global(), isolate);
+  if (js_event.IsEmpty())
+    return;
+
+  // Step 6: Let |global| be listener callback’s associated Realm’s global
+  // object.
+  v8::Local<v8::Object> global =
+      script_state_of_listener->GetContext()->Global();
+
+  // Step 8: If global is a Window object, then:
+  // Set currentEvent to global’s current event.
+  // If tuple’s item-in-shadow-tree is false, then set global’s current event to
+  // event.
+  V8PrivateProperty::Symbol event_symbol =
+      V8PrivateProperty::GetGlobalEvent(isolate);
+  ExecutionContext* execution_context_of_listener =
+      ExecutionContext::From(script_state_of_listener);
+  v8::Local<v8::Value> current_event;
+  if (execution_context_of_listener->IsDocument()) {
+    current_event = event_symbol.GetOrUndefined(global).ToLocalChecked();
+    // Expose the event object as |window.event|, except when the event's target
+    // is in a V1 shadow tree.
+    Node* target_node = event->target()->ToNode();
+    if (!(target_node && target_node->IsInV1ShadowTree()))
+      event_symbol.Set(global, js_event);
+  }
+
+  {
+    // Catch exceptions thrown in the event listener if any and report them to
+    // DevTools console.
+    v8::TryCatch try_catch(isolate);
+    try_catch.SetVerbose(true);
+
+    // Step 10: Call a listener with event's currentTarget as receiver and event
+    // and handle errors if thrown.
+    CallListenerFunction(*event->currentTarget(), *event, js_event);
+
+    if (try_catch.HasCaught()) {
+      // Step 10-2: Set legacyOutputDidListenersThrowFlag if given.
+      event->LegacySetDidListenersThrowFlag();
+    }
+
+    // |event_symbol.Set(global, current_event)| cannot and does not have to be
+    // performed when the isolate is terminating.
+    if (isolate->IsExecutionTerminating())
+      return;
+  }
+
+  // Step 12: If |global| is a Window object, then set |global|’s current event
+  // to |current_event|.
+  if (execution_context_of_listener->IsDocument())
+    event_symbol.Set(global, current_event);
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h b/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
new file mode 100644
index 0000000..5fd58c2
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h
@@ -0,0 +1,87 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_BASED_EVENT_LISTENER_H_
+#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_BASED_EVENT_LISTENER_H_
+
+#include "third_party/blink/renderer/core/core_export.h"
+#include "third_party/blink/renderer/core/dom/events/event_listener.h"
+#include "v8/include/v8.h"
+
+namespace blink {
+
+class DOMWrapperWorld;
+class Event;
+class EventTarget;
+
+// |JSBasedEventListener| is the base class for JS-based event listeners,
+// i.e. EventListener and EventHandler in the standards.
+// This provides the essential APIs of JS-based event listeners and also
+// implements the common features.
+class CORE_EXPORT JSBasedEventListener : public EventListener {
+ public:
+  static const JSBasedEventListener* Cast(const EventListener* listener) {
+    return listener && listener->IsJSBased()
+               ? static_cast<const JSBasedEventListener*>(listener)
+               : nullptr;
+  }
+
+  static JSBasedEventListener* Cast(EventListener* listener) {
+    return const_cast<JSBasedEventListener*>(
+        Cast(const_cast<const EventListener*>(listener)));
+  }
+
+  static v8::Local<v8::Function> EventListenerEffectiveFunction(
+      v8::Isolate* isolate,
+      v8::Local<v8::Object> handler);
+
+  // TODO(bindings): consider to remove this (and use GetListenerObject()
+  // instead) because this method is used in mostly only generated classes.
+  static v8::Local<v8::Value> GetListenerOrNull(v8::Isolate* isolate,
+                                                EventTarget* event_target,
+                                                EventListener* listener) {
+    if (auto* v8_listener = Cast(listener))
+      return v8_listener->GetListenerObject(*event_target);
+    return v8::Null(isolate);
+  }
+
+  ~JSBasedEventListener() override;
+
+  // blink::EventListener overrides:
+  bool BelongsToTheCurrentWorld(ExecutionContext*) const final;
+  // Implements step 2. of "inner invoke".
+  // See: https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
+  void handleEvent(ExecutionContext*, Event*) final;
+
+  // This may cause JS in the content attribute to get compiled, potentially
+  // unsuccessfully. In that case, this function returns v8::Null with firing
+  // error event instead of throwing an exception.
+  // https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler
+  // Also, this can return empty because of crbug.com/881688 .
+  virtual v8::Local<v8::Value> GetListenerObject(EventTarget&) = 0;
+
+  // Only DevTools is allowed to use this method.
+  DOMWrapperWorld& GetWorldForInspector() const { return GetWorld(); }
+
+ protected:
+  explicit JSBasedEventListener(ListenerType);
+  virtual v8::Isolate* GetIsolate() const = 0;
+  virtual ScriptState* GetScriptState() const = 0;
+  virtual DOMWrapperWorld& GetWorld() const = 0;
+
+ private:
+  // Performs "call a user object's operation", required in "inner-invoke".
+  // "The event handler processing algorithm" corresponds to this in the case of
+  // EventHandler.
+  // This may throw an exception on invoking the listener.
+  // See step 2-10:
+  // https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
+  virtual void CallListenerFunction(EventTarget&,
+                                    Event&,
+                                    v8::Local<v8::Value> js_event) = 0;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_BASED_EVENT_LISTENER_H_
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc b/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
new file mode 100644
index 0000000..58da757f
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_handler.cc
@@ -0,0 +1,154 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h"
+
+#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
+#include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_string_resource.h"
+#include "third_party/blink/renderer/core/dom/events/event_target.h"
+#include "third_party/blink/renderer/core/events/before_unload_event.h"
+#include "third_party/blink/renderer/core/events/error_event.h"
+
+namespace blink {
+
+void JSEventHandler::SetCompiledHandler(
+    ScriptState* script_state,
+    v8::Local<v8::Function> listener,
+    const V8PrivateProperty::Symbol& property) {
+  DCHECK(!HasCompiledHandler());
+  event_handler_ = V8EventHandlerNonNull::Create(listener);
+  Attach(script_state, listener, property, this);
+}
+
+// https://html.spec.whatwg.org/C/webappapis.html#the-event-handler-processing-algorithm
+void JSEventHandler::CallListenerFunction(EventTarget& event_target,
+                                          Event& event,
+                                          v8::Local<v8::Value> js_event) {
+  DCHECK(!js_event.IsEmpty());
+
+  // Step 1. Let callback be the result of getting the current value of the
+  //         event handler given eventTarget and name.
+  // Step 2. If callback is null, then return.
+  v8::Local<v8::Value> listener_value = GetListenerObject(event_target);
+  if (listener_value.IsEmpty() || listener_value->IsNull())
+    return;
+  DCHECK(HasCompiledHandler());
+
+  // Step 3. Let special error event handling be true if event is an ErrorEvent
+  // object, event's type is error, and event's currentTarget implements the
+  // WindowOrWorkerGlobalScope mixin. Otherwise, let special error event
+  // handling be false.
+  const bool special_error_event_handling =
+      event.IsErrorEvent() && event.type() == EventTypeNames::error &&
+      event.currentTarget()->IsWindowOrWorkerGlobalScope();
+
+  // Step 4. Process the Event object event as follows:
+  //   If special error event handling is true
+  //     Invoke callback with five arguments, the first one having the value of
+  //     event's message attribute, the second having the value of event's
+  //     filename attribute, the third having the value of event's lineno
+  //     attribute, the fourth having the value of event's colno attribute, the
+  //     fifth having the value of event's error attribute, and with the
+  //     callback this value set to event's currentTarget. Let return value be
+  //     the callback's return value.
+  //   Otherwise
+  //     Invoke callback with one argument, the value of which is the Event
+  //     object event, with the callback this value set to event's
+  //     currentTarget. Let return value be the callback's return value.
+  //   If an exception gets thrown by the callback, end these steps and allow
+  //   the exception to propagate. (It will propagate to the DOM event dispatch
+  //   logic, which will then report the exception.)
+  Vector<ScriptValue> arguments;
+  ScriptState* script_state_of_listener =
+      event_handler_->CallbackRelevantScriptState();
+
+  if (special_error_event_handling) {
+    ErrorEvent* error_event = ToErrorEvent(&event);
+
+    // The error argument should be initialized to null for dedicated workers.
+    // https://html.spec.whatwg.org/C/workers.html#runtime-script-errors-2
+    ScriptValue error_attribute = error_event->error(script_state_of_listener);
+    if (error_attribute.IsEmpty() ||
+        error_event->target()->InterfaceName() == EventTargetNames::Worker)
+      error_attribute = ScriptValue::CreateNull(script_state_of_listener);
+
+    arguments = {
+        ScriptValue::From(script_state_of_listener, error_event->message()),
+        ScriptValue::From(script_state_of_listener, error_event->filename()),
+        ScriptValue::From(script_state_of_listener, error_event->lineno()),
+        ScriptValue::From(script_state_of_listener, error_event->colno()),
+        error_attribute};
+  } else {
+    arguments = {ScriptValue::From(script_state_of_listener, js_event)};
+  }
+
+  ScriptValue result;
+  if (!event_handler_->Invoke(event.currentTarget(), arguments).To(&result) ||
+      GetIsolate()->IsExecutionTerminating())
+    return;
+  v8::Local<v8::Value> v8_return_value = result.V8Value();
+
+  // There is nothing to do if |v8_return_value| is null or undefined.
+  // See Step 5. for more information.
+  if (v8_return_value->IsNullOrUndefined())
+    return;
+
+  // https://heycam.github.io/webidl/#invoke-a-callback-function
+  // step 13: Set completion to the result of converting callResult.[[Value]] to
+  //          an IDL value of the same type as the operation's return type.
+  //
+  // OnBeforeUnloadEventHandler returns DOMString? while OnErrorEventHandler and
+  // EventHandler return any, so converting |v8_return_value| to return type is
+  // necessary only for OnBeforeUnloadEventHandler.
+  String result_for_beforeunload;
+  if (IsOnBeforeUnloadEventHandler()) {
+    // TODO(yukiy): use |NativeValueTraits|.
+    V8StringResource<> native_result(v8_return_value);
+
+    // |native_result.Prepare()| throws exception if it fails to convert
+    // |native_result| to String.
+    if (!native_result.Prepare())
+      return;
+    result_for_beforeunload = native_result;
+  }
+
+  // Step 5. Process return value as follows:
+  //   If event is a BeforeUnloadEvent object and event's type is beforeunload
+  //     If return value is not null, then:
+  //       1. Set event's canceled flag.
+  //       2. If event's returnValue attribute's value is the empty string, then
+  //          set event's returnValue attribute's value to return value.
+  //   If special error event handling is true
+  //     If return value is true, then set event's canceled flag.
+  //   Otherwise
+  //     If return value is false, then set event's canceled flag.
+  //       Note: If we've gotten to this "Otherwise" clause because event's type
+  //             is beforeunload but event is not a BeforeUnloadEvent object,
+  //             then return value will never be false, since in such cases
+  //             return value will have been coerced into either null or a
+  //             DOMString.
+  if (event.IsBeforeUnloadEvent() &&
+      event.type() == EventTypeNames::beforeunload) {
+    DCHECK(result_for_beforeunload);
+    event.preventDefault();
+    BeforeUnloadEvent* before_unload_event = ToBeforeUnloadEvent(&event);
+    if (before_unload_event->returnValue().IsEmpty())
+      before_unload_event->setReturnValue(result_for_beforeunload);
+  } else if (!IsOnBeforeUnloadEventHandler()) {
+    if (special_error_event_handling && v8_return_value->IsBoolean() &&
+        v8_return_value.As<v8::Boolean>()->Value())
+      event.preventDefault();
+    else if (!special_error_event_handling && v8_return_value->IsBoolean() &&
+             !v8_return_value.As<v8::Boolean>()->Value())
+      event.preventDefault();
+  }
+}
+
+void JSEventHandler::Trace(blink::Visitor* visitor) {
+  visitor->Trace(event_handler_);
+  JSBasedEventListener::Trace(visitor);
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_handler.h b/third_party/blink/renderer/bindings/core/v8/js_event_handler.h
new file mode 100644
index 0000000..cb59651
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_handler.h
@@ -0,0 +1,106 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_H_
+#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_H_
+
+#include "third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_event_handler_non_null.h"
+#include "third_party/blink/renderer/platform/bindings/trace_wrapper_member.h"
+
+namespace blink {
+
+// |JSEventHandler| implements EventHandler in the HTML standard.
+// https://html.spec.whatwg.org/C/webappapis.html#event-handler-attributes
+class CORE_EXPORT JSEventHandler : public JSBasedEventListener {
+ public:
+  enum class HandlerType {
+    kEventHandler,
+    // For kOnErrorEventHandler
+    // https://html.spec.whatwg.org/C/webappapis.html#onerroreventhandler
+    kOnErrorEventHandler,
+    // For OnBeforeUnloadEventHandler
+    // https://html.spec.whatwg.org/C/webappapis.html#onbeforeunloadeventhandler
+    kOnBeforeUnloadEventHandler,
+  };
+
+  static JSEventHandler* Create(ScriptState* script_state,
+                                v8::Local<v8::Object> listener,
+                                const V8PrivateProperty::Symbol& property,
+                                HandlerType type) {
+    return new JSEventHandler(script_state, listener, property, type);
+  }
+
+  // blink::CustomWrappable overrides:
+  void Trace(blink::Visitor* visitor) override;
+
+  // blink::EventListener overrides:
+  bool operator==(const EventListener& other) const override {
+    return this == &other;
+  }
+  bool IsEventHandler() const final { return true; }
+
+  // blink::JSBasedEventListener overrides:
+  // TODO(crbug.com/881688): remove empty check for this method. This method
+  // should return v8::Object or v8::Null.
+  v8::Local<v8::Value> GetListenerObject(EventTarget&) override {
+    return event_handler_->CallbackObject();
+  }
+
+ protected:
+  JSEventHandler(ScriptState* script_state,
+                 v8::Local<v8::Object> listener,
+                 const V8PrivateProperty::Symbol& property,
+                 HandlerType type)
+      : JSBasedEventListener(kJSEventHandlerType),
+        event_handler_(V8EventHandlerNonNull::Create(listener)),
+        type_(type) {
+    Attach(script_state, listener, property, this);
+  }
+
+  explicit JSEventHandler(HandlerType type)
+      : JSBasedEventListener(kJSEventHandlerType), type_(type) {}
+
+  // blink::JSBasedEventListener override:
+  v8::Isolate* GetIsolate() const override {
+    return event_handler_->GetIsolate();
+  }
+  ScriptState* GetScriptState() const override {
+    return event_handler_->CallbackRelevantScriptState();
+  }
+  DOMWrapperWorld& GetWorld() const override {
+    return event_handler_->CallbackRelevantScriptState()->World();
+  }
+
+  // Initializes |event_handler_| with |listener|. This method must be used only
+  // when content attribute gets lazily compiled.
+  void SetCompiledHandler(ScriptState* script_state,
+                          v8::Local<v8::Function> listener,
+                          const V8PrivateProperty::Symbol& property);
+
+  bool HasCompiledHandler() const { return event_handler_; }
+
+  // For checking special types of EventHandler.
+  bool IsOnErrorEventHandler() const {
+    return type_ == HandlerType::kOnErrorEventHandler;
+  }
+  bool IsOnBeforeUnloadEventHandler() const {
+    return type_ == HandlerType::kOnBeforeUnloadEventHandler;
+  }
+
+ private:
+  // blink::JSBasedEventListener override:
+  // Performs "The event handler processing algorithm"
+  // https://html.spec.whatwg.org/C/webappapis.html#the-event-handler-processing-algorithm
+  void CallListenerFunction(EventTarget&,
+                            Event&,
+                            v8::Local<v8::Value> js_event) override;
+
+  TraceWrapperMember<V8EventHandlerNonNull> event_handler_;
+  const HandlerType type_;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_H_
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc b/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc
new file mode 100644
index 0000000..ff8fa50d
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.cc
@@ -0,0 +1,197 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h"
+
+#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
+#include "third_party/blink/renderer/core/dom/events/event_target.h"
+#include "third_party/blink/renderer/core/events/error_event.h"
+#include "third_party/blink/renderer/core/frame/local_dom_window.h"
+#include "third_party/blink/renderer/core/html/forms/html_form_element.h"
+
+namespace blink {
+
+v8::Local<v8::Value> JSEventHandlerForContentAttribute::GetListenerObject(
+    EventTarget& event_target) {
+  // Step 3. of get the current value of the event handler should be executed
+  // only if EventHandler's value is an internal raw uncompiled handler and it
+  // has never tried to get compiled.
+  if (HasCompiledHandler())
+    return JSEventHandler::GetListenerObject(event_target);
+  if (did_compile_)
+    return v8::Null(GetIsolate());
+
+  return GetCompiledHandler(event_target);
+}
+
+// Implements Step 3. of "get the current value of the event handler"
+// https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler
+v8::Local<v8::Value> JSEventHandlerForContentAttribute::GetCompiledHandler(
+    EventTarget& event_target) {
+  // Do not compile the same code twice.
+  DCHECK(!did_compile_);
+  did_compile_ = true;
+
+  ExecutionContext* execution_context_of_event_target =
+      event_target.GetExecutionContext();
+  if (!execution_context_of_event_target)
+    return v8::Null(GetIsolate());
+
+  v8::Local<v8::Context> v8_context_of_event_target =
+      ToV8Context(execution_context_of_event_target, GetWorld());
+  if (v8_context_of_event_target.IsEmpty())
+    return v8::Null(GetIsolate());
+
+  ScriptState* script_state_of_event_target =
+      ScriptState::From(v8_context_of_event_target);
+  if (!script_state_of_event_target->ContextIsValid())
+    return v8::Null(GetIsolate());
+
+  // Step 1. If eventTarget is an element, then let element be eventTarget, and
+  // document be element's node document. Otherwise, eventTarget is a Window
+  // object, let element be null, and document be eventTarget's associated
+  // Document.
+  Element* element = nullptr;
+  Document* document = nullptr;
+  Node* node = event_target.ToNode();
+  const DOMWindow* window = event_target.ToDOMWindow();
+  if (node && node->IsElementNode()) {
+    element = ToElement(node);
+    document = &node->GetDocument();
+  } else if (node && node->IsDocumentNode()) {
+    // Attributes for |blink::HTMLBodyElement| is treated as ones for
+    // |blink::Document| unlike the definition in standards.
+    document = &node->GetDocument();
+  } else {
+    // TODO(crbug.com/891635): Add these checks here:
+    //   DCHECK(window);
+    //   DCHECK(event_target.ToLocalDOMWindow());
+    //   DCHECK_EQ(event_target.ToLocalDOMWindow()->document(), document);
+    document = To<Document>(execution_context_of_event_target);
+  }
+  DCHECK(document);
+
+  // Step 6. Let settings object be the relevant settings object of document.
+  // Step 9. Push settings object's realm execution context onto the JavaScript
+  // execution context stack; it is now the running JavaScript execution
+  // context.
+  //
+  // |document->AllowInlineEventHandler()| checks the world of current context,
+  // so this scope needs to be defined before calling it.
+  v8::Context::Scope event_target_context_scope(v8_context_of_event_target);
+
+  // Step 2. If scripting is disabled for document, then return null.
+  if (!document->AllowInlineEventHandler(node, this, source_url_,
+                                         position_.line_))
+    return v8::Null(GetIsolate());
+
+  // Step 5. If element is not null and element has a form owner, let form owner
+  // be that form owner. Otherwise, let form owner be null.
+  HTMLFormElement* form_owner = nullptr;
+  if (element && element->IsHTMLElement()) {
+    form_owner = ToHTMLElement(element)->formOwner();
+  }
+
+  // Step 10. Let function be the result of calling FunctionCreate, with
+  // arguments:
+  //   kind
+  //     Normal
+  //   ParameterList
+  //     If eventHandler is an onerror event handler of a Window object
+  //       Let the function have five arguments, named event, source, lineno,
+  //       colno, and error.
+  //     Otherwise
+  //       Let the function have a single argument called event.
+  //   Body
+  //     The result of parsing body above.
+  //   Scope
+  //     1. If eventHandler is an element's event handler, then let Scope be
+  //        NewObjectEnvironment(document, the global environment). Otherwise,
+  //        eventHandler is a Window object's event handler: let Scope be the
+  //        global environment.
+  //     2. If form owner is not null, let Scope be NewObjectEnvironment(form
+  //        owner, Scope).
+  //     3. If element is not null, let Scope be NewObjectEnvironment(element,
+  //        Scope).
+  //   Strict
+  //     The value of strict.
+  //
+  // Note: Strict is set by V8.
+  v8::Isolate* isolate = script_state_of_event_target->GetIsolate();
+  v8::Local<v8::String> parameter_list[5];
+  size_t parameter_list_size = 0;
+  if (IsOnErrorEventHandler() && window) {
+    // SVG requires to introduce evt as an alias to event in event handlers.
+    // See ANNOTATION 3: https://www.w3.org/TR/SVG/interact.html#SVGEvents
+    parameter_list[parameter_list_size++] =
+        V8String(isolate, node && node->IsSVGElement() ? "evt" : "event");
+    parameter_list[parameter_list_size++] = V8String(isolate, "source");
+    parameter_list[parameter_list_size++] = V8String(isolate, "lineno");
+    parameter_list[parameter_list_size++] = V8String(isolate, "colno");
+    parameter_list[parameter_list_size++] = V8String(isolate, "error");
+  } else {
+    // SVG requires to introduce evt as an alias to event in event handlers.
+    // See ANNOTATION 3: https://www.w3.org/TR/SVG/interact.html#SVGEvents
+    parameter_list[parameter_list_size++] =
+        V8String(isolate, node && node->IsSVGElement() ? "evt" : "event");
+  }
+  DCHECK_LE(parameter_list_size, base::size(parameter_list));
+
+  v8::Local<v8::Object> scopes[3];
+  size_t scopes_size = 0;
+  if (element) {
+    scopes[scopes_size++] =
+        ToV8(document, script_state_of_event_target).As<v8::Object>();
+  }
+  if (form_owner) {
+    scopes[scopes_size++] =
+        ToV8(form_owner, script_state_of_event_target).As<v8::Object>();
+  }
+  if (element) {
+    scopes[scopes_size++] =
+        ToV8(element, script_state_of_event_target).As<v8::Object>();
+  }
+  DCHECK_LE(scopes_size, base::size(scopes));
+
+  v8::ScriptOrigin origin(
+      V8String(isolate, source_url_),
+      v8::Integer::New(isolate, position_.line_.ZeroBasedInt()),
+      v8::Integer::New(isolate, position_.column_.ZeroBasedInt()),
+      // TODO(yukiy): consider which value should be passed here.
+      v8::True(isolate));
+  v8::ScriptCompiler::Source source(V8String(isolate, code_), origin);
+
+  v8::Local<v8::Function> compiled_function;
+  {
+    v8::TryCatch block(isolate);
+    block.SetVerbose(true);
+    v8::MaybeLocal<v8::Function> maybe_result =
+        v8::ScriptCompiler::CompileFunctionInContext(
+            v8_context_of_event_target, &source, parameter_list_size,
+            parameter_list, scopes_size, scopes);
+
+    // Step 7. If body is not parsable as FunctionBody or if parsing detects an
+    // early error, then follow these substeps:
+    //   1. Set eventHandler's value to null.
+    //   2. Report the error for the appropriate script and with the appropriate
+    //      position (line number and column number) given by location, using
+    //      settings object's global object. If the error is still not handled
+    //      after this, then the error may be reported to a developer console.
+    //   3. Return null.
+    if (!maybe_result.ToLocal(&compiled_function))
+      return v8::Null(isolate);
+  }
+
+  // Step 12. Set eventHandler's value to the result of creating a Web IDL
+  // EventHandler callback function object whose object reference is function
+  // and whose callback context is settings object.
+  compiled_function->SetName(V8String(isolate, function_name_));
+  SetCompiledHandler(
+      script_state_of_event_target, compiled_function,
+      V8PrivateProperty::GetCustomWrappableEventHandler(GetIsolate()));
+
+  return JSEventHandler::GetListenerObject(event_target);
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h b/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h
new file mode 100644
index 0000000..816b0fb
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h
@@ -0,0 +1,86 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_FOR_CONTENT_ATTRIBUTE_H_
+#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_FOR_CONTENT_ATTRIBUTE_H_
+
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h"
+#include "third_party/blink/renderer/platform/wtf/text/text_position.h"
+
+namespace blink {
+
+// |JSEventHandlerForContentAttribute| supports lazy compilation for content
+// attribute. This performs in the same way as |JSEventHandler| after it gets
+// compiled.
+class JSEventHandlerForContentAttribute final : public JSEventHandler {
+ public:
+  static JSEventHandlerForContentAttribute* Create(
+      const AtomicString& function_name,
+      const String& code,
+      const String& source_url,
+      const TextPosition& position,
+      v8::Isolate* isolate,
+      DOMWrapperWorld& world,
+      HandlerType type = HandlerType::kEventHandler) {
+    return new JSEventHandlerForContentAttribute(
+        isolate, world, function_name, code, source_url, position, type);
+  }
+
+  // blink::EventListener overrides:
+  bool IsEventHandlerForContentAttribute() const override { return true; }
+
+  // blink::JSBasedEventListener overrides:
+  v8::Local<v8::Value> GetListenerObject(EventTarget&) override;
+
+  const String& Code() const override { return code_; }
+
+ protected:
+  // blink::JSBasedEventListener override:
+  v8::Isolate* GetIsolate() const override { return isolate_; }
+  ScriptState* GetScriptState() const override {
+    DCHECK(HasCompiledHandler());
+    return JSEventHandler::GetScriptState();
+  }
+  DOMWrapperWorld& GetWorld() const override { return *world_; }
+
+ private:
+  JSEventHandlerForContentAttribute(v8::Isolate* isolate,
+                                    DOMWrapperWorld& world,
+                                    const AtomicString& function_name,
+                                    const String& code,
+                                    const String& source_url,
+                                    const TextPosition& position,
+                                    HandlerType type)
+      : JSEventHandler(type),
+        did_compile_(false),
+        function_name_(function_name),
+        code_(code),
+        source_url_(source_url),
+        position_(position),
+        isolate_(isolate),
+        world_(&world) {}
+
+  // Implements Step 3. of "get the current value of the event handler".
+  // The compiled v8::Function is returned and |JSEventHandler::event_handler_|
+  // gets initialized with it if lazy compilation succeeds.
+  // Otherwise, v8::Null is returned.
+  // https://html.spec.whatwg.org/multipage/webappapis.html#getting-the-current-value-of-the-event-handler
+  v8::Local<v8::Value> GetCompiledHandler(EventTarget&);
+
+  // Lazy compilation for content attribute should be tried only once, but we
+  // cannot see whether it had never tried to compile or it has already failed
+  // when |HasCompiledHandler()| returns false. |did_compile_| is used for
+  // checking that.
+  bool did_compile_;
+  const AtomicString function_name_;
+  String code_;
+  String source_url_;
+  TextPosition position_;
+  v8::Isolate* isolate_;
+  scoped_refptr<DOMWrapperWorld> world_;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_HANDLER_FOR_CONTENT_ATTRIBUTE_H_
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/js_event_listener.cc
new file mode 100644
index 0000000..3ff5da4
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_listener.cc
@@ -0,0 +1,28 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/renderer/bindings/core/v8/js_event_listener.h"
+
+#include "third_party/blink/renderer/core/dom/events/event.h"
+#include "third_party/blink/renderer/core/dom/events/event_target.h"
+
+namespace blink {
+
+// https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
+void JSEventListener::CallListenerFunction(EventTarget&,
+                                           Event& event,
+                                           v8::Local<v8::Value> js_event) {
+  // Step 10: Call a listener with event's currentTarget as receiver and event
+  // and handle errors if thrown.
+  v8::Maybe<void> maybe_result =
+      event_listener_->handleEvent(event.currentTarget(), &event);
+  ALLOW_UNUSED_LOCAL(maybe_result);
+}
+
+void JSEventListener::Trace(blink::Visitor* visitor) {
+  visitor->Trace(event_listener_);
+  JSBasedEventListener::Trace(visitor);
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/js_event_listener.h b/third_party/blink/renderer/bindings/core/v8/js_event_listener.h
new file mode 100644
index 0000000..f23780cc
--- /dev/null
+++ b/third_party/blink/renderer/bindings/core/v8/js_event_listener.h
@@ -0,0 +1,79 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_LISTENER_H_
+#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_LISTENER_H_
+
+#include "third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener.h"
+#include "third_party/blink/renderer/platform/bindings/trace_wrapper_member.h"
+
+namespace blink {
+
+// |JSEventListener| implements EventListener in the DOM standard.
+// https://dom.spec.whatwg.org/#callbackdef-eventlistener
+class CORE_EXPORT JSEventListener final : public JSBasedEventListener {
+ public:
+  static JSEventListener* Create(ScriptState* script_state,
+                                 v8::Local<v8::Object> listener,
+                                 const V8PrivateProperty::Symbol& property) {
+    return new JSEventListener(script_state, listener, property);
+  }
+
+  // blink::CustomWrappable overrides:
+  void Trace(blink::Visitor*) override;
+
+  // blink::EventListener overrides:
+  //
+  // Check the identity of |V8EventListener::callback_object_|. There can be
+  // multiple CallbackInterfaceBase objects that have the same
+  // |CallbackInterfaceBase::callback_object_| but have different
+  // |CallbackInterfaceBase::incumbent_script_state_|s.
+  bool operator==(const EventListener& other) const override {
+    if (other.GetType() != kJSEventListenerType)
+      return false;
+    return event_listener_->HasTheSameCallbackObject(
+        *static_cast<const JSEventListener*>(&other)->event_listener_);
+  }
+
+  // blink::JSBasedEventListener overrides:
+  // TODO(crbug.com/881688): remove empty check for this method. This method
+  // should return v8::Object or v8::Null.
+  v8::Local<v8::Value> GetListenerObject(EventTarget&) override {
+    return event_listener_->CallbackObject();
+  }
+
+ protected:
+  // blink::JSBasedEventListener overrides:
+  v8::Isolate* GetIsolate() const override {
+    return event_listener_->GetIsolate();
+  }
+  ScriptState* GetScriptState() const override {
+    return event_listener_->CallbackRelevantScriptState();
+  }
+  DOMWrapperWorld& GetWorld() const override {
+    return event_listener_->CallbackRelevantScriptState()->World();
+  }
+
+ private:
+  JSEventListener(ScriptState* script_state,
+                  v8::Local<v8::Object> listener,
+                  const V8PrivateProperty::Symbol& property)
+      : JSBasedEventListener(kJSEventListenerType),
+        event_listener_(V8EventListener::CreateOrNull(listener)) {
+    DCHECK(event_listener_);
+    Attach(script_state, listener, property, this);
+  }
+
+  // blink::JSBasedEventListener override:
+  void CallListenerFunction(EventTarget&,
+                            Event&,
+                            v8::Local<v8::Value> js_event) override;
+
+  const TraceWrapperMember<V8EventListener> event_listener_;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_JS_EVENT_LISTENER_H_
diff --git a/third_party/blink/renderer/bindings/core/v8/rejected_promises.cc b/third_party/blink/renderer/bindings/core/v8/rejected_promises.cc
index 707e5610f..62817900 100644
--- a/third_party/blink/renderer/bindings/core/v8/rejected_promises.cc
+++ b/third_party/blink/renderer/bindings/core/v8/rejected_promises.cc
@@ -8,7 +8,6 @@
 
 #include "base/memory/ptr_util.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
 #include "third_party/blink/renderer/core/dom/events/event_target.h"
@@ -18,6 +17,7 @@
 #include "third_party/blink/renderer/platform/bindings/scoped_persistent.h"
 #include "third_party/blink/renderer/platform/bindings/script_state.h"
 #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 
diff --git a/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc b/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
index 8a53bfd..15576be 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
+++ b/third_party/blink/renderer/bindings/core/v8/script_event_listener.cc
@@ -30,25 +30,22 @@
 
 #include "third_party/blink/renderer/bindings/core/v8/script_event_listener.h"
 
-#include "third_party/blink/renderer/bindings/core/v8/scheduled_action.h"
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
-#include "third_party/blink/renderer/bindings/core/v8/source_location.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h"
-#include "third_party/blink/renderer/bindings/core/v8/window_proxy.h"
 #include "third_party/blink/renderer/core/dom/document.h"
-#include "third_party/blink/renderer/core/dom/document_parser.h"
 #include "third_party/blink/renderer/core/dom/qualified_name.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
-#include "third_party/blink/renderer/platform/bindings/script_state.h"
 #include "v8/include/v8.h"
 
 namespace blink {
 
+// TODO(yukiy): make this method receive |Document*| instead of |Node*|, which
+// is no longer necessary.
 EventListener* CreateAttributeEventListener(Node* node,
                                             const QualifiedName& name,
-                                            const AtomicString& value) {
+                                            const AtomicString& value,
+                                            JSEventHandler::HandlerType type) {
   DCHECK(node);
   if (value.IsNull())
     return nullptr;
@@ -74,15 +71,17 @@
   // when parsing HTML. In that case we should assume the main world.
   v8::Local<v8::Context> v8_context = isolate->GetCurrentContext();
 
-  return V8LazyEventListener::Create(
-      name.LocalName(), value, source_url, position, node, isolate,
+  return JSEventHandlerForContentAttribute::Create(
+      name.LocalName(), value, source_url, position, isolate,
       v8_context.IsEmpty() ? DOMWrapperWorld::MainWorld()
-                           : ScriptState::From(v8_context)->World());
+                           : ScriptState::From(v8_context)->World(),
+      type);
 }
 
 EventListener* CreateAttributeEventListener(LocalFrame* frame,
                                             const QualifiedName& name,
-                                            const AtomicString& value) {
+                                            const AtomicString& value,
+                                            JSEventHandler::HandlerType type) {
   if (!frame)
     return nullptr;
 
@@ -103,64 +102,11 @@
   // when parsing HTML. In that case we should assume the main world.
   v8::Local<v8::Context> v8_context = isolate->GetCurrentContext();
 
-  return V8LazyEventListener::Create(
-      name.LocalName(), value, source_url, position, nullptr, isolate,
+  return JSEventHandlerForContentAttribute::Create(
+      name.LocalName(), value, source_url, position, isolate,
       v8_context.IsEmpty() ? DOMWrapperWorld::MainWorld()
-                           : ScriptState::From(v8_context)->World());
-}
-
-v8::Local<v8::Object> EventListenerHandler(ExecutionContext* execution_context,
-                                           EventListener* listener) {
-  if (auto* v8_listener = V8AbstractEventHandler::Cast(listener)) {
-    return v8_listener->GetListenerObject(execution_context);
-  }
-  if (auto* v8_listener = V8EventListenerImpl::Cast(listener)) {
-    return v8_listener->GetListenerObject();
-  }
-  return v8::Local<v8::Object>();
-}
-
-v8::Local<v8::Function> EventListenerEffectiveFunction(
-    v8::Isolate* isolate,
-    v8::Local<v8::Object> handler) {
-  v8::Local<v8::Function> function;
-  if (handler->IsFunction()) {
-    function = handler.As<v8::Function>();
-  } else if (handler->IsObject()) {
-    v8::Local<v8::Value> property;
-    // Try the "handleEvent" method (EventListener interface).
-    if (handler
-            ->Get(handler->CreationContext(),
-                  V8AtomicString(isolate, "handleEvent"))
-            .ToLocal(&property) &&
-        property->IsFunction())
-      function = property.As<v8::Function>();
-    // Fall back to the "constructor" property.
-    else if (handler
-                 ->Get(handler->CreationContext(),
-                       V8AtomicString(isolate, "constructor"))
-                 .ToLocal(&property) &&
-             property->IsFunction())
-      function = property.As<v8::Function>();
-  }
-  if (!function.IsEmpty())
-    return GetBoundFunction(function);
-  return v8::Local<v8::Function>();
-}
-
-// TODO(yukiy): move this method into V8EventListenerImpl or interface class
-// of EventListener and EventHandler
-std::unique_ptr<SourceLocation> GetFunctionLocation(
-    ExecutionContext* execution_context,
-    EventListener* listener) {
-  v8::Isolate* isolate = ToIsolate(execution_context);
-  v8::HandleScope handle_scope(isolate);
-  v8::Local<v8::Object> handler =
-      EventListenerHandler(execution_context, listener);
-  if (handler.IsEmpty())
-    return nullptr;
-  return SourceLocation::FromFunction(
-      EventListenerEffectiveFunction(isolate, handler));
+                           : ScriptState::From(v8_context)->World(),
+      type);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/script_event_listener.h b/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
index a0414bb..108227a 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
+++ b/third_party/blink/renderer/bindings/core/v8/script_event_listener.h
@@ -33,26 +33,26 @@
 
 #include <memory>
 
-#include "third_party/blink/renderer/core/dom/events/event_listener.h"
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h"
 
 namespace blink {
 
 class LocalFrame;
 class QualifiedName;
-class SourceLocation;
 
-EventListener* CreateAttributeEventListener(Node*,
-                                            const QualifiedName&,
-                                            const AtomicString& value);
-EventListener* CreateAttributeEventListener(LocalFrame*,
-                                            const QualifiedName&,
-                                            const AtomicString& value);
-v8::Local<v8::Object> EventListenerHandler(ExecutionContext*, EventListener*);
-v8::Local<v8::Function> EventListenerEffectiveFunction(
-    v8::Isolate*,
-    v8::Local<v8::Object> handler);
-std::unique_ptr<SourceLocation> GetFunctionLocation(ExecutionContext*,
-                                                    EventListener*);
+// TODO(bindings): consider to remove these functions.
+EventListener* CreateAttributeEventListener(
+    Node*,
+    const QualifiedName& name,
+    const AtomicString& value,
+    JSEventHandler::HandlerType type =
+        JSEventHandler::HandlerType::kEventHandler);
+EventListener* CreateAttributeEventListener(
+    LocalFrame*,
+    const QualifiedName& name,
+    const AtomicString& value,
+    JSEventHandler::HandlerType type =
+        JSEventHandler::HandlerType::kEventHandler);
 
 }  // namespace blink
 
diff --git a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver_test.cc b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver_test.cc
index 85f10c93..2e5e2075 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver_test.cc
+++ b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver_test.cc
@@ -7,7 +7,6 @@
 #include <memory>
 
 #include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_function.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
@@ -15,6 +14,7 @@
 #include "third_party/blink/renderer/core/dom/dom_exception.h"
 #include "third_party/blink/renderer/core/testing/dummy_page_holder.h"
 #include "third_party/blink/renderer/platform/bindings/script_forbidden_scope.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "v8/include/v8.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.cc b/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.cc
index 9051edde..8a275fd 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.cc
+++ b/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.cc
@@ -7,11 +7,11 @@
 #include <memory>
 #include "base/location.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_streamer.h"
 #include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.h b/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.h
index 2af307dd..a4a65c7 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.h
+++ b/third_party/blink/renderer/bindings/core/v8/script_streamer_thread.h
@@ -9,6 +9,7 @@
 
 #include "base/macros.h"
 #include "third_party/blink/renderer/core/core_export.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
 #include "v8/include/v8.h"
@@ -16,7 +17,6 @@
 namespace blink {
 
 class ScriptStreamer;
-class WebThread;
 
 // A singleton thread for running background tasks for script streaming.
 class CORE_EXPORT ScriptStreamerThread {
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
index 5f04bf7..6b9639e 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
+++ b/third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h
@@ -107,10 +107,12 @@
 
   bool BelongsToTheCurrentWorld(ExecutionContext*) const final;
 
-  bool IsAttribute() const final { return is_attribute_; }
+  bool IsEventHandler() const final { return is_attribute_; }
 
   v8::Isolate* GetIsolate() const { return isolate_; }
-  DOMWrapperWorld* GetWorldForInspector() const final { return world_.get(); }
+  DOMWrapperWorld* GetWorldPtrForInspector() const final {
+    return world_.get();
+  }
 
   void Trace(blink::Visitor*) override;
 
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_context_snapshot.cc b/third_party/blink/renderer/bindings/core/v8/v8_context_snapshot.cc
index 374e9031..ccaa8507 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_context_snapshot.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_context_snapshot.cc
@@ -114,9 +114,12 @@
 
 struct DataForDeserializer {
   STACK_ALLOCATED();
-
  public:
+  DataForDeserializer(Document* document) : document(document) {}
+
   Member<Document> document;
+  // Figures if we failed the deserialization.
+  bool did_fail = false;
 };
 
 }  // namespace
@@ -132,13 +135,22 @@
   }
 
   const int index = GetSnapshotIndexForWorld(world);
-  DataForDeserializer data{document};
+  DataForDeserializer data(document);
   v8::DeserializeInternalFieldsCallback callback =
       v8::DeserializeInternalFieldsCallback(&DeserializeInternalField, &data);
   v8::Local<v8::Context> context =
       v8::Context::FromSnapshot(isolate, index, callback,
                                 extension_configuration, global_proxy)
           .ToLocalChecked();
+
+  // In case we fail to deserialize v8::Context from snapshot,
+  // disable the snapshot feature and returns an empty handle.
+  // TODO(peria): Drop this fallback routine. crbug.com/881417
+  if (data.did_fail) {
+    V8PerIsolateData::From(isolate)->BailoutAndDisableV8ContextSnapshot();
+    return v8::Local<v8::Context>();
+  }
+
   VLOG(1) << "A context is created from snapshot for "
           << (world.IsMainWorld() ? "" : "non-") << "main world";
 
@@ -351,27 +363,45 @@
       *reinterpret_cast<const InternalFieldType*>(payload.data);
 
   const WrapperTypeInfo* wrapper_type_info = FieldTypeToWrapperTypeInfo(type);
+  DataForDeserializer* embed_data = static_cast<DataForDeserializer*>(ptr);
   switch (type) {
     case InternalFieldType::kNodeType:
     case InternalFieldType::kDocumentType:
     case InternalFieldType::kHTMLDocumentType: {
-      CHECK_EQ(index, kV8DOMWrapperTypeIndex);
+      // TODO(peria): Make this branch back to CHECK_EQ. crbug.com/881417
+      if (index != kV8DOMWrapperTypeIndex) {
+        LOG(ERROR) << "Invalid index for wrpper type info: " << index;
+        embed_data->did_fail = true;
+        return;
+      }
       object->SetAlignedPointerInInternalField(
           index, const_cast<WrapperTypeInfo*>(wrapper_type_info));
       return;
     }
     case InternalFieldType::kHTMLDocumentObject: {
+      // There seems to be few crash reports with invalid |index|.
+      // In such cases, we fallback to create v8::Context without snapshots.
+      // TODO(peria): Make this branch back to CHECK_EQ. crbug.com/881417
+      if (index != kV8DOMWrapperObjectIndex) {
+        LOG(ERROR) << "Invalid index for HTMLDocument object: " << index;
+        embed_data->did_fail = true;
+        return;
+      }
+
       // The below code handles window.document on the main world.
-      CHECK_EQ(index, kV8DOMWrapperObjectIndex);
       v8::Isolate* isolate = v8::Isolate::GetCurrent();
-      DataForDeserializer* data = static_cast<DataForDeserializer*>(ptr);
-      ScriptWrappable* document = data->document;
+      ScriptWrappable* document = embed_data->document;
       DCHECK(document);
 
       // Make reference from wrapper to document
       object->SetAlignedPointerInInternalField(index, document);
       // Make reference from document to wrapper
-      CHECK(document->SetWrapper(isolate, wrapper_type_info, object));
+      // TODO(peria): Make this branch back to CHECK. crbug.com/881417
+      if (!document->SetWrapper(isolate, wrapper_type_info, object)) {
+        LOG(ERROR) << "Failed to set HTMLDocument wrapper on Blink object.";
+        embed_data->did_fail = true;
+        return;
+      }
       WrapperTypeInfo::WrapperCreated();
       return;
     }
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
index e9208db..a21fa602 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.cc
@@ -31,10 +31,9 @@
 #include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h"
 
 #include "third_party/blink/renderer/bindings/core/v8/custom_wrappable_adapter.h"
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h"
+#include "third_party/blink/renderer/bindings/core/v8/js_event_listener.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_error_handler.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_window.h"
 #include "third_party/blink/renderer/platform/bindings/v8_private_property.h"
 
@@ -63,7 +62,6 @@
 EventListener* V8EventListenerHelper::GetEventListener(
     ScriptState* script_state,
     v8::Local<v8::Value> value,
-    bool is_attribute,
     ListenerLookupType lookup) {
   RUNTIME_CALL_TIMER_SCOPE(script_state->GetIsolate(),
                            RuntimeCallStats::CounterId::kGetEventListener);
@@ -73,40 +71,37 @@
   v8::Local<v8::Object> object = value.As<v8::Object>();
   v8::Isolate* isolate = script_state->GetIsolate();
   V8PrivateProperty::Symbol listener_property =
-      is_attribute
-          ? V8PrivateProperty::GetCustomWrappableEventHandler(isolate)
-          : V8PrivateProperty::GetCustomWrappableEventListener(isolate);
+      V8PrivateProperty::GetCustomWrappableEventListener(isolate);
 
   return GetEventListenerInternal<EventListener>(
       script_state, object, listener_property, lookup,
-      [object, is_attribute, script_state, listener_property]() {
-        return is_attribute
-                   ? static_cast<EventListener*>(
-                         V8EventListenerOrEventHandler::Create(
-                             object, is_attribute, script_state,
-                             listener_property))
-                   : static_cast<EventListener*>(V8EventListenerImpl::Create(
-                         object, script_state, listener_property));
+      [object, script_state, listener_property]() {
+        return static_cast<EventListener*>(
+            JSEventListener::Create(script_state, object, listener_property));
       });
 }
 
 // static
-EventListener* V8EventListenerHelper::EnsureErrorHandler(
+EventListener* V8EventListenerHelper::GetEventHandler(
     ScriptState* script_state,
-    v8::Local<v8::Value> value) {
+    v8::Local<v8::Value> value,
+    JSEventHandler::HandlerType handler_type,
+    ListenerLookupType lookup) {
+  RUNTIME_CALL_TIMER_SCOPE(script_state->GetIsolate(),
+                           RuntimeCallStats::CounterId::kGetEventListener);
+
   if (!value->IsObject())
     return nullptr;
   v8::Local<v8::Object> object = value.As<v8::Object>();
   v8::Isolate* isolate = script_state->GetIsolate();
   V8PrivateProperty::Symbol listener_property =
-      V8PrivateProperty::GetV8ErrorHandlerErrorHandler(isolate);
+      V8PrivateProperty::GetCustomWrappableEventHandler(isolate);
 
-  return GetEventListenerInternal<V8ErrorHandler>(
-      script_state, object, listener_property, kListenerFindOrCreate,
-      [object, script_state, listener_property]() {
-        const bool is_attribute = true;
-        return V8ErrorHandler::Create(object, is_attribute, script_state,
-                                      listener_property);
+  return GetEventListenerInternal<EventListener>(
+      script_state, object, listener_property, lookup,
+      [object, script_state, listener_property, handler_type]() {
+        return static_cast<EventListener*>(JSEventHandler::Create(
+            script_state, object, listener_property, handler_type));
       });
 }
 
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
index e105210..4ac4d83 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
+++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h
@@ -31,6 +31,7 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_HELPER_H_
 #define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_HELPER_H_
 
+#include "third_party/blink/renderer/bindings/core/v8/js_event_handler.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
@@ -51,11 +52,11 @@
  public:
   CORE_EXPORT static EventListener* GetEventListener(ScriptState*,
                                                      v8::Local<v8::Value>,
-                                                     bool is_attribute,
                                                      ListenerLookupType);
-
-  CORE_EXPORT static EventListener* EnsureErrorHandler(ScriptState*,
-                                                       v8::Local<v8::Value>);
+  CORE_EXPORT static EventListener* GetEventHandler(ScriptState*,
+                                                    v8::Local<v8::Value>,
+                                                    JSEventHandler::HandlerType,
+                                                    ListenerLookupType);
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
deleted file mode 100644
index 4316f37..0000000
--- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.cc
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h"
-
-#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
-#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
-#include "third_party/blink/renderer/core/dom/events/event.h"
-#include "third_party/blink/renderer/core/dom/events/event_target.h"
-#include "third_party/blink/renderer/core/execution_context/execution_context.h"
-#include "third_party/blink/renderer/core/probe/core_probes.h"
-#include "third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h"
-#include "third_party/blink/renderer/platform/bindings/v8_private_property.h"
-#include "third_party/blink/renderer/platform/instance_counters.h"
-
-namespace blink {
-
-V8EventListenerImpl::V8EventListenerImpl(
-    v8::Local<v8::Object> listener,
-    ScriptState* script_state,
-    const V8PrivateProperty::Symbol& property)
-    : EventListener(kJSEventListenerType),
-      event_listener_(V8EventListener::CreateOrNull(listener)) {
-  DCHECK(event_listener_);
-  Attach(script_state, listener, property, this);
-  if (IsMainThread()) {
-    InstanceCounters::IncrementCounter(
-        InstanceCounters::kJSEventListenerCounter);
-  }
-}
-
-V8EventListenerImpl::~V8EventListenerImpl() {
-  if (IsMainThread()) {
-    InstanceCounters::DecrementCounter(
-        InstanceCounters::kJSEventListenerCounter);
-  }
-}
-
-// https://dom.spec.whatwg.org/#concept-event-listener-inner-invoke
-void V8EventListenerImpl::handleEvent(
-    ExecutionContext* execution_context_of_event_target,
-    Event* event) {
-  // Don't reenter V8 if execution was terminated in this instance of V8.
-  // For example, worker can be terminated in event listener, and also window
-  // can be terminated from inspector by the TerminateExecution method.
-  if (event_listener_->GetIsolate()->IsExecutionTerminating())
-    return;
-
-  DCHECK(execution_context_of_event_target);
-  DCHECK(event);
-  if (!event->CanBeDispatchedInWorld(World()))
-    return;
-
-  ScriptState* script_state_of_listener =
-      event_listener_->CallbackRelevantScriptState();
-  if (!script_state_of_listener->ContextIsValid())
-    return;
-
-  ScriptState::Scope scope(script_state_of_listener);
-
-  // TODO(crbug.com/881688): Remove this check because listener should not be
-  // empty on calling it here.
-  if (GetListenerObject().IsEmpty())
-    return;
-
-  // https://dom.spec.whatwg.org/#firing-events
-  // Step 2. of firing events: Let event be the result of creating an event
-  // given eventConstructor, in the relevant Realm of target.
-  //
-  // (Note: a |js_event|, an v8::Value for |event| in the relevant realm of
-  // |event|'s target, is created here. It should be done before dispatching
-  // events, but Event and EventTarget do not have world to get |v8_context|, so
-  // it is done here with |execution_context_of_event_target|.)
-  v8::Local<v8::Context> v8_context =
-      ToV8Context(execution_context_of_event_target, World());
-  if (v8_context.IsEmpty())
-    return;
-  v8::Local<v8::Value> js_event =
-      ToV8(event, v8_context->Global(), event_listener_->GetIsolate());
-  if (js_event.IsEmpty())
-    return;
-
-  // Step 6: Let |global| be listener callback’s associated Realm’s global
-  // object.
-  v8::Local<v8::Object> global =
-      script_state_of_listener->GetContext()->Global();
-
-  // Step 8: If global is a Window object, then:
-  // Set currentEvent to global’s current event.
-  // If tuple’s item-in-shadow-tree is false, then set global’s current event to
-  // event.
-  V8PrivateProperty::Symbol event_symbol =
-      V8PrivateProperty::GetGlobalEvent(event_listener_->GetIsolate());
-  ExecutionContext* execution_context_of_listener =
-      ExecutionContext::From(script_state_of_listener);
-  v8::Local<v8::Value> current_event;
-  if (execution_context_of_listener->IsDocument()) {
-    current_event = event_symbol.GetOrUndefined(global).ToLocalChecked();
-    // Expose the event object as |window.event|, except when the event's target
-    // is in a V1 shadow tree.
-    Node* target_node = event->target()->ToNode();
-    if (!(target_node && target_node->IsInV1ShadowTree()))
-      event_symbol.Set(global, js_event);
-  }
-
-  {
-    // Catch exceptions thrown in the event listener if any and report them to
-    // DevTools console.
-    v8::TryCatch try_catch(event_listener_->GetIsolate());
-    try_catch.SetVerbose(true);
-
-    // Step 10: Call a listener with event's currentTarget as receiver and event
-    // and handle errors if thrown.
-    v8::Maybe<void> maybe_result =
-        event_listener_->handleEvent(event->currentTarget(), event);
-    ALLOW_UNUSED_LOCAL(maybe_result);
-
-    if (try_catch.HasCaught()) {
-      // Step 10-2: Set legacyOutputDidListenersThrowFlag if given.
-      event->LegacySetDidListenersThrowFlag();
-    }
-
-    // TODO(yukiy): consider to set |global|’s current event to |current_event|
-    // after execution is terminated if it is necessary and possible.
-    if (event_listener_->GetIsolate()->IsExecutionTerminating())
-      return;
-  }
-
-  // Step 12: If |global| is a Window object, then set |global|’s current event
-  // to |current_event|.
-  if (execution_context_of_listener->IsDocument())
-    event_symbol.Set(global, current_event);
-}
-
-void V8EventListenerImpl::Trace(blink::Visitor* visitor) {
-  visitor->Trace(event_listener_);
-  EventListener::Trace(visitor);
-}
-
-}  // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
deleted file mode 100644
index 4ac9ba2..0000000
--- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_IMPL_H_
-#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_IMPL_H_
-
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener.h"
-#include "third_party/blink/renderer/core/core_export.h"
-#include "third_party/blink/renderer/core/dom/events/event_listener.h"
-#include "third_party/blink/renderer/platform/bindings/trace_wrapper_member.h"
-#include "v8/include/v8.h"
-
-namespace blink {
-
-class Event;
-
-class CORE_EXPORT V8EventListenerImpl final : public EventListener {
- public:
-  static V8EventListenerImpl* Create(
-      v8::Local<v8::Object> listener,
-      ScriptState* script_state,
-      const V8PrivateProperty::Symbol& property) {
-    return new V8EventListenerImpl(listener, script_state, property);
-  }
-
-  static const V8EventListenerImpl* Cast(const EventListener* listener) {
-    return listener->GetType() == kJSEventListenerType
-               ? static_cast<const V8EventListenerImpl*>(listener)
-               : nullptr;
-  }
-
-  static V8EventListenerImpl* Cast(EventListener* listener) {
-    return const_cast<V8EventListenerImpl*>(
-        Cast(const_cast<const EventListener*>(listener)));
-  }
-
-  ~V8EventListenerImpl() override;
-
-  // Check the identity of |V8EventListener::callback_object_|. There can be
-  // multiple CallbackInterfaceBase objects that have the same
-  // |CallbackInterfaceBase::callback_object_| but have different
-  // |CallbackInterfaceBase::incumbent_script_state_|s.
-  bool operator==(const EventListener& other) const override {
-    const V8EventListenerImpl* other_event_listener = Cast(&other);
-    if (!other_event_listener)
-      return false;
-    return event_listener_->HasTheSameCallbackObject(
-        *other_event_listener->event_listener_);
-  }
-
-  // blink::EventListener overrides:
-  v8::Local<v8::Object> GetListenerObjectForInspector(
-      ExecutionContext* execution_context) override {
-    return event_listener_->CallbackObject();
-  }
-  DOMWrapperWorld* GetWorldForInspector() const override { return &World(); }
-  void handleEvent(ExecutionContext*, Event*) override;
-  void Trace(blink::Visitor*) override;
-
-  v8::Local<v8::Object> GetListenerObject() const {
-    return event_listener_->CallbackObject();
-  }
-
- private:
-  V8EventListenerImpl(v8::Local<v8::Object>,
-                      ScriptState*,
-                      const V8PrivateProperty::Symbol&);
-
-  DOMWrapperWorld& World() const {
-    return event_listener_->CallbackRelevantScriptState()->World();
-  }
-
-  const TraceWrapperMember<V8EventListener> event_listener_;
-};
-
-}  // namespace blink
-
-#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_EVENT_LISTENER_IMPL_H_
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
index b345078b..41de9ec4 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_event_listener_or_event_handler.cc
@@ -62,7 +62,7 @@
   // attributes in HTML) has [TreatNonObjectAsNull], which implies that
   // non-function objects should be treated as no-op functions that return
   // undefined.
-  if (IsAttribute())
+  if (IsEventHandler())
     return v8::Local<v8::Function>();
 
   // Getting the handleEvent property can runs script in the getter.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_idle_task_runner.h b/third_party/blink/renderer/bindings/core/v8/v8_idle_task_runner.h
index 05c4a5b..1cd32bf 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_idle_task_runner.h
+++ b/third_party/blink/renderer/bindings/core/v8/v8_idle_task_runner.h
@@ -32,9 +32,9 @@
 #include "base/memory/ptr_util.h"
 #include "gin/public/v8_idle_task_runner.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 4b6f9c9a..5db8763 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -32,7 +32,6 @@
 #include "services/metrics/public/cpp/ukm_builders.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/binding_security.h"
 #include "third_party/blink/renderer/bindings/core/v8/referrer_script_info.h"
 #include "third_party/blink/renderer/bindings/core/v8/rejected_promises.h"
@@ -67,6 +66,7 @@
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/weborigin/security_violation_reporting_policy.h"
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h b/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
index 09788ee..364238c 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
+++ b/third_party/blink/renderer/bindings/core/v8/v8_lazy_event_listener.h
@@ -82,7 +82,7 @@
 
   // Return true, so that event handlers from markup are not cloned twice when
   // building the shadow tree for SVGUseElements.
-  bool WasCreatedFromMarkup() const override { return true; }
+  bool IsEventHandlerForContentAttribute() const override { return true; }
 
   void CompileScript(ScriptState*, ExecutionContext*);
 
diff --git a/third_party/blink/renderer/bindings/scripts/v8_attributes.py b/third_party/blink/renderer/bindings/scripts/v8_attributes.py
index 73019f4..d58a5d9 100644
--- a/third_party/blink/renderer/bindings/scripts/v8_attributes.py
+++ b/third_party/blink/renderer/bindings/scripts/v8_attributes.py
@@ -105,11 +105,6 @@
     if is_save_same_object:
         includes.add('platform/bindings/v8_private_property.h')
 
-    if (base_idl_type == 'EventHandler' and
-            interface.name in ['Window', 'WorkerGlobalScope'] and
-            attribute.name == 'onerror'):
-        includes.add('bindings/core/v8/v8_error_handler.h')
-
     cached_attribute_validation_method = extended_attributes.get('CachedAttribute')
     keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute)
     if cached_attribute_validation_method or keep_alive_for_gc:
@@ -494,17 +489,16 @@
         getter_name = scoped_name(interface, attribute, cpp_name(attribute))
         context['event_handler_getter_expression'] = '%s(%s)' % (
             getter_name, ', '.join(arguments))
-        if (interface.name in ['Window', 'WorkerGlobalScope'] and
-                attribute.name == 'onerror'):
-            includes.add('bindings/core/v8/v8_error_handler.h')
-            arguments.append(
-                'V8EventListenerHelper::EnsureErrorHandler(' +
-                'ScriptState::ForRelevantRealm(info), v8Value)')
-        else:
-            arguments.append(
-                'V8EventListenerHelper::GetEventListener(' +
-                'ScriptState::ForRelevantRealm(info), v8Value, true, ' +
-                'kListenerFindOrCreate)')
+        handler_type = 'kEventHandler'
+        if attribute.name == 'onerror':
+            handler_type = 'kOnErrorEventHandler'
+        elif attribute.name == 'onbeforeunload':
+            handler_type = 'kOnBeforeUnloadEventHandler'
+        arguments.append(
+            'V8EventListenerHelper::GetEventHandler(' +
+            'ScriptState::ForRelevantRealm(info), v8Value, ' +
+            'JSEventHandler::HandlerType::' + handler_type +
+            ', kListenerFindOrCreate)')
     elif idl_type.base_type == 'SerializedScriptValue':
         arguments.append('std::move(cppValue)')
     else:
diff --git a/third_party/blink/renderer/bindings/scripts/v8_types.py b/third_party/blink/renderer/bindings/scripts/v8_types.py
index dec01b8..033ac59a 100644
--- a/third_party/blink/renderer/bindings/scripts/v8_types.py
+++ b/third_party/blink/renderer/bindings/scripts/v8_types.py
@@ -417,11 +417,8 @@
                             'core/typed_arrays/array_buffer_view_helpers.h',
                             'core/typed_arrays/flexible_array_buffer_view.h']),
     'Dictionary': set(['bindings/core/v8/dictionary.h']),
-    'EventHandler': set(['bindings/core/v8/v8_abstract_event_handler.h',
-                         'bindings/core/v8/v8_event_listener_helper.h']),
-    'EventListener': set(['bindings/core/v8/binding_security.h',
-                          'bindings/core/v8/v8_event_listener_helper.h',
-                          'core/frame/local_dom_window.h']),
+    'EventHandler': set(['bindings/core/v8/v8_event_listener_helper.h']),
+    'EventListener': set(['bindings/core/v8/v8_event_listener_helper.h']),
     'HTMLCollection': set(['bindings/core/v8/v8_html_collection.h',
                            'core/dom/class_collection.h',
                            'core/dom/tag_collection.h',
@@ -1046,7 +1043,7 @@
     # Special cases
     'Dictionary': '{cpp_value}.V8Value()',
     'EventHandler':
-        'V8AbstractEventHandler::GetListenerOrNull({isolate}, impl, {cpp_value})',
+        'JSBasedEventListener::GetListenerOrNull({isolate}, impl, {cpp_value})',
     'NodeFilter': 'ToV8({cpp_value}, {creation_context}, {isolate})',
     'Record': 'ToV8({cpp_value}, {creation_context}, {isolate})',
     'ScriptValue': '{cpp_value}.V8Value()',
diff --git a/third_party/blink/renderer/bindings/templates/methods.cpp.tmpl b/third_party/blink/renderer/bindings/templates/methods.cpp.tmpl
index b3b60838..b0e5543 100644
--- a/third_party/blink/renderer/bindings/templates/methods.cpp.tmpl
+++ b/third_party/blink/renderer/bindings/templates/methods.cpp.tmpl
@@ -166,9 +166,9 @@
   return;
 }
 {% if method.name == 'removeEventListener' or method.name == 'removeListener' %}
-{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], false, kListenerFindOnly);
+{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], kListenerFindOnly);
 {% else %}{# method.name == 'AddEventListener' #}
-{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], false, kListenerFindOrCreate);
+{{argument.name}} = V8EventListenerHelper::GetEventListener(ScriptState::Current(info.GetIsolate()), info[{{argument.index}}], kListenerFindOrCreate);
 {% endif %}{# method.name #}
 {% else %}{# argument.idl_type == 'EventListener' #}
 if (info[{{argument.index}}]->IsObject()) {
diff --git a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
index 8ec5561..fe533d8d 100644
--- a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
+++ b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface.cc
@@ -15,7 +15,6 @@
 #include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_element.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h"
@@ -994,7 +993,7 @@
 
   EventListener* cppValue(WTF::GetPtr(impl->implementsEventHandlerAttribute()));
 
-  V8SetReturnValue(info, V8AbstractEventHandler::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
+  V8SetReturnValue(info, JSBasedEventListener::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
 }
 
 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -1008,7 +1007,7 @@
 
   // Prepare the value to be set.
 
-  impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptState::ForRelevantRealm(info), v8Value, true, kListenerFindOrCreate));
+  impl->setImplementsEventHandlerAttribute(V8EventListenerHelper::GetEventHandler(ScriptState::ForRelevantRealm(info), v8Value, JSEventHandler::HandlerType::kEventHandler, kListenerFindOrCreate));
 }
 
 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
index 40df4e5..37b2d68 100644
--- a/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
+++ b/third_party/blink/renderer/bindings/tests/results/core/v8_test_interface_node.cc
@@ -13,7 +13,6 @@
 #include "base/memory/scoped_refptr.h"
 #include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
 #include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_dom_configuration.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_helper.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_test_interface_empty.h"
@@ -133,7 +132,7 @@
 
   EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute()));
 
-  V8SetReturnValue(info, V8AbstractEventHandler::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
+  V8SetReturnValue(info, JSBasedEventListener::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
 }
 
 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -147,7 +146,7 @@
 
   // Prepare the value to be set.
 
-  impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptState::ForRelevantRealm(info), v8Value, true, kListenerFindOrCreate));
+  impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventHandler(ScriptState::ForRelevantRealm(info), v8Value, JSEventHandler::HandlerType::kEventHandler, kListenerFindOrCreate));
 }
 
 static void perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc b/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
index 7281e7a..548edfe 100644
--- a/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
+++ b/third_party/blink/renderer/bindings/tests/results/core/v8_test_object.cc
@@ -20,7 +20,6 @@
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
 #include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value_factory.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_array_buffer.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_array_buffer_view.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_attr.h"
@@ -1607,7 +1606,7 @@
 
   EventListener* cppValue(WTF::GetPtr(impl->eventHandlerAttribute()));
 
-  V8SetReturnValue(info, V8AbstractEventHandler::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
+  V8SetReturnValue(info, JSBasedEventListener::GetListenerOrNull(info.GetIsolate(), impl, cppValue));
 }
 
 static void eventHandlerAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) {
@@ -1621,7 +1620,7 @@
 
   // Prepare the value to be set.
 
-  impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventListener(ScriptState::ForRelevantRealm(info), v8Value, true, kListenerFindOrCreate));
+  impl->setEventHandlerAttribute(V8EventListenerHelper::GetEventHandler(ScriptState::ForRelevantRealm(info), v8Value, JSEventHandler::HandlerType::kEventHandler, kListenerFindOrCreate));
 }
 
 static void doubleOrStringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/blink/renderer/controller/blink_initializer.cc b/third_party/blink/renderer/controller/blink_initializer.cc
index c3b92b5..a47a2bf 100644
--- a/third_party/blink/renderer/controller/blink_initializer.cc
+++ b/third_party/blink/renderer/controller/blink_initializer.cc
@@ -36,7 +36,6 @@
 #include "third_party/blink/public/common/experiments/memory_ablation_experiment.h"
 #include "third_party/blink/public/platform/interface_registry.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_initializer.h"
 #include "third_party/blink/renderer/bindings/modules/v8/v8_context_snapshot_external_references.h"
@@ -51,6 +50,7 @@
 #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
 #include "third_party/blink/renderer/platform/heap/heap.h"
 #include "third_party/blink/renderer/platform/histogram.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/assertions.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/wtf.h"
diff --git a/third_party/blink/renderer/core/core_idl_files.gni b/third_party/blink/renderer/core/core_idl_files.gni
index 4861186..80fac5d 100644
--- a/third_party/blink/renderer/core/core_idl_files.gni
+++ b/third_party/blink/renderer/core/core_idl_files.gni
@@ -564,6 +564,7 @@
 
 core_callback_function_idl_files =
     get_path_info([
+                    "html/event_handler.idl",
                     "dom/frame_request_callback.idl",
                     "dom/function_string_callback.idl",
                     "dom/idle_request_callback.idl",
diff --git a/third_party/blink/renderer/core/css/threaded/multi_threaded_test_util.h b/third_party/blink/renderer/core/css/threaded/multi_threaded_test_util.h
index 5c557fb..8d66716d 100644
--- a/third_party/blink/renderer/core/css/threaded/multi_threaded_test_util.h
+++ b/third_party/blink/renderer/core/css/threaded/multi_threaded_test_util.h
@@ -11,8 +11,8 @@
 
 #include "base/single_thread_task_runner.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/waitable_event.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
diff --git a/third_party/blink/renderer/core/dom/events/event_listener.h b/third_party/blink/renderer/core/dom/events/event_listener.h
index 0e73cdb..b5b2c29 100644
--- a/third_party/blink/renderer/core/dom/events/event_listener.h
+++ b/third_party/blink/renderer/core/dom/events/event_listener.h
@@ -52,11 +52,11 @@
   virtual bool operator==(const EventListener&) const = 0;
   virtual void handleEvent(ExecutionContext*, Event*) = 0;
   virtual const String& Code() const { return g_empty_string; }
-  virtual bool WasCreatedFromMarkup() const { return false; }
+  virtual bool IsEventHandlerForContentAttribute() const { return false; }
   virtual bool BelongsToTheCurrentWorld(ExecutionContext*) const {
     return false;
   }
-  virtual bool IsAttribute() const { return false; }
+  virtual bool IsEventHandler() const { return false; }
 
   // Only DevTools is allowed to use this method.
   // This method may return an empty handle.
@@ -66,7 +66,7 @@
   }
 
   // Only DevTools is allowed to use this method.
-  virtual DOMWrapperWorld* GetWorldForInspector() const { return nullptr; }
+  virtual DOMWrapperWorld* GetWorldPtrForInspector() const { return nullptr; }
 
   ListenerType GetType() const { return type_; }
 
diff --git a/third_party/blink/renderer/core/dom/events/event_listener_map.cc b/third_party/blink/renderer/core/dom/events/event_listener_map.cc
index dd0644c..de30076 100644
--- a/third_party/blink/renderer/core/dom/events/event_listener_map.cc
+++ b/third_party/blink/renderer/core/dom/events/event_listener_map.cc
@@ -189,7 +189,7 @@
     EventListenerVector* listener_vector,
     EventTarget* target) {
   for (auto& event_listener : *listener_vector) {
-    if (event_listener.Callback()->WasCreatedFromMarkup())
+    if (event_listener.Callback()->IsEventHandlerForContentAttribute())
       continue;
     AddEventListenerOptionsResolved options = event_listener.Options();
     target->addEventListener(event_type, event_listener.Callback(), options);
diff --git a/third_party/blink/renderer/core/dom/events/event_target.cc b/third_party/blink/renderer/core/dom/events/event_target.cc
index c82f6aa9..6e4fd78d 100644
--- a/third_party/blink/renderer/core/dom/events/event_target.cc
+++ b/third_party/blink/renderer/core/dom/events/event_target.cc
@@ -37,10 +37,8 @@
 #include "third_party/blink/public/web/web_settings.h"
 #include "third_party/blink/renderer/bindings/core/v8/add_event_listener_options_or_boolean.h"
 #include "third_party/blink/renderer/bindings/core/v8/event_listener_options_or_boolean.h"
-#include "third_party/blink/renderer/bindings/core/v8/script_event_listener.h"
+#include "third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h"
 #include "third_party/blink/renderer/bindings/core/v8/source_location.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_abstract_event_handler.h"
-#include "third_party/blink/renderer/bindings/core/v8/v8_event_listener_impl.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
 #include "third_party/blink/renderer/core/dom/events/event_dispatch_forbidden_scope.h"
 #include "third_party/blink/renderer/core/dom/events/event_target_impl.h"
@@ -124,11 +122,13 @@
                                        PerformanceMonitor::kBlockedEvent);
 }
 
-void ReportBlockedEvent(ExecutionContext* context,
+void ReportBlockedEvent(EventTarget& target,
                         const Event& event,
                         RegisteredEventListener* registered_listener,
                         base::TimeDelta delayed) {
-  if (registered_listener->Callback()->IsNativeBased())
+  JSBasedEventListener* listener =
+      JSBasedEventListener::Cast(registered_listener->Callback());
+  if (!listener)
     return;
 
   String message_text = String::Format(
@@ -138,9 +138,21 @@
       "responsive.",
       event.type().GetString().Utf8().data(), delayed.InMilliseconds());
 
-  PerformanceMonitor::ReportGenericViolation(
-      context, PerformanceMonitor::kBlockedEvent, message_text, delayed,
-      GetFunctionLocation(context, registered_listener->Callback()));
+  {
+    v8::Isolate* isolate = ToIsolate(target.GetExecutionContext());
+    v8::HandleScope handle_scope(isolate);
+
+    v8::Local<v8::Value> handler = listener->GetListenerObject(target);
+    PerformanceMonitor::ReportGenericViolation(
+        target.GetExecutionContext(), PerformanceMonitor::kBlockedEvent,
+        message_text, delayed,
+        (handler.IsEmpty() || !handler->IsObject())
+            ? nullptr
+            : SourceLocation::FromFunction(
+                  JSBasedEventListener::EventListenerEffectiveFunction(
+                      isolate, handler.As<v8::Object>())));
+  }
+
   registered_listener->SetBlockedEventWarningEmitted();
 }
 
@@ -289,13 +301,12 @@
   if (RuntimeEnabledFeatures::SmoothScrollJSInterventionEnabled() &&
       event_type == EventTypeNames::mousewheel && ToLocalDOMWindow() &&
       event_listener && !options.hasPassive()) {
-    v8::Local<v8::Object> callback_object;
-    if (V8AbstractEventHandler* v8_listener =
-            V8AbstractEventHandler::Cast(event_listener))
-      callback_object = v8_listener->GetExistingListenerObject();
-    if (V8EventListenerImpl* v8_listener =
-            V8EventListenerImpl::Cast(event_listener))
-      callback_object = v8_listener->GetListenerObject();
+    JSBasedEventListener* v8_listener =
+        JSBasedEventListener::Cast(event_listener);
+    if (!v8_listener)
+      return;
+    v8::Local<v8::Value> callback_object =
+        v8_listener->GetListenerObject(*this);
     if (!callback_object.IsEmpty() && callback_object->IsFunction() &&
         strcmp(
             "ssc_wheel",
@@ -523,7 +534,7 @@
 
   for (auto& event_listener : *listener_vector) {
     EventListener* listener = event_listener.Callback();
-    if (listener->IsAttribute() &&
+    if (listener->IsEventHandler() &&
         listener->BelongsToTheCurrentWorld(GetExecutionContext()))
       return &event_listener;
   }
@@ -849,7 +860,7 @@
         entry[i - 1].Callback() == listener && !entry[i - 1].Passive() &&
         !entry[i - 1].BlockedEventWarningEmitted() &&
         !event.defaultPrevented()) {
-      ReportBlockedEvent(context, event, &entry[i - 1],
+      ReportBlockedEvent(*this, event, &entry[i - 1],
                          now - event.PlatformTimeStamp());
     }
 
diff --git a/third_party/blink/renderer/core/dom/events/event_target.h b/third_party/blink/renderer/core/dom/events/event_target.h
index 7f433504..f9e4fc6 100644
--- a/third_party/blink/renderer/core/dom/events/event_target.h
+++ b/third_party/blink/renderer/core/dom/events/event_target.h
@@ -180,6 +180,8 @@
 
   virtual bool KeepEventInNode(const Event&) const { return false; }
 
+  virtual bool IsWindowOrWorkerGlobalScope() const { return false; }
+
   // Returns true if the target is window, window.document, or
   // window.document.body.
   bool IsTopLevelNode();
diff --git a/third_party/blink/renderer/core/dom/presentation_attribute_style.cc b/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
index e894ce9..6fd4dea 100644
--- a/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
+++ b/third_party/blink/renderer/core/dom/presentation_attribute_style.cc
@@ -34,11 +34,11 @@
 
 #include "base/macros.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/css/css_property_value_set.h"
 #include "third_party/blink/renderer/core/dom/attribute.h"
 #include "third_party/blink/renderer/core/dom/element.h"
 #include "third_party/blink/renderer/core/html/forms/html_input_element.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/hash_functions.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
diff --git a/third_party/blink/renderer/core/editing/element_inner_text.cc b/third_party/blink/renderer/core/editing/element_inner_text.cc
index 620584d..b77b861 100644
--- a/third_party/blink/renderer/core/editing/element_inner_text.cc
+++ b/third_party/blink/renderer/core/editing/element_inner_text.cc
@@ -471,6 +471,7 @@
   if (IsHTMLBRElement(node)) {
     ProcessChildren(node);
     result_.EmitNewline();
+    result_.SetShouldCollapseWhitespace(true);
     return;
   }
 
diff --git a/third_party/blink/renderer/core/editing/frame_selection.cc b/third_party/blink/renderer/core/editing/frame_selection.cc
index ea47d4f..78d2e31 100644
--- a/third_party/blink/renderer/core/editing/frame_selection.cc
+++ b/third_party/blink/renderer/core/editing/frame_selection.cc
@@ -857,10 +857,6 @@
          frame_->GetPage()->GetFocusController().IsActive();
 }
 
-bool FrameSelection::NeedsLayoutSelectionUpdate() const {
-  return layout_selection_->HasPendingSelection();
-}
-
 void FrameSelection::CommitAppearanceIfNeeded() {
   return layout_selection_->Commit();
 }
diff --git a/third_party/blink/renderer/core/editing/frame_selection.h b/third_party/blink/renderer/core/editing/frame_selection.h
index e97b214..5e8f81f 100644
--- a/third_party/blink/renderer/core/editing/frame_selection.h
+++ b/third_party/blink/renderer/core/editing/frame_selection.h
@@ -210,7 +210,6 @@
   void DocumentAttached(Document*);
 
   void DidLayout();
-  bool NeedsLayoutSelectionUpdate() const;
   void CommitAppearanceIfNeeded();
   void SetCaretVisible(bool caret_is_visible);
   void ScheduleVisualUpdate() const;
diff --git a/third_party/blink/renderer/core/editing/layout_selection.cc b/third_party/blink/renderer/core/editing/layout_selection.cc
index 2fe2e22..68b2e0c 100644
--- a/third_party/blink/renderer/core/editing/layout_selection.cc
+++ b/third_party/blink/renderer/core/editing/layout_selection.cc
@@ -630,7 +630,7 @@
 
 LayoutTextSelectionStatus LayoutSelection::ComputeSelectionStatus(
     const LayoutText& layout_text) const {
-  DCHECK(!HasPendingSelection());
+  DCHECK(!has_pending_selection_);
   const SelectionState selection_state = GetSelectionStateFor(layout_text);
   if (selection_state == SelectionState::kNone)
     return {0, 0, SelectionIncludeEnd::kNotInclude};
@@ -791,7 +791,7 @@
 }
 
 void LayoutSelection::Commit() {
-  if (!HasPendingSelection())
+  if (!has_pending_selection_)
     return;
   has_pending_selection_ = false;
 
diff --git a/third_party/blink/renderer/core/editing/layout_selection.h b/third_party/blink/renderer/core/editing/layout_selection.h
index 08deb8e1..9635e2a2 100644
--- a/third_party/blink/renderer/core/editing/layout_selection.h
+++ b/third_party/blink/renderer/core/editing/layout_selection.h
@@ -44,7 +44,6 @@
     return new LayoutSelection(frame_selection);
   }
 
-  bool HasPendingSelection() const { return has_pending_selection_; }
   void SetHasPendingSelection();
   void Commit();
 
diff --git a/third_party/blink/renderer/core/exported/web_associated_url_loader_impl_test.cc b/third_party/blink/renderer/core/exported/web_associated_url_loader_impl_test.cc
index 8162e306..ee03aae 100644
--- a/third_party/blink/renderer/core/exported/web_associated_url_loader_impl_test.cc
+++ b/third_party/blink/renderer/core/exported/web_associated_url_loader_impl_test.cc
@@ -37,7 +37,6 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/public/platform/web_url_request.h"
@@ -48,6 +47,7 @@
 #include "third_party/blink/public/web/web_view.h"
 #include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
 #include "third_party/blink/renderer/platform/wtf/text/cstring.h"
diff --git a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
index e63f89aa..4262f26 100644
--- a/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
+++ b/third_party/blink/renderer/core/exported/web_dev_tools_agent_impl.h
@@ -34,13 +34,13 @@
 #include <memory>
 
 #include "third_party/blink/public/platform/web_size.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/devtools_agent.mojom-blink.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/inspector/devtools_agent.h"
 #include "third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.h"
 #include "third_party/blink/renderer/core/inspector/inspector_page_agent.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index 1449162..3c4b739 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -52,7 +52,6 @@
 #include "third_party/blink/public/platform/web_float_rect.h"
 #include "third_party/blink/public/platform/web_keyboard_event.h"
 #include "third_party/blink/public/platform/web_security_origin.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_loader_client.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
@@ -155,6 +154,7 @@
 #include "third_party/blink/renderer/platform/loader/fetch/resource_error.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_loader_options.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/histogram_tester.h"
 #include "third_party/blink/renderer/platform/testing/paint_test_configurations.h"
 #include "third_party/blink/renderer/platform/testing/scoped_fake_plugin_registry.h"
diff --git a/third_party/blink/renderer/core/exported/web_plugin_container_test.cc b/third_party/blink/renderer/core/exported/web_plugin_container_test.cc
index a9a5cb0..db48d723 100644
--- a/third_party/blink/renderer/core/exported/web_plugin_container_test.cc
+++ b/third_party/blink/renderer/core/exported/web_plugin_container_test.cc
@@ -40,7 +40,6 @@
 #include "third_party/blink/public/platform/web_coalesced_input_event.h"
 #include "third_party/blink/public/platform/web_mouse_wheel_event.h"
 #include "third_party/blink/public/platform/web_pointer_event.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "third_party/blink/public/web/web_element.h"
@@ -67,6 +66,7 @@
 #include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
 #include "third_party/blink/renderer/platform/graphics/paint/paint_recorder.h"
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/scoped_fake_plugin_registry.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
index 1ede952d..b55a600 100644
--- a/third_party/blink/renderer/core/exported/web_view_test.cc
+++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -52,7 +52,6 @@
 #include "third_party/blink/public/platform/web_keyboard_event.h"
 #include "third_party/blink/public/platform/web_layer_tree_view.h"
 #include "third_party/blink/public/platform/web_size.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/public/public_buildflags.h"
 #include "third_party/blink/public/web/web_autofill_client.h"
@@ -121,6 +120,7 @@
 #include "third_party/blink/renderer/platform/graphics/graphics_layer.h"
 #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
 #include "third_party/blink/renderer/platform/keyboard_codes.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scroll/scroll_types.h"
 #include "third_party/blink/renderer/platform/testing/histogram_tester.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
diff --git a/third_party/blink/renderer/core/frame/dom_window.cc b/third_party/blink/renderer/core/frame/dom_window.cc
index 2f56ff20..ef89938 100644
--- a/third_party/blink/renderer/core/frame/dom_window.cc
+++ b/third_party/blink/renderer/core/frame/dom_window.cc
@@ -66,6 +66,10 @@
   return this;
 }
 
+bool DOMWindow::IsWindowOrWorkerGlobalScope() const {
+  return true;
+}
+
 Location* DOMWindow::location() const {
   if (!location_)
     location_ = Location::Create(const_cast<DOMWindow*>(this));
diff --git a/third_party/blink/renderer/core/frame/dom_window.h b/third_party/blink/renderer/core/frame/dom_window.h
index 58a3f12..7583923a 100644
--- a/third_party/blink/renderer/core/frame/dom_window.h
+++ b/third_party/blink/renderer/core/frame/dom_window.h
@@ -68,6 +68,7 @@
   // EventTarget overrides:
   const AtomicString& InterfaceName() const override;
   const DOMWindow* ToDOMWindow() const override;
+  bool IsWindowOrWorkerGlobalScope() const final;
 
   // Cross-origin DOM Level 0
   Location* location() const;
diff --git a/third_party/blink/renderer/core/frame/frame_serializer_test.cc b/third_party/blink/renderer/core/frame/frame_serializer_test.cc
index dd8242b..dda8d921 100644
--- a/third_party/blink/renderer/core/frame/frame_serializer_test.cc
+++ b/third_party/blink/renderer/core/frame/frame_serializer_test.cc
@@ -33,7 +33,6 @@
 #include <string>
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/public/platform/web_url_request.h"
@@ -46,6 +45,7 @@
 #include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_error.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/serialized_resource.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
diff --git a/third_party/blink/renderer/core/frame/frame_test_helpers.cc b/third_party/blink/renderer/core/frame/frame_test_helpers.cc
index 4fc07575c..92d1bd3d 100644
--- a/third_party/blink/renderer/core/frame/frame_test_helpers.cc
+++ b/third_party/blink/renderer/core/frame/frame_test_helpers.cc
@@ -39,7 +39,6 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_data.h"
 #include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url_loader_mock_factory.h"
 #include "third_party/blink/public/platform/web_url_request.h"
 #include "third_party/blink/public/platform/web_url_response.h"
@@ -51,6 +50,7 @@
 #include "third_party/blink/renderer/core/exported/web_remote_frame_impl.h"
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
 #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/url_test_helpers.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
diff --git a/third_party/blink/renderer/core/frame/performance_monitor.h b/third_party/blink/renderer/core/frame/performance_monitor.h
index b214148..02fa676 100644
--- a/third_party/blink/renderer/core/frame/performance_monitor.h
+++ b/third_party/blink/renderer/core/frame/performance_monitor.h
@@ -7,13 +7,13 @@
 
 #include "base/macros.h"
 #include "base/task/sequence_manager/task_time_observer.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/timing/sub_task_attribution.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
 #include "v8/include/v8.h"
 
diff --git a/third_party/blink/renderer/core/frame/root_frame_viewport_test.cc b/third_party/blink/renderer/core/frame/root_frame_viewport_test.cc
index f37a736e..1b6e230 100644
--- a/third_party/blink/renderer/core/frame/root_frame_viewport_test.cc
+++ b/third_party/blink/renderer/core/frame/root_frame_viewport_test.cc
@@ -9,11 +9,11 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
 #include "third_party/blink/public/platform/web_scroll_into_view_params.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/scroll/scrollable_area.h"
 #include "third_party/blink/renderer/core/scroll/scrollbar_theme_mock.h"
 #include "third_party/blink/renderer/platform/geometry/double_rect.h"
 #include "third_party/blink/renderer/platform/geometry/layout_rect.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/scroll/scroll_alignment.h"
 #include "third_party/blink/renderer/platform/scroll/scroll_types.h"
diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
index c92c612..1c58d04 100644
--- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
+++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
@@ -205,19 +205,19 @@
 }
 
 // https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use
-bool AllowedToUseFullscreen(const Frame* frame,
+bool AllowedToUseFullscreen(const Document& document,
                             ReportOptions report_on_failure) {
   // To determine whether a Document object |document| is allowed to use the
   // feature indicated by attribute name |allowattribute|, run these steps:
 
   // 1. If |document| has no browsing context, then return false.
-  if (!frame)
+  if (!document.GetFrame())
     return false;
 
   // 2. If Feature Policy is enabled, return the policy for "fullscreen"
   // feature.
-  return frame->DeprecatedIsFeatureEnabled(
-      mojom::FeaturePolicyFeature::kFullscreen, report_on_failure);
+  return document.IsFeatureEnabled(mojom::FeaturePolicyFeature::kFullscreen,
+                                   report_on_failure);
 }
 
 bool AllowedToRequestFullscreen(Document& document) {
@@ -269,8 +269,7 @@
 
   // |element|'s node document is allowed to use the feature indicated by
   // attribute name allowfullscreen.
-  if (!AllowedToUseFullscreen(element.GetDocument().GetFrame(),
-                              report_on_failure))
+  if (!AllowedToUseFullscreen(element.GetDocument(), report_on_failure))
     return false;
 
   return true;
@@ -958,8 +957,7 @@
   // The fullscreenEnabled attribute's getter must return true if the context
   // object is allowed to use the feature indicated by attribute name
   // allowfullscreen and fullscreen is supported, and false otherwise.
-  return AllowedToUseFullscreen(document.GetFrame(),
-                                ReportOptions::kDoNotReport) &&
+  return AllowedToUseFullscreen(document, ReportOptions::kDoNotReport) &&
          FullscreenIsSupported(document);
 }
 
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
index b0f63fb..74654ed 100644
--- a/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
+++ b/third_party/blink/renderer/core/html/canvas/canvas_async_blob_creator.cc
@@ -8,7 +8,6 @@
 #include "build/build_config.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/dom_exception.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
@@ -19,6 +18,7 @@
 #include "third_party/blink/renderer/platform/histogram.h"
 #include "third_party/blink/renderer/platform/image-encoders/image_encoder_utils.h"
 #include "third_party/blink/renderer/platform/scheduler/public/background_scheduler.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.h b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.h
index f1d5965..8813de5 100644
--- a/third_party/blink/renderer/core/html/canvas/canvas_font_cache.h
+++ b/third_party/blink/renderer/core/html/canvas/canvas_font_cache.h
@@ -6,11 +6,11 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CANVAS_CANVAS_FONT_CACHE_H_
 
 #include <memory>
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/css/css_property_value_set.h"
 #include "third_party/blink/renderer/platform/fonts/font.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/blink/renderer/platform/wtf/linked_hash_set.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h
index 6c89378..61fc7bf 100644
--- a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h
+++ b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h
@@ -27,7 +27,6 @@
 #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_CANVAS_CANVAS_RENDERING_CONTEXT_H_
 
 #include "base/macros.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h"
 #include "third_party/blink/renderer/core/html/canvas/html_canvas_element.h"
@@ -35,6 +34,7 @@
 #include "third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_color_params.h"
 #include "third_party/blink/renderer/platform/graphics/color_behavior.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/hash_set.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
 #include "third_party/skia/include/core/SkColorSpace.h"
diff --git a/third_party/blink/renderer/core/html/event_handler.idl b/third_party/blink/renderer/core/html/event_handler.idl
new file mode 100644
index 0000000..0776298c
--- /dev/null
+++ b/third_party/blink/renderer/core/html/event_handler.idl
@@ -0,0 +1,11 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// https://html.spec.whatwg.org/C/webappapis.html#event-handler-attributes
+
+// This definition is different from standard in order to handle special types
+// (OnErrorEventHandler, OnBeforeUnloadEventHandler) in the same type with
+// regular EventHandler.
+[TreatNonObjectAsNull]
+callback EventHandlerNonNull = any (any... args);
diff --git a/third_party/blink/renderer/core/html/forms/html_form_element.cc b/third_party/blink/renderer/core/html/forms/html_form_element.cc
index 3f10176..62508b4b 100644
--- a/third_party/blink/renderer/core/html/forms/html_form_element.cc
+++ b/third_party/blink/renderer/core/html/forms/html_form_element.cc
@@ -451,6 +451,10 @@
   }
 
   if (submission->Action().ProtocolIsJavaScript()) {
+    if (FastHasAttribute(disabledAttr)) {
+      UseCounter::Count(GetDocument(),
+                        WebFeature::kFormDisabledAttributePresentAndSubmit);
+    }
     GetDocument()
         .GetFrame()
         ->GetScriptController()
@@ -475,6 +479,10 @@
     UseCounter::Count(GetDocument().GetFrame(),
                       WebFeature::kMixedContentFormsSubmitted);
   }
+  if (FastHasAttribute(disabledAttr)) {
+    UseCounter::Count(GetDocument(),
+                      WebFeature::kFormDisabledAttributePresentAndSubmit);
+  }
 
   // TODO(lukasza): Investigate if the code below can uniformly handle remote
   // and local frames (i.e. by calling virtual Frame::navigate from a timer).
@@ -547,6 +555,8 @@
     attributes_.UpdateEncodingType(params.new_value);
   } else if (name == accept_charsetAttr) {
     attributes_.SetAcceptCharset(params.new_value);
+  } else if (name == disabledAttr) {
+    UseCounter::Count(GetDocument(), WebFeature::kFormDisabledAttributePresent);
   } else {
     HTMLElement::ParseAttribute(params);
   }
diff --git a/third_party/blink/renderer/core/html/html_body_element.cc b/third_party/blink/renderer/core/html/html_body_element.cc
index e5d1758..145122c 100644
--- a/third_party/blink/renderer/core/html/html_body_element.cc
+++ b/third_party/blink/renderer/core/html/html_body_element.cc
@@ -131,7 +131,9 @@
   } else if (name == onbeforeunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeunload,
-        CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
+        CreateAttributeEventListener(
+            GetDocument().GetFrame(), name, value,
+            JSEventHandler::HandlerType::kOnBeforeUnloadEventHandler));
   } else if (name == onunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::unload,
@@ -155,7 +157,9 @@
   } else if (name == onerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
-        CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
+        CreateAttributeEventListener(
+            GetDocument().GetFrame(), name, value,
+            JSEventHandler::HandlerType::kOnErrorEventHandler));
   } else if (name == onfocusAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focus,
diff --git a/third_party/blink/renderer/core/html/html_frame_element_base.cc b/third_party/blink/renderer/core/html/html_frame_element_base.cc
index 622b233..3e1fce3c 100644
--- a/third_party/blink/renderer/core/html/html_frame_element_base.cc
+++ b/third_party/blink/renderer/core/html/html_frame_element_base.cc
@@ -156,8 +156,11 @@
       SetScrollingMode(kScrollbarAlwaysOff);
   } else if (name == onbeforeunloadAttr) {
     // FIXME: should <frame> elements have beforeunload handlers?
-    SetAttributeEventListener(EventTypeNames::beforeunload,
-                              CreateAttributeEventListener(this, name, value));
+    SetAttributeEventListener(
+        EventTypeNames::beforeunload,
+        CreateAttributeEventListener(
+            this, name, value,
+            JSEventHandler::HandlerType::kOnBeforeUnloadEventHandler));
   } else {
     HTMLFrameOwnerElement::ParseAttribute(params);
   }
diff --git a/third_party/blink/renderer/core/html/html_frame_set_element.cc b/third_party/blink/renderer/core/html/html_frame_set_element.cc
index 0e16c17..fc7c8112 100644
--- a/third_party/blink/renderer/core/html/html_frame_set_element.cc
+++ b/third_party/blink/renderer/core/html/html_frame_set_element.cc
@@ -127,7 +127,9 @@
   } else if (name == onbeforeunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::beforeunload,
-        CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
+        CreateAttributeEventListener(
+            GetDocument().GetFrame(), name, value,
+            JSEventHandler::HandlerType::kOnBeforeUnloadEventHandler));
   } else if (name == onunloadAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::unload,
@@ -147,7 +149,9 @@
   } else if (name == onerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
-        CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
+        CreateAttributeEventListener(
+            GetDocument().GetFrame(), name, value,
+            JSEventHandler::HandlerType::kOnErrorEventHandler));
   } else if (name == onfocusAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::focus,
diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser.cc b/third_party/blink/renderer/core/html/parser/html_document_parser.cc
index b57759975..5637e2f 100644
--- a/third_party/blink/renderer/core/html/parser/html_document_parser.cc
+++ b/third_party/blink/renderer/core/html/parser/html_document_parser.cc
@@ -33,7 +33,6 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
 #include "third_party/blink/public/platform/web_loading_behavior_flag.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/css/media_values_cached.h"
 #include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
 #include "third_party/blink/renderer/core/dom/document_fragment.h"
@@ -59,6 +58,7 @@
 #include "third_party/blink/renderer/platform/histogram.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 
diff --git a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc
index d2fdce1..a05859b 100644
--- a/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc
+++ b/third_party/blink/renderer/core/html/parser/html_parser_scheduler.cc
@@ -28,10 +28,10 @@
 #include "base/feature_list.h"
 #include "base/metrics/field_trial_params.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
 #include "third_party/blink/renderer/core/html/parser/html_document_parser.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 
diff --git a/third_party/blink/renderer/core/html/track/vtt/vtt_region.cc b/third_party/blink/renderer/core/html/track/vtt/vtt_region.cc
index 30af927..bf33757 100644
--- a/third_party/blink/renderer/core/html/track/vtt/vtt_region.cc
+++ b/third_party/blink/renderer/core/html/track/vtt/vtt_region.cc
@@ -31,7 +31,6 @@
 #include "third_party/blink/renderer/core/html/track/vtt/vtt_region.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/dom_token_list.h"
 #include "third_party/blink/renderer/core/dom/element_traversal.h"
 #include "third_party/blink/renderer/core/geometry/dom_rect.h"
@@ -40,6 +39,7 @@
 #include "third_party/blink/renderer/core/html/track/vtt/vtt_scanner.h"
 #include "third_party/blink/renderer/platform/bindings/exception_messages.h"
 #include "third_party/blink/renderer/platform/bindings/exception_state.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/math_extras.h"
 
 #define VTT_LOG_LEVEL 3
diff --git a/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc b/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc
index 076b9bee..c188cbc 100644
--- a/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc
+++ b/third_party/blink/renderer/core/imagebitmap/image_bitmap_factories.cc
@@ -34,7 +34,6 @@
 
 #include "base/location.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/dom_exception.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
 #include "third_party/blink/renderer/core/fileapi/blob.h"
@@ -55,6 +54,7 @@
 #include "third_party/blink/renderer/platform/histogram.h"
 #include "third_party/blink/renderer/platform/image-decoders/image_decoder.h"
 #include "third_party/blink/renderer/platform/scheduler/public/background_scheduler.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 #include "v8/include/v8.h"
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc b/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
index e4a214f7..cc9758b9 100644
--- a/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.cc
@@ -30,6 +30,7 @@
 
 #include "third_party/blink/renderer/core/inspector/inspector_dom_debugger_agent.h"
 
+#include "third_party/blink/renderer/bindings/core/v8/js_based_event_listener.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_event_listener.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_event_target.h"
 #include "third_party/blink/renderer/bindings/core/v8/v8_node.h"
@@ -108,22 +109,18 @@
       continue;
     for (wtf_size_t k = 0; k < listeners->size(); ++k) {
       EventListener* event_listener = listeners->at(k).Callback();
-      if (event_listener->IsNativeBased())
+      JSBasedEventListener* v8_event_listener =
+          JSBasedEventListener::Cast(event_listener);
+      if (!v8_event_listener)
         continue;
-      // TODO(yukiy): Use a child class of blink::EventListener that is for v8
-      // event listeners here if it is implemented in redesigning
-      // EventListener/EventHandler: https://crbug.com/872138 .
       v8::Local<v8::Context> context = ToV8Context(
-          execution_context, *(event_listener->GetWorldForInspector()));
+          execution_context, v8_event_listener->GetWorldForInspector());
       // Optionally hide listeners from other contexts.
       if (!report_for_all_contexts && context != isolate->GetCurrentContext())
         continue;
-      // GetListenerObjectForInspector() may cause JS in the event attribute to
-      // get compiled, potentially unsuccessfully.  In that case, the function
-      // returns the empty handle without an exception.
-      v8::Local<v8::Object> handler =
-          event_listener->GetListenerObjectForInspector(execution_context);
-      if (handler.IsEmpty())
+      v8::Local<v8::Value> handler =
+          v8_event_listener->GetListenerObject(*target);
+      if (handler.IsEmpty() || !handler->IsObject())
         continue;
       bool use_capture = listeners->at(k).Capture();
       DOMNodeId backend_node_id = 0;
@@ -135,7 +132,7 @@
       }
       event_information->push_back(V8EventListenerInfo(
           type, use_capture, listeners->at(k).Passive(),
-          listeners->at(k).Once(), handler, backend_node_id));
+          listeners->at(k).Once(), handler.As<v8::Object>(), backend_node_id));
     }
   }
 }
@@ -455,7 +452,8 @@
 
   v8::Isolate* isolate = context->GetIsolate();
   v8::Local<v8::Function> function =
-      EventListenerEffectiveFunction(isolate, info.handler);
+      JSBasedEventListener::EventListenerEffectiveFunction(isolate,
+                                                           info.handler);
   if (function.IsEmpty())
     return nullptr;
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
index 4549c87..84fa61c 100644
--- a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
@@ -6,7 +6,6 @@
 
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_float_point.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_touch_event.h"
 #include "third_party/blink/renderer/core/exported/web_view_impl.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
@@ -21,6 +20,7 @@
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_request.h"
 #include "third_party/blink/renderer/platform/network/network_utils.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/util/thread_cpu_throttler.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 
diff --git a/third_party/blink/renderer/core/inspector/inspector_trace_events.h b/third_party/blink/renderer/core/inspector/inspector_trace_events.h
index ef1ebf9..5b0e5db8 100644
--- a/third_party/blink/renderer/core/inspector/inspector_trace_events.h
+++ b/third_party/blink/renderer/core/inspector/inspector_trace_events.h
@@ -9,7 +9,6 @@
 
 #include "base/macros.h"
 #include "base/optional.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_streamer.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/css/css_selector.h"
@@ -18,6 +17,7 @@
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_load_priority.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "v8/include/v8.h"
diff --git a/third_party/blink/renderer/core/inspector/thread_debugger.cc b/third_party/blink/renderer/core/inspector/thread_debugger.cc
index bc505ed..ba7feadd 100644
--- a/third_party/blink/renderer/core/inspector/thread_debugger.cc
+++ b/third_party/blink/renderer/core/inspector/thread_debugger.cc
@@ -375,7 +375,7 @@
   Vector<String> types = NormalizeEventTypes(info);
   EventListener* event_listener = V8EventListenerHelper::GetEventListener(
       ScriptState::Current(info.GetIsolate()),
-      v8::Local<v8::Function>::Cast(info.Data()), false,
+      v8::Local<v8::Function>::Cast(info.Data()),
       enabled ? kListenerFindOrCreate : kListenerFindOnly);
   if (!event_listener)
     return;
diff --git a/third_party/blink/renderer/core/inspector/worker_inspector_controller.h b/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
index 349c945..15627db2 100644
--- a/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
+++ b/third_party/blink/renderer/core/inspector/worker_inspector_controller.h
@@ -34,10 +34,10 @@
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/unguessable_token.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/inspector/inspector_session.h"
 #include "third_party/blink/renderer/core/inspector/inspector_task_runner.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/weborigin/kurl.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
diff --git a/third_party/blink/renderer/core/layout/layout_inline.cc b/third_party/blink/renderer/core/layout/layout_inline.cc
index 8ae2c79..511d33d 100644
--- a/third_party/blink/renderer/core/layout/layout_inline.cc
+++ b/third_party/blink/renderer/core/layout/layout_inline.cc
@@ -999,6 +999,10 @@
   Region region_result;
   HitTestCulledInlinesGeneratorContext context(region_result,
                                                adjusted_location);
+
+  // NG generates purely physical rectangles here, while legacy sets the block
+  // offset on the rectangles relatively to the block-start. NG is doing the
+  // right thing. Legacy is wrong.
   if (container_fragment) {
     DCHECK(EnclosingNGBlockFlow());
     DCHECK(container_fragment->IsDescendantOfNotSelf(
diff --git a/third_party/blink/renderer/core/layout/layout_text.cc b/third_party/blink/renderer/core/layout/layout_text.cc
index f22c6cc..96d6b75 100644
--- a/third_party/blink/renderer/core/layout/layout_text.cc
+++ b/third_party/blink/renderer/core/layout/layout_text.cc
@@ -27,7 +27,6 @@
 #include <algorithm>
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/accessibility/ax_object_cache.h"
 #include "third_party/blink/renderer/core/dom/text.h"
 #include "third_party/blink/renderer/core/editing/ephemeral_range.h"
@@ -63,6 +62,7 @@
 #include "third_party/blink/renderer/platform/fonts/character_range.h"
 #include "third_party/blink/renderer/platform/geometry/float_quad.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/text/bidi_resolver.h"
 #include "third_party/blink/renderer/platform/text/character.h"
diff --git a/third_party/blink/renderer/core/loader/long_task_detector.cc b/third_party/blink/renderer/core/loader/long_task_detector.cc
index fef8b5a..f3aeca2 100644
--- a/third_party/blink/renderer/core/loader/long_task_detector.cc
+++ b/third_party/blink/renderer/core/loader/long_task_detector.cc
@@ -5,7 +5,7 @@
 #include "third_party/blink/renderer/core/loader/long_task_detector.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/core/loader/long_task_detector.h b/third_party/blink/renderer/core/loader/long_task_detector.h
index 41076c7a..acdff42 100644
--- a/third_party/blink/renderer/core/loader/long_task_detector.h
+++ b/third_party/blink/renderer/core/loader/long_task_detector.h
@@ -7,9 +7,9 @@
 
 #include "base/macros.h"
 #include "base/task/sequence_manager/task_time_observer.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/core/page/page_overlay_test.cc b/third_party/blink/renderer/core/page/page_overlay_test.cc
index 3e06ccf..56b0ec2 100644
--- a/third_party/blink/renderer/core/page/page_overlay_test.cc
+++ b/third_party/blink/renderer/core/page/page_overlay_test.cc
@@ -11,7 +11,6 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/web_settings.h"
 #include "third_party/blink/renderer/core/exported/web_view_impl.h"
 #include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
@@ -21,6 +20,7 @@
 #include "third_party/blink/renderer/platform/graphics/graphics_context.h"
 #include "third_party/blink/renderer/platform/graphics/paint/drawing_recorder.h"
 #include "third_party/blink/renderer/platform/graphics/paint/paint_controller.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "third_party/skia/include/core/SkCanvas.h"
 #include "third_party/skia/include/core/SkColor.h"
diff --git a/third_party/blink/renderer/core/scheduler/throttling_test.cc b/third_party/blink/renderer/core/scheduler/throttling_test.cc
index f746941..08f198cd 100644
--- a/third_party/blink/renderer/core/scheduler/throttling_test.cc
+++ b/third_party/blink/renderer/core/scheduler/throttling_test.cc
@@ -5,9 +5,9 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/testing/sim/sim_request.h"
 #include "third_party/blink/renderer/core/testing/sim/sim_test.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
diff --git a/third_party/blink/renderer/core/script/script_runner.cc b/third_party/blink/renderer/core/script/script_runner.cc
index e5da031..9f5f0b8 100644
--- a/third_party/blink/renderer/core/script/script_runner.cc
+++ b/third_party/blink/renderer/core/script/script_runner.cc
@@ -28,11 +28,11 @@
 #include <algorithm>
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/script/script_loader.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/runtime_enabled_features.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/core/scroll/scroll_animator_test.cc b/third_party/blink/renderer/core/scroll/scroll_animator_test.cc
index 14951e6..cf548b4 100644
--- a/third_party/blink/renderer/core/scroll/scroll_animator_test.cc
+++ b/third_party/blink/renderer/core/scroll/scroll_animator_test.cc
@@ -32,12 +32,12 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/scroll/scroll_animator_base.h"
 #include "third_party/blink/renderer/core/scroll/scrollable_area.h"
 #include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
 #include "third_party/blink/renderer/platform/geometry/float_point.h"
 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 
 namespace blink {
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 500c7ec..0745314 100644
--- a/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h
+++ b/third_party/blink/renderer/core/scroll/scrollbar_test_suite.h
@@ -10,12 +10,12 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/loader/empty_clients.h"
 #include "third_party/blink/renderer/core/scroll/scrollable_area.h"
 #include "third_party/blink/renderer/core/scroll/scrollbar.h"
 #include "third_party/blink/renderer/core/scroll/scrollbar_theme_mock.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/core/svg/svg_script_element.cc b/third_party/blink/renderer/core/svg/svg_script_element.cc
index b88f4bec..0d76d32 100644
--- a/third_party/blink/renderer/core/svg/svg_script_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_script_element.cc
@@ -50,7 +50,9 @@
   if (params.name == HTMLNames::onerrorAttr) {
     SetAttributeEventListener(
         EventTypeNames::error,
-        CreateAttributeEventListener(this, params.name, params.new_value));
+        CreateAttributeEventListener(
+            this, params.name, params.new_value,
+            JSEventHandler::HandlerType::kOnErrorEventHandler));
   } else {
     SVGElement::ParseAttribute(params);
   }
diff --git a/third_party/blink/renderer/core/svg/svg_svg_element.cc b/third_party/blink/renderer/core/svg/svg_svg_element.cc
index e82c0f59..e80aac4 100644
--- a/third_party/blink/renderer/core/svg/svg_svg_element.cc
+++ b/third_party/blink/renderer/core/svg/svg_svg_element.cc
@@ -187,7 +187,9 @@
   } else if (name == HTMLNames::onerrorAttr) {
     GetDocument().SetWindowAttributeEventListener(
         EventTypeNames::error,
-        CreateAttributeEventListener(GetDocument().GetFrame(), name, value));
+        CreateAttributeEventListener(
+            GetDocument().GetFrame(), name, value,
+            JSEventHandler::HandlerType::kOnErrorEventHandler));
   } else if (SVGZoomAndPan::ParseAttribute(name, value)) {
   } else {
     SVGElement::ParseAttribute(params);
diff --git a/third_party/blink/renderer/core/testing/null_execution_context.cc b/third_party/blink/renderer/core/testing/null_execution_context.cc
index 27bfde2..4ca333d 100644
--- a/third_party/blink/renderer/core/testing/null_execution_context.cc
+++ b/third_party/blink/renderer/core/testing/null_execution_context.cc
@@ -5,10 +5,10 @@
 #include "third_party/blink/renderer/core/testing/null_execution_context.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
 #include "third_party/blink/renderer/core/frame/dom_timer.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/core/timing/worker_performance.cc b/third_party/blink/renderer/core/timing/worker_performance.cc
index 2d3968f..a7f15036 100644
--- a/third_party/blink/renderer/core/timing/worker_performance.cc
+++ b/third_party/blink/renderer/core/timing/worker_performance.cc
@@ -32,9 +32,9 @@
 
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h"
 #include "third_party/blink/renderer/core/workers/worker_global_scope.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/time.h"
 
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc
index 531cfdf..62a72ed 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc
@@ -203,7 +203,7 @@
 }
 
 void DedicatedWorker::terminate() {
-  DCHECK(GetExecutionContext()->IsContextThread());
+  DCHECK(!GetExecutionContext() || GetExecutionContext()->IsContextThread());
   context_proxy_->TerminateGlobalScope();
 }
 
diff --git a/third_party/blink/renderer/core/workers/parent_execution_context_task_runners.cc b/third_party/blink/renderer/core/workers/parent_execution_context_task_runners.cc
index 55b9ed9..7b3da53 100644
--- a/third_party/blink/renderer/core/workers/parent_execution_context_task_runners.cc
+++ b/third_party/blink/renderer/core/workers/parent_execution_context_task_runners.cc
@@ -6,8 +6,8 @@
 
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/assertions.h"
 #include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
 
diff --git a/third_party/blink/renderer/core/workers/worker_backing_thread.h b/third_party/blink/renderer/core/workers/worker_backing_thread.h
index 88f93e80..f1270f6 100644
--- a/third_party/blink/renderer/core/workers/worker_backing_thread.h
+++ b/third_party/blink/renderer/core/workers/worker_backing_thread.h
@@ -10,6 +10,7 @@
 #include "base/memory/ptr_util.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/platform/heap/thread_state.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/forward.h"
 #include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
 #include "v8/include/v8.h"
@@ -17,7 +18,6 @@
 namespace blink {
 
 class WebThreadSupportingGC;
-struct WebThreadCreationParams;
 struct WorkerBackingThreadStartupData;
 
 // WorkerBackingThread represents a WebThread with Oilpan and V8. A client of
diff --git a/third_party/blink/renderer/core/workers/worker_global_scope.h b/third_party/blink/renderer/core/workers/worker_global_scope.h
index 4076260..18c26947 100644
--- a/third_party/blink/renderer/core/workers/worker_global_scope.h
+++ b/third_party/blink/renderer/core/workers/worker_global_scope.h
@@ -134,6 +134,7 @@
 
   // EventTarget
   ExecutionContext* GetExecutionContext() const final;
+  bool IsWindowOrWorkerGlobalScope() const final { return true; }
 
   // The following methods implement PausbaleObject semantic
   // so that WorkerGlobalScope can be paused.
diff --git a/third_party/blink/renderer/core/workers/worker_thread.h b/third_party/blink/renderer/core/workers/worker_thread.h
index 26c3f58..55429cd 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.h
+++ b/third_party/blink/renderer/core/workers/worker_thread.h
@@ -36,7 +36,6 @@
 #include "base/thread_annotations.h"
 #include "base/unguessable_token.h"
 #include "services/network/public/mojom/fetch_api.mojom-shared.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_thread_type.h"
 #include "third_party/blink/renderer/core/core_export.h"
 #include "third_party/blink/renderer/core/frame/csp/content_security_policy.h"
@@ -44,6 +43,7 @@
 #include "third_party/blink/renderer/core/workers/worker_backing_thread_startup_data.h"
 #include "third_party/blink/renderer/core/workers/worker_inspector_proxy.h"
 #include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/worker_scheduler.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
diff --git a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request_progress_event_throttle.cc b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request_progress_event_throttle.cc
index d7cc325..f85ae34 100644
--- a/third_party/blink/renderer/core/xmlhttprequest/xml_http_request_progress_event_throttle.cc
+++ b/third_party/blink/renderer/core/xmlhttprequest/xml_http_request_progress_event_throttle.cc
@@ -28,12 +28,12 @@
 #include "third_party/blink/renderer/core/xmlhttprequest/xml_http_request_progress_event_throttle.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/event_type_names.h"
 #include "third_party/blink/renderer/core/events/progress_event.h"
 #include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
 #include "third_party/blink/renderer/core/probe/core_probes.h"
 #include "third_party/blink/renderer/core/xmlhttprequest/xml_http_request.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/assertions.h"
 #include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
index ca5ab3b..27afdec 100644
--- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
+++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
@@ -27,7 +27,6 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_CANVAS_RENDERING_CONTEXT_2D_H_
 #define THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_CANVAS_RENDERING_CONTEXT_2D_H_
 
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h"
 #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h"
 #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context_factory.h"
@@ -40,6 +39,7 @@
 #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
 #include "third_party/blink/renderer/platform/graphics/graphics_types.h"
 #include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 
 namespace cc {
diff --git a/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc b/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc
index cfcd8d4..9f97025 100644
--- a/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc
+++ b/third_party/blink/renderer/modules/encryptedmedia/navigator_request_media_key_system_access.cc
@@ -302,8 +302,8 @@
   ExecutionContext* execution_context = ExecutionContext::From(script_state);
   Document* document = To<Document>(execution_context);
 
-  if (!document->IsFeatureEnabled(
-          mojom::FeaturePolicyFeature::kEncryptedMedia)) {
+  if (!document->IsFeatureEnabled(mojom::FeaturePolicyFeature::kEncryptedMedia,
+                                  ReportOptions::kReportOnFailure)) {
     UseCounter::Count(document,
                       WebFeature::kEncryptedMediaDisabledByFeaturePolicy);
     document->AddConsoleMessage(
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc b/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
index 556b519..2f4c4d6 100644
--- a/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.cc
@@ -5,7 +5,6 @@
 #include "third_party/blink/renderer/modules/peerconnection/rtc_ice_transport.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/web_local_frame.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/events/event.h"
@@ -21,6 +20,7 @@
 #include "third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_ice_event.h"
 #include "third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_ice_event_init.h"
 #include "third_party/blink/renderer/modules/peerconnection/rtc_quic_transport.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/webrtc/api/jsepicecandidate.h"
 #include "third_party/webrtc/api/peerconnectioninterface.h"
 #include "third_party/webrtc/p2p/base/portallocator.h"
diff --git a/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
index f6cb9237..bf7669b 100644
--- a/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
+++ b/third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_controller_impl.cc
@@ -55,7 +55,8 @@
   // "picture-in-picture", return kDisabledByFeaturePolicy status.
   if (RuntimeEnabledFeatures::PictureInPictureAPIEnabled() &&
       !GetSupplementable()->IsFeatureEnabled(
-          blink::mojom::FeaturePolicyFeature::kPictureInPicture)) {
+          blink::mojom::FeaturePolicyFeature::kPictureInPicture,
+          ReportOptions::kReportOnFailure)) {
     return Status::kDisabledByFeaturePolicy;
   }
 
diff --git a/third_party/blink/renderer/modules/presentation/presentation_availability_state.cc b/third_party/blink/renderer/modules/presentation/presentation_availability_state.cc
index ee609bef..ba08fa1 100644
--- a/third_party/blink/renderer/modules/presentation/presentation_availability_state.cc
+++ b/third_party/blink/renderer/modules/presentation/presentation_availability_state.cc
@@ -5,9 +5,9 @@
 #include "third_party/blink/renderer/modules/presentation/presentation_availability_state.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/modules/presentation/presentation_availability_observer.h"
 #include "third_party/blink/renderer/modules/presentation/presentation_controller.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/modules/sensor/sensor_proxy_inspector_impl.cc b/third_party/blink/renderer/modules/sensor/sensor_proxy_inspector_impl.cc
index 67bb584..f4bf564 100644
--- a/third_party/blink/renderer/modules/sensor/sensor_proxy_inspector_impl.cc
+++ b/third_party/blink/renderer/modules/sensor/sensor_proxy_inspector_impl.cc
@@ -7,9 +7,9 @@
 #include "services/device/public/cpp/generic_sensor/sensor_traits.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/modules/sensor/sensor_reading_remapper.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/math_extras.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_installed_scripts_manager_test.cc b/third_party/blink/renderer/modules/service_worker/service_worker_installed_scripts_manager_test.cc
index 39572ba..619e6d4 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_installed_scripts_manager_test.cc
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_installed_scripts_manager_test.cc
@@ -9,8 +9,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_installed_scripts_manager.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/waitable_event.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
diff --git a/third_party/blink/renderer/modules/service_worker/thread_safe_script_container_test.cc b/third_party/blink/renderer/modules/service_worker/thread_safe_script_container_test.cc
index 698bc24..83df7910 100644
--- a/third_party/blink/renderer/modules/service_worker/thread_safe_script_container_test.cc
+++ b/third_party/blink/renderer/modules/service_worker/thread_safe_script_container_test.cc
@@ -8,8 +8,8 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/waitable_event.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
diff --git a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
index a467f36..1a664a7c 100644
--- a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
+++ b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
@@ -6,7 +6,6 @@
 
 #include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom-blink.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_function.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
 #include "third_party/blink/renderer/bindings/core/v8/script_value.h"
@@ -15,6 +14,7 @@
 #include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h"
 #include "third_party/blink/renderer/platform/bindings/microtask.h"
 #include "third_party/blink/renderer/platform/layout_test_support.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/assertions.h"
 #include "v8/include/v8.h"
 
diff --git a/third_party/blink/renderer/modules/storage/storage_controller.cc b/third_party/blink/renderer/modules/storage/storage_controller.cc
index c98bda8..855e3ba 100644
--- a/third_party/blink/renderer/modules/storage/storage_controller.cc
+++ b/third_party/blink/renderer/modules/storage/storage_controller.cc
@@ -11,11 +11,11 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_storage_area.h"
 #include "third_party/blink/public/platform/web_storage_namespace.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/frame/content_settings_client.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/modules/storage/cached_storage_area.h"
 #include "third_party/blink/renderer/modules/storage/storage_namespace.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
diff --git a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc
index ab50f191..aae1753 100644
--- a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc
+++ b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc
@@ -27,7 +27,6 @@
 
 #include "base/location.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_buffer.h"
 #include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
@@ -35,6 +34,7 @@
 #include "third_party/blink/renderer/platform/audio/audio_file_reader.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/scheduler/public/background_scheduler.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/modules/webaudio/audio_context_test.cc b/third_party/blink/renderer/modules/webaudio/audio_context_test.cc
index b0f898a..2923f69 100644
--- a/third_party/blink/renderer/modules/webaudio/audio_context_test.cc
+++ b/third_party/blink/renderer/modules/webaudio/audio_context_test.cc
@@ -9,9 +9,9 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/web_audio_device.h"
 #include "third_party/blink/public/platform/web_audio_latency_hint.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/testing/page_test_base.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc b/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc
index a85eda2..37b3b75 100644
--- a/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc
+++ b/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc
@@ -26,11 +26,11 @@
 #include "third_party/blink/renderer/modules/webaudio/deferred_task_handler.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_node.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_node_output.h"
 #include "third_party/blink/renderer/modules/webaudio/offline_audio_context.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.h b/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.h
index db4a535..fa4c56b 100644
--- a/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.h
+++ b/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.h
@@ -28,10 +28,10 @@
 
 #include <memory>
 #include "base/memory/scoped_refptr.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_buffer.h"
 #include "third_party/blink/renderer/modules/webaudio/audio_destination_node.h"
 #include "third_party/blink/renderer/modules/webaudio/offline_audio_context.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 75efa91..6ad1e48 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1371,7 +1371,6 @@
     "web_task_runner.cc",
     "web_task_runner.h",
     "web_text_input_info.cc",
-    "web_thread.cc",
     "web_thread_supporting_gc.cc",
     "web_thread_supporting_gc.h",
     "web_thread_type.cc",
diff --git a/third_party/blink/renderer/platform/audio/DEPS b/third_party/blink/renderer/platform/audio/DEPS
index 8764ae6..e7d214c5 100644
--- a/third_party/blink/renderer/platform/audio/DEPS
+++ b/third_party/blink/renderer/platform/audio/DEPS
@@ -13,6 +13,7 @@
     "+third_party/blink/renderer/platform/histogram.h",
     "+third_party/blink/renderer/platform/instrumentation",
     "+third_party/blink/renderer/platform/platform_export.h",
+    "+third_party/blink/renderer/platform/scheduler/public",
     "+third_party/blink/renderer/platform/shared_buffer.h",
     "+third_party/blink/renderer/platform/testing",
     "+third_party/blink/renderer/platform/waitable_event.h",
diff --git a/third_party/blink/renderer/platform/audio/audio_destination.h b/third_party/blink/renderer/platform/audio/audio_destination.h
index a42f2ee..bca1f5c 100644
--- a/third_party/blink/renderer/platform/audio/audio_destination.h
+++ b/third_party/blink/renderer/platform/audio/audio_destination.h
@@ -33,10 +33,10 @@
 #include "base/memory/scoped_refptr.h"
 #include "base/single_thread_task_runner.h"
 #include "third_party/blink/public/platform/web_audio_device.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_vector.h"
 #include "third_party/blink/renderer/platform/audio/audio_bus.h"
 #include "third_party/blink/renderer/platform/audio/audio_io_callback.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 #include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
 
diff --git a/third_party/blink/renderer/platform/audio/hrtf_database_loader.h b/third_party/blink/renderer/platform/audio/hrtf_database_loader.h
index a17ffb9..eb5115b 100644
--- a/third_party/blink/renderer/platform/audio/hrtf_database_loader.h
+++ b/third_party/blink/renderer/platform/audio/hrtf_database_loader.h
@@ -30,8 +30,8 @@
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_AUDIO_HRTF_DATABASE_LOADER_H_
 
 #include <memory>
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/audio/hrtf_database.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/blink/renderer/platform/wtf/ref_counted.h"
 #include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
diff --git a/third_party/blink/renderer/platform/audio/push_pull_fifo_multithread_test.cc b/third_party/blink/renderer/platform/audio/push_pull_fifo_multithread_test.cc
index 96563e1..d1dfae47b 100644
--- a/third_party/blink/renderer/platform/audio/push_pull_fifo_multithread_test.cc
+++ b/third_party/blink/renderer/platform/audio/push_pull_fifo_multithread_test.cc
@@ -7,9 +7,9 @@
 #include <memory>
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/audio/audio_utilities.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
diff --git a/third_party/blink/renderer/platform/audio/push_pull_fifo_test.cc b/third_party/blink/renderer/platform/audio/push_pull_fifo_test.cc
index 1c4558f..c024c1d 100644
--- a/third_party/blink/renderer/platform/audio/push_pull_fifo_test.cc
+++ b/third_party/blink/renderer/platform/audio/push_pull_fifo_test.cc
@@ -8,9 +8,9 @@
 #include <vector>
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/audio/audio_utilities.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 
diff --git a/third_party/blink/renderer/platform/audio/reverb_convolver.cc b/third_party/blink/renderer/platform/audio/reverb_convolver.cc
index 9cb601e..80bcd9a4 100644
--- a/third_party/blink/renderer/platform/audio/reverb_convolver.cc
+++ b/third_party/blink/renderer/platform/audio/reverb_convolver.cc
@@ -33,10 +33,10 @@
 
 #include "base/location.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/audio/audio_bus.h"
 #include "third_party/blink/renderer/platform/audio/vector_math.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/audio/reverb_convolver.h b/third_party/blink/renderer/platform/audio/reverb_convolver.h
index 4d3490b3..568c0e0 100644
--- a/third_party/blink/renderer/platform/audio/reverb_convolver.h
+++ b/third_party/blink/renderer/platform/audio/reverb_convolver.h
@@ -36,13 +36,13 @@
 #include "third_party/blink/renderer/platform/audio/reverb_accumulation_buffer.h"
 #include "third_party/blink/renderer/platform/audio/reverb_convolver_stage.h"
 #include "third_party/blink/renderer/platform/audio/reverb_input_buffer.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/vector.h"
 
 namespace blink {
 
 class AudioChannel;
-class WebThread;
 
 class PLATFORM_EXPORT ReverbConvolver {
   USING_FAST_MALLOC(ReverbConvolver);
diff --git a/third_party/blink/renderer/platform/bindings/parkable_string_manager.cc b/third_party/blink/renderer/platform/bindings/parkable_string_manager.cc
index 9b4767a..4042ad4 100644
--- a/third_party/blink/renderer/platform/bindings/parkable_string_manager.cc
+++ b/third_party/blink/renderer/platform/bindings/parkable_string_manager.cc
@@ -10,8 +10,8 @@
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/bindings/parkable_string.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 #include "third_party/blink/renderer/platform/wtf/wtf.h"
diff --git a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc
index e7c2c29..6694666 100644
--- a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc
+++ b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc
@@ -32,7 +32,6 @@
 #include "base/time/default_tick_clock.h"
 #include "gin/public/v8_idle_task_runner.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/renderer/platform/bindings/active_script_wrappable_base.h"
 #include "third_party/blink/renderer/platform/bindings/dom_data_store.h"
@@ -44,6 +43,7 @@
 #include "third_party/blink/renderer/platform/bindings/v8_private_property.h"
 #include "third_party/blink/renderer/platform/bindings/v8_value_cache.h"
 #include "third_party/blink/renderer/platform/heap/unified_heap_controller.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/leak_annotations.h"
 #include "v8/include/v8.h"
 
diff --git a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h
index f014621..d126266a 100644
--- a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h
+++ b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h
@@ -157,6 +157,10 @@
   V8ContextSnapshotMode GetV8ContextSnapshotMode() const {
     return v8_context_snapshot_mode_;
   }
+  void BailoutAndDisableV8ContextSnapshot() {
+    DCHECK_EQ(V8ContextSnapshotMode::kUseSnapshot, v8_context_snapshot_mode_);
+    v8_context_snapshot_mode_ = V8ContextSnapshotMode::kDontUseSnapshot;
+  }
 
   // Accessor to the cache of cross-origin accessible operation's templates.
   // Created templates get automatically cached.
diff --git a/third_party/blink/renderer/platform/bindings/v8_private_property.h b/third_party/blink/renderer/platform/bindings/v8_private_property.h
index ff6ced2..6eff732 100644
--- a/third_party/blink/renderer/platform/bindings/v8_private_property.h
+++ b/third_party/blink/renderer/platform/bindings/v8_private_property.h
@@ -49,7 +49,6 @@
   X(SameObject, NotificationVibrate)                  \
   X(SameObject, PerformanceLongTaskTimingAttribution) \
   X(SameObject, PushManagerSupportedContentEncodings) \
-  X(V8ErrorHandler, ErrorHandler)                     \
   X(CustomWrappable, EventHandler)                    \
   X(CustomWrappable, EventListener)                   \
   SCRIPT_PROMISE_PROPERTIES(X, Promise)               \
diff --git a/third_party/blink/renderer/platform/blob/DEPS b/third_party/blink/renderer/platform/blob/DEPS
index 299df734..00af29e0 100644
--- a/third_party/blink/renderer/platform/blob/DEPS
+++ b/third_party/blink/renderer/platform/blob/DEPS
@@ -10,6 +10,7 @@
     "+third_party/blink/renderer/platform/histogram.h",
     "+third_party/blink/renderer/platform/instrumentation",
     "+third_party/blink/renderer/platform/platform_export.h",
+    "+third_party/blink/renderer/platform/scheduler/public",
     "+third_party/blink/renderer/platform/testing",
     "+third_party/blink/renderer/platform/text/line_ending.h",
     "+third_party/blink/renderer/platform/uuid.h",
diff --git a/third_party/blink/renderer/platform/blob/blob_bytes_provider.cc b/third_party/blink/renderer/platform/blob/blob_bytes_provider.cc
index 3a980dc7..f52dc45 100644
--- a/third_party/blink/renderer/platform/blob/blob_bytes_provider.cc
+++ b/third_party/blink/renderer/platform/blob/blob_bytes_provider.cc
@@ -8,9 +8,9 @@
 #include "base/task/post_task.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/histogram.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 
diff --git a/third_party/blink/renderer/platform/exported/platform.cc b/third_party/blink/renderer/platform/exported/platform.cc
index 03087e8..e642f22 100644
--- a/third_party/blink/renderer/platform/exported/platform.cc
+++ b/third_party/blink/renderer/platform/exported/platform.cc
@@ -52,7 +52,6 @@
 #include "third_party/blink/public/platform/web_rtc_certificate_generator.h"
 #include "third_party/blink/public/platform/web_rtc_peer_connection_handler.h"
 #include "third_party/blink/public/platform/web_storage_namespace.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/websocket_handshake_throttle.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/font_family_names.h"
@@ -67,6 +66,7 @@
 #include "third_party/blink/renderer/platform/memory_coordinator.h"
 #include "third_party/blink/renderer/platform/partition_alloc_memory_dump_provider.h"
 #include "third_party/blink/renderer/platform/scheduler/common/simple_thread_scheduler.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/webrtc/api/rtpparameters.h"
diff --git a/third_party/blink/renderer/platform/fonts/DEPS b/third_party/blink/renderer/platform/fonts/DEPS
index 9bb4b34..971791e 100644
--- a/third_party/blink/renderer/platform/fonts/DEPS
+++ b/third_party/blink/renderer/platform/fonts/DEPS
@@ -19,6 +19,7 @@
     "+third_party/blink/renderer/platform/platform_export.h",
     "+third_party/blink/renderer/platform/resolution_units.h",
     "+third_party/blink/renderer/platform/runtime_enabled_features.h",
+    "+third_party/blink/renderer/platform/scheduler/public",
     "+third_party/blink/renderer/platform/shared_buffer.h",
     "+third_party/blink/renderer/platform/testing",
     "+third_party/blink/renderer/platform/text",
diff --git a/third_party/blink/renderer/platform/fonts/mac/font_cache_mac.mm b/third_party/blink/renderer/platform/fonts/mac/font_cache_mac.mm
index e792e97d..7eba080 100644
--- a/third_party/blink/renderer/platform/fonts/mac/font_cache_mac.mm
+++ b/third_party/blink/renderer/platform/fonts/mac/font_cache_mac.mm
@@ -33,7 +33,6 @@
 #include <memory>
 #include "base/location.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/font_family_names.h"
 #include "third_party/blink/renderer/platform/fonts/font_description.h"
 #include "third_party/blink/renderer/platform/fonts/font_face_creation_params.h"
@@ -41,6 +40,7 @@
 #include "third_party/blink/renderer/platform/fonts/mac/font_family_matcher_mac.h"
 #include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
 #include "third_party/blink/renderer/platform/layout_test_support.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
 
diff --git a/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h b/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h
index 1c8feee..d6aad8f 100644
--- a/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h
+++ b/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h
@@ -10,9 +10,9 @@
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_checker.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/graphics/static_bitmap_image.h"
 #include "third_party/blink/renderer/platform/graphics/texture_holder.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 class GrContext;
 
diff --git a/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc b/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc
index 4e70354..5f1eca83 100644
--- a/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc
+++ b/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.cc
@@ -5,12 +5,12 @@
 #include "third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl.h"
 
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/graphics/animation_worklet_mutator.h"
 #include "third_party/blink/renderer/platform/graphics/compositor_mutator_client.h"
 #include "third_party/blink/renderer/platform/graphics/main_thread_mutator_client.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/waitable_event.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
diff --git a/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl_test.cc b/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl_test.cc
index d532c37..0e44c04 100644
--- a/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl_test.cc
+++ b/third_party/blink/renderer/platform/graphics/animation_worklet_mutator_dispatcher_impl_test.cc
@@ -8,11 +8,11 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_thread_type.h"
 #include "third_party/blink/renderer/platform/graphics/animation_worklet_mutator.h"
 #include "third_party/blink/renderer/platform/graphics/compositor_mutator_client.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 
 #include <memory>
diff --git a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc
index ae95ae9c..ba1c10814 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_2d_layer_bridge_test.cc
@@ -44,7 +44,6 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_resource_host.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_resource_provider.h"
@@ -55,6 +54,7 @@
 #include "third_party/blink/renderer/platform/graphics/test/fake_gles2_interface.h"
 #include "third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h"
 #include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_wrapper.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource.h b/third_party/blink/renderer/platform/graphics/canvas_resource.h
index 9c2fac8..b15ccb9 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_resource.h
+++ b/third_party/blink/renderer/platform/graphics/canvas_resource.h
@@ -9,10 +9,10 @@
 #include "gpu/command_buffer/common/mailbox.h"
 #include "gpu/command_buffer/common/sync_token.h"
 #include "gpu/ipc/common/mailbox.mojom-blink.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/geometry/int_size.h"
 #include "third_party/blink/renderer/platform/graphics/canvas_color_params.h"
 #include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_wrapper.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
 
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_CANVAS_RESOURCE_H_
diff --git a/third_party/blink/renderer/platform/graphics/deferred_image_decoder_test.cc b/third_party/blink/renderer/platform/graphics/deferred_image_decoder_test.cc
index 96fb7a4..fb5d52e 100644
--- a/third_party/blink/renderer/platform/graphics/deferred_image_decoder_test.cc
+++ b/third_party/blink/renderer/platform/graphics/deferred_image_decoder_test.cc
@@ -31,7 +31,6 @@
 #include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
 #include "third_party/blink/renderer/platform/graphics/image_frame_generator.h"
@@ -40,6 +39,7 @@
 #include "third_party/blink/renderer/platform/graphics/paint/paint_record.h"
 #include "third_party/blink/renderer/platform/graphics/paint/paint_recorder.h"
 #include "third_party/blink/renderer/platform/graphics/test/mock_image_decoder.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/skia/include/core/SkImage.h"
diff --git a/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc b/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc
index d122cbf..d2b1712d 100644
--- a/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc
+++ b/third_party/blink/renderer/platform/graphics/gpu/shared_gpu_context.cc
@@ -10,8 +10,8 @@
 #include "gpu/config/gpu_feature_info.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_graphics_context_3d_provider.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/waitable_event.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
diff --git a/third_party/blink/renderer/platform/graphics/image_frame_generator_test.cc b/third_party/blink/renderer/platform/graphics/image_frame_generator_test.cc
index d4e87e911..927278e 100644
--- a/third_party/blink/renderer/platform/graphics/image_frame_generator_test.cc
+++ b/third_party/blink/renderer/platform/graphics/image_frame_generator_test.cc
@@ -29,11 +29,11 @@
 #include "base/location.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
 #include "third_party/blink/renderer/platform/graphics/test/mock_image_decoder.h"
 #include "third_party/blink/renderer/platform/image-decoders/segment_reader.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
diff --git a/third_party/blink/renderer/platform/graphics/mailbox_texture_holder.h b/third_party/blink/renderer/platform/graphics/mailbox_texture_holder.h
index 1b20e149..6d4f3a5 100644
--- a/third_party/blink/renderer/platform/graphics/mailbox_texture_holder.h
+++ b/third_party/blink/renderer/platform/graphics/mailbox_texture_holder.h
@@ -7,11 +7,11 @@
 
 #include "base/memory/weak_ptr.h"
 #include "base/single_thread_task_runner.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/graphics/graphics_types.h"
 #include "third_party/blink/renderer/platform/graphics/texture_holder.h"
 #include "third_party/blink/renderer/platform/graphics/web_graphics_context_3d_provider_wrapper.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/khronos/GLES2/gl2.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/heap/DEPS b/third_party/blink/renderer/platform/heap/DEPS
index 4d6fe98..3d29fd0 100644
--- a/third_party/blink/renderer/platform/heap/DEPS
+++ b/third_party/blink/renderer/platform/heap/DEPS
@@ -18,7 +18,7 @@
     "+third_party/blink/renderer/platform/memory_coordinator.h",
     "+third_party/blink/renderer/platform/platform_export.h",
     "+third_party/blink/renderer/platform/runtime_enabled_features.h",
-    "+third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h",
+    "+third_party/blink/renderer/platform/scheduler/public",
     "+third_party/blink/renderer/platform/testing",
     "+third_party/blink/renderer/platform/web_task_runner.h",
     "+third_party/blink/renderer/platform/wtf",
diff --git a/third_party/blink/renderer/platform/heap/gc_task_runner.h b/third_party/blink/renderer/platform/heap/gc_task_runner.h
index f825c13..507c4d0 100644
--- a/third_party/blink/renderer/platform/heap/gc_task_runner.h
+++ b/third_party/blink/renderer/platform/heap/gc_task_runner.h
@@ -33,9 +33,9 @@
 
 #include <memory>
 #include "base/location.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/heap/thread_state.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 
diff --git a/third_party/blink/renderer/platform/heap/heap_test.cc b/third_party/blink/renderer/platform/heap/heap_test.cc
index d5120f3..29a08ba 100644
--- a/third_party/blink/renderer/platform/heap/heap_test.cc
+++ b/third_party/blink/renderer/platform/heap/heap_test.cc
@@ -37,7 +37,6 @@
 #include "build/build_config.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/heap/address_cache.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
@@ -51,6 +50,7 @@
 #include "third_party/blink/renderer/platform/heap/stack_frame_depth.h"
 #include "third_party/blink/renderer/platform/heap/thread_state.h"
 #include "third_party/blink/renderer/platform/heap/visitor.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/hash_traits.h"
diff --git a/third_party/blink/renderer/platform/heap/thread_state.cc b/third_party/blink/renderer/platform/heap/thread_state.cc
index 21060b5..d634f36 100644
--- a/third_party/blink/renderer/platform/heap/thread_state.cc
+++ b/third_party/blink/renderer/platform/heap/thread_state.cc
@@ -41,7 +41,6 @@
 #include "base/trace_event/process_memory_dump.h"
 #include "build/build_config.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/bindings/runtime_call_stats.h"
 #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h"
 #include "third_party/blink/renderer/platform/heap/address_cache.h"
@@ -60,6 +59,7 @@
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/web_memory_allocator_dump.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/web_process_memory_dump.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/partitions.h"
 #include "third_party/blink/renderer/platform/wtf/stack_util.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h b/third_party/blink/renderer/platform/loader/fetch/memory_cache.h
index c86ebc4..d2b35e82 100644
--- a/third_party/blink/renderer/platform/loader/fetch/memory_cache.h
+++ b/third_party/blink/renderer/platform/loader/fetch/memory_cache.h
@@ -30,6 +30,7 @@
 #include "third_party/blink/renderer/platform/loader/fetch/resource.h"
 #include "third_party/blink/renderer/platform/memory_coordinator.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/hash_map.h"
 #include "third_party/blink/renderer/platform/wtf/noncopyable.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc b/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc
index d5fc683..8948a160 100644
--- a/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/raw_resource.cc
@@ -29,7 +29,6 @@
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "services/network/public/mojom/request_context_frame_type.mojom-shared.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/loader/fetch/fetch_parameters.h"
 #include "third_party/blink/renderer/platform/loader/fetch/memory_cache.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_client_walker.h"
@@ -37,6 +36,7 @@
 #include "third_party/blink/renderer/platform/loader/fetch/script_cached_metadata_handler.h"
 #include "third_party/blink/renderer/platform/loader/fetch/source_keyed_cached_metadata_handler.h"
 #include "third_party/blink/renderer/platform/network/http_names.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/loader/fetch/raw_resource_test.cc b/third_party/blink/renderer/platform/loader/fetch/raw_resource_test.cc
index 6abe055..484521b 100644
--- a/third_party/blink/renderer/platform/loader/fetch/raw_resource_test.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/raw_resource_test.cc
@@ -33,13 +33,13 @@
 #include <memory>
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/blink/public/platform/web_url_response.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/loader/fetch/memory_cache.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
 #include "third_party/blink/renderer/platform/loader/fetch/resource_timing_info.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h"
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_response_test.cc b/third_party/blink/renderer/platform/loader/fetch/resource_response_test.cc
index c22bfd36..6fff11d 100644
--- a/third_party/blink/renderer/platform/loader/fetch/resource_response_test.cc
+++ b/third_party/blink/renderer/platform/loader/fetch/resource_response_test.cc
@@ -6,8 +6,8 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 
diff --git a/third_party/blink/renderer/platform/memory_coordinator.cc b/third_party/blink/renderer/platform/memory_coordinator.cc
index 33ebadea..8775dbf 100644
--- a/third_party/blink/renderer/platform/memory_coordinator.cc
+++ b/third_party/blink/renderer/platform/memory_coordinator.cc
@@ -7,12 +7,12 @@
 #include "base/sys_info.h"
 #include "build/build_config.h"
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/public/web/blink.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
 #include "third_party/blink/renderer/platform/fonts/font_global_context.h"
 #include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
 #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/allocator/partitions.h"
 
diff --git a/third_party/blink/renderer/platform/memory_coordinator.h b/third_party/blink/renderer/platform/memory_coordinator.h
index 29d0b515..4473643 100644
--- a/third_party/blink/renderer/platform/memory_coordinator.h
+++ b/third_party/blink/renderer/platform/memory_coordinator.h
@@ -7,9 +7,9 @@
 
 #include "third_party/blink/public/platform/web_memory_pressure_level.h"
 #include "third_party/blink/public/platform/web_memory_state.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/noncopyable.h"
 #include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
 
diff --git a/third_party/blink/renderer/platform/network/network_state_notifier_test.cc b/third_party/blink/renderer/platform/network/network_state_notifier_test.cc
index 2f1f48c..f047651 100644
--- a/third_party/blink/renderer/platform/network/network_state_notifier_test.cc
+++ b/third_party/blink/renderer/platform/network/network_state_notifier_test.cc
@@ -36,7 +36,7 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_connection_type.h"
 #include "third_party/blink/public/platform/web_effective_connection_type.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/test/fake_task_runner.h"
 #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
diff --git a/third_party/blink/renderer/platform/scheduler/BUILD.gn b/third_party/blink/renderer/platform/scheduler/BUILD.gn
index dbe485ca..0988dd1 100644
--- a/third_party/blink/renderer/platform/scheduler/BUILD.gn
+++ b/third_party/blink/renderer/platform/scheduler/BUILD.gn
@@ -34,6 +34,7 @@
     "common/scheduling_lifecycle_state.cc",
     "common/simple_thread_scheduler.cc",
     "common/simple_thread_scheduler.h",
+    "common/thread.cc",
     "common/thread_scheduler.cc",
     "common/thread_scheduler_impl.cc",
     "common/thread_scheduler_impl.h",
@@ -97,6 +98,7 @@
     "public/page_lifecycle_state.h",
     "public/page_scheduler.h",
     "public/scheduling_lifecycle_state.h",
+    "public/thread.h",
     "public/thread_scheduler.h",
     "public/worker_scheduler.h",
     "renderer/frame_status.cc",
diff --git a/third_party/blink/renderer/platform/web_thread.cc b/third_party/blink/renderer/platform/scheduler/common/thread.cc
similarity index 79%
rename from third_party/blink/renderer/platform/web_thread.cc
rename to third_party/blink/renderer/platform/scheduler/common/thread.cc
index 7f244c7..bb3b7ad 100644
--- a/third_party/blink/renderer/platform/web_thread.cc
+++ b/third_party/blink/renderer/platform/scheduler/common/thread.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 #include "base/single_thread_task_runner.h"
 #include "build/build_config.h"
@@ -16,18 +16,18 @@
 
 namespace blink {
 
-WebThreadCreationParams::WebThreadCreationParams(WebThreadType thread_type)
+ThreadCreationParams::ThreadCreationParams(WebThreadType thread_type)
     : thread_type(thread_type),
       name(GetNameForThreadType(thread_type)),
       frame_or_worker_scheduler(nullptr) {}
 
-WebThreadCreationParams& WebThreadCreationParams::SetThreadNameForTest(
+ThreadCreationParams& ThreadCreationParams::SetThreadNameForTest(
     const char* thread_name) {
   name = thread_name;
   return *this;
 }
 
-WebThreadCreationParams& WebThreadCreationParams::SetFrameOrWorkerScheduler(
+ThreadCreationParams& ThreadCreationParams::SetFrameOrWorkerScheduler(
     FrameOrWorkerScheduler* scheduler) {
   frame_or_worker_scheduler = scheduler;
   return *this;
diff --git a/third_party/blink/public/platform/web_thread.h b/third_party/blink/renderer/platform/scheduler/public/thread.h
similarity index 80%
rename from third_party/blink/public/platform/web_thread.h
rename to third_party/blink/renderer/platform/scheduler/public/thread.h
index 90425ab0..f704c69 100644
--- a/third_party/blink/public/platform/web_thread.h
+++ b/third_party/blink/renderer/platform/scheduler/public/thread.h
@@ -22,16 +22,15 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_THREAD_H_
-#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_THREAD_H_
+#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_THREAD_H_
+#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_THREAD_H_
 
+#include <stdint.h>
 #include "base/callback_forward.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/threading/thread.h"
-#include "third_party/blink/public/platform/web_common.h"
 #include "third_party/blink/public/platform/web_thread_type.h"
-
-#include <stdint.h>
+#include "third_party/blink/renderer/platform/platform_export.h"
 
 namespace base {
 class SingleThreadTaskRunner;
@@ -50,14 +49,14 @@
 // Always an integer value.
 typedef uintptr_t PlatformThreadId;
 
-struct BLINK_PLATFORM_EXPORT WebThreadCreationParams {
-  explicit WebThreadCreationParams(WebThreadType);
+struct PLATFORM_EXPORT ThreadCreationParams {
+  explicit ThreadCreationParams(WebThreadType);
 
-  WebThreadCreationParams& SetThreadNameForTest(const char* name);
+  ThreadCreationParams& SetThreadNameForTest(const char* name);
 
   // Sets a scheduler for the context which was responsible for the creation
   // of this thread.
-  WebThreadCreationParams& SetFrameOrWorkerScheduler(FrameOrWorkerScheduler*);
+  ThreadCreationParams& SetFrameOrWorkerScheduler(FrameOrWorkerScheduler*);
 
   WebThreadType thread_type;
   const char* name;
@@ -65,18 +64,18 @@
   base::Thread::Options thread_options;
 };
 
-// Provides an interface to an embedder-defined thread implementation.
+// The interface of a thread recognized by Blink.
 //
 // Deleting the thread blocks until all pending, non-delayed tasks have been
 // run.
-class BLINK_PLATFORM_EXPORT WebThread {
+class PLATFORM_EXPORT Thread {
  public:
   friend class Platform;  // For IsSimpleMainThread().
 
   // An IdleTask is expected to complete before the deadline it is passed.
   using IdleTask = base::OnceCallback<void(base::TimeTicks deadline)>;
 
-  class BLINK_PLATFORM_EXPORT TaskObserver {
+  class PLATFORM_EXPORT TaskObserver {
    public:
     virtual ~TaskObserver() = default;
     virtual void WillProcessTask() = 0;
@@ -116,14 +115,20 @@
   // Returns the scheduler associated with the thread.
   virtual ThreadScheduler* Scheduler() = 0;
 
-  virtual ~WebThread() = default;
+  virtual ~Thread() = default;
 
  private:
-  // This is used to identify the actual WebThread instance. This should be
+  // This is used to identify the actual Thread instance. This should be
   // used only in Platform, and other users should ignore this.
   virtual bool IsSimpleMainThread() const { return false; }
 };
 
+// Temporary aliases while we rename those classes in Blink.
+//
+// TODO(yutak): Rename all the occurrences and remove the aliases.
+using WebThreadCreationParams = ThreadCreationParams;
+using WebThread = Thread;
+
 }  // namespace blink
 
-#endif
+#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_SCHEDULER_PUBLIC_THREAD_H_
diff --git a/third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h b/third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h
index 00c9cde..1fc3fe7 100644
--- a/third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h
+++ b/third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h
@@ -11,8 +11,8 @@
 #include "base/single_thread_task_runner.h"
 #include "base/time/time.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/page_scheduler.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 
 namespace blink {
 namespace scheduler {
diff --git a/third_party/blink/renderer/platform/scheduler/test/fake_renderer_scheduler.cc b/third_party/blink/renderer/platform/scheduler/test/fake_renderer_scheduler.cc
index d37ace3..a5d5688 100644
--- a/third_party/blink/renderer/platform/scheduler/test/fake_renderer_scheduler.cc
+++ b/third_party/blink/renderer/platform/scheduler/test/fake_renderer_scheduler.cc
@@ -7,7 +7,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "build/build_config.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc
index dfc26986..f7aed1b 100644
--- a/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc
+++ b/third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.cc
@@ -4,7 +4,7 @@
 
 #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_custom_scheduler.h"
 
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/wtf/wtf.h"
 
 namespace blink {
diff --git a/third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h b/third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h
index 11abeb0..12e06e72 100644
--- a/third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h
+++ b/third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h
@@ -7,7 +7,7 @@
 
 #include <memory>
 #include "base/test/test_mock_time_task_runner.h"
-#include "third_party/blink/public/platform/web_thread.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support.h"
 #include "third_party/blink/renderer/platform/wtf/noncopyable.h"
 
diff --git a/third_party/blink/renderer/platform/testing/unit_test_helpers.cc b/third_party/blink/renderer/platform/testing/unit_test_helpers.cc
index 05c5480d3..d3e60da 100644
--- a/third_party/blink/renderer/platform/testing/unit_test_helpers.cc
+++ b/third_party/blink/renderer/platform/testing/unit_test_helpers.cc
@@ -33,8 +33,8 @@
 #include "third_party/blink/public/platform/file_path_conversion.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/shared_buffer.h"
 #include "third_party/blink/renderer/platform/wtf/functional.h"
 #include "third_party/blink/renderer/platform/wtf/text/string_utf8_adaptor.h"
@@ -51,9 +51,14 @@
       path.Append(FILE_PATH_LITERAL("third_party/blink")));
 }
 
+// TODO(tkent): Rename this function.  crbug.com/843412.
 base::FilePath LayoutTestsFilePath() {
   base::FilePath path;
   base::PathService::Get(base::DIR_SOURCE_ROOT, &path);
+  base::FilePath web_tests_path = base::MakeAbsoluteFilePath(
+      path.Append(FILE_PATH_LITERAL("third_party/blink/web_tests")));
+  if (base::PathExists(web_tests_path))
+    return web_tests_path;
   return base::MakeAbsoluteFilePath(
       path.Append(FILE_PATH_LITERAL("third_party/WebKit/LayoutTests")));
 }
diff --git a/third_party/blink/renderer/platform/timer_test.cc b/third_party/blink/renderer/platform/timer_test.cc
index faa5559..1a578779 100644
--- a/third_party/blink/renderer/platform/timer_test.cc
+++ b/third_party/blink/renderer/platform/timer_test.cc
@@ -11,9 +11,9 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h"
 #include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_task_queue.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
 #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h"
 #include "third_party/blink/renderer/platform/wtf/ref_counted.h"
diff --git a/third_party/blink/renderer/platform/web_thread_supporting_gc.h b/third_party/blink/renderer/platform/web_thread_supporting_gc.h
index 4b7d177..cdb78ee 100644
--- a/third_party/blink/renderer/platform/web_thread_supporting_gc.h
+++ b/third_party/blink/renderer/platform/web_thread_supporting_gc.h
@@ -8,8 +8,8 @@
 #include <memory>
 #include "base/threading/thread_checker.h"
 #include "third_party/blink/public/platform/platform.h"
-#include "third_party/blink/public/platform/web_thread.h"
 #include "third_party/blink/renderer/platform/heap/gc_task_runner.h"
+#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/allocator.h"
 #include "third_party/blink/renderer/platform/wtf/noncopyable.h"
diff --git a/third_party/blink/tools/OWNERS b/third_party/blink/tools/OWNERS
index 547e4fb..bc159e2 100644
--- a/third_party/blink/tools/OWNERS
+++ b/third_party/blink/tools/OWNERS
@@ -1,5 +1 @@
 file://third_party/WebKit/Tools/OWNERS
-
-per-file audit_non_blink_usage.py=dcheng@chromium.org
-per-file audit_non_blink_usage.py=haraken@chromium.org
-per-file audit_non_blink_usage.py=jbroman@chromium.org
diff --git a/third_party/blink/tools/blinkpy/presubmit/OWNERS b/third_party/blink/tools/blinkpy/presubmit/OWNERS
new file mode 100644
index 0000000..97c8e47
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/presubmit/OWNERS
@@ -0,0 +1,3 @@
+dcheng@chromium.org
+haraken@chromium.org
+jbroman@chromium.org
diff --git a/third_party/blink/tools/blinkpy/presubmit/__init__.py b/third_party/blink/tools/blinkpy/presubmit/__init__.py
new file mode 100644
index 0000000..1adf20d2
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/presubmit/__init__.py
@@ -0,0 +1,3 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
diff --git a/third_party/blink/tools/audit_non_blink_usage.py b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
similarity index 90%
rename from third_party/blink/tools/audit_non_blink_usage.py
rename to third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
index b1edef45..676926fb 100755
--- a/third_party/blink/tools/audit_non_blink_usage.py
+++ b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
@@ -266,7 +266,11 @@
             # Blink uses UKM for logging e.g. always-on leak detection (crbug/757374)
             'ukm::.+',
         ],
-        'disallowed': ['.+'],
+        'disallowed': [
+            '.+',
+            ('base::Bind(|Once|Repeating)',
+             'Use WTF::Bind or WTF::BindRepeating.'),
+        ],
     },
     {
         'paths': ['third_party/blink/renderer/bindings/'],
@@ -477,12 +481,30 @@
             return re.compile('(?:%s)$' % '|'.join(match_list))
         return match_nothing_re
 
+    def compile_disallowed(disallowed_list):
+        """Transforms the disallowed list to one with the regexps compiled."""
+        if not disallowed_list:
+            return match_nothing_re, []
+        match_list = []
+        advice_list = []
+        for entry in disallowed_list:
+            if isinstance(entry, tuple):
+                match, advice = entry
+                match_list.append(match)
+                advice_list.append((compile_regexp(match), advice))
+            else:
+                # Just a string
+                match_list.append(entry)
+        return compile_regexp(match_list), advice_list
+
     compiled_config = []
     for raw_entry in _CONFIG:
+        disallowed, advice = compile_disallowed(raw_entry.get('disallowed'))
         compiled_config.append({
             'paths': raw_entry['paths'],
             'allowed': compile_regexp(raw_entry.get('allowed')),
-            'disallowed': compile_regexp(raw_entry.get('disallowed')),
+            'disallowed': disallowed,
+            'advice': advice,
         })
     return compiled_config
 
@@ -506,9 +528,10 @@
 
     Returns:
         A list of entries, sorted in order of relevance. Each entry is a
-        dictionary with two keys:
+        dictionary with keys:
             allowed: A regexp for identifiers that should be allowed.
             disallowed: A regexp for identifiers that should not be allowed.
+            advice: (optional) A regexp for identifiers along with advice
     """
     entries = []
     for entry in _COMPILED_CONFIG:
@@ -522,6 +545,7 @@
 
 
 def _check_entries_for_identifier(entries, identifier):
+    """Check if an identifier is allowed"""
     for entry in entries:
         if entry['allowed'].match(identifier):
             return True
@@ -531,6 +555,23 @@
     return False
 
 
+def _find_advice_for_identifier(entries, identifier):
+    advice_list = []
+    for entry in entries:
+        for matcher, advice in entry.get('advice', []):
+            if matcher.match(identifier):
+                advice_list.append(advice)
+    return advice_list
+
+
+class BadIdentifier(object):
+    """Represents a single instance of a bad identifier."""
+    def __init__(self, identifier, line, advice=None):
+        self.identifier = identifier
+        self.line = line
+        self.advice = advice
+
+
 def check(path, contents):
     """Checks for disallowed usage of non-Blink classes, functions, et cetera.
 
@@ -539,7 +580,7 @@
         contents: An array of line number, line tuples to check.
 
     Returns:
-        A list of line number, disallowed identifier tuples.
+        A list of (line number, disallowed identifier, advice) tuples.
     """
     results = []
     # Because Windows.
@@ -563,8 +604,11 @@
             line = line[:idx]
         match = _IDENTIFIER_WITH_NAMESPACE_RE.search(line)
         if match:
-            if not _check_entries_for_identifier(entries, match.group(0)):
-                results.append((line_number, match.group(0)))
+            identifier = match.group(0)
+            if not _check_entries_for_identifier(entries, identifier):
+                advice = _find_advice_for_identifier(entries, identifier)
+                results.append(
+                    BadIdentifier(identifier, line_number, advice))
     return results
 
 
@@ -579,7 +623,7 @@
                 if disallowed_identifiers:
                     print '%s uses disallowed identifiers:' % path
                     for i in disallowed_identifiers:
-                        print i
+                        print (i.line, i.identifier, i.advice)
         except IOError as e:
             print 'could not open %s: %s' % (path, e)
 
diff --git a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage_test.py b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage_test.py
new file mode 100755
index 0000000..d7003931
--- /dev/null
+++ b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage_test.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import re
+import unittest
+
+from blinkpy.presubmit import audit_non_blink_usage
+
+
+class TestAuditNonBlinkUsageTest(unittest.TestCase):
+    # This is not great but it allows us to check that something is a regexp.
+    _REGEXP_CLASS = re.compile(r"foo").__class__
+
+    def test_valid_compiled_config(self):
+        # We need to test this protected data.
+        # pylint: disable=W0212
+        for entry in audit_non_blink_usage._COMPILED_CONFIG:
+            for path in entry['paths']:
+                self.assertIsInstance(path, str)
+            if 'allowed' in entry:
+                self.assertIsInstance(entry['allowed'], self._REGEXP_CLASS)
+            if 'disallowed' in entry:
+                self.assertIsInstance(entry['disallowed'], self._REGEXP_CLASS)
+            for match, advice in entry.get('advice', []):
+                self.assertIsInstance(match, self._REGEXP_CLASS)
+                self.assertIsInstance(advice, str)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/third_party/closure_compiler/js_unit_test.py b/third_party/closure_compiler/js_unit_test.py
index ea95a7f..1d907a4 100644
--- a/third_party/closure_compiler/js_unit_test.py
+++ b/third_party/closure_compiler/js_unit_test.py
@@ -26,6 +26,8 @@
                       help='List of additional js files to load before others')
   parser.add_argument('-o', '--output',
                       help='Generated html output with flattened dependencies')
+  parser.add_argument('-I', '--include_prefix', default='',
+                      help='Prefix added to src= paths to find .js files')
   args = parser.parse_args()
 
   uniquedeps = Flatten([args.input])
@@ -46,9 +48,9 @@
 
 """)
     for file in args.mocks:
-      out.write('<script src="%s"></script>\n' % (file))
+      out.write('<script src="%s%s"></script>\n' % (args.include_prefix, file))
     for file in uniquedeps:
-      out.write('<script src="%s"></script>\n' % (file))
+      out.write('<script src="%s%s"></script>\n' % (args.include_prefix, file))
     out.write('</body>\n</html>\n')
 
 if __name__ == '__main__':
diff --git a/third_party/closure_compiler/js_unit_tests.gni b/third_party/closure_compiler/js_unit_tests.gni
index c432b63..758c760 100644
--- a/third_party/closure_compiler/js_unit_tests.gni
+++ b/third_party/closure_compiler/js_unit_tests.gni
@@ -61,6 +61,14 @@
     args = [ "--output" ] + rebase_path(outputs, root_build_dir)
     args += [ "--input" ] + [ "{{source}}" ]
 
+    # js_unit_test.py needs to walk .js_library dependency files relative to the
+    # gen_dir, but we'd like to reference the corresponding .js source files
+    # in the source dir, not the gen dir. Pass a prefix to remap --input args.
+    args += [
+      "--include_prefix",
+      rebase_path("//", "{{root_gen_dir}}", "//"),
+    ]
+
     if (defined(mocks)) {
       args += [ "--mocks" ] + rebase_path(mocks, root_build_dir)
       data = mocks
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index 3df8170..008efed 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -367,6 +367,7 @@
       'ios-simulator-cronet': 'ios',
       'ios-simulator-full-configs': 'ios',
       'ios-simulator-xcode-clang': 'ios',
+      'WebKit Mac10.13 (retina)': 'release_bot',
     },
 
     'chromium.memory': {
@@ -452,6 +453,7 @@
       'Win V8 FYI Release (NVIDIA)': 'gpu_tests_release_trybot_x86_minimal_symbols',
     },
 
+    # TODO(crbug.com/818301): This master is going away.
     'chromium.webkit': {
       'Android Builder': 'android_release_bot_minimal_symbols',
       'WebKit Linux Trusty ASAN': 'asan_lsan_release_bot',
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 3a997cac..1342087 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -4255,6 +4255,11 @@
   <int value="1" label="Timed out"/>
 </enum>
 
+<enum name="BooleanColorSpaceSupported">
+  <int value="0" label="Color space not supported"/>
+  <int value="1" label="Color space supported"/>
+</enum>
+
 <enum name="BooleanCommonNameMatch">
   <int value="0" label="subjectAltName used"/>
   <int value="1" label="Common Name used"/>
@@ -20301,6 +20306,8 @@
   <int value="2554" label="BackgroundFetchRegistrationMatchAll"/>
   <int value="2555" label="V8AtomicsNotify"/>
   <int value="2556" label="V8AtomicsWake"/>
+  <int value="2557" label="FormDisabledAttributePresent"/>
+  <int value="2558" label="FormDisabledAttributePresentAndSubmit"/>
 </enum>
 
 <enum name="FeaturePolicyFeature">
@@ -28984,6 +28991,8 @@
   <int value="-1285293181" label="SiteSettings:enabled"/>
   <int value="-1285021473" label="save-page-as-mhtml"/>
   <int value="-1284637134" label="pull-to-refresh"/>
+  <int value="-1282992935"
+      label="AutofillLocalCardMigrationShowFeedback:disabled"/>
   <int value="-1278796760" label="QueryInOmnibox:enabled"/>
   <int value="-1276912933" label="enable-quick-unlock-pin"/>
   <int value="-1271563519" label="enable-appcontainer"/>
@@ -30448,6 +30457,8 @@
   <int value="1634732103" label="PassiveDocumentWheelEventListeners:enabled"/>
   <int value="1634897915" label="password-import-export:enabled"/>
   <int value="1634980726" label="VrShellExperimentalRendering:disabled"/>
+  <int value="1636721063"
+      label="AutofillLocalCardMigrationShowFeedback:enabled"/>
   <int value="1636962093" label="disable-material-design-ntp"/>
   <int value="1639314588" label="LookalikeUrlNavigationSuggestions:disabled"/>
   <int value="1640386037" label="ContextualSuggestionsSlimPeekUI:disabled"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index c02a499..73b8466 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -34701,6 +34701,17 @@
   </summary>
 </histogram>
 
+<histogram name="GPU.DirectComposition.OverlayNV12Rec709Supported"
+    enum="BooleanColorSpaceSupported" expires_after="2020-09-30">
+  <owner>magchen@chromium.org</owner>
+  <owner>sunnyps@chromium.org</owner>
+  <owner>zmo@chromium.org</owner>
+  <summary>
+    Whether or not Rec709 color space is supported on NV12 supported machines.
+    Recorded during the GPU process initialization.
+  </summary>
+</histogram>
+
 <histogram name="GPU.DirectComposition.OverlaysSupported"
     enum="BooleanOverlaySupported">
   <owner>jbauman@chromium.org</owner>
diff --git a/tools/metrics/histograms/update_editor_commands.py b/tools/metrics/histograms/update_editor_commands.py
index 40a8f32..8934838 100644
--- a/tools/metrics/histograms/update_editor_commands.py
+++ b/tools/metrics/histograms/update_editor_commands.py
@@ -19,8 +19,8 @@
 from diff_util import PromptUserToAcceptDiff
 import path_util
 
-import print_style
 import histogram_paths
+import histograms_print_style
 
 
 ENUMS_PATH = histogram_paths.ENUMS_XML
@@ -131,7 +131,8 @@
   UpdateHistogramDefinitions(histogram_values, histograms_doc)
 
   Log('Writing out new histograms file.')
-  new_xml = print_style.GetPrintStyle().PrettyPrintNode(histograms_doc)
+  new_xml = histograms_print_style.GetPrintStyle().PrettyPrintNode(
+      histograms_doc)
   if PromptUserToAcceptDiff(xml, new_xml, 'Is the updated version acceptable?'):
     with open(ENUMS_PATH, 'wb') as f:
       f.write(new_xml)
diff --git a/tools/metrics/histograms/update_histogram_enum.py b/tools/metrics/histograms/update_histogram_enum.py
index 67b80e9..bcabcdf 100644
--- a/tools/metrics/histograms/update_histogram_enum.py
+++ b/tools/metrics/histograms/update_histogram_enum.py
@@ -18,8 +18,8 @@
 import diff_util
 import path_util
 
-import print_style
 import histogram_paths
+import histograms_print_style
 
 
 ENUMS_PATH = histogram_paths.ENUMS_XML
@@ -228,7 +228,8 @@
                              source_enum_path, caller_script_name,
                              histograms_doc)
 
-  new_xml = print_style.GetPrintStyle().PrettyPrintNode(histograms_doc)
+  new_xml = histograms_print_style.GetPrintStyle().PrettyPrintNode(
+      histograms_doc)
   return (xml, new_xml)
 
 
diff --git a/tools/metrics/histograms/update_policies.py b/tools/metrics/histograms/update_policies.py
index 267013b..531765f4 100644
--- a/tools/metrics/histograms/update_policies.py
+++ b/tools/metrics/histograms/update_policies.py
@@ -20,8 +20,8 @@
 from diff_util import PromptUserToAcceptDiff
 import path_util
 
-import print_style
 import histogram_paths
+import histograms_print_style
 
 ENUMS_PATH = histogram_paths.ENUMS_XML
 POLICY_TEMPLATES_PATH = 'components/policy/resources/policy_templates.json'
@@ -88,7 +88,8 @@
     xml = f.read()
 
   UpdateHistogramDefinitions(policy_templates, histograms_doc)
-  new_xml = print_style.GetPrintStyle().PrettyPrintNode(histograms_doc)
+  new_xml = histograms_print_style.GetPrintStyle().PrettyPrintNode(
+      histograms_doc)
   if PromptUserToAcceptDiff(xml, new_xml, 'Is the updated version acceptable?'):
     with open(ENUMS_PATH, 'wb') as f:
       f.write(new_xml)
diff --git a/ui/file_manager/BUILD.gn b/ui/file_manager/BUILD.gn
index 8a645f38..9943319 100644
--- a/ui/file_manager/BUILD.gn
+++ b/ui/file_manager/BUILD.gn
@@ -51,6 +51,7 @@
 
 group("unit_test_data") {
   deps = [
+    "file_manager/common/js:unit_tests",
     "file_manager/foreground/js:unit_tests",
     "gallery/js:unit_tests",
     "gallery/js/image_editor:unit_tests",
diff --git a/ui/file_manager/audio_player/js/BUILD.gn b/ui/file_manager/audio_player/js/BUILD.gn
index 08c3cc9..89c18c2 100644
--- a/ui/file_manager/audio_player/js/BUILD.gn
+++ b/ui/file_manager/audio_player/js/BUILD.gn
@@ -20,7 +20,6 @@
     "$externs_path/chrome_extensions.js",
     "$externs_path/metrics_private.js",
     "../../externs/audio_player_foreground.js",
-    "../../externs/entry_location.js",
     "../../externs/platform.js",
     "//third_party/analytics/externs.js",
   ]
diff --git a/ui/file_manager/base/js/BUILD.gn b/ui/file_manager/base/js/BUILD.gn
index cffa6663..b717981 100644
--- a/ui/file_manager/base/js/BUILD.gn
+++ b/ui/file_manager/base/js/BUILD.gn
@@ -15,18 +15,13 @@
 js_library("filtered_volume_manager") {
   deps = [
     "//ui/file_manager/externs:file_manager_private",
+    "//ui/file_manager/externs:volume_manager",
     "//ui/file_manager/file_manager/common/js:async_util",
     "//ui/file_manager/file_manager/common/js:files_app_entry_types",
     "//ui/file_manager/file_manager/common/js:volume_manager_common",
     "//ui/webui/resources/js:cr",
-    "//ui/webui/resources/js/cr:event_target",
     "//ui/webui/resources/js/cr/ui:array_data_model",
   ]
-  externs_list = [
-    "//ui/file_manager/externs/background/volume_manager_factory.js",
-    "//ui/file_manager/externs/entry_location.js",
-    "//ui/file_manager/externs/volume_info.js",
-    "//ui/file_manager/externs/volume_info_list.js",
-    "//ui/file_manager/externs/volume_manager.js",
-  ]
+  externs_list =
+      [ "//ui/file_manager/externs/background/volume_manager_factory.js" ]
 }
diff --git a/ui/file_manager/externs/BUILD.gn b/ui/file_manager/externs/BUILD.gn
index fef4d25..dad5e37 100644
--- a/ui/file_manager/externs/BUILD.gn
+++ b/ui/file_manager/externs/BUILD.gn
@@ -28,3 +28,16 @@
     "$externs_path/file_system_provider.js",
   ]
 }
+
+js_library("volume_manager") {
+  sources = []
+
+  # Encapsulate volume_manager.js and its dependencies. Note this should really
+  # depend on volume_manager_common.js as well, but that's not an extern.
+  externs_list = [
+    "entry_location.js",
+    "volume_info.js",
+    "volume_info_list.js",
+    "volume_manager.js",
+  ]
+}
diff --git a/ui/file_manager/externs/volume_manager.js b/ui/file_manager/externs/volume_manager.js
index ad77ac24..bc73870 100644
--- a/ui/file_manager/externs/volume_manager.js
+++ b/ui/file_manager/externs/volume_manager.js
@@ -75,7 +75,7 @@
 /**
  * Adds an event listener to the target.
  * @param {string} type The name of the event.
- * @param {EventListenerType} handler The handler for the event. This is
+ * @param {function(!Event)} handler The handler for the event. This is
  *     called when the event is dispatched.
  */
 VolumeManager.prototype.addEventListener = function(type, handler) {};
@@ -83,7 +83,7 @@
 /**
  * Removes an event listener from the target.
  * @param {string} type The name of the event.
- * @param {EventListenerType} handler The handler for the event.
+ * @param {function(!Event)} handler The handler for the event.
  */
 VolumeManager.prototype.removeEventListener = function(type, handler) {};
 
diff --git a/ui/file_manager/file_manager/common/js/BUILD.gn b/ui/file_manager/file_manager/common/js/BUILD.gn
index 30d6647..f4b2fdf 100644
--- a/ui/file_manager/file_manager/common/js/BUILD.gn
+++ b/ui/file_manager/file_manager/common/js/BUILD.gn
@@ -3,14 +3,14 @@
 # found in the LICENSE file.
 
 import("//third_party/closure_compiler/compile_js.gni")
+import("//third_party/closure_compiler/js_unit_tests.gni")
 
 # TODO(tapted): This entire folder should move to //ui/file_manager/base.
 visibility = [ "//ui/file_manager/*" ]
 
-js_type_check("closure_compile") {
+js_type_check("closure_compile_module") {
   deps = [
     ":async_util",
-    ":closure_compile_externs",
     ":error_util",
     ":file_type",
     ":files_app_entry_types",
@@ -27,24 +27,34 @@
   ]
 }
 
-js_library("closure_compile_externs") {
-  sources = []
-  externs_list = [
-    "../../../externs/background/file_browser_background.js",
-    "../../../externs/background_window.js",
-  ]
+js_library("async_util") {
 }
 
-js_library("async_util") {
+js_library("async_util_unittest") {
+  deps = [
+    ":async_util",
+    ":unittest_util",
+  ]
 }
 
 js_library("error_util") {
 }
 
 js_library("files_app_entry_types") {
+  deps = [
+    "../../../externs:file_manager_private",
+  ]
   externs_list = [ "../../../externs/volume_info.js" ]
 }
 
+js_library("files_app_entry_types_unittest") {
+  deps = [
+    ":files_app_entry_types",
+    ":unittest_util",
+    ":volume_manager_common",
+  ]
+}
+
 js_library("file_type") {
   deps = [
     ":files_app_entry_types",
@@ -52,20 +62,53 @@
   ]
 }
 
+# These importer files actually belong here. Nothing outside the Files app uses
+# them, so restrict visibility. TODO(tapted): Simplify visibility when
+# everything else moves to //ui/file_manager/base.
 js_library("importer_common") {
+  visibility = []
+  visibility = [ "//ui/file_manager/file_manager/*" ]
   deps = [
     ":file_type",
     ":volume_manager_common",
+    "../../../externs:volume_manager",
   ]
   externs_list = [
+    "//third_party/analytics/externs.js",
     "../../../externs/volume_info_list.js",
-    "../../../externs/volume_manager.js",
+    "../../../externs/background_window.js",
+    "../../../externs/background/file_browser_background.js",
+  ]
+}
+
+js_library("test_importer_common") {
+  deps = [
+    ":importer_common",
+    ":unittest_util",
+  ]
+  visibility = []
+  visibility = [ "//ui/file_manager/file_manager/*" ]
+}
+
+js_library("importer_common_unittest") {
+  deps = [
+    ":mock_entry",
+    ":test_importer_common",
+    ":util",
+    "//ui/file_manager/file_manager/background/js:mock_volume_manager",
   ]
 }
 
 js_library("lru_cache") {
 }
 
+js_library("lru_cache_unittest") {
+  deps = [
+    ":lru_cache",
+    "//ui/webui/resources/js:webui_resource_test",
+  ]
+}
+
 js_library("metrics") {
   deps = [
     ":metrics_base",
@@ -122,8 +165,40 @@
   ]
 }
 
+js_library("util_unittest") {
+  deps = [
+    ":mock_entry",
+    ":unittest_util",
+    ":util",
+  ]
+}
+
 js_library("volume_manager_common") {
   deps = [
     "//ui/webui/resources/js:assert",
   ]
 }
+
+js_unit_tests("unit_tests") {
+  deps = [
+    ":async_util_unittest",
+    ":files_app_entry_types_unittest",
+    ":importer_common_unittest",
+    ":lru_cache_unittest",
+    ":util_unittest",
+  ]
+}
+
+js_type_check("test_support_type_check") {
+  deps = [
+    ":test_importer_common",
+  ]
+}
+
+group("closure_compile") {
+  deps = [
+    ":closure_compile_module",
+    ":test_support_type_check",
+    ":unit_tests_type_check",
+  ]
+}
diff --git a/ui/file_manager/file_manager/common/js/async_util_unittest.html b/ui/file_manager/file_manager/common/js/async_util_unittest.html
deleted file mode 100644
index a17eef2..0000000
--- a/ui/file_manager/file_manager/common/js/async_util_unittest.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- Copyright 2014 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.
-  -->
-<script src="async_util.js"></script>
-<script src="unittest_util.js"></script>
-
-<script src="async_util_unittest.js"></script>
diff --git a/ui/file_manager/file_manager/common/js/async_util_unittest.js b/ui/file_manager/file_manager/common/js/async_util_unittest.js
index d0745e2..08edf0c 100644
--- a/ui/file_manager/file_manager/common/js/async_util_unittest.js
+++ b/ui/file_manager/file_manager/common/js/async_util_unittest.js
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 /**
- * @type {string} Result
+ * @type {?string} Result
  */
 var result;
 
diff --git a/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.html b/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.html
deleted file mode 100644
index 88378be..0000000
--- a/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<!-- Copyright 2018 The Chromium Authors. All rights reserved.
-  -- Use of this source code is governed by a BSD-style license that can be
-  -- found in the LICENSE file.
-  -->
-<html>
-  <body>
-  <script src="../../common/js/unittest_util.js"></script>
-
-  <script src="files_app_entry_types.js"></script>
-  <script src="volume_manager_common.js"></script>
-  <script src="files_app_entry_types_unittest.js"></script>
-  </body>
-</html>
diff --git a/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.js b/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.js
index 262fd15..ad138317 100644
--- a/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.js
+++ b/ui/file_manager/file_manager/common/js/files_app_entry_types_unittest.js
@@ -4,9 +4,35 @@
 
 'use strict';
 
+function notreached(error) {
+  assertTrue(false, 'NOTREACHED(): ' + (error.stack || error));
+}
+
+/**
+ * Creates a new volume with a single, mock VolumeEntry.
+ * @param {?VolumeManagerCommon.VolumeType} volumeType
+ * @param {DirectoryEntry=} displayRoot
+ * @param {Object=} additionalProperties
+ * @return {!VolumeEntry}
+ */
+function fakeVolumeEntry(volumeType, displayRoot, additionalProperties) {
+  const kLabel = 'Fake Filesystem';
+  if (displayRoot === undefined)
+    displayRoot = createFakeDisplayRoot();
+  let fakeVolumeInfo = {
+    displayRoot: displayRoot,
+    label: kLabel,
+    volumeType: volumeType
+  };
+  Object.assign(fakeVolumeInfo, additionalProperties || {});
+  // Create the VolumeEntry via casting (duck typing).
+  return new VolumeEntry(/** @type{!VolumeInfo} */ (fakeVolumeInfo));
+}
+
 /**  Test constructor and default public attributes. */
 function testEntryList(testReportCallback) {
-  const entryList = new EntryList('My files', 'my_files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
   assertEquals('My files', entryList.label);
   assertEquals('entry-list://my_files', entryList.toURL());
   assertEquals('my_files', entryList.rootType);
@@ -15,7 +41,8 @@
   assertTrue(entryList.isDirectory);
   assertFalse(entryList.isFile);
 
-  entryList.addEntry(new EntryList('Child Entry', 'child_entry'));
+  entryList.addEntry(
+      new EntryList('Child Entry', VolumeManagerCommon.RootType.MY_FILES));
   assertEquals(1, entryList.children.length);
 
   const reader = entryList.createReader();
@@ -28,11 +55,11 @@
     callCounter++;
     if (readerResult.length > 0) {
       resultCouter++;
-      reader.readEntries(accumulateResults);
+      reader.readEntries(accumulateResults, () => {});
     }
   };
 
-  reader.readEntries(accumulateResults);
+  reader.readEntries(accumulateResults, () => {});
   // readEntries runs asynchronously, so let's wait it to be called.
   reportPromise(
       waitUntil(() => {
@@ -48,29 +75,25 @@
 
 /** Tests method EntryList.getParent. */
 function testEntryListGetParent(testReportCallback) {
-  const entryList = new EntryList('My files', 'my_files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
   let callbackTriggered = false;
   entryList.getParent(parentEntry => {
     // EntryList should return itself since it's a root and that's what the web
     // spec says.
     callbackTriggered = true;
     assertEquals(parentEntry, entryList);
-  });
+  }, notreached /* error */);
   reportPromise(waitUntil(() => callbackTriggered), testReportCallback);
 }
 
 /** Tests method EntryList.addEntry. */
 function testEntryListAddEntry() {
-  const entryList = new EntryList('My files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
   assertEquals(0, entryList.children.length);
 
-  const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-    volumeType: VolumeManagerCommon.VolumeType.DOWNLOADS,
-  };
-  const childEntry = new VolumeEntry(fakeVolumeInfo);
+  const childEntry = fakeVolumeEntry(VolumeManagerCommon.VolumeType.DOWNLOADS);
   entryList.addEntry(childEntry);
   assertEquals(1, entryList.children.length);
   assertEquals(childEntry, entryList.children[0]);
@@ -78,14 +101,10 @@
 
 /** Tests methods to remove entries. */
 function testEntryListRemoveEntry() {
-  const entryList = new EntryList('My files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
 
-  const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-  };
-  const childEntry = new VolumeEntry(fakeVolumeInfo);
+  const childEntry = fakeVolumeEntry(VolumeManagerCommon.VolumeType.DOWNLOADS);
   entryList.addEntry(childEntry);
   assertTrue(entryList.removeEntry(childEntry));
   assertEquals(0, entryList.children.length);
@@ -95,39 +114,27 @@
  * Tests methods findIndexByVolumeInfo, removeByVolumeType, removeByRootType.
  */
 function testEntryFindIndex() {
-  const entryList = new EntryList('My files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
 
-  const fakeRootEntry = createFakeDisplayRoot();
-  const downloadsVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-    volumeType: VolumeManagerCommon.VolumeType.DOWNLOADS,
-  };
-  const downloads = new VolumeEntry(downloadsVolumeInfo);
+  const downloads = fakeVolumeEntry(VolumeManagerCommon.VolumeType.DOWNLOADS);
+  const crostini = fakeVolumeEntry(VolumeManagerCommon.VolumeType.CROSTINI);
 
-  const crostiniRootEntry = createFakeDisplayRoot();
-  const crostiniVolumeInfo = {
-    displayRoot: crostiniRootEntry,
-    label: 'Fake Filesystem',
-    volumeType: VolumeManagerCommon.VolumeType.CROSTINI,
-  };
-  const crostini = new VolumeEntry(crostiniVolumeInfo);
-
-  const fakeEntry = {
+  const fakeEntry = /** @type{!Entry} */ ({
     isDirectory: true,
     rootType: VolumeManagerCommon.RootType.CROSTINI,
     name: 'Linux files',
     toURL: function() {
       return 'fake-entry://linux-files';
     }
-  };
+  });
 
   entryList.addEntry(downloads);
   entryList.addEntry(crostini);
 
   // Test findIndexByVolumeInfo.
-  assertEquals(0, entryList.findIndexByVolumeInfo(downloadsVolumeInfo));
-  assertEquals(1, entryList.findIndexByVolumeInfo(crostiniVolumeInfo));
+  assertEquals(0, entryList.findIndexByVolumeInfo(downloads.volumeInfo));
+  assertEquals(1, entryList.findIndexByVolumeInfo(crostini.volumeInfo));
 
   // Test removeByVolumeType.
   assertTrue(
@@ -145,12 +152,13 @@
 
 /** Tests method EntryList.getMetadata. */
 function testEntryListGetMetadata(testReportCallback) {
-  const entryList = new EntryList('My files');
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
 
   let modificationTime = null;
   entryList.getMetadata(metadata => {
     modificationTime = metadata.modificationTime;
-  });
+  }, notreached /* error */);
 
   // getMetadata runs asynchronously, so let's wait it to be called.
   reportPromise(
@@ -176,10 +184,10 @@
     // merge on testResults.
     readerResult.map(f => testResults.push(f));
     if (readerResult.length > 0)
-      reader.readEntries(accumulateResults);
+      reader.readEntries(accumulateResults, () => {});
   };
 
-  reader.readEntries(accumulateResults);
+  reader.readEntries(accumulateResults, () => {});
   // readEntries runs asynchronously, so let's wait it to be called.
   reportPromise(
       waitUntil(() => {
@@ -226,13 +234,9 @@
  */
 function testVolumeEntry() {
   const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-    volumeType: VolumeManagerCommon.VolumeType.DOWNLOADS,
-  };
+  const volumeEntry =
+      fakeVolumeEntry(VolumeManagerCommon.VolumeType.DOWNLOADS, fakeRootEntry);
 
-  const volumeEntry = new VolumeEntry(fakeVolumeInfo);
   assertEquals(fakeRootEntry, volumeEntry.rootEntry);
   assertEquals(VolumeManagerCommon.VolumeType.DOWNLOADS, volumeEntry.iconName);
   assertEquals('fake-filesystem://', volumeEntry.filesystem);
@@ -251,19 +255,17 @@
 function testVolumeEntryDelayedDisplayRoot(testReportCallback) {
   let callbackTriggered = false;
   const fakeRootEntry = createFakeDisplayRoot();
-  // A VolumeInfo without displayRoot.
-  const fakeVolumeInfo = {
-    displayRoot: null,
-    label: 'Fake Filesystem',
+
+  // Create an entry using a VolumeInfo without displayRoot.
+  const volumeEntry = fakeVolumeEntry(null, null, {
     resolveDisplayRoot: function(successCallback, errorCallback) {
       setTimeout(() => {
         successCallback(fakeRootEntry);
         callbackTriggered = true;
       }, 0);
-    },
-  };
+    }
+  });
 
-  const volumeEntry = new VolumeEntry(fakeVolumeInfo);
   // rootEntry starts as null.
   assertEquals(null, volumeEntry.rootEntry);
   reportPromise(
@@ -275,36 +277,24 @@
 }
 /** Tests VolumeEntry.getParent */
 function testVolumeEntryGetParent(testReportCallback) {
-  const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-  };
-
-  const volumeEntry = new VolumeEntry(fakeVolumeInfo);
+  const volumeEntry = fakeVolumeEntry(null);
   let callbackTriggered = false;
   volumeEntry.getParent(parentEntry => {
     callbackTriggered = true;
     // VolumeEntry should return itself since it's a root and that's what the
     // web spec says.
     assertEquals(parentEntry, volumeEntry);
-  });
+  }, notreached /* error */);
   reportPromise(waitUntil(() => callbackTriggered), testReportCallback);
 }
 
 /**  Tests VolumeEntry.getMetadata */
 function testVolumeEntryGetMetadata(testReportCallback) {
-  const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-  };
-  const volumeEntry = new VolumeEntry(fakeVolumeInfo);
-
+  const volumeEntry = fakeVolumeEntry(null);
   let modificationTime = null;
   volumeEntry.getMetadata(metadata => {
     modificationTime = metadata.modificationTime;
-  });
+  }, notreached /* error */);
 
   // getMetadata runs asynchronously, so let's wait it to be called.
   reportPromise(
@@ -324,13 +314,9 @@
  * Test EntryList.addEntry sets prefix on VolumeEntry.
  */
 function testEntryListAddEntrySetsPrefix() {
-  const fakeRootEntry = createFakeDisplayRoot();
-  const fakeVolumeInfo = {
-    displayRoot: fakeRootEntry,
-    label: 'Fake Filesystem',
-  };
-  const volumeEntry = new VolumeEntry(fakeVolumeInfo);
-  const entryList = new EntryList('My files', 'my_files');
+  const volumeEntry = fakeVolumeEntry(null);
+  const entryList =
+      new EntryList('My files', VolumeManagerCommon.RootType.MY_FILES);
 
   entryList.addEntry(volumeEntry);
   assertEquals(1, entryList.children.length);
@@ -343,9 +329,9 @@
  */
 function testFakeEntry(testReportCallback) {
   let fakeEntry =
-      new FakeEntry('label', VolumeManagerCommon.RootType.CROSTINI, true, null);
+      new FakeEntry('label', VolumeManagerCommon.RootType.CROSTINI, true);
 
-  assertEquals(null, fakeEntry.sourceRestriction);
+  assertEquals(undefined, fakeEntry.sourceRestriction);
   assertEquals('FakeEntry', fakeEntry.type_name);
   assertEquals('label', fakeEntry.label);
   assertEquals('label', fakeEntry.name);
@@ -357,25 +343,28 @@
   assertFalse(fakeEntry.isFile);
 
   // Check the isDirectory and sourceRestriction constructor args.
+  const kSourceRestriction =
+      /** @type{chrome.fileManagerPrivate.SourceRestriction} */ ('fake');
   fakeEntry = new FakeEntry(
       'label', VolumeManagerCommon.RootType.CROSTINI, false,
-      AllowedPaths.NATIVE_PATH);
-  assertEquals(AllowedPaths.NATIVE_PATH, fakeEntry.sourceRestriction);
+      kSourceRestriction);
+  assertEquals(kSourceRestriction, fakeEntry.sourceRestriction);
   assertFalse(fakeEntry.isDirectory);
   assertTrue(fakeEntry.isFile);
 
   let callCounter = 0;
 
   fakeEntry.getMetadata((metadata) => {
-    // Returns empty metadata {}.
+    // Returns empty (but non-null) metadata {}.
+    assert(metadata);
     assertEquals(0, Object.keys(metadata).length);
     callCounter++;
-  });
+  }, notreached /* error */);
   fakeEntry.getParent((parentEntry) => {
     // Should return itself.
     assertEquals(fakeEntry, parentEntry);
     callCounter++;
-  });
+  }, notreached /* error */);
 
   reportPromise(
       waitUntil(() => {
diff --git a/ui/file_manager/file_manager/common/js/importer_common_unittest.html b/ui/file_manager/file_manager/common/js/importer_common_unittest.html
deleted file mode 100644
index a148632a..0000000
--- a/ui/file_manager/file_manager/common/js/importer_common_unittest.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<!-- Copyright 2014 The Chromium Authors. All rights reserved.
-  -- Use of this source code is governed by a BSD-style license that can be
-  -- found in the LICENSE file.
-  -->
-
-<html>
-<body>
-  <script src="../../../../../ui/webui/resources/js/cr.js"></script>
-  <script src="../../../../../ui/webui/resources/js/cr/event_target.js"></script>
-  <script src="../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"></script>
-  <script src="../../../../../ui/webui/resources/js/load_time_data.js"></script>
-  <script src="volume_manager_common.js"></script>
-  <script src="files_app_entry_types.js"></script>
-  <script src="../../common/js/lru_cache.js"></script>
-  <script src="../../background/js/entry_location_impl.js"></script>
-  <script src="../../background/js/metadata_proxy.js"></script>
-  <script src="../../background/js/mock_file_operation_manager.js"></script>
-  <script src="../../background/js/mock_media_scanner.js"></script>
-  <script src="../../background/js/volume_info_impl.js"></script>
-  <script src="../../background/js/volume_info_list_impl.js"></script>
-  <script src="../../background/js/volume_manager_factory.js"></script>
-  <script src="../../background/js/volume_manager_impl.js"></script>
-  <script src="../../background/js/volume_manager_util.js"></script>
-  <script src="../../background/js/mock_volume_manager.js"></script>
-  <script src="unittest_util.js"></script>
-  <script src="test_importer_common.js"></script>
-  <script src="mock_entry.js"></script>
-  <script src="async_util.js"></script>
-  <script src="file_type.js"></script>
-  <script src="util.js"></script>
-  <script src="importer_common.js"></script>
-
-  <script src="importer_common_unittest.js"></script>
-</body>
-</html>
diff --git a/ui/file_manager/file_manager/common/js/importer_common_unittest.js b/ui/file_manager/file_manager/common/js/importer_common_unittest.js
index 7d14b8f..995c5fb 100644
--- a/ui/file_manager/file_manager/common/js/importer_common_unittest.js
+++ b/ui/file_manager/file_manager/common/js/importer_common_unittest.js
@@ -3,28 +3,28 @@
 // found in the LICENSE file.
 
 /** @type {!MockVolumeManager} */
-var volumeManager;
+let volumeManager;
 
 /** @type {!VolumeInfo} */
-var cameraVolume;
+let cameraVolume;
 
 /** @type {!VolumeInfo} */
-var sdVolume;
+let sdVolume;
 
-/** @type {!VolumeInfo} */
-var driveVolume;
+/** @type {VolumeInfo} */
+let driveVolume;
 
 /** @type {!MockFileEntry} */
-var cameraFileEntry;
+let cameraFileEntry;
 
 /** @type {!MockFileEntry} */
-var rawFileEntry;
+let rawFileEntry;
 
 /** @type {!MockFileEntry} */
-var sdFileEntry;
+let sdFileEntry;
 
 /** @type {!MockFileEntry} */
-var driveFileEntry;
+let driveFileEntry;
 
 // Sadly, boilerplate setup necessary to include test support classes.
 loadTimeData.data = {
@@ -204,7 +204,7 @@
             // Verify the *active* log is deleted.
             assertEquals(0, fileName.search(/[0-9]{6}-import-debug-0.log/),
                 'Filename (' + fileName + ') does not match next pattern.');
-            driveFileEntry.assertRemoved();
+            driveFileEntry.asMock().assertRemoved();
 
             return importer.ChromeLocalStorage.getInstance()
                   .get(importer.Setting.LAST_KNOWN_LOG_ID)
@@ -216,10 +216,16 @@
 
 function testRotateLogs_RemembersInitialActiveLog(callback) {
   var nextLogId = 1;
-  var fileFactory = assertFalse;  // Should not be called.
-  var promise = importer.rotateLogs(nextLogId, assertFalse)
-      .then(
-          function() {
+
+  // Should not be called.
+  var fileFactory = (namePromise) => {
+    assertFalse(true);
+    return Promise.resolve();
+  };
+
+  var promise =
+      importer.rotateLogs(nextLogId, fileFactory)
+          .then(function() {
             return importer.ChromeLocalStorage.getInstance()
                   .get(importer.Setting.LAST_KNOWN_LOG_ID)
                   .then(assertEquals.bind(null, nextLogId));
@@ -244,7 +250,7 @@
   // And finally that we can reconstitute the original.
   assertEquals(url, importer.inflateAppUrl(deflated),
       'Deflated then inflated URLs must match original URL.');
-};
+}
 
 function testHasMediaDirectory(callback) {
   var dir = createDirectoryEntry(sdVolume, '/DCIM');
@@ -267,12 +273,11 @@
 }
 
 function createFileEntry(volume, path) {
-  var entry = new MockFileEntry(
-      volume.fileSystem,
-      path, {
-        size: 1234,
-        modificationTime: new Date().toString()
-      });
+  var entry =
+      new MockFileEntry(volume.fileSystem, path, /** @type{Metadata} */ ({
+                          size: 1234,
+                          modificationTime: new Date().toString()
+                        }));
   // Ensure the file entry has a volumeID...necessary for lookups
   // via the VolumeManager.
   entry.volumeId = volume.volumeId;
diff --git a/ui/file_manager/file_manager/common/js/lru_cache_unittest.html b/ui/file_manager/file_manager/common/js/lru_cache_unittest.html
deleted file mode 100644
index 68025e5..0000000
--- a/ui/file_manager/file_manager/common/js/lru_cache_unittest.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<!-- Copyright 2014 The Chromium Authors. All rights reserved.
-  -- Use of this source code is governed by a BSD-style license that can be
-  -- found in the LICENSE file.
-  -->
-
-<html>
-<body>
-  <script src="lru_cache.js"></script>
-  <script src="lru_cache_unittest.js"></script>
-</body>
-</html>
diff --git a/ui/file_manager/file_manager/common/js/mock_entry.js b/ui/file_manager/file_manager/common/js/mock_entry.js
index 1991c8e..f9e6dd42 100644
--- a/ui/file_manager/file_manager/common/js/mock_entry.js
+++ b/ui/file_manager/file_manager/common/js/mock_entry.js
@@ -282,6 +282,15 @@
 };
 
 /**
+ * Helper to expose methods mixed in via MockEntry to the type checker.
+ *
+ * @return {!MockEntry}
+ */
+MockFileEntry.prototype.asMock = function() {
+  return /** @type{!MockEntry} */ (/** @type(*) */ (this));
+};
+
+/**
  * Mock class for DirectoryEntry.
  *
  * @param {FileSystem} filesystem File system where the entry is localed.
diff --git a/ui/file_manager/file_manager/common/js/test_importer_common.js b/ui/file_manager/file_manager/common/js/test_importer_common.js
index 653f536..d4909b90 100644
--- a/ui/file_manager/file_manager/common/js/test_importer_common.js
+++ b/ui/file_manager/file_manager/common/js/test_importer_common.js
@@ -9,6 +9,7 @@
  * Sets up a logger for use in unit tests.  The test logger doesn't attempt to
  * access chrome's sync file system.  Call this during setUp.
  * @return {!importer.TestLogger}
+ * @suppress{accessControls} For testing.
  */
 importer.setupTestLogger = function() {
   var logger = new importer.TestLogger();
diff --git a/ui/file_manager/file_manager/common/js/unittest_util.js b/ui/file_manager/file_manager/common/js/unittest_util.js
index cf7b20b..413a05b0 100644
--- a/ui/file_manager/file_manager/common/js/unittest_util.js
+++ b/ui/file_manager/file_manager/common/js/unittest_util.js
@@ -101,11 +101,11 @@
   this.calls_ = [];
 
   /**
-   * The recording funciton. Bound in our constructor to ensure we always
+   * The recording function. Bound in our constructor to ensure we always
    * return the same object. This is necessary as some clients may make use
    * of object equality.
    *
-   * @type {function()}
+   * @type {function(*)}
    */
   this.callback = this.recordArguments_.bind(this);
 }
diff --git a/ui/file_manager/file_manager/common/js/util_unittest.html b/ui/file_manager/file_manager/common/js/util_unittest.html
deleted file mode 100644
index f6d70af..0000000
--- a/ui/file_manager/file_manager/common/js/util_unittest.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<!DOCTYPE html>
-<!-- Copyright 2018 The Chromium Authors. All rights reserved.
-  -- Use of this source code is governed by a BSD-style license that can be
-  -- found in the LICENSE file.
-  -->
-
-<html>
-<body>
-  <script src="mock_entry.js"></script>
-  <script src="util.js"></script>
-  <script src="util_unittest.js"></script>
-</body>
-</html>
diff --git a/ui/file_manager/file_manager/foreground/js/directory_contents.js b/ui/file_manager/file_manager/foreground/js/directory_contents.js
index d04448f..0406d6f 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_contents.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_contents.js
@@ -514,11 +514,14 @@
     this.addFilter('android_hidden', entry => {
       if (entry.filesystem && entry.filesystem.name !== 'android_files')
         return true;
-      // If |entry| is an Android top-level folder which is not whitelisted, it
-      // should be hidden.
-      if (entry.fullPath && entry.fullPath.substr(1) == entry.name &&
-          FileFilter.DEFAULT_ANDROID_FOLDERS.indexOf(entry.name) == -1) {
-        return false;
+      // If |entry| is an Android top-level folder which is not whitelisted or
+      // its sub folder, it should be hidden.
+      if (entry.fullPath) {
+        const components = entry.fullPath.split('/');
+        if (components[1] &&
+            FileFilter.DEFAULT_ANDROID_FOLDERS.indexOf(components[1]) == -1) {
+          return false;
+        }
       }
       return true;
     });
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.js b/ui/file_manager/file_manager/foreground/js/directory_model.js
index 86b880c..1e66082 100644
--- a/ui/file_manager/file_manager/foreground/js/directory_model.js
+++ b/ui/file_manager/file_manager/foreground/js/directory_model.js
@@ -315,7 +315,21 @@
  * @private
  */
 DirectoryModel.prototype.onFilterChanged_ = function() {
-  this.rescanSoon(false);
+  const currentDirectory = this.getCurrentDirEntry();
+  if (currentDirectory && util.isNativeEntry(currentDirectory) &&
+      !this.fileFilter_.filter(
+          /** @type {!DirectoryEntry} */ (currentDirectory))) {
+    // If the current directory should be hidden in the new filter setting,
+    // change the current directory to the current volume's root.
+    const volumeInfo = this.volumeManager_.getVolumeInfo(currentDirectory);
+    if (volumeInfo) {
+      volumeInfo.resolveDisplayRoot().then(displayRoot => {
+        this.changeDirectoryEntry(displayRoot);
+      });
+    }
+  } else {
+    this.rescanSoon(false);
+  }
 };
 
 /**
@@ -1064,7 +1078,7 @@
 /**
  * Activates the given directory.
  * This method:
- *  - Changes the current directory, if the given directory is the current
+ *  - Changes the current directory, if the given directory is not the current
  *    directory.
  *  - Clears the selection, if the given directory is the current directory.
  *
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn
index f686653..a698efc5 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn
+++ b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn
@@ -148,10 +148,7 @@
     ":metadata_provider",
     ":multi_metadata_provider",
     "../../../common/js:util",
-  ]
-  externs_list = [
-    "../../../../externs/volume_info_list.js",
-    "../../../../externs/volume_manager.js",
+    "//ui/file_manager/externs:volume_manager",
   ]
 }
 
@@ -190,8 +187,8 @@
     ":external_metadata_provider",
     ":file_system_metadata_provider",
     ":metadata_provider",
+    "//ui/file_manager/externs:volume_manager",
   ]
-  externs_list = [ "../../../../externs/volume_manager.js" ]
 }
 
 js_library("thumbnail_model") {
diff --git a/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn b/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn
index d66b4acb..3462ef36 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn
+++ b/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn
@@ -59,7 +59,6 @@
     "../../../../externs/css_rule.js",
     "../../../../externs/drag_target.js",
     "../../../../externs/entries_changed_event.js",
-    "../../../../externs/entry_location.js",
     "../../../../externs/gallery_foreground.js",
     "../../../../externs/menu_item_update_event.js",
     "../../../../externs/paper_elements.js",
@@ -308,8 +307,8 @@
     "../../../common/js:metrics",
     "../../../common/js:util",
     "../../../common/js:volume_manager_common",
+    "//ui/file_manager/externs:volume_manager",
   ]
-  externs_list = [ "../../../../externs/volume_manager.js" ]
 }
 
 js_library("multi_profile_share_dialog") {
diff --git a/ui/file_manager/gallery/js/BUILD.gn b/ui/file_manager/gallery/js/BUILD.gn
index c9f8ed7..17e71d7 100644
--- a/ui/file_manager/gallery/js/BUILD.gn
+++ b/ui/file_manager/gallery/js/BUILD.gn
@@ -135,10 +135,7 @@
     "../../file_manager/common/js:file_type",
     "../../file_manager/common/js:util",
     "../../file_manager/common/js:volume_manager_common",
-  ]
-  externs_list = [
-    "../../externs/volume_manager.js",
-    "../../externs/volume_info_list.js",
+    "//ui/file_manager/externs:volume_manager",
   ]
 }
 
diff --git a/ui/file_manager/integration_tests/file_manager/gear_menu.js b/ui/file_manager/integration_tests/file_manager/gear_menu.js
index ab345b6..5c2e3c9f 100644
--- a/ui/file_manager/integration_tests/file_manager/gear_menu.js
+++ b/ui/file_manager/integration_tests/file_manager/gear_menu.js
@@ -448,6 +448,123 @@
 };
 
 /**
+ * Tests that the current directory is changed to "Play files" after the
+ * current directory is hidden by toggle-hidden-android-folders option.
+ */
+testcase.hideCurrentDirectoryByTogglingHiddenAndroidFolders = function() {
+  let appId;
+  const MENU_ITEM_SELECTOR = '#gear-menu-toggle-hidden-android-folders';
+  const steps = [
+    function() {
+      openNewWindow(null, RootPath.ANDROID_FILES).then(this.next);
+    },
+    function(inAppId) {
+      appId = inAppId;
+      addEntries(
+          ['android_files'], BASIC_ANDROID_ENTRY_SET_WITH_HIDDEN, this.next);
+    },
+    // Wait for the file list to appear.
+    function(result) {
+      chrome.test.assertTrue(result);
+      remoteCall.waitForElement(appId, '#file-list').then(this.next);
+    },
+    // Wait for the gear menu button to appear.
+    function() {
+      remoteCall.waitForElement(appId, '#gear-button:not([hidden])')
+          .then(this.next);
+    },
+    // Open the gear menu by clicking the gear button.
+    function() {
+      remoteCall.callRemoteTestUtil(
+          'fakeMouseClick', appId, ['#gear-button'], this.next);
+    },
+    // Wait for menu to not be hidden.
+    function(result) {
+      chrome.test.assertTrue(result);
+      remoteCall.waitForElement(appId, '#gear-menu:not([hidden])')
+          .then(this.next);
+    },
+    // Wait for menu item to appear.
+    function() {
+      remoteCall
+          .waitForElement(
+              appId, MENU_ITEM_SELECTOR + ':not([disabled]):not([checked])')
+          .then(this.next);
+    },
+    // Click the menu item.
+    function() {
+      remoteCall.callRemoteTestUtil(
+          'fakeMouseClick', appId, [MENU_ITEM_SELECTOR], this.next);
+    },
+    // Wait for item to be checked.
+    function(result) {
+      chrome.test.assertTrue(result);
+      remoteCall.waitForElement(appId, MENU_ITEM_SELECTOR + '[checked]')
+          .then(this.next);
+    },
+    // Check the hidden files are displayed.
+    function() {
+      remoteCall
+          .waitForFiles(
+              appId,
+              TestEntryInfo.getExpectedRows(
+                  BASIC_ANDROID_ENTRY_SET_WITH_HIDDEN),
+              {ignoreFileSize: true, ignoreLastModifiedTime: true})
+          .then(this.next);
+    },
+    // Navigate to "/My files/Play files/A".
+    function() {
+      remoteCall
+          .navigateWithDirectoryTree(
+              appId, '/A', 'My files/Play files', 'android_files')
+          .then(this.next);
+    },
+    // Wait until current directory is changed to "/My files/Play files/A".
+    function() {
+      remoteCall
+          .waitUntilCurrentDirectoryIsChanged(appId, '/My files/Play files/A')
+          .then(this.next);
+    },
+    // Open the gear menu by clicking the gear button.
+    function() {
+      remoteCall.callRemoteTestUtil(
+          'fakeMouseClick', appId, ['#gear-button'], this.next);
+    },
+    // Wait for menu to not be hidden.
+    function(result) {
+      chrome.test.assertTrue(result);
+      remoteCall.waitForElement(appId, '#gear-menu:not([hidden])')
+          .then(this.next);
+    },
+    // Wait for menu item to appear.
+    function() {
+      remoteCall
+          .waitForElement(
+              appId, MENU_ITEM_SELECTOR + '[checked]:not([disabled])')
+          .then(this.next);
+    },
+    // Click the menu item.
+    function() {
+      remoteCall.callRemoteTestUtil(
+          'fakeMouseClick', appId, [MENU_ITEM_SELECTOR], this.next);
+    },
+    // Wait until the current directory is changed from
+    // "/My files/Play files/A" to "/My files/Play files" since
+    // "/My files/Play files/A" is invisible now.
+    function(result) {
+      chrome.test.assertTrue(result);
+      remoteCall
+          .waitUntilCurrentDirectoryIsChanged(appId, '/My files/Play files')
+          .then(this.next);
+    },
+    function() {
+      checkIfNoErrorsOccured(this.next);
+    },
+  ];
+  StepsRunner.run(steps);
+};
+
+/**
  * Tests the paste-into-current-folder menu item.
  */
 testcase.showPasteIntoCurrentFolder = function() {
diff --git a/ui/file_manager/integration_tests/file_manager/quick_view.js b/ui/file_manager/integration_tests/file_manager/quick_view.js
index 34a66b2..24ca503 100644
--- a/ui/file_manager/integration_tests/file_manager/quick_view.js
+++ b/ui/file_manager/integration_tests/file_manager/quick_view.js
@@ -550,3 +550,127 @@
     },
   ]);
 };
+
+/**
+ * Tests opening Quick View containing an image.
+ */
+testcase.openQuickViewImage = function() {
+  const caller = getCaller();
+  let appId;
+
+  /**
+   * The <webview> resides in the <files-safe-media type="image"> shadow DOM,
+   * which is a child of the #quick-view shadow DOM.
+   */
+  const webView = ['#quick-view', 'files-safe-media[type="image"]', 'webview'];
+
+  StepsRunner.run([
+    // Open Files app on Downloads containing ENTRIES.smallJpeg.
+    function() {
+      setupAndWaitUntilReady(
+          null, RootPath.DOWNLOADS, this.next, [ENTRIES.smallJpeg], []);
+    },
+    // Open the file in Quick View.
+    function(results) {
+      appId = results.windowId;
+      const openSteps = openQuickViewSteps(appId, ENTRIES.smallJpeg.nameText);
+      StepsRunner.run(openSteps).then(this.next);
+    },
+    // Wait for the Quick View <webview> to load and display its content.
+    function() {
+      function checkWebViewImageLoaded(elements) {
+        let haveElements = Array.isArray(elements) && elements.length === 1;
+        if (haveElements)
+          haveElements = elements[0].styles.display.includes('block');
+        if (!haveElements || elements[0].attributes.loaded !== '')
+          return pending(caller, 'Waiting for <webview> to load.');
+        return;
+      }
+      repeatUntil(function() {
+        return remoteCall
+            .callRemoteTestUtil(
+                'deepQueryAllElements', appId, [webView, ['display']])
+            .then(checkWebViewImageLoaded);
+      }).then(this.next);
+    },
+    // Get the <webview> document.body backgroundColor style.
+    function() {
+      const getBackgroundStyle =
+          'window.getComputedStyle(document.body).backgroundColor';
+      remoteCall
+        .callRemoteTestUtil(
+            'deepExecuteScriptInWebView', appId, [webView, getBackgroundStyle])
+        .then(this.next);
+    },
+    // Check: the <webview> body backgroundColor should be transparent black.
+    function(backgroundColor) {
+      chrome.test.assertEq('rgba(0, 0, 0, 0)', backgroundColor[0]);
+      this.next();
+    },
+    function() {
+      checkIfNoErrorsOccured(this.next);
+    },
+  ]);
+};
+
+/**
+ * Tests opening Quick View containing a video.
+ */
+testcase.openQuickViewVideo = function() {
+  const caller = getCaller();
+  let appId;
+
+  /**
+   * The <webview> resides in the <files-safe-media type="video"> shadow DOM,
+   * which is a child of the #quick-view shadow DOM.
+   */
+  const webView = ['#quick-view', 'files-safe-media[type="video"]', 'webview'];
+
+  StepsRunner.run([
+    // Open Files app on Downloads containing ENTRIES.world video.
+    function() {
+      setupAndWaitUntilReady(
+          null, RootPath.DOWNLOADS, this.next, [ENTRIES.world], []);
+    },
+    // Open the file in Quick View.
+    function(results) {
+      appId = results.windowId;
+      const openSteps = openQuickViewSteps(appId, ENTRIES.world.nameText);
+      StepsRunner.run(openSteps).then(this.next);
+    },
+    // Wait for the Quick View <webview> to load and display its content.
+    function() {
+     function checkWebViewVideoLoaded(elements) {
+        let haveElements = Array.isArray(elements) && elements.length === 1;
+        if (haveElements)
+          haveElements = elements[0].styles.display.includes('block');
+        if (!haveElements || elements[0].attributes.loaded !== '')
+          return pending(caller, 'Waiting for <webview> to load.');
+        return;
+      }
+      repeatUntil(function() {
+        return remoteCall
+            .callRemoteTestUtil(
+                'deepQueryAllElements', appId, [webView, ['display']])
+            .then(checkWebViewVideoLoaded);
+      }).then(this.next);
+    },
+    // Get the <webview> document.body backgroundColor style.
+    function() {
+      const getBackgroundStyle =
+          'window.getComputedStyle(document.body).backgroundColor';
+      remoteCall
+        .callRemoteTestUtil(
+            'deepExecuteScriptInWebView', appId, [webView, getBackgroundStyle])
+        .then(this.next);
+    },
+    // Check: the <webview> body backgroundColor should be transparent black.
+    function(backgroundColor) {
+      chrome.test.assertEq('rgba(0, 0, 0, 0)', backgroundColor[0]);
+      this.next();
+    },
+    function() {
+      checkIfNoErrorsOccured(this.next);
+    },
+  ]);
+};
diff --git a/ui/file_manager/integration_tests/test_util.js b/ui/file_manager/integration_tests/test_util.js
index c9875f7..404376e 100644
--- a/ui/file_manager/integration_tests/test_util.js
+++ b/ui/file_manager/integration_tests/test_util.js
@@ -458,6 +458,17 @@
     typeText: 'JPEG image'
   }),
 
+  smallJpeg: new TestEntryInfo({
+    type: EntryType.FILE,
+    sourceFileName: 'small.jpg',
+    targetPath: 'small.jpg',
+    mimeType: 'image/jpeg',
+    lastModifiedTime: 'Jan 18, 2038, 1:02 AM',
+    nameText: 'small.jpg',
+    sizeText: '1 KB',
+    typeText: 'JPEG image'
+  }),
+
   // An ogg file without a mime type, to confirm that file type detection using
   // file extensions works fine.
   beautiful: new TestEntryInfo({
@@ -533,6 +544,17 @@
     typeText: 'HTML document',
   }),
 
+  tallPdf: new TestEntryInfo({
+    type: EntryType.FILE,
+    sourceFileName: 'tall.pdf',
+    targetPath: 'tall.pdf',
+    mimeType: 'application/pdf',
+    lastModifiedTime: 'Sep 4, 1998, 12:34 PM',
+    nameText: 'tall.pdf',
+    sizeText: '15 KB',
+    typeText: 'PDF document',
+  }),
+
   pinned: new TestEntryInfo({
     type: EntryType.FILE,
     sourceFileName: 'text.txt',
diff --git a/ui/file_manager/video_player/js/BUILD.gn b/ui/file_manager/video_player/js/BUILD.gn
index 1ac9457..e00d4b6fb 100644
--- a/ui/file_manager/video_player/js/BUILD.gn
+++ b/ui/file_manager/video_player/js/BUILD.gn
@@ -23,7 +23,6 @@
     "$externs_path/media_player_private.js",
     "$externs_path/metrics_private.js",
     "../../externs/chrome_cast.js",
-    "../../externs/entry_location.js",
     "../../externs/platform.js",
     "//third_party/analytics/externs.js",
   ]
diff --git a/ui/file_manager/video_player/js/cast/BUILD.gn b/ui/file_manager/video_player/js/cast/BUILD.gn
index aaa6a83..60713864 100644
--- a/ui/file_manager/video_player/js/cast/BUILD.gn
+++ b/ui/file_manager/video_player/js/cast/BUILD.gn
@@ -23,11 +23,7 @@
     "../../../externs/app_window_common.js",
     "../../../externs/background/volume_manager_factory.js",
     "../../../externs/chrome_cast.js",
-    "../../../externs/entry_location.js",
     "../../../externs/platform.js",
-    "../../../externs/volume_info.js",
-    "../../../externs/volume_info_list.js",
-    "../../../externs/volume_manager.js",
     "//third_party/analytics/externs.js",
   ]
 }
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index 3ddd01d0..c75cf9db 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -292,7 +292,8 @@
 void KeyboardController::NotifyKeyboardBoundsChanging(
     const gfx::Rect& new_bounds) {
   visual_bounds_in_screen_ = new_bounds;
-  if (ui_->HasKeyboardWindow() && ui_->GetKeyboardWindow()->IsVisible()) {
+  aura::Window* window = GetKeyboardWindow();
+  if (window && window->IsVisible()) {
     const gfx::Rect occluded_bounds_in_screen = GetWorkspaceOccludedBounds();
     notification_manager_.SendNotifications(
         container_behavior_->OccludedBoundsAffectWorkspaceLayout(), new_bounds,
@@ -343,12 +344,13 @@
 }
 
 void KeyboardController::Reload() {
-  if (ui_->HasKeyboardWindow()) {
-    // A reload should never try to show virtual keyboard. If keyboard is not
-    // visible before reload, it should stay invisible after reload.
-    show_on_keyboard_window_load_ = false;
-    ui_->ReloadKeyboardIfNeeded();
-  }
+  if (!GetKeyboardWindow())
+    return;
+
+  // A reload should never try to show virtual keyboard. If keyboard is not
+  // visible before reload, it should stay invisible after reload.
+  show_on_keyboard_window_load_ = false;
+  ui_->ReloadKeyboardIfNeeded();
 }
 
 void KeyboardController::AddObserver(KeyboardControllerObserver* observer) {
@@ -705,13 +707,15 @@
 
   if (parent_container_->children().empty()) {
     DCHECK_EQ(state_, KeyboardControllerState::INITIAL);
+    // TODO(https://crbug.com/845780): This call will create and load the
+    // virtual keyboard window. Redesign the KeyboardUI interface so that
+    // loading is explicit.
     aura::Window* keyboard_window = ui_->GetKeyboardWindow();
     keyboard_window->AddPreTargetHandler(&event_filter_);
     keyboard_window->AddObserver(this);
     parent_container_->AddChild(keyboard_window);
   }
 
-  DCHECK(ui_->HasKeyboardWindow());
   if (layout_delegate_ != nullptr) {
     if (display.is_valid())
       layout_delegate_->MoveKeyboardToDisplay(display);
@@ -719,7 +723,8 @@
       layout_delegate_->MoveKeyboardToTouchableDisplay();
   }
 
-  aura::Window* keyboard_window = ui_->GetKeyboardWindow();
+  aura::Window* keyboard_window = GetKeyboardWindow();
+  DCHECK(keyboard_window);
   DCHECK_EQ(parent_container_, keyboard_window->parent());
 
   switch (state_) {
@@ -738,7 +743,7 @@
 
   switch (state_) {
     case KeyboardControllerState::INITIAL:
-      DCHECK_EQ(ui_->GetKeyboardWindow()->bounds().height(), 0);
+      DCHECK_EQ(keyboard_window->bounds().height(), 0);
       show_on_keyboard_window_load_ = show_keyboard;
       ChangeState(KeyboardControllerState::LOADING_EXTENSION);
       return;
diff --git a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
index 4697944e..ebf0ad52 100644
--- a/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
+++ b/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.js
@@ -52,6 +52,15 @@
     },
 
     /**
+     * True if the dialog should consume 'keydown' events. If ignoreEnterKey
+     * is true, 'Enter' key won't be consumed.
+     */
+    consumeKeydownEvent: {
+      type: Boolean,
+      value: false,
+    },
+
+    /**
      * True if the dialog should not be able to be cancelled, which will prevent
      * 'Escape' key presses from closing the dialog.
      */
@@ -77,6 +86,9 @@
   /** @private {?MutationObserver} */
   mutationObserver_: null,
 
+  /** @private {?Function} */
+  boundKeydown_: null,
+
   /** @override */
   ready: function() {
     // If the active history entry changes (i.e. user clicks back button),
@@ -93,10 +105,13 @@
   /** @override */
   attached: function() {
     var mutationObserverCallback = function() {
-      if (this.$.dialog.open)
+      if (this.$.dialog.open) {
         this.addIntersectionObserver_();
-      else
+        this.addKeydownListener_();
+      } else {
         this.removeIntersectionObserver_();
+        this.removeKeydownListener_();
+      }
     }.bind(this);
 
     this.mutationObserver_ = new MutationObserver(mutationObserverCallback);
@@ -113,6 +128,7 @@
   /** @override */
   detached: function() {
     this.removeIntersectionObserver_();
+    this.removeKeydownListener_();
     if (this.mutationObserver_) {
       this.mutationObserver_.disconnect();
       this.mutationObserver_ = null;
@@ -163,6 +179,31 @@
     }
   },
 
+  /** @private */
+  addKeydownListener_: function() {
+    if (!this.consumeKeydownEvent)
+      return;
+
+    this.boundKeydown_ = this.boundKeydown_ || this.onKeydown_.bind(this);
+
+    this.addEventListener('keydown', this.boundKeydown_);
+
+    // Sometimes <body> is key event's target and in that case the event
+    // will bypass cr-dialog. We should consume those events too in order to
+    // behave modally. This prevents accidentally triggering keyboard commands.
+    document.body.addEventListener('keydown', this.boundKeydown_);
+  },
+
+  /** @private */
+  removeKeydownListener_: function() {
+    if (!this.boundKeydown_)
+      return;
+
+    this.removeEventListener('keydown', this.boundKeydown_);
+    document.body.removeEventListener('keydown', this.boundKeydown_);
+    this.boundKeydown_ = null;
+  },
+
   showModal: function() {
     this.$.dialog.showModal();
     assert(this.$.dialog.open);
@@ -269,6 +310,23 @@
     }
   },
 
+  /**
+   * @param {!Event} e
+   * @private
+   */
+  onKeydown_: function(e) {
+    assert(this.consumeKeydownEvent);
+
+    if (!this.getNative().open)
+      return;
+
+    if (this.ignoreEnterKey && e.key == 'Enter')
+      return;
+
+    // Stop propagation to behave modally.
+    e.stopPropagation();
+  },
+
   /** @param {!PointerEvent} e */
   onPointerdown_: function(e) {
     // Only show pulse animation if user left-clicked outside of the dialog